add max board temp

This commit is contained in:
interfisch 2022-06-04 11:18:11 +02:00
parent dc40db8e74
commit 91bfeffcb3
2 changed files with 9 additions and 1 deletions

View File

@ -175,8 +175,9 @@ void ESCSerialComm::updateMotorparams(unsigned long loopmillis) {
Motorparams.millis=loopmillis; Motorparams.millis=loopmillis;
if (loopmillis>5000) { //wait until voltage is reliable from esc if (loopmillis>20000) { //wait until voltage is reliable from esc
minBatVoltage=min(minBatVoltage,getFeedback_batVoltage()); minBatVoltage=min(minBatVoltage,getFeedback_batVoltage());
maxBoardTemp=max(maxBoardTemp,getFeedback_boardTemp());
} }
mincurL=min(mincurL,getFiltered_curL()); mincurL=min(mincurL,getFiltered_curL());
@ -267,8 +268,13 @@ float ESCSerialComm::getMinBatVoltage() {
return minBatVoltage; return minBatVoltage;
} }
float ESCSerialComm::getMaxBoardTemp() {
return maxBoardTemp;
}
void ESCSerialComm::resetStatistics() { void ESCSerialComm::resetStatistics() {
minBatVoltage=1000; minBatVoltage=1000;
maxBoardTemp=0;
mincurL=0; mincurL=0;
mincurR=0; mincurR=0;
maxcurL=0; maxcurL=0;

View File

@ -94,6 +94,7 @@ class ESCSerialComm
float getFiltered_curR(); float getFiltered_curR();
float getMinBatVoltage(); float getMinBatVoltage();
float getMaxBoardTemp();
double getCurrentConsumed(); double getCurrentConsumed();
double getMeanSpeed(); double getMeanSpeed();
double getTrip(); double getTrip();
@ -124,6 +125,7 @@ class ESCSerialComm
double currentConsumed; //Ah double currentConsumed; //Ah
float minBatVoltage=1000; float minBatVoltage=1000;
float maxBoardTemp=0;
float mincurL=0; float mincurL=0;