3 Commits

32 changed files with 592 additions and 91 deletions

View File

@ -18,8 +18,8 @@
#define CAN_ID_SHUNT_CURRENT 0x521
#define CAN_ID_SHUNT_VOLTAGE2 0x523
#define CAN_ID_SHUNT_VOLTAGE3 0x524
#define CAN_AMS_STATUS_VOLTAGE_FACTOR (1e-3 * 0x100)
#define CAN_AMS_STATUS_TEMP_FACTOR (0.0625 * 0x10)
#define CAN_AMS_STATUS_VOLTAGE_FACTOR 1e-4
#define CAN_AMS_STATUS_TEMP_FACTOR 0.0625
VehicleState vehicle_state = {0};
@ -50,8 +50,11 @@ void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
case CAN_ID_AMS_STATUS:
vehicle_state.ts_state = data[0] & 0x7F;
vehicle_state.soc = data[1];
vehicle_state.min_cell_volt = data[2] * CAN_AMS_STATUS_VOLTAGE_FACTOR;
vehicle_state.max_cell_temp = data[3] * CAN_AMS_STATUS_TEMP_FACTOR;
const uint8_t *ptr = &data[2];
vehicle_state.min_cell_volt =
ftcan_unmarshal_unsigned(&ptr, 2) * CAN_AMS_STATUS_VOLTAGE_FACTOR;
vehicle_state.max_cell_temp =
ftcan_unmarshal_signed(&ptr, 2) * CAN_AMS_STATUS_TEMP_FACTOR;
msg = VEH_UPD_AMS;
break;
case CAN_ID_AS_MISSION_FB:

View File

@ -350,6 +350,7 @@ TouchGFX/generated/fonts/src/Table_verdana_20_4bpp.cpp \
TouchGFX/generated/fonts/src/UnmappedDataFont.cpp \
TouchGFX/generated/gui_generated/src/ami_screen/AMIViewBase.cpp \
TouchGFX/generated/gui_generated/src/common/FrontendApplicationBase.cpp \
TouchGFX/generated/gui_generated/src/containers/DriverViewFieldBase.cpp \
TouchGFX/generated/gui_generated/src/containers/MissionSelectElementBase.cpp \
TouchGFX/generated/gui_generated/src/containers/TireTempBase.cpp \
TouchGFX/generated/gui_generated/src/driverview_screen/DriverViewViewBase.cpp \
@ -369,6 +370,7 @@ TouchGFX/generated/texts/src/TypedTextDatabase.cpp \
TouchGFX/gui/src/ami_screen/AMIPresenter.cpp \
TouchGFX/gui/src/ami_screen/AMIView.cpp \
TouchGFX/gui/src/common/FrontendApplication.cpp \
TouchGFX/gui/src/containers/DriverViewField.cpp \
TouchGFX/gui/src/containers/MissionSelectElement.cpp \
TouchGFX/gui/src/containers/TireTemp.cpp \
TouchGFX/gui/src/driverview_screen/DriverViewPresenter.cpp \

View File

@ -4,6 +4,17 @@
<Language Id="GB" />
</Languages>
<Texts>
<TextGroup Id="DriverViewFields">
<Text Id="Field_TSCurrent" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">ITS</Translation>
</Text>
<Text Id="Field_MinCellVolt" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">VMIN</Translation>
</Text>
<Text Id="Field_Speed" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">SPEED</Translation>
</Text>
</TextGroup>
<TextGroup Id="MissionNamesHuge">
<Text Id="Inspection_Huge" Alignment="Center" TypographyId="Chinat_Huge">
<Translation Language="GB">Inspection</Translation>
@ -51,6 +62,21 @@
</Text>
</TextGroup>
<TextGroup Id="Unsorted">
<Text Id="__SingleUse_K26P" Alignment="Center" TypographyId="Numbers">
<Translation Language="GB">&lt;value&gt;</Translation>
</Text>
<Text Id="__SingleUse_0FBJ" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">FIELD</Translation>
</Text>
<Text Id="__SingleUse_4OBM" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">LV</Translation>
</Text>
<Text Id="__SingleUse_PHFD" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">TS</Translation>
</Text>
<Text Id="__SingleUse_H6UX" Alignment="Center" TypographyId="Chinat_Small">
<Translation Language="GB">TIRES</Translation>
</Text>
<Text Id="__SingleUse_20H3" Alignment="Center" TypographyId="Numbers">
<Translation Language="GB">&lt;value&gt;</Translation>
</Text>
@ -70,6 +96,6 @@
<Typography Id="Chinat_Large" Font="CHINN___.ttf" Size="30" Bpp="4" Direction="LTR" FallbackCharacter="?" />
<Typography Id="Chinat_Small" Font="CHINN___.ttf" Size="20" Bpp="4" Direction="LTR" FallbackCharacter="?" />
<Typography Id="Chinat_Huge" Font="CHINN___.ttf" Size="40" Bpp="4" Direction="LTR" FallbackCharacter="?" />
<Typography Id="Numbers" Font="lucon.TTF" Size="50" Bpp="4" Direction="LTR" FallbackCharacter="?" WildcardCharacterRanges="0-9" />
<Typography Id="Numbers" Font="lucon.TTF" Size="50" Bpp="4" Direction="LTR" FallbackCharacter="?" WildcardCharacters=". ," WildcardCharacterRanges="0-9" />
</Typographies>
</TextDatabase>

View File

@ -4,10 +4,16 @@
66
68
69
70
73
76
77
78
80
82
83
84
86
97
99
100

View File

@ -1,3 +1,6 @@
32
44
46
48
49
50

View File

@ -5,10 +5,16 @@ AH:0 BA:1 FC:63 EC:0 FF:0 CF:1
66
68
69
70
73
76
77
78
80
82
83
84
86
97
99
100

View File

@ -1,4 +1,7 @@
AH:0 BA:1 FC:63 EC:0 FF:0 CF:1
32
44
46
48
49
50

View File

@ -54,9 +54,29 @@ KEEP extern const uint8_t unicodes_CHINN____20_4bpp_0[] FONT_GLYPH_LOCATION_FLAS
0x44, 0x44, 0x44, 0x24, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x60, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xB3, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x7F,
// Unicode: [0x0046, F]
0x00, 0xA4, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x1F, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF6, 0xFF,
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0xF7, 0xFF, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
0x44, 0x04, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF7, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F,
0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
// Unicode: [0x0049, I]
0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF,
0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF, 0xF7, 0xFF,
// Unicode: [0x004C, L]
0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0x44, 0x44, 0x44, 0x44,
0x44, 0x44, 0x44, 0x24, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x70, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x00, 0xC5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x6F,
// Unicode: [0x004D, M]
0x20, 0xEA, 0x9E, 0x01, 0x00, 0x00, 0x00, 0x60, 0xFD, 0x5C, 0x00, 0xD1, 0xFF, 0xFF, 0x1C, 0x00,
0x00, 0x00, 0xF6, 0xFF, 0xFF, 0x04, 0xF5, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x10, 0xFE, 0xFF, 0xFF,
@ -67,6 +87,36 @@ KEEP extern const uint8_t unicodes_CHINN____20_4bpp_0[] FONT_GLYPH_LOCATION_FLAS
0x80, 0xFF, 0x0E, 0xF7, 0xFF, 0x00, 0xF2, 0xFF, 0xF8, 0xFF, 0x07, 0x80, 0xFF, 0x0E, 0xF7, 0xFF,
0x00, 0x80, 0xFF, 0xFF, 0xEF, 0x01, 0x80, 0xFF, 0x0E, 0xF7, 0xFF, 0x00, 0x10, 0xFC, 0xFF, 0x6F,
0x00, 0x80, 0xFF, 0x0E, 0xF7, 0xFF, 0x00, 0x00, 0xA1, 0xDE, 0x06, 0x00, 0x80, 0xFF, 0x0E,
// Unicode: [0x004E, N]
0x20, 0xEA, 0x9E, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0xE1, 0xFF, 0xFF, 0x2D, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x7F, 0xF6, 0xFF, 0xFF, 0xEF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0xF7, 0xFF,
0xFB, 0xFF, 0x4E, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0xF7, 0xFF, 0xA0, 0xFF, 0xFF, 0x05, 0x00, 0x00,
0xFF, 0x7F, 0xF7, 0xFF, 0x00, 0xF9, 0xFF, 0x5F, 0x00, 0x00, 0xFF, 0x7F, 0xF7, 0xFF, 0x00, 0x80,
0xFF, 0xFF, 0x06, 0x00, 0xFF, 0x7F, 0xF7, 0xFF, 0x00, 0x00, 0xF7, 0xFF, 0x7F, 0x00, 0xFF, 0x7F,
0xF7, 0xFF, 0x00, 0x00, 0x60, 0xFF, 0xFF, 0x08, 0xFF, 0x7F, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0xF5,
0xFF, 0x9F, 0xFF, 0x6F, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x40, 0xFE, 0xFF, 0xFF, 0x4F, 0xF7, 0xFF,
0x00, 0x00, 0x00, 0x00, 0xE3, 0xFF, 0xFF, 0x0C, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x20, 0xEA,
0xAE, 0x02,
// Unicode: [0x0050, P]
0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0x02, 0x00, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0x00, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
0x00, 0xF7, 0xFF, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xF7, 0xFF, 0x03, 0xF7, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF5, 0xFF, 0x04, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xEF, 0x01, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xF7, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x06, 0x00, 0xF7, 0xFF, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
0x03, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// Unicode: [0x0052, R]
0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4C, 0x00, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x06, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF7, 0xFF,
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xFF, 0x5F, 0xF7, 0xFF, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
0xFF, 0x5F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF7, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F,
0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x8F, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFE, 0x8F, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x8F, 0xF7, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x8F, 0xF7, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0x8F,
// Unicode: [0x0053, S]
0x00, 0xA3, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@ -87,6 +137,16 @@ KEEP extern const uint8_t unicodes_CHINN____20_4bpp_0[] FONT_GLYPH_LOCATION_FLAS
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF6, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0x01, 0x00,
0x00, 0x00,
// Unicode: [0x0056, V]
0xF2, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xD1, 0xFF, 0x1E, 0x90, 0xFF, 0x5F, 0x00, 0x00, 0x00,
0x00, 0xF8, 0xFF, 0x06, 0x10, 0xFE, 0xDF, 0x00, 0x00, 0x00, 0x20, 0xFE, 0xDF, 0x00, 0x00, 0xF7,
0xFF, 0x07, 0x00, 0x00, 0xA0, 0xFF, 0x4F, 0x00, 0x00, 0xD1, 0xFF, 0x1E, 0x00, 0x00, 0xF3, 0xFF,
0x0B, 0x00, 0x00, 0x60, 0xFF, 0x8F, 0x00, 0x00, 0xFB, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF,
0x02, 0x50, 0xFF, 0x9F, 0x00, 0x00, 0x00, 0x00, 0xF4, 0xFF, 0x0A, 0xD0, 0xFF, 0x1E, 0x00, 0x00,
0x00, 0x00, 0xB0, 0xFF, 0x3F, 0xF7, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFF, 0xCF, 0xFE,
0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xC1, 0xFF, 0xFF, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xE9, 0x7D, 0x00, 0x00,
0x00, 0x00,
// Unicode: [0x0061, a]
0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x01, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x0B, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x40, 0x44,

View File

@ -2,6 +2,16 @@
FONT_GLYPH_LOCATION_FLASH_PRAGMA
KEEP extern const uint8_t unicodes_lucon_TTF_50_4bpp_0[] FONT_GLYPH_LOCATION_FLASH_ATTRIBUTE = {
// Unicode: [0x0020]
// (Has no glyph data)
// Unicode: [0x002C]
0x32, 0x33, 0x33, 0x23, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF,
0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0x9F, 0xF8, 0xFF, 0xFF, 0x8F,
0x00, 0x90, 0xFF, 0x6F, 0x00, 0xB0, 0xFF, 0x4F, 0x00, 0xE0, 0xFF, 0x0E, 0x00, 0xF5, 0xFF, 0x09,
0x20, 0xFD, 0xFF, 0x02, 0xF6, 0xFF, 0x5F, 0x00, 0xF8, 0xDF, 0x04, 0x00, 0x64, 0x03, 0x00, 0x00,
// Unicode: [0x002E]
0x32, 0x33, 0x33, 0x23, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF,
0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF, 0xF8, 0xFF, 0xFF, 0xAF,
// Unicode: [0x0030]
0x00, 0x00, 0x00, 0x00, 0x61, 0xDA, 0xFF, 0xBD, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0xFE, 0xFF, 0xFF, 0xFF, 0xEF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFA, 0xFF, 0xFF,

View File

@ -10,26 +10,32 @@ KEEP extern const touchgfx::GlyphNode glyphs_CHINN____20_4bpp[] FONT_TABLE_LOCAT
{ 260, 0x0042, 20, 13, 13, 0, 21, 0, 0, 0x00 }, // B
{ 390, 0x0044, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // D
{ 520, 0x0045, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // E
{ 650, 0x0049, 4, 13, 13, 0, 5, 0, 0, 0x00 }, // I
{ 676, 0x004D, 21, 13, 13, 0, 21, 0, 0, 0x00 }, // M
{ 819, 0x0053, 22, 13, 13, 0, 22, 0, 0, 0x00 }, // S
{ 962, 0x0054, 20, 13, 13, -1, 19, 0, 0, 0x00 }, // T
{ 1092, 0x0061, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // a
{ 1222, 0x0063, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // c
{ 1352, 0x0064, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // d
{ 1482, 0x0065, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // e
{ 1612, 0x0067, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // g
{ 1742, 0x0069, 4, 13, 13, 0, 5, 0, 0, 0x00 }, // i
{ 1768, 0x006B, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // k
{ 1898, 0x006C, 15, 13, 13, 0, 14, 0, 0, 0x00 }, // l
{ 2002, 0x006E, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // n
{ 2132, 0x006F, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // o
{ 2262, 0x0070, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // p
{ 2392, 0x0072, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // r
{ 2522, 0x0073, 22, 13, 13, 0, 22, 0, 0, 0x00 }, // s
{ 2665, 0x0074, 20, 13, 13, -1, 19, 0, 0, 0x00 }, // t
{ 2795, 0x0075, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // u
{ 2925, 0x0076, 20, 13, 13, -1, 18, 0, 0, 0x00 } // v
{ 650, 0x0046, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // F
{ 780, 0x0049, 4, 13, 13, 0, 5, 0, 0, 0x00 }, // I
{ 806, 0x004C, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // L
{ 936, 0x004D, 21, 13, 13, 0, 21, 0, 0, 0x00 }, // M
{ 1079, 0x004E, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // N
{ 1209, 0x0050, 21, 13, 13, 0, 20, 0, 0, 0x00 }, // P
{ 1352, 0x0052, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // R
{ 1482, 0x0053, 22, 13, 13, 0, 22, 0, 0, 0x00 }, // S
{ 1625, 0x0054, 20, 13, 13, -1, 19, 0, 0, 0x00 }, // T
{ 1755, 0x0056, 20, 13, 13, -1, 18, 0, 0, 0x00 }, // V
{ 1885, 0x0061, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // a
{ 2015, 0x0063, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // c
{ 2145, 0x0064, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // d
{ 2275, 0x0065, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // e
{ 2405, 0x0067, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // g
{ 2535, 0x0069, 4, 13, 13, 0, 5, 0, 0, 0x00 }, // i
{ 2561, 0x006B, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // k
{ 2691, 0x006C, 15, 13, 13, 0, 14, 0, 0, 0x00 }, // l
{ 2795, 0x006E, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // n
{ 2925, 0x006F, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // o
{ 3055, 0x0070, 20, 13, 13, 0, 19, 0, 0, 0x00 }, // p
{ 3185, 0x0072, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // r
{ 3315, 0x0073, 22, 13, 13, 0, 22, 0, 0, 0x00 }, // s
{ 3458, 0x0074, 20, 13, 13, -1, 19, 0, 0, 0x00 }, // t
{ 3588, 0x0075, 20, 13, 13, 0, 20, 0, 0, 0x00 }, // u
{ 3718, 0x0076, 20, 13, 13, -1, 18, 0, 0, 0x00 } // v
};
// CHINN____20_4bpp
@ -47,6 +53,6 @@ touchgfx::GeneratedFont& getFont_CHINN____20_4bpp();
touchgfx::GeneratedFont& getFont_CHINN____20_4bpp()
{
static touchgfx::GeneratedFont CHINN____20_4bpp(glyphs_CHINN____20_4bpp, 26, 20, 20, 0, 0, 4, 1, 1, 1, unicodes_CHINN____20_4bpp, kerning_CHINN____20_4bpp, 63, 0, 0, 0);
static touchgfx::GeneratedFont CHINN____20_4bpp(glyphs_CHINN____20_4bpp, 32, 20, 20, 0, 0, 4, 1, 1, 1, unicodes_CHINN____20_4bpp, kerning_CHINN____20_4bpp, 63, 0, 0, 0);
return CHINN____20_4bpp;
}

View File

@ -4,17 +4,20 @@
FONT_TABLE_LOCATION_FLASH_PRAGMA
KEEP extern const touchgfx::GlyphNode glyphs_lucon_TTF_50_4bpp[] FONT_TABLE_LOCATION_FLASH_ATTRIBUTE = {
{ 0, 0x0030, 26, 38, 37, 2, 30, 0, 0, 0x00 },
{ 494, 0x0031, 25, 37, 37, 4, 30, 0, 0, 0x00 },
{ 975, 0x0032, 21, 37, 37, 4, 30, 0, 0, 0x00 },
{ 1382, 0x0033, 21, 38, 37, 5, 30, 0, 0, 0x00 },
{ 1800, 0x0034, 26, 36, 36, 2, 30, 0, 0, 0x00 },
{ 2268, 0x0035, 20, 37, 36, 6, 30, 0, 0, 0x00 },
{ 2638, 0x0036, 24, 38, 37, 4, 30, 0, 0, 0x00 },
{ 3094, 0x0037, 23, 36, 36, 4, 30, 0, 0, 0x00 },
{ 3526, 0x0038, 24, 38, 37, 3, 30, 0, 0, 0x00 },
{ 3982, 0x0039, 25, 38, 37, 3, 30, 0, 0, 0x00 },
{ 4476, 0x003F, 23, 37, 37, 4, 30, 0, 0, 0x00 }
{ 0, 0x0020, 0, 0, 0, 0, 30, 0, 0, 0x00 },
{ 0, 0x002C, 8, 16, 8, 11, 30, 0, 0, 0x00 },
{ 64, 0x002E, 8, 8, 8, 11, 30, 0, 0, 0x00 },
{ 96, 0x0030, 26, 38, 37, 2, 30, 0, 0, 0x00 },
{ 590, 0x0031, 25, 37, 37, 4, 30, 0, 0, 0x00 },
{ 1071, 0x0032, 21, 37, 37, 4, 30, 0, 0, 0x00 },
{ 1478, 0x0033, 21, 38, 37, 5, 30, 0, 0, 0x00 },
{ 1896, 0x0034, 26, 36, 36, 2, 30, 0, 0, 0x00 },
{ 2364, 0x0035, 20, 37, 36, 6, 30, 0, 0, 0x00 },
{ 2734, 0x0036, 24, 38, 37, 4, 30, 0, 0, 0x00 },
{ 3190, 0x0037, 23, 36, 36, 4, 30, 0, 0, 0x00 },
{ 3622, 0x0038, 24, 38, 37, 3, 30, 0, 0, 0x00 },
{ 4078, 0x0039, 25, 38, 37, 3, 30, 0, 0, 0x00 },
{ 4572, 0x003F, 23, 37, 37, 4, 30, 0, 0, 0x00 }
};
// lucon_TTF_50_4bpp
@ -32,6 +35,6 @@ touchgfx::GeneratedFont& getFont_lucon_TTF_50_4bpp();
touchgfx::GeneratedFont& getFont_lucon_TTF_50_4bpp()
{
static touchgfx::GeneratedFont lucon_TTF_50_4bpp(glyphs_lucon_TTF_50_4bpp, 11, 51, 50, 0, 0, 4, 1, 0, 0, unicodes_lucon_TTF_50_4bpp, kerning_lucon_TTF_50_4bpp, 63, 0, 0, 0);
static touchgfx::GeneratedFont lucon_TTF_50_4bpp(glyphs_lucon_TTF_50_4bpp, 14, 58, 50, 0, 0, 4, 1, 0, 0, unicodes_lucon_TTF_50_4bpp, kerning_lucon_TTF_50_4bpp, 63, 0, 0, 0);
return lucon_TTF_50_4bpp;
}

View File

@ -0,0 +1,36 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef DRIVERVIEWFIELDBASE_HPP
#define DRIVERVIEWFIELDBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/BoxWithBorder.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
class DriverViewFieldBase : public touchgfx::Container
{
public:
DriverViewFieldBase();
virtual ~DriverViewFieldBase();
virtual void initialize();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::BoxWithBorder box;
touchgfx::TextArea title;
touchgfx::TextAreaWithOneWildcard value;
private:
};
#endif // DRIVERVIEWFIELDBASE_HPP

View File

@ -13,6 +13,8 @@
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
#include <touchgfx/containers/progress_indicators/LineProgress.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <gui/containers/DriverViewField.hpp>
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
{
@ -39,10 +41,16 @@ protected:
touchgfx::PainterRGB565 ttDivVertPainter;
touchgfx::Line ttDivHoriz;
touchgfx::PainterRGB565 ttDivHorizPainter;
touchgfx::LineProgress tsVoltage;
touchgfx::PainterRGB565 tsVoltagePainter;
touchgfx::LineProgress lvVoltage;
touchgfx::PainterRGB565 lvVoltagePainter;
touchgfx::LineProgress tsSoC;
touchgfx::PainterRGB565 tsSoCPainter;
touchgfx::LineProgress lvSoC;
touchgfx::PainterRGB565 lvSoCPainter;
touchgfx::TextArea tireLabel;
touchgfx::TextArea tsSoCLabel;
touchgfx::TextArea lvSoCLabel;
DriverViewField field1;
DriverViewField field2;
DriverViewField field3;
private:

View File

@ -0,0 +1,39 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <gui_generated/containers/DriverViewFieldBase.hpp>
#include <touchgfx/Color.hpp>
#include <texts/TextKeysAndLanguages.hpp>
DriverViewFieldBase::DriverViewFieldBase()
{
setWidth(160);
setHeight(80);
box.setPosition(0, 0, 160, 80);
box.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
box.setBorderColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
box.setBorderSize(3);
add(box);
title.setPosition(0, 0, 160, 25);
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
title.setLinespacing(0);
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_0FBJ));
add(title);
value.setPosition(0, 20, 160, 57);
value.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
value.setLinespacing(0);
value.setTypedText(touchgfx::TypedText(T___SINGLEUSE_K26P));
add(value);
}
DriverViewFieldBase::~DriverViewFieldBase()
{
}
void DriverViewFieldBase::initialize()
{
}

View File

@ -5,6 +5,7 @@
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
#include <touchgfx/Color.hpp>
#include <images/BitmapDatabase.hpp>
#include <texts/TextKeysAndLanguages.hpp>
DriverViewViewBase::DriverViewViewBase()
{
@ -18,19 +19,19 @@ DriverViewViewBase::DriverViewViewBase()
logo.setBitmap(touchgfx::Bitmap(BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID));
add(logo);
tireTempRR.setXY(240, 167);
tireTempRR.setXY(240, 182);
add(tireTempRR);
tireTempFR.setXY(240, 92);
tireTempFR.setXY(240, 107);
add(tireTempFR);
tireTempRL.setXY(165, 167);
tireTempRL.setXY(165, 182);
add(tireTempRL);
tireTempFL.setXY(165, 92);
tireTempFL.setXY(165, 107);
add(tireTempFL);
ttDivVert.setPosition(239, 92, 3, 150);
ttDivVert.setPosition(239, 107, 3, 150);
ttDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
ttDivVert.setPainter(ttDivVertPainter);
ttDivVert.setStart(0, 0);
@ -39,7 +40,7 @@ DriverViewViewBase::DriverViewViewBase()
ttDivVert.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(ttDivVert);
ttDivHoriz.setPosition(165, 166, 150, 3);
ttDivHoriz.setPosition(165, 181, 150, 3);
ttDivHorizPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
ttDivHoriz.setPainter(ttDivHorizPainter);
ttDivHoriz.setStart(0, 0);
@ -48,31 +49,58 @@ DriverViewViewBase::DriverViewViewBase()
ttDivHoriz.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
add(ttDivHoriz);
tsVoltage.setXY(10, 92);
tsVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
tsVoltage.setRange(0, 100);
tsVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
tsVoltagePainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
tsVoltage.setPainter(tsVoltagePainter);
tsVoltage.setStart(9, 200);
tsVoltage.setEnd(9, 0);
tsVoltage.setLineWidth(100);
tsVoltage.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
tsVoltage.setValue(60);
add(tsVoltage);
tsSoC.setXY(10, 107);
tsSoC.setProgressIndicatorPosition(0, 0, 40, 150);
tsSoC.setRange(0, 100);
tsSoC.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
tsSoCPainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
tsSoC.setPainter(tsSoCPainter);
tsSoC.setStart(9, 150);
tsSoC.setEnd(9, 0);
tsSoC.setLineWidth(100);
tsSoC.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
tsSoC.setValue(60);
add(tsSoC);
lvVoltage.setXY(88, 92);
lvVoltage.setProgressIndicatorPosition(0, 0, 40, 150);
lvVoltage.setRange(0, 100);
lvVoltage.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
lvVoltagePainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
lvVoltage.setPainter(lvVoltagePainter);
lvVoltage.setStart(9, 200);
lvVoltage.setEnd(9, 0);
lvVoltage.setLineWidth(100);
lvVoltage.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
lvVoltage.setValue(80);
add(lvVoltage);
lvSoC.setXY(430, 107);
lvSoC.setProgressIndicatorPosition(0, 0, 40, 150);
lvSoC.setRange(0, 100);
lvSoC.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
lvSoCPainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
lvSoC.setPainter(lvSoCPainter);
lvSoC.setStart(9, 150);
lvSoC.setEnd(9, 0);
lvSoC.setLineWidth(100);
lvSoC.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
lvSoC.setValue(80);
add(lvSoC);
tireLabel.setPosition(165, 82, 150, 25);
tireLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
tireLabel.setLinespacing(0);
tireLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_H6UX));
add(tireLabel);
tsSoCLabel.setPosition(10, 82, 40, 25);
tsSoCLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
tsSoCLabel.setLinespacing(0);
tsSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
add(tsSoCLabel);
lvSoCLabel.setPosition(430, 82, 40, 25);
lvSoCLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
lvSoCLabel.setLinespacing(0);
lvSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_4OBM));
add(lvSoCLabel);
field1.setXY(0, 0);
add(field1);
field2.setXY(160, 0);
add(field2);
field3.setXY(320, 0);
add(field3);
}
DriverViewViewBase::~DriverViewViewBase()
@ -86,4 +114,7 @@ void DriverViewViewBase::setupScreen()
tireTempFR.initialize();
tireTempRL.initialize();
tireTempFL.initialize();
field1.initialize();
field2.initialize();
field3.initialize();
}

View File

@ -1 +1 @@
{"remap":"yes","language":"GB","language_index":0,"indices":[["95","T_INSPECTION_HUGE"],["127","T_EBS_HUGE"],["106","T_TRACKDRIVE_HUGE"],["117","T_AUTOX_HUGE"],["138","T_SKIDPAD_HUGE"],["82","T_ACCEL_HUGE"],["34","T_INVALID_HUGE"],["67","T_MANUAL"],["95","T_INSPECTION"],["127","T_EBS"],["106","T_TRACKDRIVE"],["117","T_AUTOX"],["138","T_SKIDPAD"],["82","T_ACCEL"],["136","T___SINGLEUSE_20H3"],["17","T___SINGLEUSE_SDGP"],["51","T___SINGLEUSE_M5X7"],["0","T___SINGLEUSE_6GPV"]]}
{"remap":"yes","language":"GB","language_index":0,"indices":[["169","T_FIELD_TSCURRENT"],["164","T_FIELD_MINCELLVOLT"],["152","T_FIELD_SPEED"],["95","T_INSPECTION_HUGE"],["127","T_EBS_HUGE"],["106","T_TRACKDRIVE_HUGE"],["117","T_AUTOX_HUGE"],["138","T_SKIDPAD_HUGE"],["82","T_ACCEL_HUGE"],["34","T_INVALID_HUGE"],["67","T_MANUAL"],["95","T_INSPECTION"],["127","T_EBS"],["106","T_TRACKDRIVE"],["117","T_AUTOX"],["138","T_SKIDPAD"],["82","T_ACCEL"],["136","T___SINGLEUSE_K26P"],["146","T___SINGLEUSE_0FBJ"],["173","T___SINGLEUSE_4OBM"],["170","T___SINGLEUSE_PHFD"],["158","T___SINGLEUSE_H6UX"],["136","T___SINGLEUSE_20H3"],["17","T___SINGLEUSE_SDGP"],["51","T___SINGLEUSE_M5X7"],["0","T___SINGLEUSE_6GPV"]]}

View File

@ -1 +1 @@
{"languages":["GB"],"textids":["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_20H3","T___SINGLEUSE_SDGP","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]}
{"languages":["GB"],"textids":["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_K26P","T___SINGLEUSE_0FBJ","T___SINGLEUSE_4OBM","T___SINGLEUSE_PHFD","T___SINGLEUSE_H6UX","T___SINGLEUSE_20H3","T___SINGLEUSE_SDGP","T___SINGLEUSE_M5X7","T___SINGLEUSE_6GPV"]}

View File

@ -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,84,114,97,99,107,100,114,105,118,101,0,65,117,116,111,99,114,111,115,115,0,69,66,83,32,84,101,115,116,0,2,0,83,107,105,100,112,97,100,0]}
{"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,84,114,97,99,107,100,114,105,118,101,0,65,117,116,111,99,114,111,115,115,0,69,66,83,32,84,101,115,116,0,2,0,83,107,105,100,112,97,100,0,70,73,69,76,68,0,83,80,69,69,68,0,84,73,82,69,83,0,86,77,73,78,0,73,84,83,0,76,86,0]}

View File

@ -1 +1 @@
{"databases":{"DEFAULT":[[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,"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},"generate_font_format":"0"}
{"databases":{"DEFAULT":[[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,"CENTER","LTR"],[2,"CENTER","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},"generate_font_format":"0"}

View File

@ -12,6 +12,9 @@ enum LANGUAGES
enum TEXTS
{
T_FIELD_TSCURRENT,
T_FIELD_MINCELLVOLT,
T_FIELD_SPEED,
T_INSPECTION_HUGE,
T_EBS_HUGE,
T_TRACKDRIVE_HUGE,
@ -26,6 +29,11 @@ enum TEXTS
T_AUTOX,
T_SKIDPAD,
T_ACCEL,
T___SINGLEUSE_K26P,
T___SINGLEUSE_0FBJ,
T___SINGLEUSE_4OBM,
T___SINGLEUSE_PHFD,
T___SINGLEUSE_H6UX,
T___SINGLEUSE_20H3,
T___SINGLEUSE_SDGP,
T___SINGLEUSE_M5X7,

View File

@ -10,6 +10,9 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE;
// Remap all strings
TEXT_LOCATION_FLASH_PRAGMA
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
169, // T_FIELD_TSCURRENT: "ITS"
164, // T_FIELD_MINCELLVOLT: "VMIN"
152, // T_FIELD_SPEED: "SPEED"
95, // T_INSPECTION_HUGE: "Inspection"
127, // T_EBS_HUGE: "EBS Test"
106, // T_TRACKDRIVE_HUGE: "Trackdrive"
@ -24,6 +27,11 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
117, // T_AUTOX: "Autocross"
138, // T_SKIDPAD: "Skidpad"
82, // T_ACCEL: "Acceleration"
136, // T___SINGLEUSE_K26P: "<>"
146, // T___SINGLEUSE_0FBJ: "FIELD"
173, // T___SINGLEUSE_4OBM: "LV"
170, // T___SINGLEUSE_PHFD: "TS"
158, // T___SINGLEUSE_H6UX: "TIRES"
136, // T___SINGLEUSE_20H3: "<>"
17, // T___SINGLEUSE_SDGP: "Current Mission:"
51, // T___SINGLEUSE_M5X7: "Invalid Mission"

View File

@ -71,7 +71,13 @@ KEEP extern const touchgfx::Unicode::UnicodeChar texts_all_languages[] TEXT_LOCA
0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x0, // @117 "Autocross"
0x45, 0x42, 0x53, 0x20, 0x54, 0x65, 0x73, 0x74, 0x0, // @127 "EBS Test"
0x2, 0x0, // @136 "<>"
0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0 // @138 "Skidpad"
0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0, // @138 "Skidpad"
0x46, 0x49, 0x45, 0x4c, 0x44, 0x0, // @146 "FIELD"
0x53, 0x50, 0x45, 0x45, 0x44, 0x0, // @152 "SPEED"
0x54, 0x49, 0x52, 0x45, 0x53, 0x0, // @158 "TIRES"
0x56, 0x4d, 0x49, 0x4e, 0x0, // @164 "VMIN"
0x49, 0x54, 0x53, 0x0, // @169 "ITS"
0x4c, 0x56, 0x0 // @173 "LV"
};
TEXT_LOCATION_FLASH_PRAGMA

View File

@ -24,6 +24,9 @@ extern const touchgfx::TypedText::TypedTextData* const typedTextDatabaseArray[];
TEXT_LOCATION_FLASH_PRAGMA
const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
@ -39,6 +42,11 @@ const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCAT
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 4, 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 },
{ 4, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
{ 2, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
{ 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR }

View File

@ -0,0 +1,29 @@
#ifndef DRIVERVIEWFIELD_HPP
#define DRIVERVIEWFIELD_HPP
#include "touchgfx/TypedText.hpp"
#include "touchgfx/Unicode.hpp"
#include <gui_generated/containers/DriverViewFieldBase.hpp>
class DriverViewField : public DriverViewFieldBase {
public:
DriverViewField();
virtual ~DriverViewField() {}
virtual void initialize();
void setName(const touchgfx::TypedText &text);
void setValue(float newValue);
void setPrecision(size_t intDigits, size_t decimalDigits);
protected:
private:
Unicode::UnicodeChar valueBuffer[16];
size_t intDigits;
size_t decimalDigits;
float fieldValue;
void updateValueBuffer();
};
#endif // DRIVERVIEWFIELD_HPP

View File

@ -27,6 +27,8 @@ public:
virtual ~DriverViewPresenter(){};
void amsUpdated() override;
private:
DriverViewPresenter();

View File

@ -13,6 +13,8 @@ public:
virtual void tearDownScreen();
void setTireTemps(const TireTemps &temps);
void setTSSoC(uint8_t soc);
void setMinCellVolt(float v);
protected:
};

View File

@ -0,0 +1,35 @@
#include "touchgfx/Unicode.hpp"
#include <gui/containers/DriverViewField.hpp>
DriverViewField::DriverViewField()
: intDigits{0}, decimalDigits{0}, fieldValue{0} {}
void DriverViewField::initialize() { DriverViewFieldBase::initialize(); }
void DriverViewField::setName(const touchgfx::TypedText &text) {
title.setTypedText(text);
title.invalidate();
}
void DriverViewField::setValue(float newValue) {
fieldValue = newValue;
updateValueBuffer();
}
void DriverViewField::setPrecision(size_t intDigits, size_t decimalDigits) {
this->intDigits = intDigits;
this->decimalDigits = decimalDigits;
updateValueBuffer();
}
void DriverViewField::updateValueBuffer() {
size_t width = intDigits;
if (decimalDigits != 0) {
width += decimalDigits + 1; // 1 digit for the decimal point
}
float params[3] = {(float)width, (float)decimalDigits, fieldValue};
Unicode::snprintfFloats(valueBuffer,
sizeof(valueBuffer) / sizeof(Unicode::UnicodeChar),
"%*.*f", params);
value.setWildcard(valueBuffer);
}

View File

@ -8,3 +8,8 @@ DriverViewPresenter::DriverViewPresenter(DriverViewView &v) : view(v) {}
void DriverViewPresenter::activate() {}
void DriverViewPresenter::deactivate() {}
void DriverViewPresenter::amsUpdated() {
view.setTSSoC(vehicle_state.soc);
view.setMinCellVolt(vehicle_state.min_cell_volt);
}

View File

@ -1,8 +1,20 @@
#include "texts/TextKeysAndLanguages.hpp"
#include <gui/driverview_screen/DriverViewView.hpp>
DriverViewView::DriverViewView() {}
void DriverViewView::setupScreen() { DriverViewViewBase::setupScreen(); }
void DriverViewView::setupScreen() {
DriverViewViewBase::setupScreen();
field1.setName(T_FIELD_MINCELLVOLT);
field1.setValue(3.21);
field1.setPrecision(1, 2);
field2.setName(T_FIELD_SPEED);
field2.setValue(42.0);
field2.setPrecision(3, 0);
field3.setName(T_FIELD_TSCURRENT);
field3.setValue(131.0);
field3.setPrecision(3, 0);
}
void DriverViewView::tearDownScreen() { DriverViewViewBase::tearDownScreen(); }
@ -12,3 +24,13 @@ void DriverViewView::setTireTemps(const TireTemps &temps) {
tireTempRL.setTemp(temps.rl);
tireTempRR.setTemp(temps.rr);
}
void DriverViewView::setTSSoC(uint8_t soc) {
tsSoC.setValue(soc);
tsSoC.invalidate();
}
void DriverViewView::setMinCellVolt(float v) {
field1.setValue(v);
field1.invalidate();
}

View File

@ -34,6 +34,8 @@
<ClCompile Include="..\..\generated\gui_generated\src\driverview_screen\DriverViewViewBase.cpp"/>
<ClCompile Include="..\..\gui\src\containers\TireTemp.cpp"/>
<ClCompile Include="..\..\generated\gui_generated\src\containers\TireTempBase.cpp"/>
<ClCompile Include="..\..\gui\src\containers\DriverViewField.cpp"/>
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp"/>
</ItemGroup>
<ItemGroup>
<None Include="$(ApplicationRoot)\assets\texts\texts.xml"/>
@ -197,6 +199,8 @@
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\driverview_screen\DriverViewViewBase.hpp"/>
<ClInclude Include="..\..\gui\include\gui\containers\TireTemp.hpp"/>
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\TireTempBase.hpp"/>
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewField.hpp"/>
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp"/>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc"/>

View File

@ -291,6 +291,12 @@
<ClCompile Include="..\..\generated\gui_generated\src\containers\TireTempBase.cpp">
<Filter>Source Files\generated\gui_generated\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\gui\src\containers\DriverViewField.cpp">
<Filter>Source Files\gui\containers</Filter>
</ClCompile>
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp">
<Filter>Source Files\generated\gui_generated\containers</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="$(ApplicationRoot)\assets\texts\texts.xml">
@ -772,6 +778,12 @@
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\TireTempBase.hpp">
<Filter>Header Files\generated\gui_generated\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewField.hpp">
<Filter>Header Files\gui\containers</Filter>
</ClInclude>
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp">
<Filter>Header Files\generated\gui_generated\containers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc">

View File

@ -232,7 +232,7 @@
"Type": "CustomContainerInstance",
"Name": "tireTempRR",
"X": 240,
"Y": 167,
"Y": 182,
"Width": 75,
"Height": 75,
"CustomContainerDefinitionName": "TireTemp"
@ -241,7 +241,7 @@
"Type": "CustomContainerInstance",
"Name": "tireTempFR",
"X": 240,
"Y": 92,
"Y": 107,
"Width": 75,
"Height": 75,
"CustomContainerDefinitionName": "TireTemp"
@ -250,7 +250,7 @@
"Type": "CustomContainerInstance",
"Name": "tireTempRL",
"X": 165,
"Y": 167,
"Y": 182,
"Width": 75,
"Height": 75,
"CustomContainerDefinitionName": "TireTemp"
@ -259,7 +259,7 @@
"Type": "CustomContainerInstance",
"Name": "tireTempFL",
"X": 165,
"Y": 92,
"Y": 107,
"Width": 75,
"Height": 75,
"CustomContainerDefinitionName": "TireTemp"
@ -268,7 +268,7 @@
"Type": "Line",
"Name": "ttDivVert",
"X": 239,
"Y": 92,
"Y": 107,
"Width": 3,
"Height": 150,
"Color": {
@ -284,7 +284,7 @@
"Type": "Line",
"Name": "ttDivHoriz",
"X": 165,
"Y": 166,
"Y": 181,
"Width": 150,
"Height": 3,
"Color": {
@ -298,9 +298,9 @@
},
{
"Type": "LineProgress",
"Name": "tsVoltage",
"Name": "tsSoC",
"X": 10,
"Y": 92,
"Y": 107,
"Width": 40,
"Height": 150,
"Color": {
@ -308,7 +308,7 @@
"Green": 255
},
"StartX": 9.0,
"StartY": 200.0,
"StartY": 150.0,
"EndX": 9.0,
"LineWidth": 100.0,
"LineEndingStyle": "Butt",
@ -318,9 +318,9 @@
},
{
"Type": "LineProgress",
"Name": "lvVoltage",
"X": 88,
"Y": 92,
"Name": "lvSoC",
"X": 430,
"Y": 107,
"Width": 40,
"Height": 150,
"Color": {
@ -328,13 +328,81 @@
"Green": 255
},
"StartX": 9.0,
"StartY": 200.0,
"StartY": 150.0,
"EndX": 9.0,
"LineWidth": 100.0,
"LineEndingStyle": "Butt",
"FileNameBackground": "bat_bar_bg.png",
"ProgressRangeMax": 100,
"ProgressInitialValue": 80
},
{
"Type": "TextArea",
"Name": "tireLabel",
"X": 165,
"Y": 82,
"Width": 150,
"Height": 25,
"TextId": "__SingleUse_H6UX",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
}
},
{
"Type": "TextArea",
"Name": "tsSoCLabel",
"X": 10,
"Y": 82,
"Width": 40,
"Height": 25,
"TextId": "__SingleUse_PHFD",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
}
},
{
"Type": "TextArea",
"Name": "lvSoCLabel",
"X": 430,
"Y": 82,
"Width": 40,
"Height": 25,
"TextId": "__SingleUse_4OBM",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
}
},
{
"Type": "CustomContainerInstance",
"Name": "field1",
"Width": 160,
"Height": 80,
"CustomContainerDefinitionName": "DriverViewField"
},
{
"Type": "CustomContainerInstance",
"Name": "field2",
"X": 160,
"Width": 160,
"Height": 80,
"CustomContainerDefinitionName": "DriverViewField"
},
{
"Type": "CustomContainerInstance",
"Name": "field3",
"X": 320,
"Width": 160,
"Height": 80,
"CustomContainerDefinitionName": "DriverViewField"
}
],
"Interactions": []
@ -419,6 +487,56 @@
}
],
"Interactions": []
},
{
"Name": "DriverViewField",
"X": 80,
"Y": 215,
"Width": 160,
"Height": 80,
"Components": [
{
"Type": "BoxWithBorder",
"Name": "box",
"Width": 160,
"Height": 80,
"BorderColor": {
"Red": 255,
"Green": 255,
"Blue": 255
},
"BorderSize": 3
},
{
"Type": "TextArea",
"Name": "title",
"Width": 160,
"Height": 25,
"TextId": "__SingleUse_0FBJ",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
}
},
{
"Type": "TextArea",
"Name": "value",
"Y": 20,
"Width": 160,
"Height": 57,
"TextId": "__SingleUse_K26P",
"TextRotation": "0",
"Color": {
"Red": 255,
"Green": 255,
"Blue": 255
},
"Wildcard1": {}
}
],
"Interactions": []
}
],
"Name": "MyApplication",