Commit Graph

191 Commits

Author SHA1 Message Date
EmanuelFeru 5f2eb196af Improved UART error recovery
- In case of an Rx error instead of stopping the complete UART, only the Rx DMA is aborted and restarted.
2020-06-23 19:58:36 +02:00
EmanuelFeru ac90ed1b6b Fixed initial condition bug
- the initial condition for the Battery and Board temperature was wrongly set
- the filter is fixdt(1,32,16), so the shift should be by 16 bits.
2020-06-22 20:21:18 +02:00
EmanuelFeru b8d9c8c8bc Re-arranged variables
- no functionality change
2020-06-22 09:17:42 +02:00
EmanuelFeru ada07cd5fb
Fixed links 2020-06-21 23:59:44 +02:00
EmanuelFeru e46dff590f Major UART communication improvement
- the UART communication is improved based on UART Idle line detection interrupt
- an Rx ring buffer is used to manage the UART incoming data
- both Tx and Rx are efficiently handled using DMA

#45 #64 #65

Other:
- minor visual improvements
2020-06-21 23:14:46 +02:00
EmanuelFeru 85552b3e41
Merge pull request #50 from juodumas/update-torque-mode-readme
Update torque mode description in readme
2020-06-13 11:06:54 +02:00
EmanuelFeru 205c054235 PWM Variant update
- made the 2 channels to operate independently #61
- added defines to enable/disable motors, if one motor is not needed #63
2020-06-13 10:57:54 +02:00
EmanuelFeru 8ddfc82882 Updated PWM Variant
- PWM Variant should now support that the PWM for the 2 channels (steering, throttle) can happen:
• in the same time (ussually the case if Servo library from Arduino is used)
•or offseted (ussually if commercial RC PWM received is used)
- made the PWM timeout for the 2 channels independent to be able to use only one channel if desired.
2020-06-13 00:08:34 +02:00
EmanuelFeru 558759b2c5
Merge pull request #57 from benjaf/master
PWM Steering fixed
2020-06-02 14:46:07 +02:00
EmanuelFeru 22411e1851 update PWM timeout
- updated the `pwm_timeout` and uncommented `pwm_captured_ch1_value` as discussed with @benjaf
2020-06-02 14:42:14 +02:00
EmanuelFeru b95307f260 Update control.c
- removed the `PWM_signal_Correct(..)` function, because it is already existing here 34c6e4d610/Src/util.c (L844-L862)
- added (void) to the functions
- limited `pwm_timeout` to 500 instead of 0, ottherwise the timeout won't work properly, because it will will reset every time.
2020-06-02 13:04:10 +02:00
Benjamin 21a8f757d0 PWM Steering fixed 2020-06-02 11:53:59 +02:00
EmanuelFeru 34c6e4d610 Improved UART Timeout
Apparently, the UART data Rx/Tx is quite unreliable (especially under motor load) leading to very often out-of-sync issues. This change allows to reset the DMA more often, leading to a faster re-sync of the UART transmission and thus avoiding UART timeout.
2020-06-01 20:08:47 +02:00
EmanuelFeru 32f4a2c03e Fixed missing define for Serial feedback 2020-05-26 23:39:56 +02:00
EmanuelFeru 083088724e Updated mainboard picture 2020-05-26 22:49:12 +02:00
EmanuelFeru 736f2b9419 Minor updates
- updated ReadMe: added higher resolution mainboard picture, added links with projects, online compiler, Telegram link
- setup.c : fixed the Charger GPIO pin to PULLUP, otherwise the Charger won't be recognized when connected
- config.h : increased the default ADC protection Timeout from 30 to 100 for more robustness.
2020-05-26 22:17:40 +02:00
juodumas 001071a55d Update torque mode description in readme 2020-05-03 22:42:46 +03:00
EmanuelFeru ea8507fc67
Merge pull request #48 from juodumas/update-config-h-comments
Update config.h current limiting comments
2020-05-03 19:10:53 +02:00
EmanuelFeru f3f03df83a
Merge pull request #47 from juodumas/add-build-dir-to-gitignore
Add build/ dir to .gitignore
2020-05-03 18:50:17 +02:00
juodumas 0125bf0dc0 Update config.h current limiting comments 2020-05-03 16:29:40 +03:00
juodumas 166e0ae05b Add build/ dir to .gitignore 2020-05-03 16:20:12 +03:00
EmanuelFeru 95c10c9ba7 Update util.c 2020-03-24 21:31:30 +01:00
EmanuelFeru e1950f2a91
Merge pull request #31 from EmanuelFeru/variant_pwm
Added VARIANT_PWM
2020-03-24 20:46:01 +01:00
EmanuelFeru 38574153f0 Added deadband for PPM signal
Issue #29
2020-03-24 20:36:19 +01:00
EmanuelFeru 39e4fdc869 Variant_PWM implemented 2020-03-24 19:57:08 +01:00
EmanuelFeru d6d22351e3 Updated webview 2020-03-24 19:56:01 +01:00
EmanuelFeru c099bec824 RC pwm signal read fixes
Re-work on the RC pwm input signal timeout
2020-03-23 21:09:17 +01:00
EmanuelFeru 7d80e564f0 First commit pwm
- buttons not yet support
2020-03-21 19:24:29 +01:00
EmanuelFeru 9d6cec8889 Hovercar minor update
- put by default TORQUE mode. Hovercar works best in Torque mode
- made the brake pedal more aggressive. Gives a better braking feel.
2020-03-17 15:38:35 +01:00
EmanuelFeru 3fd6c057ea
Merge pull request #27 from pinguinpfleger/master
Added Flashing Method 4: MacOS
2020-03-04 20:41:41 +01:00
Kai Hauser 1090c2fb99
Merge branch 'master' into master 2020-03-01 10:23:02 +01:00
EmanuelFeru 72e6b30033 UART with sideboards works + major refactoring
► the mainboard can now send and receive Serial data from the sideboards
► heavy refactored the `main.c`. It was becoming too large to manage... Therefore, `util.c` and `util.h` was created
► added new functionality for `VARIANT_HOVERCAR` and variants with `CONTROL_ADC` in general:
- ADC limits auto-calibration mode (long press of the power button) - calibration will not be lost at power-off
- Max Current and Max Speed adjustment mode (long press followed by a short press of the power button) - calibration will not be lost at power-off
- added one sideboard functionality:
         - LEDs are used to display battery level,  Motor Enable, Errors, Reverse driving, Braking.
         - Photo sensors are used as push buttons: One for changing Control Mode, One for Activating/Deactivating the Field Weakening on the fly
2020-03-01 10:00:26 +01:00
Kai Hauser e70b3aa38c
more CLI 2020-02-27 12:07:49 +01:00
Kai Hauser a6242cc3d6
Added Flashing Method 4: MacOS
and moved Variants above Flashing since you have to define a Variant before flashing
2020-02-26 21:03:52 +01:00
Kai Hauser 83b85bf4a1
Merge pull request #1 from EmanuelFeru/master
sync
2020-02-26 20:46:31 +01:00
EmanuelFeru 52e920c5ee Merge branch 'master' of https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC 2020-02-16 21:58:25 +01:00
EmanuelFeru 872d86f021 Added Keil project
Project can now be built and flashed with Keil uVision as well.
2020-02-16 21:58:15 +01:00
EmanuelFeru f1cb07dad2 Update README.md 2020-02-10 09:52:49 +01:00
EmanuelFeru 9e943feb8e Update README.md 2020-02-08 08:55:11 +01:00
EmanuelFeru b96ecf09e5
Update README.md 2020-02-07 18:25:57 +01:00
EmanuelFeru 4382ec3128
Update README.md 2020-02-07 18:15:18 +01:00
EmanuelFeru c58db9b3e2 Merge branch 'master' of https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC 2020-02-07 17:31:12 +01:00
EmanuelFeru 2cddbf5ed0 Added mcu unlocking pictures 2020-02-07 17:29:09 +01:00
EmanuelFeru 70c385e4a1
Update README.md 2020-02-07 17:27:23 +01:00
EmanuelFeru 2d178a399c Improved Serial Timeout
- added condition to avoid restarting DMA repeatedly if no data is received
- enabled DEBUG_SERIAL_ASCII for all Variants except VARIANT_TRANSPOTTER
2020-02-06 21:53:38 +01:00
EmanuelFeru 3329281bd2
Merge pull request #18 from pinguinpfleger/master
Some prettifying, typos, renaming
2020-01-29 21:29:39 +01:00
EmanuelFeru a57b600230 Minor changes for PR #18
- updated sligtly the order of defines and corrected defines for some variants in config.h
- fixed checksum data type in Arduino example (Issue #19)
2020-01-29 21:20:04 +01:00
Kai Hauser 25f223a703
fixes <command-line>:0:0: warning: "PLATFORMIO" redefined
no need to define -D PLATFORMIO since by platformio itself.
2020-01-26 21:19:58 +01:00
kai 8098a31457 prettified config.h 2020-01-18 02:14:42 +01:00
kai 2c1572d844 prettified config.h 2020-01-18 02:10:40 +01:00