update PWM timeout
- updated the `pwm_timeout` and uncommented `pwm_captured_ch1_value` as discussed with @benjaf
This commit is contained in:
parent
b95307f260
commit
22411e1851
|
@ -298,7 +298,7 @@
|
||||||
#define PWM_CH2_MIN -1000 // (-1000 - 0)
|
#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 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 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 SUPPORT_BUTTONS // use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3!
|
||||||
// #define INVERT_R_DIRECTION
|
// #define INVERT_R_DIRECTION
|
||||||
// #define INVERT_L_DIRECTION
|
// #define INVERT_L_DIRECTION
|
||||||
|
|
|
@ -119,9 +119,9 @@ void PWM_SysTick_Callback(void) {
|
||||||
pwm_timeout++;
|
pwm_timeout++;
|
||||||
// Stop after 500 ms without PPM signal
|
// Stop after 500 ms without PPM signal
|
||||||
if(pwm_timeout > 500) {
|
if(pwm_timeout > 500) {
|
||||||
//pwm_captured_ch1_value = 500;
|
pwm_captured_ch1_value = 500;
|
||||||
pwm_captured_ch2_value = 500;
|
pwm_captured_ch2_value = 500;
|
||||||
pwm_timeout = 500;
|
pwm_timeout = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue