Add AS OK field to AMI

This commit is contained in:
Jasper Blanckenburg 2023-11-18 14:48:43 +01:00
parent 698c6a24c4
commit fd4ee51fd6
5 changed files with 21 additions and 10 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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};
};

View File

@ -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));
}

View File

@ -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",