Add AS OK field to AMI

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

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