forked from EFeru/hoverboard-firmware-hack-FOC
Fixed Trigger released check for MultiModeDrive
(cherry picked from commit 2a2e2a2091494e8257b5e558077ca7a3c2ac575f)
This commit is contained in:
@ -162,11 +162,14 @@ static uint32_t buzzerTimer_prev = 0;
|
|||||||
static uint32_t inactivity_timeout_counter;
|
static uint32_t inactivity_timeout_counter;
|
||||||
static MultipleTap MultipleTapBrake; // define multiple tap functionality for the Brake pedal
|
static MultipleTap MultipleTapBrake; // define multiple tap functionality for the Brake pedal
|
||||||
|
|
||||||
static uint16_t rate = RATE;
|
static uint16_t rate = RATE; // Adjustable rate to support multiple drive modes on startup
|
||||||
|
|
||||||
#ifdef MULTI_MODE_DRIVE
|
#ifdef MULTI_MODE_DRIVE
|
||||||
static uint16_t max_speed;
|
|
||||||
static uint8_t drive_mode;
|
static uint8_t drive_mode;
|
||||||
|
static uint16_t max_speed;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
@ -230,7 +233,7 @@ int main(void) {
|
|||||||
|
|
||||||
#ifdef MULTI_MODE_DRIVE
|
#ifdef MULTI_MODE_DRIVE
|
||||||
// Wait until triggers are released
|
// Wait until triggers are released
|
||||||
while((adc_buffer.l_rx2 + adc_buffer.l_tx2) <= (input1[0].min + input2[0].min)) { HAL_Delay(10); }
|
while((adc_buffer.l_rx2 + adc_buffer.l_tx2) >= (input1[0].min + input2[0].min)) { HAL_Delay(10); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
Reference in New Issue
Block a user