From fd4ee51fd65fad276cb56e83cffc238232855752 Mon Sep 17 00:00:00 2001 From: "Jasper v. Blanckenburg" Date: Sat, 18 Nov 2023 14:48:43 +0100 Subject: [PATCH] Add AS OK field to AMI --- .../gui_generated/ami_screen/AMIViewBase.hpp | 1 + .../src/ami_screen/AMIViewBase.cpp | 6 ++++++ .../gui/include/gui/ami_screen/AMIView.hpp | 1 + TouchGFX/gui/src/ami_screen/AMIView.cpp | 3 +++ TouchGFX/steering-wheel.touchgfx | 20 +++++++++---------- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/TouchGFX/generated/gui_generated/include/gui_generated/ami_screen/AMIViewBase.hpp b/TouchGFX/generated/gui_generated/include/gui_generated/ami_screen/AMIViewBase.hpp index 29e7b7a..797d145 100644 --- a/TouchGFX/generated/gui_generated/include/gui_generated/ami_screen/AMIViewBase.hpp +++ b/TouchGFX/generated/gui_generated/include/gui_generated/ami_screen/AMIViewBase.hpp @@ -67,6 +67,7 @@ protected: touchgfx::Shape<3> ft; touchgfx::PainterRGB565 ftPainter; touchgfx::Container init; + touchgfx::TextAreaWithOneWildcard asOK; touchgfx::TextArea textArea8; touchgfx::TextArea textArea7; touchgfx::TextAreaWithOneWildcard pressRear; diff --git a/TouchGFX/generated/gui_generated/src/ami_screen/AMIViewBase.cpp b/TouchGFX/generated/gui_generated/src/ami_screen/AMIViewBase.cpp index 76fe211..90445a3 100644 --- a/TouchGFX/generated/gui_generated/src/ami_screen/AMIViewBase.cpp +++ b/TouchGFX/generated/gui_generated/src/ami_screen/AMIViewBase.cpp @@ -202,6 +202,12 @@ AMIViewBase::AMIViewBase() add(driving); init.setPosition(0, 0, 480, 320); + asOK.setPosition(68, 279, 169, 24); + asOK.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); + asOK.setLinespacing(0); + asOK.setTypedText(touchgfx::TypedText(T___SINGLEUSE_C17G)); + init.add(asOK); + textArea8.setXY(68, 247); textArea8.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255)); textArea8.setLinespacing(0); diff --git a/TouchGFX/gui/include/gui/ami_screen/AMIView.hpp b/TouchGFX/gui/include/gui/ami_screen/AMIView.hpp index d356418..4ad2ad1 100644 --- a/TouchGFX/gui/include/gui/ami_screen/AMIView.hpp +++ b/TouchGFX/gui/include/gui/ami_screen/AMIView.hpp @@ -51,6 +51,7 @@ protected: AMIDataField measuredSpeedField; touchgfx::Unicode::UnicodeChar progressBuffer[16]; + touchgfx::Unicode::UnicodeChar asOKBuffer[16]; touchgfx::Shape<3> cones[NUM_CONES] = {cone0, cone1, cone2, cone3, cone4, cone5, cone6, cone7, cone8, cone9}; }; diff --git a/TouchGFX/gui/src/ami_screen/AMIView.cpp b/TouchGFX/gui/src/ami_screen/AMIView.cpp index 0805456..0153569 100644 --- a/TouchGFX/gui/src/ami_screen/AMIView.cpp +++ b/TouchGFX/gui/src/ami_screen/AMIView.cpp @@ -111,6 +111,9 @@ void AMIView::updateDataFields() { void AMIView::setJetsonTimeout(bool timeout) { if (timeout) { desiredAngle.setColor(touchgfx::Color::getColorFromRGB(0xFF, 0, 0)); + touchgfx::Unicode::fromUTF8((const uint8_t *)"TIMEOUT", asOKBuffer, + sizeof(asOKBuffer) / sizeof(*asOKBuffer)); + asOK.setWildcard(asOKBuffer); } else { desiredAngle.setColor(touchgfx::Color::getColorFromRGB(0xFF, 0xFF, 0xFF)); } diff --git a/TouchGFX/steering-wheel.touchgfx b/TouchGFX/steering-wheel.touchgfx index f29041b..b953710 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": { @@ -248,7 +248,7 @@ "X": 273, "Y": 103, "Width": 84, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_3MDX", "TextRotation": "0", "Color": { @@ -264,7 +264,7 @@ "X": 273, "Y": 135, "Width": 85, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_JFR7", "TextRotation": "0", "Color": { @@ -344,7 +344,7 @@ "X": 273, "Y": 198, "Width": 129, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_590R", "TextRotation": "0", "Color": { @@ -360,7 +360,7 @@ "X": 273, "Y": 166, "Width": 128, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_Z78U", "TextRotation": "0", "Color": { @@ -664,7 +664,7 @@ "X": 68, "Y": 247, "Width": 255, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_0L75", "TextRotation": "0", "Color": { @@ -680,7 +680,7 @@ "X": 68, "Y": 215, "Width": 273, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_GA13", "TextRotation": "0", "Color": { @@ -760,7 +760,7 @@ "X": 68, "Y": 184, "Width": 259, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_OOU3", "TextRotation": "0", "Color": { @@ -776,7 +776,7 @@ "X": 68, "Y": 152, "Width": 256, - "Height": 24, + "Height": 25, "TextId": "__SingleUse_2FPP", "TextRotation": "0", "Color": { @@ -1121,7 +1121,7 @@ "X": 95, "Y": -2, "Width": 269, - "Height": 30, + "Height": 37, "Visible": false, "TextId": "__SingleUse_HMH2", "TextRotation": "0",