From cb2f55be1bb27725e2cdd7dad809500cc8b8845d Mon Sep 17 00:00:00 2001 From: "Jasper v. Blanckenburg" Date: Tue, 11 Jun 2024 22:17:21 +0200 Subject: [PATCH] Move R2D/precharge bar to custom container --- TouchGFX/assets/texts/texts.xml | 18 +- .../containers/ProgressBarBase.hpp | 37 ++++ .../driverview_screen/DriverViewViewBase.hpp | 7 +- .../endurance_screen/EnduranceViewBase.hpp | 21 ++ .../src/containers/ProgressBarBase.cpp | 53 +++++ .../driverview_screen/DriverViewViewBase.cpp | 29 +-- .../endurance_screen/EnduranceViewBase.cpp | 39 ++++ .../texts/cache/LanguageCpp_Gb.cache | 2 +- .../texts/cache/TextKeysAndLanguages.cache | 2 +- .../texts/cache/TypedTextDatabaseCpp.cache | 2 +- .../include/texts/TextKeysAndLanguages.hpp | 6 +- TouchGFX/generated/texts/src/LanguageGb.cpp | 6 +- .../generated/texts/src/TypedTextDatabase.cpp | 12 +- .../include/gui/containers/ProgressBar.hpp | 23 +++ .../gui/driverview_screen/DriverViewView.hpp | 8 +- TouchGFX/gui/src/containers/ProgressBar.cpp | 45 ++++ .../driverview_screen/DriverViewPresenter.cpp | 8 +- .../src/driverview_screen/DriverViewView.cpp | 40 +--- TouchGFX/steering-wheel.touchgfx | 194 ++++++++++++------ 19 files changed, 382 insertions(+), 170 deletions(-) create mode 100644 TouchGFX/generated/gui_generated/include/gui_generated/containers/ProgressBarBase.hpp create mode 100644 TouchGFX/generated/gui_generated/src/containers/ProgressBarBase.cpp create mode 100644 TouchGFX/gui/include/gui/containers/ProgressBar.hpp create mode 100644 TouchGFX/gui/src/containers/ProgressBar.cpp diff --git a/TouchGFX/assets/texts/texts.xml b/TouchGFX/assets/texts/texts.xml index e759422..ebf7234 100644 --- a/TouchGFX/assets/texts/texts.xml +++ b/TouchGFX/assets/texts/texts.xml @@ -171,6 +171,15 @@ + + <value> + + + R2D + + + PRECHARGE + <value>° @@ -291,12 +300,6 @@ - - <value> - - - R2D - <value> @@ -306,9 +309,6 @@ PARAMETERS - - PRECHARGE - <value>% diff --git a/TouchGFX/generated/gui_generated/include/gui_generated/containers/ProgressBarBase.hpp b/TouchGFX/generated/gui_generated/include/gui_generated/containers/ProgressBarBase.hpp new file mode 100644 index 0000000..0936473 --- /dev/null +++ b/TouchGFX/generated/gui_generated/include/gui_generated/containers/ProgressBarBase.hpp @@ -0,0 +1,37 @@ +/*********************************************************************************/ +/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ +/*********************************************************************************/ +#ifndef PROGRESSBARBASE_HPP +#define PROGRESSBARBASE_HPP + +#include +#include +#include +#include +#include + +class ProgressBarBase : public touchgfx::Container +{ +public: + ProgressBarBase(); + virtual ~ProgressBarBase(); + virtual void initialize(); + +protected: + FrontendApplication& application() { + return *static_cast(touchgfx::Application::getInstance()); + } + + /* + * Member Declarations + */ + touchgfx::TextAreaWithOneWildcard r2dProgressLabel; + touchgfx::TextArea r2dLabel; + touchgfx::TextArea prechargeLabel; + touchgfx::BoxProgress progressBar; + +private: + +}; + +#endif // PROGRESSBARBASE_HPP diff --git a/TouchGFX/generated/gui_generated/include/gui_generated/driverview_screen/DriverViewViewBase.hpp b/TouchGFX/generated/gui_generated/include/gui_generated/driverview_screen/DriverViewViewBase.hpp index 2ce025b..b401167 100644 --- a/TouchGFX/generated/gui_generated/include/gui_generated/driverview_screen/DriverViewViewBase.hpp +++ b/TouchGFX/generated/gui_generated/include/gui_generated/driverview_screen/DriverViewViewBase.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include class DriverViewViewBase : public touchgfx::View @@ -98,10 +98,7 @@ protected: DriverViewStatusItem statusPDU; DriverViewStatusItem statusINV; DriverViewStatusItem statusLV; - touchgfx::BoxProgress progressBar; - touchgfx::TextArea prechargeLabel; - touchgfx::TextArea r2dLabel; - touchgfx::TextAreaWithOneWildcard r2dProgressLabel; + ProgressBar progressBar; ErrorPopup errorPopup; private: diff --git a/TouchGFX/generated/gui_generated/include/gui_generated/endurance_screen/EnduranceViewBase.hpp b/TouchGFX/generated/gui_generated/include/gui_generated/endurance_screen/EnduranceViewBase.hpp index c7757bd..05a75f6 100644 --- a/TouchGFX/generated/gui_generated/include/gui_generated/endurance_screen/EnduranceViewBase.hpp +++ b/TouchGFX/generated/gui_generated/include/gui_generated/endurance_screen/EnduranceViewBase.hpp @@ -19,6 +19,27 @@ public: EnduranceViewBase(); virtual ~EnduranceViewBase(); virtual void setupScreen(); + virtual void handleKeyEvent(uint8_t key); + + /* + * Virtual Action Handlers + */ + virtual void decreasePowerLimit() + { + // Override and implement this function in Endurance + } + virtual void increasePowerLimit() + { + // Override and implement this function in Endurance + } + virtual void decreaseSpeedLimit() + { + // Override and implement this function in Endurance + } + virtual void increaseSpeedLimit() + { + // Override and implement this function in Endurance + } protected: FrontendApplication& application() { diff --git a/TouchGFX/generated/gui_generated/src/containers/ProgressBarBase.cpp b/TouchGFX/generated/gui_generated/src/containers/ProgressBarBase.cpp new file mode 100644 index 0000000..4431227 --- /dev/null +++ b/TouchGFX/generated/gui_generated/src/containers/ProgressBarBase.cpp @@ -0,0 +1,53 @@ +/*********************************************************************************/ +/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ +/*********************************************************************************/ +#include +#include +#include +#include + +ProgressBarBase::ProgressBarBase() +{ + setWidth(456); + setHeight(33); + r2dProgressLabel.setPosition(168, -2, 219, 37); + r2dProgressLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); + r2dProgressLabel.setLinespacing(0); + r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_6EXA)); + r2dProgressLabel.setVisible(false); + add(r2dProgressLabel); + + r2dLabel.setPosition(70, -2, 317, 37); + r2dLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); + r2dLabel.setLinespacing(0); + r2dLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_570K)); + r2dLabel.setVisible(false); + add(r2dLabel); + + prechargeLabel.setXY(95, -2); + prechargeLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); + prechargeLabel.setLinespacing(0); + prechargeLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_G2S2)); + prechargeLabel.setVisible(false); + add(prechargeLabel); + + progressBar.setXY(0, 0); + progressBar.setProgressIndicatorPosition(0, 0, 480, 55); + progressBar.setRange(0, 100); + progressBar.setDirection(touchgfx::AbstractDirectionProgress::RIGHT); + progressBar.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID)); + progressBar.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0)); + progressBar.setValue(0); + progressBar.setVisible(false); + add(progressBar); +} + +ProgressBarBase::~ProgressBarBase() +{ + +} + +void ProgressBarBase::initialize() +{ + +} diff --git a/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp b/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp index dc0d18a..1e927ad 100644 --- a/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp +++ b/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp @@ -124,36 +124,8 @@ DriverViewViewBase::DriverViewViewBase() : statusBar.add(statusItems); progressBar.setXY(0, 0); - progressBar.setProgressIndicatorPosition(0, 0, 480, 55); - progressBar.setRange(0, 100); - progressBar.setDirection(touchgfx::AbstractDirectionProgress::RIGHT); - progressBar.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID)); - progressBar.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0)); - progressBar.setValue(0); - progressBar.setVisible(false); statusBar.add(progressBar); - prechargeLabel.setXY(95, -2); - prechargeLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); - prechargeLabel.setLinespacing(0); - prechargeLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_HMH2)); - prechargeLabel.setVisible(false); - statusBar.add(prechargeLabel); - - r2dLabel.setPosition(70, -2, 317, 37); - r2dLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); - r2dLabel.setLinespacing(0); - r2dLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_NGUK)); - r2dLabel.setVisible(false); - statusBar.add(r2dLabel); - - r2dProgressLabel.setPosition(168, -2, 219, 37); - r2dProgressLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); - r2dProgressLabel.setLinespacing(0); - r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_J5UH)); - r2dProgressLabel.setVisible(false); - statusBar.add(r2dProgressLabel); - add(statusBar); errorPopup.setXY(12, 125); @@ -187,6 +159,7 @@ void DriverViewViewBase::setupScreen() statusPDU.initialize(); statusINV.initialize(); statusLV.initialize(); + progressBar.initialize(); errorPopup.initialize(); } diff --git a/TouchGFX/generated/gui_generated/src/endurance_screen/EnduranceViewBase.cpp b/TouchGFX/generated/gui_generated/src/endurance_screen/EnduranceViewBase.cpp index 1022cce..5042cd6 100644 --- a/TouchGFX/generated/gui_generated/src/endurance_screen/EnduranceViewBase.cpp +++ b/TouchGFX/generated/gui_generated/src/endurance_screen/EnduranceViewBase.cpp @@ -126,3 +126,42 @@ void EnduranceViewBase::setupScreen() { } + +void EnduranceViewBase::handleKeyEvent(uint8_t key) +{ + if(104 == key) + { + //DecreasePLim + //When hardware button 104 clicked call virtual function + //Call decreasePowerLimit + decreasePowerLimit(); + + } + + if(108 == key) + { + //IncreasePLim + //When hardware button 108 clicked call virtual function + //Call increasePowerLimit + increasePowerLimit(); + + } + + if(107 == key) + { + //DecreaseSLim + //When hardware button 107 clicked call virtual function + //Call decreaseSpeedLimit + decreaseSpeedLimit(); + + } + + if(106 == key) + { + //IncreaseSLim + //When hardware button 106 clicked call virtual function + //Call increaseSpeedLimit + increaseSpeedLimit(); + + } +} diff --git a/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache b/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache index b4427e5..b1022e1 100644 --- a/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache +++ b/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache @@ -1 +1 @@ -{"remap":"yes","language":"GB","language_index":0,"indices":[["524","T_LV"],["404","T_PDU"],["516","T_SCS"],["520","T_SDC"],["512","T_R2D"],["509","T_TS"],["504","T_INV"],["392","T_AMS"],["235","T_ERROR_AMS"],["200","T_DEBUGVIEWFIELD_TITLE"],["200","T_DRIVERVIEWFIELD_TITLE"],["200","T_NUMBERSMALLWILDCARD"],["450","T_FIELD_BBAL"],["383","T_FIELD_TSVOLTVEH"],["376","T_FIELD_TSVOLTBAT"],["420","T_FIELD_LVSOC"],["444","T_FIELD_TSSOC"],["465","T_FIELD_MAXCELLTEMP"],["475","T_FIELD_TIREFL"],["480","T_FIELD_TIREFR"],["485","T_FIELD_TIRERL"],["490","T_FIELD_TIRERR"],["460","T_FIELD_LAPCOUNT"],["305","T_FIELD_INICHKSTATE"],["414","T_FIELD_ERR"],["520","T_FIELD_SDC"],["321","T_FIELD_INVRREADY"],["313","T_FIELD_INVLREADY"],["345","T_FIELD_R2DPROGRESS"],["329","T_FIELD_ACTIVEMISSION"],["289","T_FIELD_ASSTATE"],["361","T_FIELD_TSSTATE"],["200","T_NUMBERWILDCARD"],["200","T_DEFAULTWILDCARD_CENTERED"],["200","T_DEFAULTWILDCARD_RIGHTALIGNED"],["508","T_FIELD_TSCURRENT"],["495","T_FIELD_MINCELLVOLT"],["438","T_FIELD_SPEED"],["202","T_INSPECTION_HUGE"],["280","T_EBS_HUGE"],["224","T_TRACKDRIVE_HUGE"],["245","T_AUTOX_HUGE"],["353","T_SKIDPAD_HUGE"],["146","T_ACCEL_HUGE"],["35","T_INVALID_HUGE"],["116","T_MANUAL"],["202","T_INSPECTION"],["280","T_EBS"],["224","T_TRACKDRIVE"],["245","T_AUTOX"],["353","T_SKIDPAD"],["146","T_ACCEL"],["268","T___SINGLEUSE_B2Q6"],["265","T___SINGLEUSE_OP6C"],["438","T___SINGLEUSE_1F9T"],["432","T___SINGLEUSE_QAZ3"],["200","T___SINGLEUSE_DONW"],["200","T___SINGLEUSE_4X8X"],["265","T___SINGLEUSE_FPXE"],["265","T___SINGLEUSE_51AZ"],["185","T___SINGLEUSE_DJ62"],["159","T___SINGLEUSE_5W6Y"],["197","T___SINGLEUSE_C17G"],["390","T___SINGLEUSE_XFW7"],["396","T___SINGLEUSE_N50J"],["500","T___SINGLEUSE_V38H"],["470","T___SINGLEUSE_XC1X"],["271","T___SINGLEUSE_KI1B"],["172","T___SINGLEUSE_QNHI"],["0","T___SINGLEUSE_43KA"],["402","T___SINGLEUSE_YRU7"],["455","T___SINGLEUSE_E6D7"],["200","T___SINGLEUSE_ZEKA"],["131","T___SINGLEUSE_0L75"],["100","T___SINGLEUSE_GA13"],["200","T___SINGLEUSE_THUG"],["200","T___SINGLEUSE_CO7A"],["200","T___SINGLEUSE_A0LF"],["200","T___SINGLEUSE_166C"],["84","T___SINGLEUSE_OOU3"],["68","T___SINGLEUSE_2FPP"],["200","T___SINGLEUSE_2S21"],["200","T___SINGLEUSE_OQ6P"],["337","T___SINGLEUSE_590R"],["297","T___SINGLEUSE_Z78U"],["200","T___SINGLEUSE_LLOZ"],["200","T___SINGLEUSE_232C"],["426","T___SINGLEUSE_JFR7"],["408","T___SINGLEUSE_3MDX"],["17","T___SINGLEUSE_F9I5"],["200","T___SINGLEUSE_9L8R"],["17","T___SINGLEUSE_1NKF"],["200","T___SINGLEUSE_J5UH"],["512","T___SINGLEUSE_NGUK"],["200","T___SINGLEUSE_4E84"],["200","T___SINGLEUSE_YTAB"],["213","T___SINGLEUSE_RWCE"],["255","T___SINGLEUSE_HMH2"],["265","T___SINGLEUSE_PHFD"],["369","T___SINGLEUSE_H6UX"],["200","T___SINGLEUSE_20H3"],["52","T___SINGLEUSE_M5X7"],["18","T___SINGLEUSE_6GPV"]]} \ No newline at end of file +{"remap":"yes","language":"GB","language_index":0,"indices":[["524","T_LV"],["404","T_PDU"],["516","T_SCS"],["520","T_SDC"],["512","T_R2D"],["509","T_TS"],["504","T_INV"],["392","T_AMS"],["235","T_ERROR_AMS"],["200","T_DEBUGVIEWFIELD_TITLE"],["200","T_DRIVERVIEWFIELD_TITLE"],["200","T_NUMBERSMALLWILDCARD"],["450","T_FIELD_BBAL"],["383","T_FIELD_TSVOLTVEH"],["376","T_FIELD_TSVOLTBAT"],["420","T_FIELD_LVSOC"],["444","T_FIELD_TSSOC"],["465","T_FIELD_MAXCELLTEMP"],["475","T_FIELD_TIREFL"],["480","T_FIELD_TIREFR"],["485","T_FIELD_TIRERL"],["490","T_FIELD_TIRERR"],["460","T_FIELD_LAPCOUNT"],["305","T_FIELD_INICHKSTATE"],["414","T_FIELD_ERR"],["520","T_FIELD_SDC"],["321","T_FIELD_INVRREADY"],["313","T_FIELD_INVLREADY"],["345","T_FIELD_R2DPROGRESS"],["329","T_FIELD_ACTIVEMISSION"],["289","T_FIELD_ASSTATE"],["361","T_FIELD_TSSTATE"],["200","T_NUMBERWILDCARD"],["200","T_DEFAULTWILDCARD_CENTERED"],["200","T_DEFAULTWILDCARD_RIGHTALIGNED"],["508","T_FIELD_TSCURRENT"],["495","T_FIELD_MINCELLVOLT"],["438","T_FIELD_SPEED"],["202","T_INSPECTION_HUGE"],["280","T_EBS_HUGE"],["224","T_TRACKDRIVE_HUGE"],["245","T_AUTOX_HUGE"],["353","T_SKIDPAD_HUGE"],["146","T_ACCEL_HUGE"],["35","T_INVALID_HUGE"],["116","T_MANUAL"],["202","T_INSPECTION"],["280","T_EBS"],["224","T_TRACKDRIVE"],["245","T_AUTOX"],["353","T_SKIDPAD"],["146","T_ACCEL"],["200","T___SINGLEUSE_6EXA"],["512","T___SINGLEUSE_570K"],["255","T___SINGLEUSE_G2S2"],["268","T___SINGLEUSE_B2Q6"],["265","T___SINGLEUSE_OP6C"],["438","T___SINGLEUSE_1F9T"],["432","T___SINGLEUSE_QAZ3"],["200","T___SINGLEUSE_DONW"],["200","T___SINGLEUSE_4X8X"],["265","T___SINGLEUSE_FPXE"],["265","T___SINGLEUSE_51AZ"],["185","T___SINGLEUSE_DJ62"],["159","T___SINGLEUSE_5W6Y"],["197","T___SINGLEUSE_C17G"],["390","T___SINGLEUSE_XFW7"],["396","T___SINGLEUSE_N50J"],["500","T___SINGLEUSE_V38H"],["470","T___SINGLEUSE_XC1X"],["271","T___SINGLEUSE_KI1B"],["172","T___SINGLEUSE_QNHI"],["0","T___SINGLEUSE_43KA"],["402","T___SINGLEUSE_YRU7"],["455","T___SINGLEUSE_E6D7"],["200","T___SINGLEUSE_ZEKA"],["131","T___SINGLEUSE_0L75"],["100","T___SINGLEUSE_GA13"],["200","T___SINGLEUSE_THUG"],["200","T___SINGLEUSE_CO7A"],["200","T___SINGLEUSE_A0LF"],["200","T___SINGLEUSE_166C"],["84","T___SINGLEUSE_OOU3"],["68","T___SINGLEUSE_2FPP"],["200","T___SINGLEUSE_2S21"],["200","T___SINGLEUSE_OQ6P"],["337","T___SINGLEUSE_590R"],["297","T___SINGLEUSE_Z78U"],["200","T___SINGLEUSE_LLOZ"],["200","T___SINGLEUSE_232C"],["426","T___SINGLEUSE_JFR7"],["408","T___SINGLEUSE_3MDX"],["17","T___SINGLEUSE_F9I5"],["200","T___SINGLEUSE_9L8R"],["17","T___SINGLEUSE_1NKF"],["200","T___SINGLEUSE_4E84"],["200","T___SINGLEUSE_YTAB"],["213","T___SINGLEUSE_RWCE"],["265","T___SINGLEUSE_PHFD"],["369","T___SINGLEUSE_H6UX"],["200","T___SINGLEUSE_20H3"],["52","T___SINGLEUSE_M5X7"],["18","T___SINGLEUSE_6GPV"]]} \ No newline at end of file diff --git a/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache b/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache index 8e48d68..b4283bf 100644 --- a/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache +++ b/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache @@ -1 +1 @@ -{"languages":["GB"],"textids":["T_LV","T_PDU","T_SCS","T_SDC","T_R2D","T_TS","T_INV","T_AMS","T_ERROR_AMS","T_DEBUGVIEWFIELD_TITLE","T_DRIVERVIEWFIELD_TITLE","T_NUMBERSMALLWILDCARD","T_FIELD_BBAL","T_FIELD_TSVOLTVEH","T_FIELD_TSVOLTBAT","T_FIELD_LVSOC","T_FIELD_TSSOC","T_FIELD_MAXCELLTEMP","T_FIELD_TIREFL","T_FIELD_TIREFR","T_FIELD_TIRERL","T_FIELD_TIRERR","T_FIELD_LAPCOUNT","T_FIELD_INICHKSTATE","T_FIELD_ERR","T_FIELD_SDC","T_FIELD_INVRREADY","T_FIELD_INVLREADY","T_FIELD_R2DPROGRESS","T_FIELD_ACTIVEMISSION","T_FIELD_ASSTATE","T_FIELD_TSSTATE","T_NUMBERWILDCARD","T_DEFAULTWILDCARD_CENTERED","T_DEFAULTWILDCARD_RIGHTALIGNED","T_FIELD_TSCURRENT","T_FIELD_MINCELLVOLT","T_FIELD_SPEED","T_INSPECTION_HUGE","T_EBS_HUGE","T_TRACKDRIVE_HUGE","T_AUTOX_HUGE","T_SKIDPAD_HUGE","T_ACCEL_HUGE","T_INVALID_HUGE","T_MANUAL","T_INSPECTION","T_EBS","T_TRACKDRIVE","T_AUTOX","T_SKIDPAD","T_ACCEL","T___SINGLEUSE_B2Q6","T___SINGLEUSE_OP6C","T___SINGLEUSE_1F9T","T___SINGLEUSE_QAZ3","T___SINGLEUSE_DONW","T___SINGLEUSE_4X8X","T___SINGLEUSE_FPXE","T___SINGLEUSE_51AZ","T___SINGLEUSE_DJ62","T___SINGLEUSE_5W6Y","T___SINGLEUSE_C17G","T___SINGLEUSE_XFW7","T___SINGLEUSE_N50J","T___SINGLEUSE_V38H","T___SINGLEUSE_XC1X","T___SINGLEUSE_KI1B","T___SINGLEUSE_QNHI","T___SINGLEUSE_43KA","T___SINGLEUSE_YRU7","T___SINGLEUSE_E6D7","T___SINGLEUSE_ZEKA","T___SINGLEUSE_0L75","T___SINGLEUSE_GA13","T___SINGLEUSE_THUG","T___SINGLEUSE_CO7A","T___SINGLEUSE_A0LF","T___SINGLEUSE_166C","T___SINGLEUSE_OOU3","T___SINGLEUSE_2FPP","T___SINGLEUSE_2S21","T___SINGLEUSE_OQ6P","T___SINGLEUSE_590R","T___SINGLEUSE_Z78U","T___SINGLEUSE_LLOZ","T___SINGLEUSE_232C","T___SINGLEUSE_JFR7","T___SINGLEUSE_3MDX","T___SINGLEUSE_F9I5","T___SINGLEUSE_9L8R","T___SINGLEUSE_1NKF","T___SINGLEUSE_J5UH","T___SINGLEUSE_NGUK","T___SINGLEUSE_4E84","T___SINGLEUSE_YTAB","T___SINGLEUSE_RWCE","T___SINGLEUSE_HMH2","T___SINGLEUSE_PHFD","T___SINGLEUSE_H6UX","T___SINGLEUSE_20H3","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]} \ No newline at end of file +{"languages":["GB"],"textids":["T_LV","T_PDU","T_SCS","T_SDC","T_R2D","T_TS","T_INV","T_AMS","T_ERROR_AMS","T_DEBUGVIEWFIELD_TITLE","T_DRIVERVIEWFIELD_TITLE","T_NUMBERSMALLWILDCARD","T_FIELD_BBAL","T_FIELD_TSVOLTVEH","T_FIELD_TSVOLTBAT","T_FIELD_LVSOC","T_FIELD_TSSOC","T_FIELD_MAXCELLTEMP","T_FIELD_TIREFL","T_FIELD_TIREFR","T_FIELD_TIRERL","T_FIELD_TIRERR","T_FIELD_LAPCOUNT","T_FIELD_INICHKSTATE","T_FIELD_ERR","T_FIELD_SDC","T_FIELD_INVRREADY","T_FIELD_INVLREADY","T_FIELD_R2DPROGRESS","T_FIELD_ACTIVEMISSION","T_FIELD_ASSTATE","T_FIELD_TSSTATE","T_NUMBERWILDCARD","T_DEFAULTWILDCARD_CENTERED","T_DEFAULTWILDCARD_RIGHTALIGNED","T_FIELD_TSCURRENT","T_FIELD_MINCELLVOLT","T_FIELD_SPEED","T_INSPECTION_HUGE","T_EBS_HUGE","T_TRACKDRIVE_HUGE","T_AUTOX_HUGE","T_SKIDPAD_HUGE","T_ACCEL_HUGE","T_INVALID_HUGE","T_MANUAL","T_INSPECTION","T_EBS","T_TRACKDRIVE","T_AUTOX","T_SKIDPAD","T_ACCEL","T___SINGLEUSE_6EXA","T___SINGLEUSE_570K","T___SINGLEUSE_G2S2","T___SINGLEUSE_B2Q6","T___SINGLEUSE_OP6C","T___SINGLEUSE_1F9T","T___SINGLEUSE_QAZ3","T___SINGLEUSE_DONW","T___SINGLEUSE_4X8X","T___SINGLEUSE_FPXE","T___SINGLEUSE_51AZ","T___SINGLEUSE_DJ62","T___SINGLEUSE_5W6Y","T___SINGLEUSE_C17G","T___SINGLEUSE_XFW7","T___SINGLEUSE_N50J","T___SINGLEUSE_V38H","T___SINGLEUSE_XC1X","T___SINGLEUSE_KI1B","T___SINGLEUSE_QNHI","T___SINGLEUSE_43KA","T___SINGLEUSE_YRU7","T___SINGLEUSE_E6D7","T___SINGLEUSE_ZEKA","T___SINGLEUSE_0L75","T___SINGLEUSE_GA13","T___SINGLEUSE_THUG","T___SINGLEUSE_CO7A","T___SINGLEUSE_A0LF","T___SINGLEUSE_166C","T___SINGLEUSE_OOU3","T___SINGLEUSE_2FPP","T___SINGLEUSE_2S21","T___SINGLEUSE_OQ6P","T___SINGLEUSE_590R","T___SINGLEUSE_Z78U","T___SINGLEUSE_LLOZ","T___SINGLEUSE_232C","T___SINGLEUSE_JFR7","T___SINGLEUSE_3MDX","T___SINGLEUSE_F9I5","T___SINGLEUSE_9L8R","T___SINGLEUSE_1NKF","T___SINGLEUSE_4E84","T___SINGLEUSE_YTAB","T___SINGLEUSE_RWCE","T___SINGLEUSE_PHFD","T___SINGLEUSE_H6UX","T___SINGLEUSE_20H3","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]} \ No newline at end of file diff --git a/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache b/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache index 0eec24c..91c7a22 100644 --- a/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache +++ b/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache @@ -1 +1 @@ -{"databases":{"GB":[[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[5,"LEFT","LTR"],[2,"CENTER","LTR"],[6,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"RIGHT","LTR"],[4,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[8,"CENTER","LTR"],[8,"CENTER","LTR"],[8,"RIGHT","LTR"],[8,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[1,"LEFT","LTR"],[1,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[0,"LEFT","LTR"],[3,"CENTER","LTR"],[1,"RIGHT","LTR"],[1,"LEFT","LTR"],[4,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"CENTER","LTR"],[1,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]],"DEFAULT":[[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[5,"LEFT","LTR"],[2,"CENTER","LTR"],[6,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"RIGHT","LTR"],[4,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[8,"CENTER","LTR"],[8,"CENTER","LTR"],[8,"RIGHT","LTR"],[8,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[1,"LEFT","LTR"],[1,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[0,"LEFT","LTR"],[3,"CENTER","LTR"],[1,"RIGHT","LTR"],[1,"LEFT","LTR"],[4,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"CENTER","LTR"],[1,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]]},"database_list":["GB"],"fonts":{"getFont_verdana_20_4bpp":0,"getFont_CHINN____30_4bpp":1,"getFont_CHINN____20_4bpp":2,"getFont_CHINN____40_4bpp":3,"getFont_lucon_TTF_50_4bpp":4,"getFont_verdanab_20_4bpp":5,"getFont_lucon_TTF_33_4bpp":6,"getFont_lucon_TTF_20_4bpp":7,"getFont_lucon_TTF_80_4bpp":8},"generate_font_format":"0"} \ No newline at end of file +{"databases":{"GB":[[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[5,"LEFT","LTR"],[2,"CENTER","LTR"],[6,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"LEFT","LTR"],[4,"RIGHT","LTR"],[4,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[8,"CENTER","LTR"],[8,"CENTER","LTR"],[8,"RIGHT","LTR"],[8,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[1,"LEFT","LTR"],[1,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[0,"LEFT","LTR"],[3,"CENTER","LTR"],[4,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]],"DEFAULT":[[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[5,"LEFT","LTR"],[2,"CENTER","LTR"],[6,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[0,"CENTER","LTR"],[0,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[3,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"LEFT","LTR"],[4,"RIGHT","LTR"],[4,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[8,"CENTER","LTR"],[8,"CENTER","LTR"],[8,"RIGHT","LTR"],[8,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[2,"RIGHT","LTR"],[2,"CENTER","LTR"],[2,"LEFT","LTR"],[1,"LEFT","LTR"],[1,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[7,"RIGHT","LTR"],[7,"RIGHT","LTR"],[2,"LEFT","LTR"],[2,"LEFT","LTR"],[2,"CENTER","LTR"],[0,"LEFT","LTR"],[3,"CENTER","LTR"],[4,"RIGHT","LTR"],[1,"LEFT","LTR"],[1,"CENTER","LTR"],[2,"CENTER","LTR"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]]},"database_list":["GB"],"fonts":{"getFont_verdana_20_4bpp":0,"getFont_CHINN____30_4bpp":1,"getFont_CHINN____20_4bpp":2,"getFont_CHINN____40_4bpp":3,"getFont_lucon_TTF_50_4bpp":4,"getFont_verdanab_20_4bpp":5,"getFont_lucon_TTF_33_4bpp":6,"getFont_lucon_TTF_20_4bpp":7,"getFont_lucon_TTF_80_4bpp":8},"generate_font_format":"0"} \ No newline at end of file diff --git a/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp b/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp index b04cd06..8511136 100644 --- a/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp +++ b/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp @@ -64,6 +64,9 @@ enum TEXTS T_AUTOX, T_SKIDPAD, T_ACCEL, + T___SINGLEUSE_6EXA, + T___SINGLEUSE_570K, + T___SINGLEUSE_G2S2, T___SINGLEUSE_B2Q6, T___SINGLEUSE_OP6C, T___SINGLEUSE_1F9T, @@ -104,12 +107,9 @@ enum TEXTS T___SINGLEUSE_F9I5, T___SINGLEUSE_9L8R, T___SINGLEUSE_1NKF, - T___SINGLEUSE_J5UH, - T___SINGLEUSE_NGUK, T___SINGLEUSE_4E84, T___SINGLEUSE_YTAB, T___SINGLEUSE_RWCE, - T___SINGLEUSE_HMH2, T___SINGLEUSE_PHFD, T___SINGLEUSE_H6UX, T___SINGLEUSE_20H3, diff --git a/TouchGFX/generated/texts/src/LanguageGb.cpp b/TouchGFX/generated/texts/src/LanguageGb.cpp index 5bcadf1..37c12fd 100644 --- a/TouchGFX/generated/texts/src/LanguageGb.cpp +++ b/TouchGFX/generated/texts/src/LanguageGb.cpp @@ -62,6 +62,9 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = { 245, // T_AUTOX: "Autocross" 353, // T_SKIDPAD: "Skidpad" 146, // T_ACCEL: "Acceleration" + 200, // T___SINGLEUSE_6EXA: "<>" + 512, // T___SINGLEUSE_570K: "R2D" + 255, // T___SINGLEUSE_G2S2: "PRECHARGE" 268, // T___SINGLEUSE_B2Q6: "<>?" 265, // T___SINGLEUSE_OP6C: "<>%" 438, // T___SINGLEUSE_1F9T: "SPEED" @@ -102,12 +105,9 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = { 17, // T___SINGLEUSE_F9I5: "" 200, // T___SINGLEUSE_9L8R: "<>" 17, // T___SINGLEUSE_1NKF: "" - 200, // T___SINGLEUSE_J5UH: "<>" - 512, // T___SINGLEUSE_NGUK: "R2D" 200, // T___SINGLEUSE_4E84: "<>" 200, // T___SINGLEUSE_YTAB: "<>" 213, // T___SINGLEUSE_RWCE: "PARAMETERS" - 255, // T___SINGLEUSE_HMH2: "PRECHARGE" 265, // T___SINGLEUSE_PHFD: "<>%" 369, // T___SINGLEUSE_H6UX: "BRAKES" 200, // T___SINGLEUSE_20H3: "<>" diff --git a/TouchGFX/generated/texts/src/TypedTextDatabase.cpp b/TouchGFX/generated/texts/src/TypedTextDatabase.cpp index 653c5db..c56ce92 100644 --- a/TouchGFX/generated/texts/src/TypedTextDatabase.cpp +++ b/TouchGFX/generated/texts/src/TypedTextDatabase.cpp @@ -84,6 +84,9 @@ const touchgfx::TypedText::TypedTextData typedText_database_GB[] TEXT_LOCATION_F { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, @@ -124,12 +127,9 @@ const touchgfx::TypedText::TypedTextData typedText_database_GB[] TEXT_LOCATION_F { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 0, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, @@ -190,6 +190,9 @@ const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCAT { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, + { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, @@ -230,12 +233,9 @@ const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCAT { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 0, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR }, { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 1, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, - { 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, { 4, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, diff --git a/TouchGFX/gui/include/gui/containers/ProgressBar.hpp b/TouchGFX/gui/include/gui/containers/ProgressBar.hpp new file mode 100644 index 0000000..f1a64d5 --- /dev/null +++ b/TouchGFX/gui/include/gui/containers/ProgressBar.hpp @@ -0,0 +1,23 @@ +#ifndef PROGRESSBAR_HPP +#define PROGRESSBAR_HPP + +#include + +enum class ProgressType { PRECHARGE, R2D }; + +class ProgressBar : public ProgressBarBase { +public: + ProgressBar(); + virtual ~ProgressBar() {} + + virtual void initialize(); + + void setProgress(bool active, ProgressType type, float progress); + +protected: +private: + touchgfx::Unicode::UnicodeChar r2dProgBuffer[16]; + touchgfx::Unicode::UnicodeChar socBuffer[4]; +}; + +#endif // PROGRESSBAR_HPP diff --git a/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp b/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp index 0cea870..29c2cc1 100644 --- a/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp +++ b/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp @@ -3,15 +3,12 @@ #include "gui/common/NamedField.hpp" #include "gui/containers/DriverViewFieldSelection.hpp" -#include "touchgfx/Unicode.hpp" -#include "touchgfx/containers/scrollers/DrawableList.hpp" +#include "gui/containers/ProgressBar.hpp" #include #include #include "vehicle_state.h" -enum class DriverViewProgressType { PRECHARGE, R2D }; - class DriverViewView : public DriverViewViewBase { public: DriverViewView(); @@ -28,7 +25,7 @@ public: void setTemps(const Temperatures &temps); void setTSSoC(uint8_t soc); - void setProgress(bool active, DriverViewProgressType type, float progress); + void setProgress(bool active, ProgressType type, float progress); void showAMSError(); void clearErrorPopup(); @@ -53,7 +50,6 @@ private: size_t selectedFieldIndex; DataFieldType fieldTypes[NUM_FIELDS]; - touchgfx::Unicode::UnicodeChar r2dProgBuffer[16]; touchgfx::Unicode::UnicodeChar socBuffer[4]; }; diff --git a/TouchGFX/gui/src/containers/ProgressBar.cpp b/TouchGFX/gui/src/containers/ProgressBar.cpp new file mode 100644 index 0000000..69ef5e4 --- /dev/null +++ b/TouchGFX/gui/src/containers/ProgressBar.cpp @@ -0,0 +1,45 @@ +#include "gui/common/NamedField.hpp" +#include + +ProgressBar::ProgressBar() {} + +void ProgressBar::initialize() { ProgressBarBase::initialize(); } + +void ProgressBar::setProgress(bool active, ProgressType type, float progress) { + if (active) { + switch (type) { + case ProgressType::PRECHARGE: + prechargeLabel.setVisible(true); + r2dLabel.setVisible(false); + r2dProgressLabel.setVisible(false); + progressBar.setValue(progress); + break; + case ProgressType::R2D: + const char *progText = static_cast(get_r2dprog_text()); + touchgfx::Unicode::strncpy(r2dProgBuffer, progText, + sizeof(r2dProgBuffer) / + sizeof(*r2dProgBuffer)); + r2dProgressLabel.setWildcard(r2dProgBuffer); + r2dProgressLabel.setVisible(true); + r2dLabel.setVisible(true); + prechargeLabel.setVisible(false); + progress = progress - R2D_TSACTIVE; + progressBar.setValue(progress * 100 / 5); + break; + } + prechargeLabel.invalidate(); + r2dProgressLabel.invalidate(); + r2dLabel.invalidate(); + progressBar.setVisible(true); + progressBar.invalidate(); + } else if (progressBar.isVisible()) { + prechargeLabel.setVisible(false); + prechargeLabel.invalidate(); + r2dLabel.setVisible(false); + r2dLabel.invalidate(); + r2dProgressLabel.setVisible(false); + r2dProgressLabel.invalidate(); + progressBar.setVisible(false); + progressBar.invalidate(); + } +} diff --git a/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp b/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp index 53c894b..f77cd0e 100644 --- a/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp +++ b/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp @@ -2,6 +2,7 @@ #include #include "gui/common/NamedField.hpp" +#include "gui/containers/ProgressBar.hpp" constexpr int32_t SHOW_ERRORS_FOR = 10000; // ms @@ -48,13 +49,12 @@ void DriverViewPresenter::updateProgress() { progress = vehicle_state.ts_voltage_veh / vehicle_state.ts_voltage_bat * 100; } - view.setProgress(true, DriverViewProgressType::PRECHARGE, progress); + view.setProgress(true, ProgressType::PRECHARGE, progress); } else if (vehicle_state.r2d_progress > R2D_TSACTIVE && vehicle_state.r2d_progress < R2D_INIT_SUCCESS) { - view.setProgress(true, DriverViewProgressType::R2D, - vehicle_state.r2d_progress); + view.setProgress(true, ProgressType::R2D, vehicle_state.r2d_progress); } else { - view.setProgress(false, DriverViewProgressType::PRECHARGE, 0); + view.setProgress(false, ProgressType::PRECHARGE, 0); } } diff --git a/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp b/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp index ad0e41b..fc95f88 100644 --- a/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp +++ b/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp @@ -1,6 +1,7 @@ #include "gui/common/NamedField.hpp" #include "gui/containers/DriverViewField.hpp" #include "gui/containers/DriverViewStatusItem.hpp" +#include "gui/containers/ProgressBar.hpp" #include "gui/driverview_screen/DriverViewPresenter.hpp" #include "texts/TextKeysAndLanguages.hpp" #include "touchgfx/Callback.hpp" @@ -96,44 +97,9 @@ void DriverViewView::setTSSoC(uint8_t value) { socLabel.invalidate(); } -void DriverViewView::setProgress(bool active, DriverViewProgressType type, +void DriverViewView::setProgress(bool active, ProgressType type, float progress) { - if (active) { - switch (type) { - case DriverViewProgressType::PRECHARGE: - prechargeLabel.setVisible(true); - r2dLabel.setVisible(false); - r2dProgressLabel.setVisible(false); - progressBar.setValue(progress); - break; - case DriverViewProgressType::R2D: - const char *progText = static_cast(get_r2dprog_text()); - touchgfx::Unicode::strncpy(r2dProgBuffer, progText, - sizeof(r2dProgBuffer) / - sizeof(*r2dProgBuffer)); - r2dProgressLabel.setWildcard(r2dProgBuffer); - r2dProgressLabel.setVisible(true); - r2dLabel.setVisible(true); - prechargeLabel.setVisible(false); - progress = progress - R2D_TSACTIVE; - progressBar.setValue(progress * 100 / 5); - break; - } - prechargeLabel.invalidate(); - r2dProgressLabel.invalidate(); - r2dLabel.invalidate(); - progressBar.setVisible(true); - progressBar.invalidate(); - } else if (progressBar.isVisible()) { - prechargeLabel.setVisible(false); - prechargeLabel.invalidate(); - r2dLabel.setVisible(false); - r2dLabel.invalidate(); - r2dProgressLabel.setVisible(false); - r2dProgressLabel.invalidate(); - progressBar.setVisible(false); - progressBar.invalidate(); - } + progressBar.setProgress(active, type, progress); } void DriverViewView::showAMSError() { diff --git a/TouchGFX/steering-wheel.touchgfx b/TouchGFX/steering-wheel.touchgfx index 5f16a23..bbbd663 100644 --- a/TouchGFX/steering-wheel.touchgfx +++ b/TouchGFX/steering-wheel.touchgfx @@ -11,7 +11,7 @@ "X": 41, "Y": 15, "Width": 397, - "Height": 30, + "Height": 37, "TextId": "__SingleUse_6GPV", "TextRotation": "0", "Color": { @@ -1112,70 +1112,11 @@ ] }, { - "Type": "BoxProgress", + "Type": "CustomContainerInstance", "Name": "progressBar", "Width": 456, "Height": 33, - "Visible": false, - "Color": { - "Red": 99, - "Green": 186 - }, - "Direction": "Right", - "FileNameBackground": "prog_horiz_bg.png", - "IndicatorPositionWidth": 480, - "IndicatorPositionHeight": 55, - "ProgressRangeMax": 100 - }, - { - "Type": "TextArea", - "Name": "prechargeLabel", - "X": 95, - "Y": -2, - "Width": 269, - "Height": 30, - "Visible": false, - "TextId": "__SingleUse_HMH2", - "TextRotation": "0", - "Color": { - "Red": 255, - "Green": 255, - "Blue": 255 - }, - "AutoSize": true - }, - { - "Type": "TextArea", - "Name": "r2dLabel", - "X": 70, - "Y": -2, - "Width": 317, - "Height": 37, - "Visible": false, - "TextId": "__SingleUse_NGUK", - "TextRotation": "0", - "Color": { - "Red": 255, - "Green": 255, - "Blue": 255 - } - }, - { - "Type": "TextArea", - "Name": "r2dProgressLabel", - "X": 168, - "Y": -2, - "Width": 219, - "Height": 37, - "Visible": false, - "TextId": "__SingleUse_J5UH", - "TextRotation": "0", - "Color": { - "Red": 255, - "Green": 255, - "Blue": 255 - }, - "Wildcard1": {} + "CustomContainerDefinitionName": "ProgressBar" } ] }, @@ -1709,7 +1650,7 @@ "X": 27, "Y": 2, "Width": 99, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_QAZ3", "TextRotation": "0", "Color": { @@ -1725,7 +1666,7 @@ "X": 329, "Y": 2, "Width": 102, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_1F9T", "TextRotation": "0", "Color": { @@ -1880,7 +1821,7 @@ "X": 8, "Y": 7, "Width": 203, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_5W6Y", "TextRotation": "0", "Color": { @@ -1909,7 +1850,52 @@ ] } ], - "Interactions": [] + "Interactions": [ + { + "InteractionName": "DecreasePLim", + "Trigger": { + "Type": "TriggerPhysicalButtonClicked", + "ButtonKey": 104 + }, + "Action": { + "Type": "ActionCustom", + "FunctionName": "decreasePowerLimit" + } + }, + { + "InteractionName": "IncreasePLim", + "Trigger": { + "Type": "TriggerPhysicalButtonClicked", + "ButtonKey": 108 + }, + "Action": { + "Type": "ActionCustom", + "FunctionName": "increasePowerLimit" + } + }, + { + "InteractionName": "DecreaseSLim", + "Trigger": { + "Type": "TriggerPhysicalButtonClicked", + "ButtonKey": 107 + }, + "Action": { + "Type": "ActionCustom", + "FunctionName": "decreaseSpeedLimit" + } + }, + { + "InteractionName": "IncreaseSLim", + "Trigger": { + "Type": "TriggerPhysicalButtonClicked", + "ButtonKey": 106 + }, + "Action": { + "Type": "ActionCustom", + "FunctionName": "increaseSpeedLimit" + } + } + ] } ], "CustomContainerDefinitions": [ @@ -2390,6 +2376,82 @@ } ], "Interactions": [] + }, + { + "Name": "ProgressBar", + "X": -80, + "Y": 80, + "Width": 456, + "Height": 33, + "Components": [ + { + "Type": "TextArea", + "Name": "r2dProgressLabel", + "X": 168, + "Y": -2, + "Width": 219, + "Height": 37, + "Visible": false, + "TextId": "__SingleUse_6EXA", + "TextRotation": "0", + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + }, + "Wildcard1": {} + }, + { + "Type": "TextArea", + "Name": "r2dLabel", + "X": 70, + "Y": -2, + "Width": 317, + "Height": 37, + "Visible": false, + "TextId": "__SingleUse_570K", + "TextRotation": "0", + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + } + }, + { + "Type": "TextArea", + "Name": "prechargeLabel", + "X": 95, + "Y": -2, + "Width": 269, + "Height": 37, + "Visible": false, + "TextId": "__SingleUse_G2S2", + "TextRotation": "0", + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + }, + "AutoSize": true + }, + { + "Type": "BoxProgress", + "Name": "progressBar", + "Width": 456, + "Height": 33, + "Visible": false, + "Color": { + "Red": 99, + "Green": 186 + }, + "Direction": "Right", + "FileNameBackground": "prog_horiz_bg.png", + "IndicatorPositionWidth": 480, + "IndicatorPositionHeight": 55, + "ProgressRangeMax": 100 + } + ], + "Interactions": [] } ], "Name": "SteeringWheel",