robot

Dependencies:   FastPWM3 mbed

Changes

RevisionDateWhoCommit message
252:38644631ed97 2018-11-13 bwang 11/13/2018 12:45 - hitting <return> on empty line prints "\r>", so that hitting enter after intially connecting to the controller generates a prompt default tip
251:4ba2f238066f 2018-11-13 bwang 11/13/2018 12:36 - bugfix to processCmd(), hitting <return> on an empty line in terminal no longer prints 'Bad Command'
250:ef028cbd0749 2018-11-13 bwang 11/13/2018 12:26 - bugfix to rxCallback()
249:314c1b12d9c2 2018-11-13 bwang 11/13/2018 12:33 - changes to rxCallback() - fast commands no longer print "\r>" after completion; non-ASCII chars are no longer echoed
248:c4539ee69052 2018-11-13 bwang 11/13/2018 11:20 - added COMMANDS.txt, added bounds check in OP_TORQUE
247:da647f7185b7 2018-11-13 bwang 11/13/2017 11:04 - added fast commands (which have command and data > 127 and aren't issuable from a terminal)
246:167b5d50d0f2 2018-11-13 bwang 11/13/2018 10:05 - added io.cmd_busy flag to block execution of processCmd() during execution of processCmd()
245:d97d09df3629 2018-11-12 bwang 11/12/2018 07:42 - PWM configured to be non-inverting in BREMSConfigRegisters, moved inverting code to hardware.h like it should be
244:1c6c0af8508e 2018-11-12 bwang 11/12/2018 07:33 - revert to old inverting, falling-edge-aligned code, since the Prius module is inverting
243:96b03b3bf3ef 2018-11-12 bwang 11/12/2018 06:16 - added W_LOOP_MAX_TQ parameter to limit acceleration in speed mode (actually, to make bench supplies not freak out when the motor ramps)
242:ac30f04fd6f7 2018-11-12 bwang 11/12/2018 05:56 - added check for user_cmd < 0 in OP_DRIVING in cmd_setp - this disables motor if the user enters a cmd < 0, without screwing with error logic.
241:eec17042a009 2018-11-11 bwang 11/10/2018 10:09 - cosmetic typo in errors.cpp
240:2aaffa217627 2018-11-11 bwang added speed mode (untested), other changes - see CHANGELOG
239:09cd19ce7048 2018-11-10 bwang 11/10/2018 06:59 - changed the sign of the offset returned by calibrate_position(), since the signs of the PWM's have changed
238:cf54cb197c8f 2018-11-10 bwang 11/10/2018 06:20 - added cmd_clear() before startup message in BREMSInit()
237:1a4591a0dd2d 2018-11-10 bwang 11/10/2018 06:18 - made PWM's non-inverting, swapped pins to match
236:29ee9e1ccf61 2018-11-10 bwang 11/10/2018 05:01 - bugfix to cmd_setp()
235:fe49ec4e9c97 2018-11-10 bwang 11/10/2018 04:36 - bugfix to cmd_setp(), is_driving() now checks user_cmd and not torque_percent (i.e. if the pedal is down, the car is 'driving' regardless of the throttle map)
234:ad68d7f8eff1 2018-11-10 bwang 11/10/2018 04:21 - cmd_setp() sets setpoint to zero if there are errors present (to avoid sudden start of motor if errors are cleared)
233:2ca26ab47b4f 2018-11-10 bwang 11/10/2018 04:14 - 'some modes override FOC outputs' removed from commutate(), as it is no longer needed (ZERO, CHR have their own routines, CFG disables output anyway)
232:47f6cf4f9126 2018-11-10 bwang 11/10/2018 03:36 - restructured code to allow for proper encoder zeroing - MODE_ZERO and MODE_CHR execute run-once functions when they are entered, then drop to MODE_CFG
231:753ec371b153 2018-11-10 bwang 11/10/2018 01:50 - swapped ia and ib (back to what they were before 11/10/2018)
230:7ac00598d366 2018-11-10 bwang 11/10/2018 01:32 - new pin mapping for new hardware
229:90c6892f4d3b 2018-11-10 bwang 11/10/2018 01:26 - renamed ia_supp_offset, ib_supp_offset to ad1, ad2_supp_offset to reflect the fact that they correspond to ADC channel offsets and not currents (which can be renamed in elsewhere)
228:8a14f1da2121 2018-11-10 bwang temp commit, it works on new hardware
227:e058e025c72d 2018-11-10 bwang 11/10/2018 00:50 - moved RESOLVER_RESET pin to PC_0 to match new hardware
226:0e3fbbfea464 2018-10-29 bwang 10/28/2018 21:27 - added some explanatory comments to BREMSConfigRegisters
225:81b72a4bf18b 2018-10-27 bwang 10/27/2018 19:12 - moved encoder object to use PA_1 and PA_15; removed some spurious analog registers in BREMSConfigRegisters which are no longer being used
224:90172915d0fb 2018-10-17 bwang 10/16/2018 22:59 - renamed CircularBuffer to fCircularBuffer to avoid conflict with new mbed libs
223:b986e7cee521 2018-10-02 bwang 10/02/2018 03:10 - added overly-complicated LedBlinker class for blinking status codes over an LED, added blinker object to IOStruct, STATUS_LED to hardware.h
222:b58a95551632 2018-10-02 bwang 10/02/2018 02:21 - processCmd() now uses else-if statements, prints message if command is invalid
221:1e607c8d7d76 2018-10-02 bwang 10/02/2018 02:15 - PwmIn::get_throttle() returns 0, not -1, if throttle is disabled.
220:ff69c230aa6d 2018-06-26 bwang 06/26/2018 15:57 - added induction machine CurrentModel, which is probably wrong
219:1cfd651eb2b2 2018-06-26 bwang 06/26/2018 15:47 - GetUnlimitedElecPosition() is now a private member of PositionSensorEncoder class (it is only used to compute mechanical position)
218:13981deba5a8 2018-05-30 bwang updated CHANGELOG.txt with info regarding resolver decoder
217:1171ed0f6145 2018-04-30 bwang added additional 50 ms delay before resetting resolver decoder to allow voltages to stabilize
216:198ebadc005c 2018-04-30 bwang added RESOLVER_RESET pin, firmware now resets resolver decode IC on boot
215:7aa534d8ec4e 2018-04-30 bwang MODE_ZERO requires at least 0.5 user_cmd to enable
214:c70a6e86417f 2018-04-29 bwang added bounds check in rxCallback()
213:2218bab57355 2018-04-29 bwang last 3 commits had a DirectMapper in main instead of a LutMapper
212:1e370ffcb73d 2018-04-29 bwang backspace (ASCII 0x08, PuTTY Shift+Backspace) also deletes the previous char in the terminal
211:3193c31cb1b7 2018-04-28 bwang added vd, vq parameters in cmd_query, changed order of strcmps in cmd_query() to speed up typical use
210:f9b722cf8a2c 2018-04-28 bwang if flash is not programmed, op = OP_TORQUE, src = CMD_SRC_TERMINAL (previously both were invalid)
209:befed15596a7 2018-02-20 bwang 02/20/2018 00:54 - moved modes.cpp to correct location
208:3f3fe99c73ad 2018-02-14 bwang typo fix
207:56ab30e84525 2018-02-14 bwang 02/13/2018 23:15 - cmd_flush() now works in all modes (otherwise the controller would only ever boot up in MODE_CFG)
206:5c848ea69028 2018-02-14 bwang 02/13/2017 20:33 - set serial RX interrupt to be lower priority than commutation interrupt
205:5cfe6d7e08a3 2018-02-12 bwang 02/11/2018 21:21 - cmd_exit() checks that motor is not running
204:74714d52a936 2018-02-12 bwang 02/11/2018 21:11 - further improvements to mode handling, output overrides and output disabling now live in their own functions
203:cb2a3ea31dce 2018-02-12 bwang temp commit
202:1baff0df86d1 2018-02-12 bwang 02/11/2017 20:13 - scrambled the mode and error handling code in commutate() to be cleaner
201:5d1a3aa50fe0 2018-02-12 bwang temp commit
200:4999d5e6c63d 2018-02-11 bwang 02/11/2017 03:16 - blocked switching modes when motor is running
199:c160a2c03781 2018-02-11 bwang 02/11/2017 02:54 - long commands can no longer be executed while control.enabled == true, invalid BREMS_src now sets control.user_cmd to 0
198:7ee146427a0d 2018-02-11 bwang 02/11/2018 02:11 - added BREMS_mode. most modes are stubs right now (BREMS_CFG does a rudimentary encoder zero-ing, BREMS_CFG disables outputs)
197:68fd01b73537 2018-02-10 bwang 02/10/2018 17:00 - fixed a bug in BREMSConfig where the delay was in the wrong spot
196:7172e6e28867 2018-02-10 bwang 02/10/2017 01:35 - can now switch command source to terminal, added 'clear' command (which clears the screen on POSIX-compliant terminals)
195:b61a734eb50c 2018-02-10 bwang formatting fix
194:05e119bc5a78 2018-02-10 bwang 02/10/2018 01:05 - everything configured through flash variables, started adding support for operating modes
193:3abadeecf908 2018-02-10 bwang 02/10/2018 00:35 - added fancy masked error system