Engine temp warning messages and bug fixes

This commit is contained in:
2026-03-30 16:29:16 +02:00
parent 3b2abd3f71
commit da6b23d78e
9 changed files with 126 additions and 29 deletions

View File

@@ -62,6 +62,8 @@ bool Lcd::isMessageTask(task::Type type) {
case task::DisplayMsgTrackDetectOk:
case task::DisplayMsgConfigNoTracks:
case task::DisplayMsgBatteryLow:
case task::DisplayMsgEngineTempLow:
case task::DisplayMsgEngineTempHigh:
return true;
default:
@@ -151,6 +153,8 @@ int Lcd::renderDriverPrimary() {
double vbat;
vbatGlobalRead(vbat);
double teng;
tengGlobalRead(teng);
display_->setCursor(0,0);
this->print("GPS:");
@@ -165,8 +169,12 @@ int Lcd::renderDriverPrimary() {
this->print(gps_data.speed_.value_);
display_->setCursor(0,3);
this->print("VBAT:");
this->print("Vbat:");
this->print(vbat);
display_->setCursor(10,3);
this->print("Teng:");
this->print(teng);
return 0;
}
@@ -206,13 +214,31 @@ int Lcd::renderMsgConfigNoTracks() {
int Lcd::renderMsgBatteryLow() {
this->clear();
display_->setCursor(2, 1);
this->print("BATTERY WARNING");
display_->setCursor(6, 1);
this->print("WARNING");
display_->setCursor(6, 2);
this->print("VBAT LOW");
return 0;
}
int Lcd::renderMsgEngineTempLow() {
this->clear();
display_->setCursor(6, 1);
this->print("WARNING");
display_->setCursor(2, 2);
this->print("ENGINE TEMP LOW");
return 0;
}
int Lcd::renderMsgEngineTempHigh() {
this->clear();
display_->setCursor(6, 1);
this->print("WARNING");
display_->setCursor(2, 2);
this->print("ENGINE TEMP HIGH");
return 0;
}
int Lcd::push(const Task &task) {
return queue_.push(task);
}
@@ -413,6 +439,13 @@ int Lcd::loop(unsigned long timeout_ms) {
case task::DisplayMsgBatteryLow:
activateMessage(screen::MsgBatteryLow, next_task.data_);
break;
case task::DisplayMsgEngineTempLow:
activateMessage(screen::MsgEngineTempLow, next_task.data_);
break;
case task::DisplayMsgEngineTempHigh:
activateMessage(screen::MsgEngineTempLow, next_task.data_);
default:
break;
@@ -467,6 +500,14 @@ int Lcd::loop(unsigned long timeout_ms) {
case screen::MsgBatteryLow:
this->renderMsgBatteryLow();
break;
case screen::MsgEngineTempLow:
this->renderMsgEngineTempLow();
break;
case screen::MsgEngineTempHigh:
this->renderMsgEngineTempHigh();
break;
default:
break;