Display inverter & motor temperatures

This commit is contained in:
2023-05-05 14:50:10 +02:00
parent 24be6312c8
commit a097d2b3aa
26 changed files with 431 additions and 212 deletions

View File

@ -1,19 +1,19 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef TIRETEMPBASE_HPP
#define TIRETEMPBASE_HPP
#ifndef TEMPERATUREBASE_HPP
#define TEMPERATUREBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
class TireTempBase : public touchgfx::Container
class TemperatureBase : public touchgfx::Container
{
public:
TireTempBase();
virtual ~TireTempBase();
TemperatureBase();
virtual ~TemperatureBase();
virtual void initialize();
protected:
@ -31,4 +31,4 @@ private:
};
#endif // TIRETEMPBASE_HPP
#endif // TEMPERATUREBASE_HPP

View File

@ -8,11 +8,11 @@
#include <mvp/View.hpp>
#include <gui/driverview_screen/DriverViewPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <gui/containers/TireTemp.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <gui/containers/Temperature.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
#include <touchgfx/containers/progress_indicators/LineProgress.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <gui/containers/DriverViewField.hpp>
#include <touchgfx/containers/scrollers/ScrollWheel.hpp>
#include <gui/containers/DriverViewFieldSelection.hpp>
@ -66,14 +66,24 @@ protected:
* Member Declarations
*/
touchgfx::Box __background;
TireTemp tireTempRR;
TireTemp tireTempFR;
TireTemp tireTempRL;
TireTemp tireTempFL;
touchgfx::TextArea motorTempLabel;
Temperature motorTempL;
Temperature motorTempR;
touchgfx::Line motorTempDiv;
touchgfx::PainterRGB565 motorTempDivPainter;
touchgfx::Line invTempDiv;
touchgfx::PainterRGB565 invTempDivPainter;
Temperature invTempR;
Temperature invTempL;
touchgfx::TextArea invTempLabel;
touchgfx::Line ttDivVert;
touchgfx::PainterRGB565 ttDivVertPainter;
touchgfx::Line ttDivHoriz;
touchgfx::PainterRGB565 ttDivHorizPainter;
Temperature tireTempRR;
Temperature tireTempFR;
Temperature tireTempRL;
Temperature tireTempFL;
touchgfx::LineProgress tsSoC;
touchgfx::PainterRGB565 tsSoCPainter;
touchgfx::LineProgress lvSoC;

View File

@ -1,31 +1,31 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <gui_generated/containers/TireTempBase.hpp>
#include <gui_generated/containers/TemperatureBase.hpp>
#include <touchgfx/Color.hpp>
#include <texts/TextKeysAndLanguages.hpp>
TireTempBase::TireTempBase()
TemperatureBase::TemperatureBase()
{
setWidth(75);
setHeight(75);
bg.setPosition(0, 0, 75, 75);
setWidth(60);
setHeight(60);
bg.setPosition(0, 0, 60, 60);
bg.setColor(touchgfx::Color::getColorFromRGB(0, 38, 255));
add(bg);
value.setPosition(0, 7, 75, 60);
value.setPosition(0, 0, 60, 50);
value.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
value.setLinespacing(0);
value.setTypedText(touchgfx::TypedText(T___SINGLEUSE_20H3));
add(value);
}
TireTempBase::~TireTempBase()
TemperatureBase::~TemperatureBase()
{
}
void TireTempBase::initialize()
void TemperatureBase::initialize()
{
}

View File

@ -4,8 +4,8 @@
#include <gui_generated/driverview_screen/DriverViewViewBase.hpp>
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
#include <touchgfx/Color.hpp>
#include <images/BitmapDatabase.hpp>
#include <texts/TextKeysAndLanguages.hpp>
#include <images/BitmapDatabase.hpp>
DriverViewViewBase::DriverViewViewBase() :
updateItemCallback(this, &DriverViewViewBase::updateItemCallbackHandler)
@ -16,19 +16,49 @@ DriverViewViewBase::DriverViewViewBase() :
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
add(__background);
tireTempRR.setXY(240, 197);
add(tireTempRR);
motorTempLabel.setPosition(315, 187, 150, 25);
motorTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
motorTempLabel.setLinespacing(0);
motorTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_JN2J));
add(motorTempLabel);
tireTempFR.setXY(240, 122);
add(tireTempFR);
motorTempL.setXY(329, 212);
add(motorTempL);
tireTempRL.setXY(165, 197);
add(tireTempRL);
motorTempR.setXY(392, 212);
add(motorTempR);
tireTempFL.setXY(165, 122);
add(tireTempFL);
motorTempDiv.setPosition(389, 212, 3, 60);
motorTempDivPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
motorTempDiv.setPainter(motorTempDivPainter);
motorTempDiv.setStart(0, 0);
motorTempDiv.setEnd(0, 320);
motorTempDiv.setLineWidth(10);
motorTempDiv.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(motorTempDiv);
ttDivVert.setPosition(239, 122, 3, 150);
invTempDiv.setPosition(389, 122, 3, 60);
invTempDivPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
invTempDiv.setPainter(invTempDivPainter);
invTempDiv.setStart(0, 0);
invTempDiv.setEnd(0, 320);
invTempDiv.setLineWidth(10);
invTempDiv.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(invTempDiv);
invTempR.setXY(392, 122);
add(invTempR);
invTempL.setXY(329, 122);
add(invTempL);
invTempLabel.setPosition(315, 97, 150, 25);
invTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
invTempLabel.setLinespacing(0);
invTempLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_ZP7N));
add(invTempLabel);
ttDivVert.setPosition(239, 122, 3, 123);
ttDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
ttDivVert.setPainter(ttDivVertPainter);
ttDivVert.setStart(0, 0);
@ -37,7 +67,7 @@ DriverViewViewBase::DriverViewViewBase() :
ttDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(ttDivVert);
ttDivHoriz.setPosition(165, 196, 150, 3);
ttDivHoriz.setPosition(179, 182, 123, 3);
ttDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
ttDivHoriz.setPainter(ttDivHorizPainter);
ttDivHoriz.setStart(0, 0);
@ -46,6 +76,18 @@ DriverViewViewBase::DriverViewViewBase() :
ttDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(ttDivHoriz);
tireTempRR.setXY(242, 185);
add(tireTempRR);
tireTempFR.setXY(242, 122);
add(tireTempFR);
tireTempRL.setXY(179, 185);
add(tireTempRL);
tireTempFL.setXY(179, 122);
add(tireTempFL);
tsSoC.setXY(15, 122);
tsSoC.setProgressIndicatorPosition(0, 0, 40, 150);
tsSoC.setRange(0, 100);
@ -59,7 +101,7 @@ DriverViewViewBase::DriverViewViewBase() :
tsSoC.setValue(60);
add(tsSoC);
lvSoC.setXY(425, 122);
lvSoC.setXY(110, 122);
lvSoC.setProgressIndicatorPosition(0, 0, 40, 150);
lvSoC.setRange(0, 100);
lvSoC.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
@ -84,7 +126,7 @@ DriverViewViewBase::DriverViewViewBase() :
tsSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
add(tsSoCLabel);
lvSoCLabel.setPosition(425, 97, 40, 25);
lvSoCLabel.setPosition(110, 97, 40, 25);
lvSoCLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
lvSoCLabel.setLinespacing(0);
lvSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_4OBM));
@ -156,6 +198,10 @@ DriverViewViewBase::~DriverViewViewBase()
void DriverViewViewBase::setupScreen()
{
motorTempL.initialize();
motorTempR.initialize();
invTempR.initialize();
invTempL.initialize();
tireTempRR.initialize();
tireTempFR.initialize();
tireTempRL.initialize();