TireTemp -> BrakeTemp
This commit is contained in:
parent
b5c457c84a
commit
d1d0c3df1d
|
@ -85,16 +85,16 @@ protected:
|
||||||
Temperature invTempR;
|
Temperature invTempR;
|
||||||
Temperature invTempL;
|
Temperature invTempL;
|
||||||
touchgfx::TextArea invTempLabel;
|
touchgfx::TextArea invTempLabel;
|
||||||
touchgfx::Container tireTemps;
|
touchgfx::Container brakeTemps;
|
||||||
touchgfx::Line ttDivVert;
|
touchgfx::Line btDivVert;
|
||||||
touchgfx::PainterRGB565 ttDivVertPainter;
|
touchgfx::PainterRGB565 btDivVertPainter;
|
||||||
touchgfx::Line ttDivHoriz;
|
touchgfx::Line btDivHoriz;
|
||||||
touchgfx::PainterRGB565 ttDivHorizPainter;
|
touchgfx::PainterRGB565 btDivHorizPainter;
|
||||||
Temperature tireTempRR;
|
Temperature brakeTempRR;
|
||||||
Temperature tireTempFR;
|
Temperature brakeTempFR;
|
||||||
Temperature tireTempRL;
|
Temperature brakeTempRL;
|
||||||
Temperature tireTempFL;
|
Temperature brakeTempFL;
|
||||||
touchgfx::TextArea tireLabel;
|
touchgfx::TextArea brakeLabel;
|
||||||
touchgfx::Container dataFields;
|
touchgfx::Container dataFields;
|
||||||
touchgfx::ScrollWheel fieldTypeSelection;
|
touchgfx::ScrollWheel fieldTypeSelection;
|
||||||
touchgfx::DrawableListItems<DriverViewFieldSelection, 10> fieldTypeSelectionListItems;
|
touchgfx::DrawableListItems<DriverViewFieldSelection, 10> fieldTypeSelectionListItems;
|
||||||
|
|
|
@ -103,44 +103,44 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||||
|
|
||||||
add(drivetrainTemps);
|
add(drivetrainTemps);
|
||||||
|
|
||||||
tireTemps.setPosition(165, 97, 150, 150);
|
brakeTemps.setPosition(165, 97, 150, 150);
|
||||||
ttDivVert.setPosition(74, 25, 3, 123);
|
btDivVert.setPosition(74, 25, 3, 123);
|
||||||
ttDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
btDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
ttDivVert.setPainter(ttDivVertPainter);
|
btDivVert.setPainter(btDivVertPainter);
|
||||||
ttDivVert.setStart(0, 0);
|
btDivVert.setStart(0, 0);
|
||||||
ttDivVert.setEnd(0, 320);
|
btDivVert.setEnd(0, 320);
|
||||||
ttDivVert.setLineWidth(10);
|
btDivVert.setLineWidth(10);
|
||||||
ttDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
btDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||||
tireTemps.add(ttDivVert);
|
brakeTemps.add(btDivVert);
|
||||||
|
|
||||||
ttDivHoriz.setPosition(14, 85, 123, 3);
|
btDivHoriz.setPosition(14, 85, 123, 3);
|
||||||
ttDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
btDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
ttDivHoriz.setPainter(ttDivHorizPainter);
|
btDivHoriz.setPainter(btDivHorizPainter);
|
||||||
ttDivHoriz.setStart(0, 0);
|
btDivHoriz.setStart(0, 0);
|
||||||
ttDivHoriz.setEnd(480, 0);
|
btDivHoriz.setEnd(480, 0);
|
||||||
ttDivHoriz.setLineWidth(10);
|
btDivHoriz.setLineWidth(10);
|
||||||
ttDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
btDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||||
tireTemps.add(ttDivHoriz);
|
brakeTemps.add(btDivHoriz);
|
||||||
|
|
||||||
tireTempRR.setXY(77, 88);
|
brakeTempRR.setXY(77, 88);
|
||||||
tireTemps.add(tireTempRR);
|
brakeTemps.add(brakeTempRR);
|
||||||
|
|
||||||
tireTempFR.setXY(77, 25);
|
brakeTempFR.setXY(77, 25);
|
||||||
tireTemps.add(tireTempFR);
|
brakeTemps.add(brakeTempFR);
|
||||||
|
|
||||||
tireTempRL.setXY(14, 88);
|
brakeTempRL.setXY(14, 88);
|
||||||
tireTemps.add(tireTempRL);
|
brakeTemps.add(brakeTempRL);
|
||||||
|
|
||||||
tireTempFL.setXY(14, 25);
|
brakeTempFL.setXY(14, 25);
|
||||||
tireTemps.add(tireTempFL);
|
brakeTemps.add(brakeTempFL);
|
||||||
|
|
||||||
tireLabel.setPosition(0, 0, 150, 25);
|
brakeLabel.setPosition(0, 0, 150, 25);
|
||||||
tireLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
brakeLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
tireLabel.setLinespacing(0);
|
brakeLabel.setLinespacing(0);
|
||||||
tireLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_H6UX));
|
brakeLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_H6UX));
|
||||||
tireTemps.add(tireLabel);
|
brakeTemps.add(brakeLabel);
|
||||||
|
|
||||||
add(tireTemps);
|
add(brakeTemps);
|
||||||
|
|
||||||
dataFields.setPosition(15, 15, 450, 305);
|
dataFields.setPosition(15, 15, 450, 305);
|
||||||
fieldTypeSelection.setPosition(0, 80, 150, 225);
|
fieldTypeSelection.setPosition(0, 80, 150, 225);
|
||||||
|
@ -215,10 +215,10 @@ void DriverViewViewBase::setupScreen()
|
||||||
motorTempR.initialize();
|
motorTempR.initialize();
|
||||||
invTempR.initialize();
|
invTempR.initialize();
|
||||||
invTempL.initialize();
|
invTempL.initialize();
|
||||||
tireTempRR.initialize();
|
brakeTempRR.initialize();
|
||||||
tireTempFR.initialize();
|
brakeTempFR.initialize();
|
||||||
tireTempRL.initialize();
|
brakeTempRL.initialize();
|
||||||
tireTempFL.initialize();
|
brakeTempFL.initialize();
|
||||||
fieldTypeSelection.initialize();
|
fieldTypeSelection.initialize();
|
||||||
for (int i = 0; i < fieldTypeSelectionListItems.getNumberOfDrawables(); i++)
|
for (int i = 0; i < fieldTypeSelectionListItems.getNumberOfDrawables(); i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,14 +23,14 @@ void DriverViewView::setupScreen() {
|
||||||
// tireTempRL.setTempThresholds(tireThresholds);
|
// tireTempRL.setTempThresholds(tireThresholds);
|
||||||
// tireTempRR.setTempThresholds(tireThresholds);
|
// tireTempRR.setTempThresholds(tireThresholds);
|
||||||
int brakeThresholds[4] = {100, 150, 200, 250};
|
int brakeThresholds[4] = {100, 150, 200, 250};
|
||||||
tireTempFL.setSmallText(true);
|
brakeTempFL.setSmallText(true);
|
||||||
tireTempFL.setTempThresholds(brakeThresholds);
|
brakeTempFL.setTempThresholds(brakeThresholds);
|
||||||
tireTempFR.setSmallText(true);
|
brakeTempFR.setSmallText(true);
|
||||||
tireTempFR.setTempThresholds(brakeThresholds);
|
brakeTempFR.setTempThresholds(brakeThresholds);
|
||||||
tireTempRL.setSmallText(true);
|
brakeTempRL.setSmallText(true);
|
||||||
tireTempRL.setTempThresholds(brakeThresholds);
|
brakeTempRL.setTempThresholds(brakeThresholds);
|
||||||
tireTempRR.setSmallText(true);
|
brakeTempRR.setSmallText(true);
|
||||||
tireTempRR.setTempThresholds(brakeThresholds);
|
brakeTempRR.setTempThresholds(brakeThresholds);
|
||||||
int invThresholds[4] = {30, 40, 50, 60};
|
int invThresholds[4] = {30, 40, 50, 60};
|
||||||
invTempL.setTempThresholds(invThresholds);
|
invTempL.setTempThresholds(invThresholds);
|
||||||
invTempR.setTempThresholds(invThresholds);
|
invTempR.setTempThresholds(invThresholds);
|
||||||
|
@ -58,10 +58,10 @@ void DriverViewView::updateFieldValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DriverViewView::setTemps(const Temperatures &temps) {
|
void DriverViewView::setTemps(const Temperatures &temps) {
|
||||||
tireTempFL.setTemp(roundf(temps.brake_fl));
|
brakeTempFL.setTemp(roundf(temps.brake_fl));
|
||||||
tireTempFR.setTemp(roundf(temps.brake_fr));
|
brakeTempFR.setTemp(roundf(temps.brake_fr));
|
||||||
tireTempRL.setTemp(roundf(temps.brake_rl));
|
brakeTempRL.setTemp(roundf(temps.brake_rl));
|
||||||
tireTempRR.setTemp(roundf(temps.brake_rr));
|
brakeTempRR.setTemp(roundf(temps.brake_rr));
|
||||||
invTempL.setTemp(roundf(temps.inv_l));
|
invTempL.setTemp(roundf(temps.inv_l));
|
||||||
invTempR.setTemp(roundf(temps.inv_r));
|
invTempR.setTemp(roundf(temps.inv_r));
|
||||||
motorTempL.setTemp(roundf(temps.mot_l));
|
motorTempL.setTemp(roundf(temps.mot_l));
|
||||||
|
|
|
@ -431,7 +431,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "Container",
|
"Type": "Container",
|
||||||
"Name": "tireTemps",
|
"Name": "brakeTemps",
|
||||||
"X": 165,
|
"X": 165,
|
||||||
"Y": 97,
|
"Y": 97,
|
||||||
"Width": 150,
|
"Width": 150,
|
||||||
|
@ -439,7 +439,7 @@
|
||||||
"Components": [
|
"Components": [
|
||||||
{
|
{
|
||||||
"Type": "Line",
|
"Type": "Line",
|
||||||
"Name": "ttDivVert",
|
"Name": "btDivVert",
|
||||||
"X": 74,
|
"X": 74,
|
||||||
"Y": 25,
|
"Y": 25,
|
||||||
"Width": 3,
|
"Width": 3,
|
||||||
|
@ -455,7 +455,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "Line",
|
"Type": "Line",
|
||||||
"Name": "ttDivHoriz",
|
"Name": "btDivHoriz",
|
||||||
"X": 14,
|
"X": 14,
|
||||||
"Y": 85,
|
"Y": 85,
|
||||||
"Width": 123,
|
"Width": 123,
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "CustomContainerInstance",
|
"Type": "CustomContainerInstance",
|
||||||
"Name": "tireTempRR",
|
"Name": "brakeTempRR",
|
||||||
"X": 77,
|
"X": 77,
|
||||||
"Y": 88,
|
"Y": 88,
|
||||||
"Width": 60,
|
"Width": 60,
|
||||||
|
@ -480,7 +480,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "CustomContainerInstance",
|
"Type": "CustomContainerInstance",
|
||||||
"Name": "tireTempFR",
|
"Name": "brakeTempFR",
|
||||||
"X": 77,
|
"X": 77,
|
||||||
"Y": 25,
|
"Y": 25,
|
||||||
"Width": 60,
|
"Width": 60,
|
||||||
|
@ -489,7 +489,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "CustomContainerInstance",
|
"Type": "CustomContainerInstance",
|
||||||
"Name": "tireTempRL",
|
"Name": "brakeTempRL",
|
||||||
"X": 14,
|
"X": 14,
|
||||||
"Y": 88,
|
"Y": 88,
|
||||||
"Width": 60,
|
"Width": 60,
|
||||||
|
@ -498,7 +498,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "CustomContainerInstance",
|
"Type": "CustomContainerInstance",
|
||||||
"Name": "tireTempFL",
|
"Name": "brakeTempFL",
|
||||||
"X": 14,
|
"X": 14,
|
||||||
"Y": 25,
|
"Y": 25,
|
||||||
"Width": 60,
|
"Width": 60,
|
||||||
|
@ -507,7 +507,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "TextArea",
|
"Type": "TextArea",
|
||||||
"Name": "tireLabel",
|
"Name": "brakeLabel",
|
||||||
"Width": 150,
|
"Width": 150,
|
||||||
"Height": 25,
|
"Height": 25,
|
||||||
"TextId": "__SingleUse_H6UX",
|
"TextId": "__SingleUse_H6UX",
|
||||||
|
|
Loading…
Reference in New Issue