Skip to content

Commit

Permalink
Auto stash before merge of "dev" and "origin/dev"
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno3634-gif committed Aug 30, 2024
1 parent 490121f commit c7407b1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QTranslator>
//static store* store_ref;
//void check_menu(int i);
#include<QMessageBox>

//VoidsterdebugWindow debugWindow;
//PilotWindow pl;
Expand Down Expand Up @@ -54,9 +55,14 @@ int main(int argc, char *argv[]){

//PilotWindow pl;
//pl.show();
QMessageBox *msgBox = new QMessageBox(QMessageBox::Warning, "ERRO", "bateria baixa !!!", QMessageBox::NoButton);
msgBox->setStandardButtons(QMessageBox::NoButton);
msgBox->show();
MainWindow m;
m.show();
//QMessageBox::information(nullptr, "ERRO", "bateria baixa !!!");

msgBox->close();

// VoidsterdebugWindow debugWindow;
// debugWindow.show();
Expand Down
14 changes: 11 additions & 3 deletions src/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,18 @@ void store::parseBson(std::vector<std::uint8_t> v){
this->setLV_Soc(t.decoded);
}
if(j.contains(BSON_MOTORTEMPERATURE)){
// EncodingUnion t;
// t.encoded=j[BSON_MOTORTEMPERATURE];
// this->setmotorTemperature(t.decoded);
this->setmotorTemperature(j[BSON_MOTORTEMPERATURE]);
if(j[BSON_MOTORTEMPERATURE]>= 75 && error_map.find("Motor temperature warning") != error_map.end()){
error_map["Motor temperature warning"] = j[BSON_MOTORTEMPERATURE];
scribeError("Motor temperature warning",WARNING);
}
else{
if(error_map.find("Motor temperature warning") == error_map.end()){
error_map.erase("Motor temperature warning");
}

}

}
if(j.contains(BSON_MAX_CELL_TEMP)){
// EncodingUnion t;
Expand Down
10 changes: 6 additions & 4 deletions src/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,13 @@ class store: public QObject{
int m_lapTime=0;
short m_lapCount=0;
short m_highVoltage=0;
int page = 0;
int m_battery_voltage = 0;
int m_min_cell_voltage = 0;
int m_max_cell_voltage = 0;
int page = 0;
int m_battery_voltage = 0;
int m_min_cell_voltage = 0;
int m_max_cell_voltage = 0;
//int m_tyreTemperature=0;
std::unordered_map<string, int> error_map;

#endif


Expand Down

0 comments on commit c7407b1

Please sign in to comment.