Commit Graph
101 Commits
Author SHA1 Message Date
Samuel Sadok 2e0926e562 fix analog thread stack overflow 2021-09-03 18:30:08 +02:00
Paul Guenette 054883707f Add brake_resistor_current variable to interface 2021-07-17 15:42:01 -04:00
Samuel Sadok 207426aa0f initial ODrive v4.0 support 2020-11-18 18:59:56 +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 6d22b35f99 add config.enable_brake_resistor 2020-11-13 18:45:48 +01:00
Samuel Sadok 1f7815459f Merge branch 'devel' into control-loop-refactor 2020-11-03 18:34:08 +01:00
Paul Guenette a428d08ecd Merge branch 'timing' into devel_fast 2020-10-30 21:26:31 -04:00
Paul Guenette b13fbe4163 Merge remote-tracking branch 'madcowswe/clean-math-funcs' into devel 2020-10-20 23:32:54 -04:00
Paul Guenette e1ff203879 Merge branch 'master' into devel 2020-09-30 11:22:10 -04:00
Oskar Weigl f360f576b4 Merge branch 'rc-v0.5.1' 2020-09-27 16:17:35 -07:00
Oskar Weigl 33987df7e1 Avoid redundant normalizing of adc voltage 2020-09-05 16:15:11 -07:00
Oskar Weigl 600832f8cf drop flag fno-finite-math-only, and implement explicit nan check function 2020-09-04 20:31:58 -07:00
Oskar Weigl 412329d71a change to cmath by default 2020-09-04 19:46:12 -07:00
Oskar Weigl 711111e6fb change fmaxf to std max 2020-09-04 18:23:33 -07: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
Unknown 499dd64d87 Ensure sample trigger occurs at the right spot, and only once. 2020-08-26 01:42:03 -04:00
Unknown 2bb990937a Add TaskTimer class 2020-08-25 21:40:24 -04:00
Unknown 7077bb11d0 Merge branch 'timing' into devel 2020-08-25 18:22:37 -04:00
Unknown b1961e8a29 Add timers for sections 2020-08-24 00:50:23 -04:00
Oskar Weigl 439505c517 add link to timing diagram in low_level.cpp 2020-08-21 21:00:07 -07:00
Samuel Sadok 8d144bd944 Merge branch 'devel' into lowlevel-refactor 2020-08-05 16:28:17 +02:00
Oskar Weigl 3760c7bc84 Merge branch 'rc-v0.5.0' into devel 2020-08-03 20:16:51 -07: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
Samuel Sadok cc79c8eecb overhaul timer setup/synchronization
This new method is more flexible in the sense of what timers to
synchronize and also provides clearer guarantees with respect to
the repetition counter and prescaler.
2020-07-21 12:31:03 +02:00
Samuel Sadok 6377df4b1e move ext int subscribe logic to Stm32Gpio class 2020-07-21 12:31:03 +02:00
Samuel Sadok 856455077d refactor drv8301 driver 2020-07-21 12:31:03 +02:00
Rowan Goemans 1a0d6acace - Refactored thermal and current lmiting sub-systems and introduced motor thermistor support.
- Added thermal errors to dump_errors call in odrivetool.
- Added function in odrivetool to set thermistor coefficients based on thermistor specs.
- Added documentation for users on how to connect and configure their own thermistors.
2020-07-17 14:09:47 +02:00
Samuel Sadok 7fade2b95a add filter to the reported <odrv>.ibus 2020-07-13 16:00:33 +02:00
Unknown 883dd27a17 Fix static in encoder.cpp, constexpr the things 2020-07-11 22:19:41 -04:00
Samuel Sadok 653c4c327e Merge remote-tracking branch 'origin/devel' into feature/interface_autogen_merged 2020-05-22 21:27:58 +02:00
Samuel Sadok b3912d58c2 revert numerical static_cast to C style casts
As per https://github.com/madcowswe/ODrive/pull/410#discussion_r427725994
2020-05-20 13:26:14 +02:00
Samuel Sadok 149dcf7377 reenable ascii protocol 2020-05-18 14:44:37 +02:00
Samuel Sadok e4d70a22b7 Initial implementation of interface autogenerator.
TODO:
 - write to endpoints from float (for PWM/analog input)
 - ascii protocol
2020-05-14 23:05:02 +02:00
Samuel Sadok da7f719283 improve naming consistency between code and fibre
Consistent naming makes code autogeneration easier.
This commit does not claim that the exported names of the variables were
more sensible than the in-code names. However changing the exported
names can break external tools and needs to happen in a controlled and
documented way.
2020-05-14 11:16:32 +02:00
Samuel Sadok 011fb86377 make note on timing 2020-05-08 11:02:04 +02:00
Samuel Sadok 8cbee27a5d disable overvoltage ramp if brake_resistance == 0 2020-05-08 10:38:53 +02:00
Oskar Weigl 19647db3e6 update changelog, add debug freeze of tim13 2020-05-07 13:25:36 -07:00
Samuel Sadok 484c5ab9da clarify comments 2020-05-06 11:23:46 +02:00
Samuel Sadok 50ecdef860 move DC overcurrent/undercurrent checks to update_brake_current()
The checks now take into account the brake current.
Expose ibus on fibre.
2020-05-05 18:16:06 +02:00
Samuel Sadok 1dc420a76d various changes to update_brake_current:
- cleaner implementaiton of the overvoltage ramp with config variables separate from other functions
 - explicit enable flag for overvoltage ramp (disabled by default)
 - reinstate brake duty cycle NaN error
 - add informational flag for brake resistor saturation
2020-05-04 12:54:34 +02:00
Oskar Weigl edb6a1611c changed max brake duty to 95 pct 2020-05-01 17:11:47 -07:00
Samuel Sadok f84ff36c74 only enable vbus_voltage clamping if dc_bus_overvoltage_trip_level > nominal_voltage 2020-04-30 11:44:14 +02:00
Unknown 8a7a5aac4d Remove VBUS_OVERVOLTAGE_LEVEL because it's not being used 2020-03-29 21:10:38 -04:00
Unknown db890b0d5c Use brake_current as a true FF 2020-03-28 00:58:32 -04:00
Unknown 31fb65b86c Improve braking logic 2020-03-27 21:30:32 -04:00
Unknown c231928619 Merge branch 'feature/brake_current_fix' into RazorsFrozenTesting 2020-03-27 21:24:49 -04:00