Show battery temperature
This commit is contained in:
@ -12,8 +12,8 @@
|
||||
#include <touchgfx/containers/progress_indicators/LineProgress.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <gui/containers/Temperature.hpp>
|
||||
#include <touchgfx/widgets/canvas/Line.hpp>
|
||||
#include <gui/containers/Temperature.hpp>
|
||||
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
|
||||
#include <gui/containers/DriverViewFieldSelection.hpp>
|
||||
#include <gui/containers/DriverViewField.hpp>
|
||||
@ -77,11 +77,20 @@ protected:
|
||||
touchgfx::TextArea tsSoCLabel;
|
||||
touchgfx::TextArea lvSoCLabel;
|
||||
touchgfx::Container drivetrainTemps;
|
||||
touchgfx::TextArea motorTempLabel;
|
||||
Temperature motorTempL;
|
||||
Temperature motorTempR;
|
||||
touchgfx::Line batTempDiv;
|
||||
touchgfx::PainterRGB565 batTempDivPainter;
|
||||
Temperature batTempR;
|
||||
Temperature batTempL;
|
||||
touchgfx::TextArea batTempLabel;
|
||||
touchgfx::Line dtDiv2;
|
||||
touchgfx::PainterRGB565 dtDiv2Painter;
|
||||
touchgfx::Line motorTempDiv;
|
||||
touchgfx::PainterRGB565 motorTempDivPainter;
|
||||
Temperature motorTempR;
|
||||
Temperature motorTempL;
|
||||
touchgfx::TextArea motorTempLabel;
|
||||
touchgfx::Line dtDiv1;
|
||||
touchgfx::PainterRGB565 dtDiv1Painter;
|
||||
touchgfx::Line invTempDiv;
|
||||
touchgfx::PainterRGB565 invTempDivPainter;
|
||||
Temperature invTempR;
|
||||
|
||||
@ -57,20 +57,39 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||
|
||||
add(SoC);
|
||||
|
||||
drivetrainTemps.setPosition(316, 125, 152, 180);
|
||||
motorTempLabel.setPosition(0, 90, 150, 25);
|
||||
motorTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
motorTempLabel.setLinespacing(0);
|
||||
motorTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_JN2J));
|
||||
drivetrainTemps.add(motorTempLabel);
|
||||
drivetrainTemps.setPosition(316, 125, 152, 185);
|
||||
batTempDiv.setPosition(60, 124, 3, 60);
|
||||
batTempDivPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
batTempDiv.setPainter(batTempDivPainter);
|
||||
batTempDiv.setStart(0, 0);
|
||||
batTempDiv.setEnd(0, 320);
|
||||
batTempDiv.setLineWidth(10);
|
||||
batTempDiv.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
drivetrainTemps.add(batTempDiv);
|
||||
|
||||
motorTempL.setXY(14, 115);
|
||||
drivetrainTemps.add(motorTempL);
|
||||
batTempR.setXY(63, 124);
|
||||
drivetrainTemps.add(batTempR);
|
||||
|
||||
motorTempR.setXY(77, 115);
|
||||
drivetrainTemps.add(motorTempR);
|
||||
batTempL.setXY(0, 124);
|
||||
drivetrainTemps.add(batTempL);
|
||||
|
||||
motorTempDiv.setPosition(74, 115, 3, 60);
|
||||
batTempLabel.setPosition(123, 124, 25, 60);
|
||||
batTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
batTempLabel.setLinespacing(0);
|
||||
batTempLabel.setRotation(touchgfx::TEXT_ROTATE_90);
|
||||
batTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_L1J7));
|
||||
drivetrainTemps.add(batTempLabel);
|
||||
|
||||
dtDiv2.setPosition(0, 122, 123, 2);
|
||||
dtDiv2Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
dtDiv2.setPainter(dtDiv2Painter);
|
||||
dtDiv2.setStart(0, 0);
|
||||
dtDiv2.setEnd(123, 0);
|
||||
dtDiv2.setLineWidth(10);
|
||||
dtDiv2.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
drivetrainTemps.add(dtDiv2);
|
||||
|
||||
motorTempDiv.setPosition(60, 62, 3, 60);
|
||||
motorTempDivPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
motorTempDiv.setPainter(motorTempDivPainter);
|
||||
motorTempDiv.setStart(0, 0);
|
||||
@ -79,7 +98,29 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||
motorTempDiv.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
drivetrainTemps.add(motorTempDiv);
|
||||
|
||||
invTempDiv.setPosition(74, 25, 3, 60);
|
||||
motorTempR.setXY(63, 62);
|
||||
drivetrainTemps.add(motorTempR);
|
||||
|
||||
motorTempL.setXY(0, 62);
|
||||
drivetrainTemps.add(motorTempL);
|
||||
|
||||
motorTempLabel.setPosition(123, 62, 25, 60);
|
||||
motorTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
motorTempLabel.setLinespacing(0);
|
||||
motorTempLabel.setRotation(touchgfx::TEXT_ROTATE_90);
|
||||
motorTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_JN2J));
|
||||
drivetrainTemps.add(motorTempLabel);
|
||||
|
||||
dtDiv1.setPosition(0, 60, 123, 2);
|
||||
dtDiv1Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
dtDiv1.setPainter(dtDiv1Painter);
|
||||
dtDiv1.setStart(0, 0);
|
||||
dtDiv1.setEnd(123, 0);
|
||||
dtDiv1.setLineWidth(10);
|
||||
dtDiv1.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
drivetrainTemps.add(dtDiv1);
|
||||
|
||||
invTempDiv.setPosition(60, 0, 3, 60);
|
||||
invTempDivPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
invTempDiv.setPainter(invTempDivPainter);
|
||||
invTempDiv.setStart(0, 0);
|
||||
@ -88,15 +129,16 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||
invTempDiv.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
drivetrainTemps.add(invTempDiv);
|
||||
|
||||
invTempR.setXY(77, 25);
|
||||
invTempR.setXY(63, 0);
|
||||
drivetrainTemps.add(invTempR);
|
||||
|
||||
invTempL.setXY(14, 25);
|
||||
invTempL.setXY(0, 0);
|
||||
drivetrainTemps.add(invTempL);
|
||||
|
||||
invTempLabel.setPosition(0, 0, 150, 25);
|
||||
invTempLabel.setPosition(123, 0, 25, 60);
|
||||
invTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
invTempLabel.setLinespacing(0);
|
||||
invTempLabel.setRotation(touchgfx::TEXT_ROTATE_90);
|
||||
invTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_ZP7N));
|
||||
drivetrainTemps.add(invTempLabel);
|
||||
|
||||
@ -230,8 +272,10 @@ DriverViewViewBase::~DriverViewViewBase()
|
||||
|
||||
void DriverViewViewBase::setupScreen()
|
||||
{
|
||||
motorTempL.initialize();
|
||||
batTempR.initialize();
|
||||
batTempL.initialize();
|
||||
motorTempR.initialize();
|
||||
motorTempL.initialize();
|
||||
invTempR.initialize();
|
||||
invTempL.initialize();
|
||||
brakeTempRR.initialize();
|
||||
|
||||
Reference in New Issue
Block a user