add boost and check battery

This commit is contained in:
2023-09-13 12:58:27 +02:00
parent 09fb1d10da
commit 73b5594786
6 changed files with 20 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
/**
* @author R<>mi Heredero
* @author R<>mi Heredero
* @version. 0.0.0
* @date August 2023
* @file kartculator.c
@@ -242,6 +242,11 @@ void calcTorque(uint8_t joy_pos) {
calcTorque *= 1150;
calcTorque /= 1000;
}
if(eKart.batteryVoltage <= 18750) {
calcTorque = 0;
}
eKart.torque = (int16_t) calcTorque;
}