diff --git a/Core/Inc/vehicle.h b/Core/Inc/vehicle.h index 22421bf..675b6aa 100644 --- a/Core/Inc/vehicle.h +++ b/Core/Inc/vehicle.h @@ -73,11 +73,16 @@ typedef enum { } AMSSlavePanicKind; typedef struct { - float fl; - float fr; - float rl; - float rr; -} TireTemps; + float tire_fl; + float tire_fr; + float tire_rl; + float tire_rr; + + float inv_l; + float inv_r; + float mot_l; + float mot_r; +} Temperatures; typedef struct { TSState ts_state; @@ -118,7 +123,7 @@ typedef struct { IniChkState ini_chk_state; unsigned lap_count; - TireTemps tire_temps; + Temperatures temps; float min_cell_volt; float max_cell_temp; diff --git a/Core/Src/vehicle.c b/Core/Src/vehicle.c index 5c3b946..401c9d9 100644 --- a/Core/Src/vehicle.c +++ b/Core/Src/vehicle.c @@ -14,6 +14,7 @@ #define CAN_ID_AMS_SLAVE_PANIC 0x9 #define CAN_ID_AMS_STATUS 0xA #define CAN_ID_AMS_ERROR 0xC +#define CAN_ID_CS_INTERNAL 0x108 #define CAN_ID_MISSION_SELECTED 0x400 #define CAN_ID_STW_BUTTONS 0x401 #define CAN_ID_STW_PARAM_SET 0x402 @@ -24,6 +25,7 @@ #define CAN_ID_SHUNT_VOLTAGE2 0x523 #define CAN_AMS_STATUS_VOLTAGE_FACTOR 1e-4 #define CAN_AMS_STATUS_TEMP_FACTOR 0.0625 +#define CAN_CS_INTERNAL_TEMP_FACTOR 0.01 VehicleState vehicle_state = {0}; @@ -32,6 +34,7 @@ void vehicle_thread_entry(ULONG hfdcan_addr) { ftcan_add_filter(CAN_ID_AMS_SLAVE_PANIC, 0x7FF); ftcan_add_filter(CAN_ID_AMS_STATUS, 0x7FF); ftcan_add_filter(CAN_ID_AMS_ERROR, 0x7FF); + ftcan_add_filter(CAN_ID_CS_INTERNAL, 0x7FF); ftcan_add_filter(CAN_ID_AS_MISSION_FB, 0x7FF); ftcan_add_filter(CAN_ID_STW_STATUS, 0x7FF); ftcan_add_filter(CAN_ID_SHUNT_CURRENT, 0x7FF); @@ -84,6 +87,17 @@ void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) { vehicle_state.last_ams_error.kind = data[0]; vehicle_state.last_ams_error.arg = data[1]; break; + case CAN_ID_CS_INTERNAL: + vehicle_state.temps.inv_l = + (data[0] | (data[1] << 8)) * CAN_CS_INTERNAL_TEMP_FACTOR; + vehicle_state.temps.inv_r = + (data[2] | (data[3] << 8)) * CAN_CS_INTERNAL_TEMP_FACTOR; + vehicle_state.temps.mot_l = + (data[4] | (data[5] << 8)) * CAN_CS_INTERNAL_TEMP_FACTOR; + // TODO: uncomment when we have a right motor + // vehicle_state.temps.mot_r = + // (data[6] | (data[7] << 8)) * CAN_CS_INTERNAL_TEMP_FACTOR; + break; case CAN_ID_AS_MISSION_FB: vehicle_state.active_mission = data[0] & 0b111; break; diff --git a/STM32Make.make b/STM32Make.make index 8bee06a..da11caa 100644 --- a/STM32Make.make +++ b/STM32Make.make @@ -360,8 +360,9 @@ TouchGFX/generated/gui_generated/src/containers/DebugViewItemBase.cpp \ TouchGFX/generated/gui_generated/src/containers/DebugViewLineBase.cpp \ TouchGFX/generated/gui_generated/src/containers/DriverViewFieldBase.cpp \ TouchGFX/generated/gui_generated/src/containers/DriverViewFieldSelectionBase.cpp \ +TouchGFX/generated/gui_generated/src/containers/ErrorPopupBase.cpp \ TouchGFX/generated/gui_generated/src/containers/MissionSelectElementBase.cpp \ -TouchGFX/generated/gui_generated/src/containers/TireTempBase.cpp \ +TouchGFX/generated/gui_generated/src/containers/TemperatureBase.cpp \ TouchGFX/generated/gui_generated/src/debugview_screen/DebugViewViewBase.cpp \ TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp \ TouchGFX/generated/gui_generated/src/missionselect_screen/MissionSelectViewBase.cpp \ @@ -388,8 +389,9 @@ TouchGFX/gui/src/containers/DebugViewItem.cpp \ TouchGFX/gui/src/containers/DebugViewLine.cpp \ TouchGFX/gui/src/containers/DriverViewField.cpp \ TouchGFX/gui/src/containers/DriverViewFieldSelection.cpp \ +TouchGFX/gui/src/containers/ErrorPopup.cpp \ TouchGFX/gui/src/containers/MissionSelectElement.cpp \ -TouchGFX/gui/src/containers/TireTemp.cpp \ +TouchGFX/gui/src/containers/Temperature.cpp \ TouchGFX/gui/src/debugview_screen/DebugViewPresenter.cpp \ TouchGFX/gui/src/debugview_screen/DebugViewView.cpp \ TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp \ diff --git a/TouchGFX/assets/texts/texts.xml b/TouchGFX/assets/texts/texts.xml index 844952f..73c0a09 100644 --- a/TouchGFX/assets/texts/texts.xml +++ b/TouchGFX/assets/texts/texts.xml @@ -142,6 +142,12 @@ + + MOTOR + + + INVERTER + <value> diff --git a/TouchGFX/generated/gui_generated/include/gui_generated/containers/TireTempBase.hpp b/TouchGFX/generated/gui_generated/include/gui_generated/containers/TemperatureBase.hpp similarity index 79% rename from TouchGFX/generated/gui_generated/include/gui_generated/containers/TireTempBase.hpp rename to TouchGFX/generated/gui_generated/include/gui_generated/containers/TemperatureBase.hpp index fb1b2fb..117d458 100644 --- a/TouchGFX/generated/gui_generated/include/gui_generated/containers/TireTempBase.hpp +++ b/TouchGFX/generated/gui_generated/include/gui_generated/containers/TemperatureBase.hpp @@ -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 #include #include #include -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 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 50cdf26..9f9f214 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 @@ -8,11 +8,11 @@ #include #include #include -#include +#include +#include #include #include #include -#include #include #include #include @@ -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; diff --git a/TouchGFX/generated/gui_generated/src/containers/TireTempBase.cpp b/TouchGFX/generated/gui_generated/src/containers/TemperatureBase.cpp similarity index 68% rename from TouchGFX/generated/gui_generated/src/containers/TireTempBase.cpp rename to TouchGFX/generated/gui_generated/src/containers/TemperatureBase.cpp index a456208..0739766 100644 --- a/TouchGFX/generated/gui_generated/src/containers/TireTempBase.cpp +++ b/TouchGFX/generated/gui_generated/src/containers/TemperatureBase.cpp @@ -1,31 +1,31 @@ /*********************************************************************************/ /********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ /*********************************************************************************/ -#include +#include #include #include -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() { } diff --git a/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp b/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp index c90cbeb..0ba3b6a 100644 --- a/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp +++ b/TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include 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(); diff --git a/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache b/TouchGFX/generated/texts/cache/LanguageCpp_Gb.cache index d19223c..df9cdbd 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":[["128","T_ERROR_AMS"],["167","T_DEBUGVIEWFIELD_TITLE"],["167","T_DRIVERVIEWFIELD_TITLE"],["277","T_FIELD_BBAL"],["240","T_FIELD_TSVOLTVEH"],["233","T_FIELD_TSVOLTBAT"],["253","T_FIELD_LVSOC"],["271","T_FIELD_TSSOC"],["287","T_FIELD_MAXCELLTEMP"],["292","T_FIELD_TIREFL"],["297","T_FIELD_TIREFR"],["302","T_FIELD_TIRERL"],["307","T_FIELD_TIRERR"],["282","T_FIELD_LAPCOUNT"],["177","T_FIELD_INICHKSTATE"],["247","T_FIELD_ERR"],["325","T_FIELD_SDC"],["193","T_FIELD_INVRREADY"],["185","T_FIELD_INVLREADY"],["209","T_FIELD_R2DPROGRESS"],["201","T_FIELD_ACTIVEMISSION"],["169","T_FIELD_ASSTATE"],["225","T_FIELD_TSSTATE"],["167","T_NUMBERWILDCARD"],["167","T_DEFAULTWILDCARD_CENTERED"],["167","T_DEFAULTWILDCARD_RIGHTALIGNED"],["317","T_FIELD_TSCURRENT"],["312","T_FIELD_MINCELLVOLT"],["259","T_FIELD_SPEED"],["95","T_INSPECTION_HUGE"],["158","T_EBS_HUGE"],["117","T_TRACKDRIVE_HUGE"],["138","T_AUTOX_HUGE"],["217","T_SKIDPAD_HUGE"],["82","T_ACCEL_HUGE"],["34","T_INVALID_HUGE"],["67","T_MANUAL"],["95","T_INSPECTION"],["158","T_EBS"],["117","T_TRACKDRIVE"],["138","T_AUTOX"],["217","T_SKIDPAD"],["82","T_ACCEL"],["167","T___SINGLEUSE_9L8R"],["16","T___SINGLEUSE_1NKF"],["167","T___SINGLEUSE_J5UH"],["321","T___SINGLEUSE_NGUK"],["167","T___SINGLEUSE_4E84"],["167","T___SINGLEUSE_YTAB"],["106","T___SINGLEUSE_RWCE"],["148","T___SINGLEUSE_HMH2"],["329","T___SINGLEUSE_4OBM"],["318","T___SINGLEUSE_PHFD"],["265","T___SINGLEUSE_H6UX"],["167","T___SINGLEUSE_20H3"],["17","T___SINGLEUSE_SDGP"],["51","T___SINGLEUSE_M5X7"],["0","T___SINGLEUSE_6GPV"]]} \ No newline at end of file +{"remap":"yes","language":"GB","language_index":0,"indices":[["128","T_ERROR_AMS"],["176","T_DEBUGVIEWFIELD_TITLE"],["176","T_DRIVERVIEWFIELD_TITLE"],["292","T_FIELD_BBAL"],["249","T_FIELD_TSVOLTVEH"],["242","T_FIELD_TSVOLTBAT"],["262","T_FIELD_LVSOC"],["286","T_FIELD_TSSOC"],["302","T_FIELD_MAXCELLTEMP"],["307","T_FIELD_TIREFL"],["312","T_FIELD_TIREFR"],["317","T_FIELD_TIRERL"],["322","T_FIELD_TIRERR"],["297","T_FIELD_LAPCOUNT"],["186","T_FIELD_INICHKSTATE"],["256","T_FIELD_ERR"],["340","T_FIELD_SDC"],["202","T_FIELD_INVRREADY"],["194","T_FIELD_INVLREADY"],["218","T_FIELD_R2DPROGRESS"],["210","T_FIELD_ACTIVEMISSION"],["178","T_FIELD_ASSTATE"],["234","T_FIELD_TSSTATE"],["176","T_NUMBERWILDCARD"],["176","T_DEFAULTWILDCARD_CENTERED"],["176","T_DEFAULTWILDCARD_RIGHTALIGNED"],["332","T_FIELD_TSCURRENT"],["327","T_FIELD_MINCELLVOLT"],["274","T_FIELD_SPEED"],["95","T_INSPECTION_HUGE"],["158","T_EBS_HUGE"],["117","T_TRACKDRIVE_HUGE"],["138","T_AUTOX_HUGE"],["226","T_SKIDPAD_HUGE"],["82","T_ACCEL_HUGE"],["34","T_INVALID_HUGE"],["67","T_MANUAL"],["95","T_INSPECTION"],["158","T_EBS"],["117","T_TRACKDRIVE"],["138","T_AUTOX"],["226","T_SKIDPAD"],["82","T_ACCEL"],["268","T___SINGLEUSE_JN2J"],["167","T___SINGLEUSE_ZP7N"],["176","T___SINGLEUSE_9L8R"],["16","T___SINGLEUSE_1NKF"],["176","T___SINGLEUSE_J5UH"],["336","T___SINGLEUSE_NGUK"],["176","T___SINGLEUSE_4E84"],["176","T___SINGLEUSE_YTAB"],["106","T___SINGLEUSE_RWCE"],["148","T___SINGLEUSE_HMH2"],["344","T___SINGLEUSE_4OBM"],["333","T___SINGLEUSE_PHFD"],["280","T___SINGLEUSE_H6UX"],["176","T___SINGLEUSE_20H3"],["17","T___SINGLEUSE_SDGP"],["51","T___SINGLEUSE_M5X7"],["0","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 246d5d6..e8029fc 100644 --- a/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache +++ b/TouchGFX/generated/texts/cache/TextKeysAndLanguages.cache @@ -1 +1 @@ -{"languages":["GB"],"textids":["T_ERROR_AMS","T_DEBUGVIEWFIELD_TITLE","T_DRIVERVIEWFIELD_TITLE","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_9L8R","T___SINGLEUSE_1NKF","T___SINGLEUSE_J5UH","T___SINGLEUSE_NGUK","T___SINGLEUSE_4E84","T___SINGLEUSE_YTAB","T___SINGLEUSE_RWCE","T___SINGLEUSE_HMH2","T___SINGLEUSE_4OBM","T___SINGLEUSE_PHFD","T___SINGLEUSE_H6UX","T___SINGLEUSE_20H3","T___SINGLEUSE_SDGP","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]} \ No newline at end of file +{"languages":["GB"],"textids":["T_ERROR_AMS","T_DEBUGVIEWFIELD_TITLE","T_DRIVERVIEWFIELD_TITLE","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_JN2J","T___SINGLEUSE_ZP7N","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_4OBM","T___SINGLEUSE_PHFD","T___SINGLEUSE_H6UX","T___SINGLEUSE_20H3","T___SINGLEUSE_SDGP","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]} \ No newline at end of file diff --git a/TouchGFX/generated/texts/cache/TextsCpp.cache b/TouchGFX/generated/texts/cache/TextsCpp.cache index a6f3d78..c127bc1 100644 --- a/TouchGFX/generated/texts/cache/TextsCpp.cache +++ b/TouchGFX/generated/texts/cache/TextsCpp.cache @@ -1 +1 @@ -{"remap":"yes","languages":["Gb"],"characters":[67,104,111,111,115,101,32,97,32,109,105,115,115,105,111,110,0,67,117,114,114,101,110,116,32,77,105,115,115,105,111,110,58,0,73,110,118,97,108,105,100,32,77,105,115,115,105,111,110,33,0,73,110,118,97,108,105,100,32,77,105,115,115,105,111,110,0,77,97,110,117,97,108,32,68,114,105,118,105,110,103,0,65,99,99,101,108,101,114,97,116,105,111,110,0,73,110,115,112,101,99,116,105,111,110,0,80,65,82,65,77,69,84,69,82,83,0,84,114,97,99,107,100,114,105,118,101,0,65,77,83,32,69,114,114,79,114,0,65,117,116,111,99,114,111,115,115,0,80,82,69,67,72,65,82,71,69,0,69,66,83,32,84,101,115,116,0,2,0,65,83,83,84,65,84,69,0,73,67,83,84,65,84,69,0,73,78,86,76,82,68,89,0,73,78,86,82,82,68,89,0,77,73,83,83,73,79,78,0,82,50,68,80,82,79,71,0,83,107,105,100,112,97,100,0,84,83,83,84,65,84,69,0,84,83,86,66,65,84,0,84,83,86,86,69,72,0,69,82,82,79,82,0,76,86,83,79,67,0,83,80,69,69,68,0,84,73,82,69,83,0,84,83,83,79,67,0,66,66,65,76,0,76,65,80,83,0,84,77,65,88,0,84,84,70,76,0,84,84,70,82,0,84,84,82,76,0,84,84,82,82,0,86,77,73,78,0,73,84,83,0,82,50,68,0,83,68,67,0,76,86,0]} \ No newline at end of file +{"remap":"yes","languages":["Gb"],"characters":[67,104,111,111,115,101,32,97,32,109,105,115,115,105,111,110,0,67,117,114,114,101,110,116,32,77,105,115,115,105,111,110,58,0,73,110,118,97,108,105,100,32,77,105,115,115,105,111,110,33,0,73,110,118,97,108,105,100,32,77,105,115,115,105,111,110,0,77,97,110,117,97,108,32,68,114,105,118,105,110,103,0,65,99,99,101,108,101,114,97,116,105,111,110,0,73,110,115,112,101,99,116,105,111,110,0,80,65,82,65,77,69,84,69,82,83,0,84,114,97,99,107,100,114,105,118,101,0,65,77,83,32,69,114,114,79,114,0,65,117,116,111,99,114,111,115,115,0,80,82,69,67,72,65,82,71,69,0,69,66,83,32,84,101,115,116,0,73,78,86,69,82,84,69,82,0,2,0,65,83,83,84,65,84,69,0,73,67,83,84,65,84,69,0,73,78,86,76,82,68,89,0,73,78,86,82,82,68,89,0,77,73,83,83,73,79,78,0,82,50,68,80,82,79,71,0,83,107,105,100,112,97,100,0,84,83,83,84,65,84,69,0,84,83,86,66,65,84,0,84,83,86,86,69,72,0,69,82,82,79,82,0,76,86,83,79,67,0,77,79,84,79,82,0,83,80,69,69,68,0,84,73,82,69,83,0,84,83,83,79,67,0,66,66,65,76,0,76,65,80,83,0,84,77,65,88,0,84,84,70,76,0,84,84,70,82,0,84,84,82,76,0,84,84,82,82,0,86,77,73,78,0,73,84,83,0,82,50,68,0,83,68,67,0,76,86,0]} \ No newline at end of file diff --git a/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache b/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache index 95aad2a..6605ffd 100644 --- a/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache +++ b/TouchGFX/generated/texts/cache/TypedTextDatabaseCpp.cache @@ -1 +1 @@ -{"databases":{"DEFAULT":[[3,"CENTER","LTR"],[5,"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"],[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"],[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"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[1,"LEFT","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]]},"database_list":["DEFAULT"],"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},"generate_font_format":"0"} \ No newline at end of file +{"databases":{"DEFAULT":[[3,"CENTER","LTR"],[5,"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"],[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"],[2,"CENTER","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"],[2,"CENTER","LTR"],[4,"CENTER","LTR"],[1,"LEFT","LTR"],[2,"CENTER","LTR"],[1,"LEFT","LTR"]]},"database_list":["DEFAULT"],"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},"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 42f8238..23586ec 100644 --- a/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp +++ b/TouchGFX/generated/texts/include/texts/TextKeysAndLanguages.hpp @@ -55,6 +55,8 @@ enum TEXTS T_AUTOX, T_SKIDPAD, T_ACCEL, + T___SINGLEUSE_JN2J, + T___SINGLEUSE_ZP7N, T___SINGLEUSE_9L8R, T___SINGLEUSE_1NKF, T___SINGLEUSE_J5UH, diff --git a/TouchGFX/generated/texts/src/LanguageGb.cpp b/TouchGFX/generated/texts/src/LanguageGb.cpp index 221c633..19ab89a 100644 --- a/TouchGFX/generated/texts/src/LanguageGb.cpp +++ b/TouchGFX/generated/texts/src/LanguageGb.cpp @@ -11,39 +11,39 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE; TEXT_LOCATION_FLASH_PRAGMA KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = { 128, // T_ERROR_AMS: "AMS ErrOr" - 167, // T_DEBUGVIEWFIELD_TITLE: "<>" - 167, // T_DRIVERVIEWFIELD_TITLE: "<>" - 277, // T_FIELD_BBAL: "BBAL" - 240, // T_FIELD_TSVOLTVEH: "TSVVEH" - 233, // T_FIELD_TSVOLTBAT: "TSVBAT" - 253, // T_FIELD_LVSOC: "LVSOC" - 271, // T_FIELD_TSSOC: "TSSOC" - 287, // T_FIELD_MAXCELLTEMP: "TMAX" - 292, // T_FIELD_TIREFL: "TTFL" - 297, // T_FIELD_TIREFR: "TTFR" - 302, // T_FIELD_TIRERL: "TTRL" - 307, // T_FIELD_TIRERR: "TTRR" - 282, // T_FIELD_LAPCOUNT: "LAPS" - 177, // T_FIELD_INICHKSTATE: "ICSTATE" - 247, // T_FIELD_ERR: "ERROR" - 325, // T_FIELD_SDC: "SDC" - 193, // T_FIELD_INVRREADY: "INVRRDY" - 185, // T_FIELD_INVLREADY: "INVLRDY" - 209, // T_FIELD_R2DPROGRESS: "R2DPROG" - 201, // T_FIELD_ACTIVEMISSION: "MISSION" - 169, // T_FIELD_ASSTATE: "ASSTATE" - 225, // T_FIELD_TSSTATE: "TSSTATE" - 167, // T_NUMBERWILDCARD: "<>" - 167, // T_DEFAULTWILDCARD_CENTERED: "<>" - 167, // T_DEFAULTWILDCARD_RIGHTALIGNED: "<>" - 317, // T_FIELD_TSCURRENT: "ITS" - 312, // T_FIELD_MINCELLVOLT: "VMIN" - 259, // T_FIELD_SPEED: "SPEED" + 176, // T_DEBUGVIEWFIELD_TITLE: "<>" + 176, // T_DRIVERVIEWFIELD_TITLE: "<>" + 292, // T_FIELD_BBAL: "BBAL" + 249, // T_FIELD_TSVOLTVEH: "TSVVEH" + 242, // T_FIELD_TSVOLTBAT: "TSVBAT" + 262, // T_FIELD_LVSOC: "LVSOC" + 286, // T_FIELD_TSSOC: "TSSOC" + 302, // T_FIELD_MAXCELLTEMP: "TMAX" + 307, // T_FIELD_TIREFL: "TTFL" + 312, // T_FIELD_TIREFR: "TTFR" + 317, // T_FIELD_TIRERL: "TTRL" + 322, // T_FIELD_TIRERR: "TTRR" + 297, // T_FIELD_LAPCOUNT: "LAPS" + 186, // T_FIELD_INICHKSTATE: "ICSTATE" + 256, // T_FIELD_ERR: "ERROR" + 340, // T_FIELD_SDC: "SDC" + 202, // T_FIELD_INVRREADY: "INVRRDY" + 194, // T_FIELD_INVLREADY: "INVLRDY" + 218, // T_FIELD_R2DPROGRESS: "R2DPROG" + 210, // T_FIELD_ACTIVEMISSION: "MISSION" + 178, // T_FIELD_ASSTATE: "ASSTATE" + 234, // T_FIELD_TSSTATE: "TSSTATE" + 176, // T_NUMBERWILDCARD: "<>" + 176, // T_DEFAULTWILDCARD_CENTERED: "<>" + 176, // T_DEFAULTWILDCARD_RIGHTALIGNED: "<>" + 332, // T_FIELD_TSCURRENT: "ITS" + 327, // T_FIELD_MINCELLVOLT: "VMIN" + 274, // T_FIELD_SPEED: "SPEED" 95, // T_INSPECTION_HUGE: "Inspection" 158, // T_EBS_HUGE: "EBS Test" 117, // T_TRACKDRIVE_HUGE: "Trackdrive" 138, // T_AUTOX_HUGE: "Autocross" - 217, // T_SKIDPAD_HUGE: "Skidpad" + 226, // T_SKIDPAD_HUGE: "Skidpad" 82, // T_ACCEL_HUGE: "Acceleration" 34, // T_INVALID_HUGE: "Invalid Mission!" 67, // T_MANUAL: "Manual Driving" @@ -51,20 +51,22 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = { 158, // T_EBS: "EBS Test" 117, // T_TRACKDRIVE: "Trackdrive" 138, // T_AUTOX: "Autocross" - 217, // T_SKIDPAD: "Skidpad" + 226, // T_SKIDPAD: "Skidpad" 82, // T_ACCEL: "Acceleration" - 167, // T___SINGLEUSE_9L8R: "<>" + 268, // T___SINGLEUSE_JN2J: "MOTOR" + 167, // T___SINGLEUSE_ZP7N: "INVERTER" + 176, // T___SINGLEUSE_9L8R: "<>" 16, // T___SINGLEUSE_1NKF: "" - 167, // T___SINGLEUSE_J5UH: "<>" - 321, // T___SINGLEUSE_NGUK: "R2D" - 167, // T___SINGLEUSE_4E84: "<>" - 167, // T___SINGLEUSE_YTAB: "<>" + 176, // T___SINGLEUSE_J5UH: "<>" + 336, // T___SINGLEUSE_NGUK: "R2D" + 176, // T___SINGLEUSE_4E84: "<>" + 176, // T___SINGLEUSE_YTAB: "<>" 106, // T___SINGLEUSE_RWCE: "PARAMETERS" 148, // T___SINGLEUSE_HMH2: "PRECHARGE" - 329, // T___SINGLEUSE_4OBM: "LV" - 318, // T___SINGLEUSE_PHFD: "TS" - 265, // T___SINGLEUSE_H6UX: "TIRES" - 167, // T___SINGLEUSE_20H3: "<>" + 344, // T___SINGLEUSE_4OBM: "LV" + 333, // T___SINGLEUSE_PHFD: "TS" + 280, // T___SINGLEUSE_H6UX: "TIRES" + 176, // T___SINGLEUSE_20H3: "<>" 17, // T___SINGLEUSE_SDGP: "Current Mission:" 51, // T___SINGLEUSE_M5X7: "Invalid Mission" 0 // T___SINGLEUSE_6GPV: "Choose a mission" diff --git a/TouchGFX/generated/texts/src/Texts.cpp b/TouchGFX/generated/texts/src/Texts.cpp index 65e230b..249f5bf 100644 --- a/TouchGFX/generated/texts/src/Texts.cpp +++ b/TouchGFX/generated/texts/src/Texts.cpp @@ -73,34 +73,36 @@ KEEP extern const touchgfx::Unicode::UnicodeChar texts_all_languages[] TEXT_LOCA 0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x0, // @138 "Autocross" 0x50, 0x52, 0x45, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x0, // @148 "PRECHARGE" 0x45, 0x42, 0x53, 0x20, 0x54, 0x65, 0x73, 0x74, 0x0, // @158 "EBS Test" - 0x2, 0x0, // @167 "<>" - 0x41, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @169 "ASSTATE" - 0x49, 0x43, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @177 "ICSTATE" - 0x49, 0x4e, 0x56, 0x4c, 0x52, 0x44, 0x59, 0x0, // @185 "INVLRDY" - 0x49, 0x4e, 0x56, 0x52, 0x52, 0x44, 0x59, 0x0, // @193 "INVRRDY" - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x0, // @201 "MISSION" - 0x52, 0x32, 0x44, 0x50, 0x52, 0x4f, 0x47, 0x0, // @209 "R2DPROG" - 0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0, // @217 "Skidpad" - 0x54, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @225 "TSSTATE" - 0x54, 0x53, 0x56, 0x42, 0x41, 0x54, 0x0, // @233 "TSVBAT" - 0x54, 0x53, 0x56, 0x56, 0x45, 0x48, 0x0, // @240 "TSVVEH" - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x0, // @247 "ERROR" - 0x4c, 0x56, 0x53, 0x4f, 0x43, 0x0, // @253 "LVSOC" - 0x53, 0x50, 0x45, 0x45, 0x44, 0x0, // @259 "SPEED" - 0x54, 0x49, 0x52, 0x45, 0x53, 0x0, // @265 "TIRES" - 0x54, 0x53, 0x53, 0x4f, 0x43, 0x0, // @271 "TSSOC" - 0x42, 0x42, 0x41, 0x4c, 0x0, // @277 "BBAL" - 0x4c, 0x41, 0x50, 0x53, 0x0, // @282 "LAPS" - 0x54, 0x4d, 0x41, 0x58, 0x0, // @287 "TMAX" - 0x54, 0x54, 0x46, 0x4c, 0x0, // @292 "TTFL" - 0x54, 0x54, 0x46, 0x52, 0x0, // @297 "TTFR" - 0x54, 0x54, 0x52, 0x4c, 0x0, // @302 "TTRL" - 0x54, 0x54, 0x52, 0x52, 0x0, // @307 "TTRR" - 0x56, 0x4d, 0x49, 0x4e, 0x0, // @312 "VMIN" - 0x49, 0x54, 0x53, 0x0, // @317 "ITS" - 0x52, 0x32, 0x44, 0x0, // @321 "R2D" - 0x53, 0x44, 0x43, 0x0, // @325 "SDC" - 0x4c, 0x56, 0x0 // @329 "LV" + 0x49, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x45, 0x52, 0x0, // @167 "INVERTER" + 0x2, 0x0, // @176 "<>" + 0x41, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @178 "ASSTATE" + 0x49, 0x43, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @186 "ICSTATE" + 0x49, 0x4e, 0x56, 0x4c, 0x52, 0x44, 0x59, 0x0, // @194 "INVLRDY" + 0x49, 0x4e, 0x56, 0x52, 0x52, 0x44, 0x59, 0x0, // @202 "INVRRDY" + 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x0, // @210 "MISSION" + 0x52, 0x32, 0x44, 0x50, 0x52, 0x4f, 0x47, 0x0, // @218 "R2DPROG" + 0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0, // @226 "Skidpad" + 0x54, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @234 "TSSTATE" + 0x54, 0x53, 0x56, 0x42, 0x41, 0x54, 0x0, // @242 "TSVBAT" + 0x54, 0x53, 0x56, 0x56, 0x45, 0x48, 0x0, // @249 "TSVVEH" + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x0, // @256 "ERROR" + 0x4c, 0x56, 0x53, 0x4f, 0x43, 0x0, // @262 "LVSOC" + 0x4d, 0x4f, 0x54, 0x4f, 0x52, 0x0, // @268 "MOTOR" + 0x53, 0x50, 0x45, 0x45, 0x44, 0x0, // @274 "SPEED" + 0x54, 0x49, 0x52, 0x45, 0x53, 0x0, // @280 "TIRES" + 0x54, 0x53, 0x53, 0x4f, 0x43, 0x0, // @286 "TSSOC" + 0x42, 0x42, 0x41, 0x4c, 0x0, // @292 "BBAL" + 0x4c, 0x41, 0x50, 0x53, 0x0, // @297 "LAPS" + 0x54, 0x4d, 0x41, 0x58, 0x0, // @302 "TMAX" + 0x54, 0x54, 0x46, 0x4c, 0x0, // @307 "TTFL" + 0x54, 0x54, 0x46, 0x52, 0x0, // @312 "TTFR" + 0x54, 0x54, 0x52, 0x4c, 0x0, // @317 "TTRL" + 0x54, 0x54, 0x52, 0x52, 0x0, // @322 "TTRR" + 0x56, 0x4d, 0x49, 0x4e, 0x0, // @327 "VMIN" + 0x49, 0x54, 0x53, 0x0, // @332 "ITS" + 0x52, 0x32, 0x44, 0x0, // @336 "R2D" + 0x53, 0x44, 0x43, 0x0, // @340 "SDC" + 0x4c, 0x56, 0x0 // @344 "LV" }; TEXT_LOCATION_FLASH_PRAGMA diff --git a/TouchGFX/generated/texts/src/TypedTextDatabase.cpp b/TouchGFX/generated/texts/src/TypedTextDatabase.cpp index 9635b5d..340ea07 100644 --- a/TouchGFX/generated/texts/src/TypedTextDatabase.cpp +++ b/TouchGFX/generated/texts/src/TypedTextDatabase.cpp @@ -69,6 +69,8 @@ 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 }, + { 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR }, + { 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 }, diff --git a/TouchGFX/gui/include/gui/containers/Temperature.hpp b/TouchGFX/gui/include/gui/containers/Temperature.hpp new file mode 100644 index 0000000..a74ef92 --- /dev/null +++ b/TouchGFX/gui/include/gui/containers/Temperature.hpp @@ -0,0 +1,31 @@ +#ifndef TEMPERATURE_HPP +#define TEMPERATURE_HPP + +#include + +class Temperature : public TemperatureBase { +public: + Temperature(); + virtual ~Temperature() {} + + virtual void initialize(); + + virtual void setTemp(int temp_in_celsius); + + /** + * @brief Set the temperature thresholds for the color coding. + * + * @param thresholds Array of 4 integers + */ + void setTempThresholds(int *thresholds); + +protected: +private: + int temp; + int tempThresholds[4]; + Unicode::UnicodeChar valueBuffer[3]; + + void updateValueBuffer(); +}; + +#endif // TEMPERATURE_HPP diff --git a/TouchGFX/gui/include/gui/containers/TireTemp.hpp b/TouchGFX/gui/include/gui/containers/TireTemp.hpp deleted file mode 100644 index 142a179..0000000 --- a/TouchGFX/gui/include/gui/containers/TireTemp.hpp +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef TIRETEMP_HPP -#define TIRETEMP_HPP - -#include -#include - -class TireTemp : public TireTempBase { -public: - TireTemp(); - virtual ~TireTemp() {} - - virtual void initialize(); - - virtual void setTemp(int temp_in_celsius); - -protected: -private: - int temp; - Unicode::UnicodeChar valueBuffer[3]; - - void updateValueBuffer(); -}; - -#endif // TIRETEMP_HPP diff --git a/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp b/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp index d9c0606..3386b36 100644 --- a/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp +++ b/TouchGFX/gui/include/gui/driverview_screen/DriverViewView.hpp @@ -24,7 +24,7 @@ public: void setFieldType(size_t i, DataFieldType type); void updateFieldValues(); - void setTireTemps(const TireTemps &temps); + void setTemps(const Temperatures &temps); void setTSSoC(uint8_t soc); void setProgress(bool active, DriverViewProgressType type, float progress); diff --git a/TouchGFX/gui/src/common/NamedField.cpp b/TouchGFX/gui/src/common/NamedField.cpp index 4fea283..833ee09 100644 --- a/TouchGFX/gui/src/common/NamedField.cpp +++ b/TouchGFX/gui/src/common/NamedField.cpp @@ -249,13 +249,13 @@ NamedFieldDescription dataFieldDescs[] = { [DF_IniChkState] = {NamedFieldKind::Text, "ICSTATE", 1, 0, get_inichk_text}, [DF_LapCount] = {NamedFieldKind::Int, "LAPS", 3, 0, VEH_FIELD(lap_count)}, [DF_TireTempFL] = {NamedFieldKind::Float, "TTFL", 2, 1, - VEH_FIELD(tire_temps.fl)}, + VEH_FIELD(temps.tire_fl)}, [DF_TireTempFR] = {NamedFieldKind::Float, "TTFR", 2, 1, - VEH_FIELD(tire_temps.fr)}, + VEH_FIELD(temps.tire_fr)}, [DF_TireTempRL] = {NamedFieldKind::Float, "TTRL", 2, 1, - VEH_FIELD(tire_temps.rl)}, + VEH_FIELD(temps.tire_rl)}, [DF_TireTempRR] = {NamedFieldKind::Float, "TTRR", 2, 1, - VEH_FIELD(tire_temps.rr)}, + VEH_FIELD(temps.tire_rr)}, [DF_MinCellVolt] = {NamedFieldKind::Float, "VMIN", 1, 2, VEH_FIELD(min_cell_volt)}, [DF_MaxCellTemp] = {NamedFieldKind::Float, "TMAX", 2, 1, diff --git a/TouchGFX/gui/src/containers/TireTemp.cpp b/TouchGFX/gui/src/containers/Temperature.cpp similarity index 61% rename from TouchGFX/gui/src/containers/TireTemp.cpp rename to TouchGFX/gui/src/containers/Temperature.cpp index d7e6496..75ff46e 100644 --- a/TouchGFX/gui/src/containers/TireTemp.cpp +++ b/TouchGFX/gui/src/containers/Temperature.cpp @@ -1,12 +1,17 @@ +#include + +#include + #include "touchgfx/Color.hpp" #include "touchgfx/Unicode.hpp" -#include -TireTemp::TireTemp() : temp{0} { updateValueBuffer(); } +Temperature::Temperature() : temp{0}, tempThresholds{0, 0, 0, 0} { + updateValueBuffer(); +} -void TireTemp::initialize() { TireTempBase::initialize(); } +void Temperature::initialize() { TemperatureBase::initialize(); } -void TireTemp::setTemp(int temp_in_celsius) { +void Temperature::setTemp(int temp_in_celsius) { if (temp_in_celsius < 0) { // No space for displaying negative values temp_in_celsius = 0; @@ -18,13 +23,13 @@ void TireTemp::setTemp(int temp_in_celsius) { temp = temp_in_celsius; updateValueBuffer(); - if (temp < 35) { + if (temp < tempThresholds[0]) { bg.setColor(touchgfx::Color::getColorFromRGB(0x05, 0x76, 0xb7)); - } else if (temp < 40) { + } else if (temp < tempThresholds[1]) { bg.setColor(touchgfx::Color::getColorFromRGB(0x05, 0x76, 0x64)); - } else if (temp < 50) { + } else if (temp < tempThresholds[2]) { bg.setColor(touchgfx::Color::getColorFromRGB(0x05, 0x95, 0x38)); - } else if (temp < 60) { + } else if (temp < tempThresholds[3]) { bg.setColor(touchgfx::Color::getColorFromRGB(0xdd, 0x6e, 0x22)); } else { bg.setColor(touchgfx::Color::getColorFromRGB(0xdd, 0x2f, 0x22)); @@ -33,7 +38,11 @@ void TireTemp::setTemp(int temp_in_celsius) { bg.invalidate(); // TODO: Only invalidate if color changed } -void TireTemp::updateValueBuffer() { +void Temperature::setTempThresholds(int *thresholds) { + memcpy(tempThresholds, thresholds, sizeof(tempThresholds)); +} + +void Temperature::updateValueBuffer() { // Unicode::utoa(temp, valueBuffer, 3, 10); Unicode::snprintf(valueBuffer, sizeof(valueBuffer) / sizeof(Unicode::UnicodeChar), "%02d", diff --git a/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp b/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp index 0a1d6d0..32c8e3a 100644 --- a/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp +++ b/TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp @@ -16,7 +16,7 @@ void DriverViewPresenter::activate() { void DriverViewPresenter::deactivate() {} void DriverViewPresenter::vehicleStateUpdated() { - view.setTireTemps(vehicle_state.tire_temps); + view.setTemps(vehicle_state.temps); view.setTSSoC(vehicle_state.soc); updateProgress(); updateErrorPopup(); diff --git a/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp b/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp index 01c00c1..a7c06af 100644 --- a/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp +++ b/TouchGFX/gui/src/driverview_screen/DriverViewView.cpp @@ -17,6 +17,17 @@ void DriverViewView::setupScreen() { getField(i).setType(fieldTypes[i]); } fieldTypeSelection.setNumberOfItems(DataFieldType_COUNT); + int tireThresholds[4] = {35, 40, 50, 60}; + tireTempFL.setTempThresholds(tireThresholds); + tireTempFR.setTempThresholds(tireThresholds); + tireTempRL.setTempThresholds(tireThresholds); + tireTempRR.setTempThresholds(tireThresholds); + int invThresholds[4] = {30, 40, 50, 60}; + invTempL.setTempThresholds(invThresholds); + invTempR.setTempThresholds(invThresholds); + int motorThresholds[4] = {30, 45, 60, 80}; + motorTempL.setTempThresholds(motorThresholds); + motorTempR.setTempThresholds(motorThresholds); } void DriverViewView::tearDownScreen() { DriverViewViewBase::tearDownScreen(); } @@ -37,11 +48,15 @@ void DriverViewView::updateFieldValues() { } } -void DriverViewView::setTireTemps(const TireTemps &temps) { - tireTempFL.setTemp(temps.fl); - tireTempFR.setTemp(temps.fr); - tireTempRL.setTemp(temps.rl); - tireTempRR.setTemp(temps.rr); +void DriverViewView::setTemps(const Temperatures &temps) { + tireTempFL.setTemp(roundf(temps.tire_fl)); + tireTempFR.setTemp(roundf(temps.tire_fr)); + tireTempRL.setTemp(roundf(temps.tire_rl)); + tireTempRR.setTemp(roundf(temps.tire_rr)); + invTempL.setTemp(roundf(temps.inv_l)); + invTempR.setTemp(roundf(temps.inv_r)); + motorTempL.setTemp(roundf(temps.mot_l)); + motorTempR.setTemp(roundf(temps.mot_r)); } void DriverViewView::setTSSoC(uint8_t soc) { diff --git a/TouchGFX/simulator/msvs/Application.vcxproj b/TouchGFX/simulator/msvs/Application.vcxproj index 7082d4f..3e55de4 100644 --- a/TouchGFX/simulator/msvs/Application.vcxproj +++ b/TouchGFX/simulator/msvs/Application.vcxproj @@ -32,8 +32,6 @@ - - @@ -53,6 +51,8 @@ + + @@ -214,8 +214,6 @@ - - @@ -235,6 +233,8 @@ + + diff --git a/TouchGFX/simulator/msvs/Application.vcxproj.filters b/TouchGFX/simulator/msvs/Application.vcxproj.filters index 893ec10..a98a4e8 100644 --- a/TouchGFX/simulator/msvs/Application.vcxproj.filters +++ b/TouchGFX/simulator/msvs/Application.vcxproj.filters @@ -309,12 +309,6 @@ Source Files\generated\gui_generated\driverview_screen - - Source Files\gui\containers - - - Source Files\generated\gui_generated\containers - Source Files\gui\containers @@ -372,6 +366,12 @@ Source Files\generated\gui_generated\containers + + Source Files\gui\containers + + + Source Files\generated\gui_generated\containers + @@ -847,12 +847,6 @@ Header Files\generated\gui_generated\driverview_screen - - Header Files\gui\containers - - - Header Files\generated\gui_generated\containers - Header Files\gui\containers @@ -910,6 +904,12 @@ Header Files\generated\gui_generated\containers + + Header Files\gui\containers + + + Header Files\generated\gui_generated\containers + diff --git a/TouchGFX/steering-wheel.touchgfx b/TouchGFX/steering-wheel.touchgfx index 31a3a7e..b20313d 100644 --- a/TouchGFX/steering-wheel.touchgfx +++ b/TouchGFX/steering-wheel.touchgfx @@ -245,40 +245,102 @@ "CanvasBufferSize": 7200, "Components": [ { - "Type": "CustomContainerInstance", - "Name": "tireTempRR", - "X": 240, - "Y": 197, - "Width": 75, - "Height": 75, - "CustomContainerDefinitionName": "TireTemp" + "Type": "TextArea", + "Name": "motorTempLabel", + "X": 315, + "Y": 187, + "Width": 150, + "Height": 25, + "TextId": "__SingleUse_JN2J", + "TextRotation": "0", + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + } }, { "Type": "CustomContainerInstance", - "Name": "tireTempFR", - "X": 240, + "Name": "motorTempL", + "X": 329, + "Y": 212, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "CustomContainerInstance", + "Name": "motorTempR", + "X": 392, + "Y": 212, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "Line", + "Name": "motorTempDiv", + "X": 389, + "Y": 212, + "Width": 3, + "Height": 60, + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + }, + "EndY": 320.0, + "LineWidth": 10.0, + "LineEndingStyle": "Round" + }, + { + "Type": "Line", + "Name": "invTempDiv", + "X": 389, "Y": 122, - "Width": 75, - "Height": 75, - "CustomContainerDefinitionName": "TireTemp" + "Width": 3, + "Height": 60, + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + }, + "EndY": 320.0, + "LineWidth": 10.0, + "LineEndingStyle": "Round" }, { "Type": "CustomContainerInstance", - "Name": "tireTempRL", - "X": 165, - "Y": 197, - "Width": 75, - "Height": 75, - "CustomContainerDefinitionName": "TireTemp" - }, - { - "Type": "CustomContainerInstance", - "Name": "tireTempFL", - "X": 165, + "Name": "invTempR", + "X": 392, "Y": 122, - "Width": 75, - "Height": 75, - "CustomContainerDefinitionName": "TireTemp" + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "CustomContainerInstance", + "Name": "invTempL", + "X": 329, + "Y": 122, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "TextArea", + "Name": "invTempLabel", + "X": 315, + "Y": 97, + "Width": 150, + "Height": 25, + "TextId": "__SingleUse_ZP7N", + "TextRotation": "0", + "Color": { + "Red": 255, + "Green": 255, + "Blue": 255 + } }, { "Type": "Line", @@ -286,7 +348,7 @@ "X": 239, "Y": 122, "Width": 3, - "Height": 150, + "Height": 123, "Color": { "Red": 255, "Green": 255, @@ -299,9 +361,9 @@ { "Type": "Line", "Name": "ttDivHoriz", - "X": 165, - "Y": 196, - "Width": 150, + "X": 179, + "Y": 182, + "Width": 123, "Height": 3, "Color": { "Red": 255, @@ -312,6 +374,42 @@ "LineWidth": 10.0, "LineEndingStyle": "Round" }, + { + "Type": "CustomContainerInstance", + "Name": "tireTempRR", + "X": 242, + "Y": 185, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "CustomContainerInstance", + "Name": "tireTempFR", + "X": 242, + "Y": 122, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "CustomContainerInstance", + "Name": "tireTempRL", + "X": 179, + "Y": 185, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, + { + "Type": "CustomContainerInstance", + "Name": "tireTempFL", + "X": 179, + "Y": 122, + "Width": 60, + "Height": 60, + "CustomContainerDefinitionName": "Temperature" + }, { "Type": "LineProgress", "Name": "tsSoC", @@ -335,7 +433,7 @@ { "Type": "LineProgress", "Name": "lvSoC", - "X": 425, + "X": 110, "Y": 122, "Width": 40, "Height": 150, @@ -385,7 +483,7 @@ { "Type": "TextArea", "Name": "lvSoCLabel", - "X": 425, + "X": 110, "Y": 97, "Width": 40, "Height": 25, @@ -803,17 +901,17 @@ "Interactions": [] }, { - "Name": "TireTemp", + "Name": "Temperature", "X": 135, "Y": 215, - "Width": 75, - "Height": 75, + "Width": 60, + "Height": 60, "Components": [ { "Type": "Box", "Name": "bg", - "Width": 75, - "Height": 75, + "Width": 60, + "Height": 60, "Color": { "Green": 38, "Blue": 255 @@ -822,9 +920,8 @@ { "Type": "TextArea", "Name": "value", - "Y": 7, - "Width": 75, - "Height": 60, + "Width": 60, + "Height": 50, "TextId": "__SingleUse_20H3", "TextRotation": "0", "Color": {