Commit Graph
147 Commits
Author SHA1 Message Date
Samuel Sadok 2e0926e562 fix analog thread stack overflow 2021-09-03 18:30:08 +02:00
Oskar Weigl 26cd9ecbe9 run encoder.apply_config on successful dir_find 2021-04-13 23:29:45 -04:00
Samuel Sadok d328a74c17 Merge branch 'devel' into libfibre 2021-01-08 11:54:16 +01:00
Samuel Sadok 74badd955c Merge branch 'devel' into can-refactor 2020-12-08 00:06:08 +01:00
Samuel Sadok 049ac24218 Reboot on save_configuration()
See in-code comment for details.
2020-12-07 11:54:18 +01:00
Samuel Sadok 21e19b9c18 Merge branch 'devel' into libfibre 2020-12-03 21:20:30 +01:00
Samuel Sadok 187b83de7f fix volatility of can config 2020-12-03 19:01:45 +01:00
Samuel Sadok 4e350823b4 refactor CAN 2020-12-03 12:53:54 +01:00
Matt Quick 520783d4b6 Refactor CAN interface for additional protocols 2020-12-03 12:48:19 +01:00
Samuel Sadok d20a85187c Merge stuff into devel 2020-12-03 12:36:45 +01:00
Samuel Sadok ac6c553156 add get_drv_fault function 2020-11-25 19:30:04 +01:00
Oskar Weigl a3b7497150 change LED color and add eye curve 2020-11-24 23:58:44 -08:00
Samuel Sadok 287dd47b8f move startup delay to fix race condition 2020-11-19 12:19:02 +01:00
Samuel Sadok 207426aa0f initial ODrive v4.0 support 2020-11-18 18:59:56 +01:00
Samuel Sadok c32cbec58c rename some of the new functions and variables 2020-11-16 21:03:23 +01:00
Samuel Sadok 60b433700f fix uninitialized warning after CRITICAL_SECTION 2020-11-16 17:15:00 +01:00
Samuel Sadok 628e12dd20 abort save_configuration when armed 2020-11-16 16:30:58 +01:00
Samuel Sadok 6f99ce478e use rtos signals in wait_for_control_iteration 2020-11-13 18:45:49 +01:00
Samuel Sadok 69897ece9c improve debug instrumentation
- add ERROR output on GPIO
 - add exported get_gpio_states() function
 - add task timer for DC calib ADC wait time
 - fix oscilloscope
2020-11-13 18:45:49 +01:00
Samuel Sadok a6587f8d8a fix various issues
- overcurrent error during motor calibration (this is caused by
overshoot. For now we just ignore the current limit during motor
calibration as we did before)
- factor 2 error at encoder calibration
- set error flag if Motor::arm() is called while the brake resistor is
enabled but disarmed.
- only arm brake resistor if enabled
- auto-arm brake resistor on clear_errors()
2020-11-13 18:45:49 +01:00
Samuel Sadok c23076c19c Merge branch 'devel' into control-loop-refactor 2020-11-05 13:43:57 +01:00
Samuel Sadok a1ac01e430 add dump_threads diagnostics function 2020-11-03 19:42:32 +01:00
Samuel Sadok 1f7815459f Merge branch 'devel' into control-loop-refactor 2020-11-03 18:34:08 +01:00
Paul Guenette ef61d6d814 Merge branch 'devel' into uart1 2020-10-30 20:39:17 -04:00
Samuel Sadok 6088b8dadf Merge branch 'devel' into libfibre 2020-10-30 16:59:01 +01:00
PAJohnson fd848f2c36 Addressed PR comments
Updated API Migration Notes
Changed Axis error that is thrown for over temp from ERROR_OVER_TEMP to ERROR_MOTOR_FAILED
Moved setting of thermistor_.motor_ = this from motor apply_config() to motor constructor
Moved motor_thermistor apply_config call from Motor to config_apply_all() in main.cpp
2020-10-21 03:44:32 -04:00
Samuel Sadok e15ab60184 change user facing component names
UART0 => UART_A
UART1 => UART_B
UART2 => UART_C
CAN0 => CAN_A
SPI0 => SPI_A
I2C0 => I2C_A
PWM0 => PWM
2020-10-15 11:52:44 +02:00
PAJohnson 1899fa7df5 Moved thermistors from belonging to Axis to being a part of Motor.
Thermistor apply_config now called in Motor::apply_config()
Thermistor errors rolled into motor errors
odrivetool and GUI updated to handle change
Removed CurrentLimiter,Thermistor arrays abstraction
2020-10-13 22:01:52 -04:00
Samuel Sadok 7fd0806d49 introduce InputPort and OutputPort, don't use NAN
The InputPort/OutputPort infrastructure facilitates safer
data paths between components: OutputPorts store a value
and the age of the value measured in number of control loop
iterations. InputPorts can be connected to various sources,
for instance an OutputPort. InputPorts expose the values to
consumers in the form of std::optional to reflect the fact
that an InputPort can be dangling or connected to a stale
OutputPort.
2020-09-23 16:20:21 +02:00
Samuel Sadok 3addf6da77 Merge remote-tracking branch 'origin/devel' into control-loop-refactor 2020-09-22 12:56:00 +02:00
Samuel Sadok a1c67e6ba1 refactor Fibre to AsyncStream architecture
The previous implementation was based on blocking calls, i.e. the
platform dependent output channel would block on a write operation and
by extension the Fibre decoder could also block when given data by an
input channel. The revised implementation in this commit is based around
a fully asynchronous (i.e. non-blocking)  stream interface.
2020-09-15 12:57:39 +02:00
Oskar Weigl 88497ae44c Merge pull request #451 from aprgl/mechanical-brake
Mechanical brake support
2020-09-08 15:55:50 -07:00
Shaun Meehan 0882c71beb Removed apply_config and enable functions, removed automatic gpio swap, fixed readme and odrive-interface to match 2020-09-03 18:59:14 -07:00
Unknown 3c49b7f8ca Merge branch 'rc-v0.5.1' into devel 2020-09-02 20:51:13 -04:00
Unknown f691536b3c Fix DRV lock-up problem when using absolute encoders 2020-09-02 20:44:56 -04:00
Samuel Sadok 5661a3b5ed Refactor control loop.
Please see https://github.com/madcowswe/ODrive/issues/472 for a detailed description.
2020-09-01 00:03:01 +02:00
Shaun b61ac4c50e Merge branch 'devel' into mechanical-brake 2020-08-27 18:33:43 -07:00
Shaun Meehan 89bf879ff9 Added GPIO_MODE_MECH_BRAKE, removed pull-ups for outputs, updated docs, added check for GPIO_MODE_MECH_BRAKE to startup in main 2020-08-27 18:28:33 -07:00
Samuel Sadok f3fa0af5c1 Fix pullup/pulldown configuration, update docs 2020-08-24 13:00:15 +02:00
Shaun 460f10842e Merge branch 'devel' into mechanical-brake 2020-08-19 11:54:20 -07:00
Shaun Meehan 46c054f3af Mechanical Brake feature 2020-08-18 23:44:37 -07:00
Samuel Sadok b6ac7c306a rename config push/pop to write/read, fix order 2020-07-30 17:14:30 +02:00
Samuel Sadok 5e61c5a88a turn GPIO feature matrix into sparse matrix 2020-07-30 17:14:30 +02:00
Samuel Sadok 5e628c5783 enhance resource usage diagnostics 2020-07-21 19:09:46 +02:00
Samuel Sadok 2d256f43cb more refactoring in perparation for new hardware 2020-07-21 13:02:03 +02:00
Samuel Sadok 938f088fc2 make axis allocation static 2020-07-21 13:02:03 +02:00
Samuel Sadok b3ddadb360 further improve hardware independence 2020-07-21 12:55:10 +02:00
Samuel Sadok 71cc825ba2 Move complexity out of CubeMX autogenerated code
Where viable, customizations in the CubeMX code (mostly the USER
CODE sections) are moved to our own files (primarily main.cpp and
board.cpp).

This will minimize code duplication when adding a new, completely
separate instance of the CubeMX files. The USB code still contains a
large amount of customization which is not touched by this commit and
should be refactored separately later on.

The entry point is now in main.cpp (moved from the CubeMX-generated
main.c). This increases control over the boot process while also
improving code organization.
2020-07-21 12:55:10 +02:00
Samuel Sadok 1f3391c81b introduce GPIO modes 2020-07-21 12:55:10 +02:00
Samuel Sadok c745983f95 define gpios as array of Stm32Gpio objects 2020-07-21 12:31:03 +02:00