diff --git a/Inc/config.h b/Inc/config.h index 3609f26..75c5422 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -298,7 +298,7 @@ #define PWM_CH2_MIN -1000 // (-1000 - 0) #define FILTER 6553 // 0.1f [-] fixdt(0,16,16) lower value == softer filter [0, 65535] = [0.0 - 1.0]. #define SPEED_COEFFICIENT 16384 // 1.0f [-] fixdt(1,16,14) higher value == stronger. [0, 65535] = [-2.0 - 2.0]. In this case 16384 = 1.0 * 2^14 - #define STEER_COEFFICIENT 16384 // 0.0f [-] fixdt(1,16,14) higher value == stronger. [0, 65535] = [-2.0 - 2.0]. In this case 0 = 0.0 * 2^14. If you do not want any steering, set it to 0. + #define STEER_COEFFICIENT 16384 // 1.0f [-] fixdt(1,16,14) higher value == stronger. [0, 65535] = [-2.0 - 2.0]. In this case 16384 = 1.0 * 2^14. If you do not want any steering, set it to 0. // #define SUPPORT_BUTTONS // use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3! // #define INVERT_R_DIRECTION // #define INVERT_L_DIRECTION diff --git a/Src/control.c b/Src/control.c index 70ac4cd..dcda286 100644 --- a/Src/control.c +++ b/Src/control.c @@ -119,9 +119,9 @@ void PWM_SysTick_Callback(void) { pwm_timeout++; // Stop after 500 ms without PPM signal if(pwm_timeout > 500) { - //pwm_captured_ch1_value = 500; + pwm_captured_ch1_value = 500; pwm_captured_ch2_value = 500; - pwm_timeout = 500; + pwm_timeout = 0; } }