fix compiler

This commit is contained in:
2023-09-01 10:40:11 +02:00
parent 296575a4b9
commit 26ea7d0870
2 changed files with 35 additions and 53 deletions

View File

@@ -9,7 +9,7 @@
void calcTorque(uint8_t joy_pos) {
int32_t calcTorque;
calcTorque = joy_pos; // joystick position
calcTorque = (int8_t) joy_pos; // joystick position
calcTorque *= KART_CST.CONTROL_POWER_FACTOR; // convert by power factor
calcTorque /= 1000; // torque define by joystick
eKart.torque = (int16_t) calcTorque;
@@ -17,7 +17,7 @@ void calcTorque(uint8_t joy_pos) {
void calcPosition(uint8_t joy_pos){
int32_t calcPosition;
calcPosition = joy_pos;
calcPosition = (int8_t) joy_pos;
}
void calcSpeed(int32_t rpm) {