forked from EFeru/hoverboard-firmware-hack-FOC
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
This commit is contained in:
@@ -114,12 +114,12 @@ void Nunchuk_Read(void) {
|
||||
timeout = 0;
|
||||
}
|
||||
|
||||
#ifndef TRANSPOTTER
|
||||
if (timeout > 3) {
|
||||
HAL_Delay(50);
|
||||
Nunchuk_Init();
|
||||
}
|
||||
#endif
|
||||
#ifndef TRANSPOTTER
|
||||
if (timeout > 3) {
|
||||
HAL_Delay(50);
|
||||
Nunchuk_Init();
|
||||
}
|
||||
#endif
|
||||
|
||||
//setScopeChannel(0, (int)nunchuk_data[0]);
|
||||
//setScopeChannel(1, (int)nunchuk_data[1]);
|
||||
|
Reference in New Issue
Block a user