#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 0 // 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 INVERT_R_DIRECTION
#define INVERT_L_DIRECTION
// #define SUPPORT_BUTTONS_LEFT // use left sensor board cable for button inputs. Disable DEBUG_SERIAL_USART2!
// #define SUPPORT_BUTTONS_RIGHT // use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3!
// #define STANDSTILL_HOLD_ENABLE // [-] Flag to hold the position when standtill is reached. Only available and makes sense for VOLTAGE or TORQUE mode.
#endif
// ############################# END OF VARIANT_PPM SETTINGS ############################
uint16_tspeedBlend;// Calculate speed Blend, a number between [0, 1] in fixdt(0,16,15)
speedBlend=(uint16_t)(((CLAMP(speedAvgAbs,10,60)-10)<<15)/50);// speedBlend [0,1] is within [10 rpm, 60rpm]
#endif
@ -240,6 +240,12 @@ int main(void) {
}
#endif
#ifdef VARIANT_SKATEBOARD
if(cmd2<0){// When Throttle pedal is negative, it acts as brake. This condition is to make sure it goes to 0 as we reach standstill (to avoid Reverse driving)