Add AMS Error popup
This commit is contained in:
parent
cb2d707bd9
commit
24be6312c8
|
@ -55,6 +55,23 @@ typedef enum {
|
||||||
INICHK_ERROR = 9
|
INICHK_ERROR = 9
|
||||||
} IniChkState;
|
} IniChkState;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
AMS_ERROR_NONE = 0x00,
|
||||||
|
AMS_ERROR_SLAVE_TIMEOUT = 0x01,
|
||||||
|
AMS_ERROR_SLAVE_PANIC = 0x02,
|
||||||
|
AMS_ERROR_SHUNT_TIMEOUT = 0x03,
|
||||||
|
AMS_ERROR_SHUNT_OVERCURRENT = 0x04,
|
||||||
|
AMS_ERROR_SHUNT_OVERTEMP = 0x05
|
||||||
|
} AMSErrorKind;
|
||||||
|
typedef enum {
|
||||||
|
AMS_SLAVEPANIC_OVERTEMP = 0x00,
|
||||||
|
AMS_SLAVEPANIC_UNDERTEMP = 0x01,
|
||||||
|
AMS_SLAVEPANIC_OVERVOLTAGE = 0x02,
|
||||||
|
AMS_SLAVEPANIC_UNDERVOLTAGE = 0x03,
|
||||||
|
AMS_SLAVEPANIC_TOO_FEW_TEMP = 0x04,
|
||||||
|
AMS_SLAVEPANIC_OPENWIRE = 0x05
|
||||||
|
} AMSSlavePanicKind;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float fl;
|
float fl;
|
||||||
float fr;
|
float fr;
|
||||||
|
@ -89,6 +106,15 @@ typedef struct {
|
||||||
int err_invl : 1;
|
int err_invl : 1;
|
||||||
int err_invr : 1;
|
int err_invr : 1;
|
||||||
} errors;
|
} errors;
|
||||||
|
struct {
|
||||||
|
AMSErrorKind kind;
|
||||||
|
uint8_t arg;
|
||||||
|
} last_ams_error;
|
||||||
|
struct {
|
||||||
|
uint8_t id;
|
||||||
|
AMSSlavePanicKind kind;
|
||||||
|
uint32_t arg;
|
||||||
|
} last_ams_slave_panic;
|
||||||
IniChkState ini_chk_state;
|
IniChkState ini_chk_state;
|
||||||
|
|
||||||
unsigned lap_count;
|
unsigned lap_count;
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
#include "stm32h7xx_hal_gpio.h"
|
#include "stm32h7xx_hal_gpio.h"
|
||||||
#include "tx_api.h"
|
#include "tx_api.h"
|
||||||
|
|
||||||
|
#define CAN_ID_AMS_SLAVE_PANIC 0x9
|
||||||
#define CAN_ID_AMS_STATUS 0xA
|
#define CAN_ID_AMS_STATUS 0xA
|
||||||
|
#define CAN_ID_AMS_ERROR 0xC
|
||||||
#define CAN_ID_MISSION_SELECTED 0x400
|
#define CAN_ID_MISSION_SELECTED 0x400
|
||||||
#define CAN_ID_STW_BUTTONS 0x401
|
#define CAN_ID_STW_BUTTONS 0x401
|
||||||
#define CAN_ID_STW_PARAM_SET 0x402
|
#define CAN_ID_STW_PARAM_SET 0x402
|
||||||
|
@ -27,7 +29,9 @@ VehicleState vehicle_state = {0};
|
||||||
|
|
||||||
void vehicle_thread_entry(ULONG hfdcan_addr) {
|
void vehicle_thread_entry(ULONG hfdcan_addr) {
|
||||||
ftcan_init((void *)hfdcan_addr);
|
ftcan_init((void *)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_STATUS, 0x7FF);
|
||||||
|
ftcan_add_filter(CAN_ID_AMS_ERROR, 0x7FF);
|
||||||
ftcan_add_filter(CAN_ID_AS_MISSION_FB, 0x7FF);
|
ftcan_add_filter(CAN_ID_AS_MISSION_FB, 0x7FF);
|
||||||
ftcan_add_filter(CAN_ID_STW_STATUS, 0x7FF);
|
ftcan_add_filter(CAN_ID_STW_STATUS, 0x7FF);
|
||||||
ftcan_add_filter(CAN_ID_SHUNT_CURRENT, 0x7FF);
|
ftcan_add_filter(CAN_ID_SHUNT_CURRENT, 0x7FF);
|
||||||
|
@ -59,16 +63,27 @@ void vehicle_broadcast_buttons(GPIO_PinState *button_states) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
|
void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t *data) {
|
||||||
|
const uint8_t *ptr;
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
case CAN_ID_AMS_SLAVE_PANIC:
|
||||||
|
vehicle_state.last_ams_slave_panic.id = data[0];
|
||||||
|
vehicle_state.last_ams_slave_panic.kind = data[1];
|
||||||
|
ptr = &data[2];
|
||||||
|
vehicle_state.last_ams_slave_panic.arg = ftcan_unmarshal_unsigned(&ptr, 4);
|
||||||
|
break;
|
||||||
case CAN_ID_AMS_STATUS:
|
case CAN_ID_AMS_STATUS:
|
||||||
vehicle_state.ts_state = data[0] & 0x7F;
|
vehicle_state.ts_state = data[0] & 0x7F;
|
||||||
vehicle_state.soc = data[1];
|
vehicle_state.soc = data[1];
|
||||||
const uint8_t *ptr = &data[2];
|
ptr = &data[2];
|
||||||
vehicle_state.min_cell_volt =
|
vehicle_state.min_cell_volt =
|
||||||
ftcan_unmarshal_unsigned(&ptr, 2) * CAN_AMS_STATUS_VOLTAGE_FACTOR;
|
ftcan_unmarshal_unsigned(&ptr, 2) * CAN_AMS_STATUS_VOLTAGE_FACTOR;
|
||||||
vehicle_state.max_cell_temp =
|
vehicle_state.max_cell_temp =
|
||||||
ftcan_unmarshal_signed(&ptr, 2) * CAN_AMS_STATUS_TEMP_FACTOR;
|
ftcan_unmarshal_signed(&ptr, 2) * CAN_AMS_STATUS_TEMP_FACTOR;
|
||||||
break;
|
break;
|
||||||
|
case CAN_ID_AMS_ERROR:
|
||||||
|
vehicle_state.last_ams_error.kind = data[0];
|
||||||
|
vehicle_state.last_ams_error.arg = data[1];
|
||||||
|
break;
|
||||||
case CAN_ID_AS_MISSION_FB:
|
case CAN_ID_AS_MISSION_FB:
|
||||||
vehicle_state.active_mission = data[0] & 0b111;
|
vehicle_state.active_mission = data[0] & 0b111;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
<Language Id="GB" />
|
<Language Id="GB" />
|
||||||
</Languages>
|
</Languages>
|
||||||
<Texts>
|
<Texts>
|
||||||
|
<TextGroup Id="Errors">
|
||||||
|
<Text Id="Error_AMS" Alignment="Center" TypographyId="Chinat_Huge">
|
||||||
|
<Translation Language="GB">AMS ErrOr</Translation>
|
||||||
|
</Text>
|
||||||
|
</TextGroup>
|
||||||
<TextGroup Id="DataFields">
|
<TextGroup Id="DataFields">
|
||||||
<Text Id="DebugViewField_Title" Alignment="Left" TypographyId="Default_Bold">
|
<Text Id="DebugViewField_Title" Alignment="Left" TypographyId="Default_Bold">
|
||||||
<Translation Language="GB"><value></Translation>
|
<Translation Language="GB"><value></Translation>
|
||||||
|
@ -137,6 +142,12 @@
|
||||||
</Text>
|
</Text>
|
||||||
</TextGroup>
|
</TextGroup>
|
||||||
<TextGroup Id="Unsorted">
|
<TextGroup Id="Unsorted">
|
||||||
|
<Text Id="__SingleUse_9L8R" Alignment="Left" TypographyId="Default">
|
||||||
|
<Translation Language="GB"><value></Translation>
|
||||||
|
</Text>
|
||||||
|
<Text Id="__SingleUse_1NKF" Alignment="Center" TypographyId="Chinat_Huge">
|
||||||
|
<Translation Language="GB" />
|
||||||
|
</Text>
|
||||||
<Text Id="__SingleUse_J5UH" Alignment="Right" TypographyId="Chinat_Large">
|
<Text Id="__SingleUse_J5UH" Alignment="Right" TypographyId="Chinat_Large">
|
||||||
<Translation Language="GB"><value></Translation>
|
<Translation Language="GB"><value></Translation>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
69
|
69
|
||||||
73
|
73
|
||||||
77
|
77
|
||||||
|
79
|
||||||
83
|
83
|
||||||
84
|
84
|
||||||
97
|
97
|
||||||
|
|
|
@ -7,6 +7,7 @@ AH:0 BA:1 FC:63 EC:0 FF:0 CF:0
|
||||||
69
|
69
|
||||||
73
|
73
|
||||||
77
|
77
|
||||||
|
79
|
||||||
83
|
83
|
||||||
84
|
84
|
||||||
97
|
97
|
||||||
|
|
|
@ -197,6 +197,41 @@ KEEP extern const uint8_t unicodes_CHINN____40_4bpp_0[] FONT_GLYPH_LOCATION_FLAS
|
||||||
0xFF, 0x0D, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x90, 0xFF, 0xFF, 0xAF, 0x01, 0x00,
|
0xFF, 0x0D, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x90, 0xFF, 0xFF, 0xAF, 0x01, 0x00,
|
||||||
0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x62, 0x67, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x62, 0x67, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
// Unicode: [0x004F, O]
|
||||||
|
0x00, 0x00, 0x30, 0xC9, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE,
|
||||||
|
0x16, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x04, 0x00, 0x00, 0x00, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x00, 0x00, 0x30, 0xFE, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x04, 0x00,
|
||||||
|
0xD1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0x1E, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFB, 0xFF, 0xFF, 0xCF, 0xCC, 0xCC, 0xCC, 0xCC,
|
||||||
|
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xEC, 0xFF, 0xFF, 0xCF, 0x00, 0xFD, 0xFF, 0xFF, 0x0F,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01,
|
||||||
|
0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01,
|
||||||
|
0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x01, 0xFC, 0xFF, 0xFF, 0x0F,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0xFA, 0xFF, 0xFF, 0xCF, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xEC,
|
||||||
|
0xFF, 0xFF, 0xDF, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x2E, 0x00, 0x50, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x00,
|
||||||
|
0x00, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0x8F, 0x00, 0x00, 0x00, 0x50, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x05, 0x00, 0x00, 0x00, 0x00, 0x71, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x17, 0x00, 0x00, 0x00,
|
||||||
// Unicode: [0x0053, S]
|
// Unicode: [0x0053, S]
|
||||||
0x00, 0x00, 0x00, 0x72, 0xDB, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
0x00, 0x00, 0x00, 0x72, 0xDB, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x00, 0x00, 0xA1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x00, 0x00, 0xA1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
|
|
@ -12,23 +12,24 @@ KEEP extern const touchgfx::GlyphNode glyphs_CHINN____40_4bpp[] FONT_TABLE_LOCAT
|
||||||
{ 1720, 0x0045, 38, 27, 27, 1, 40, 0, 0, 0x00 }, // E
|
{ 1720, 0x0045, 38, 27, 27, 1, 40, 0, 0, 0x00 }, // E
|
||||||
{ 2233, 0x0049, 7, 27, 27, 1, 9, 0, 0, 0x00 }, // I
|
{ 2233, 0x0049, 7, 27, 27, 1, 9, 0, 0, 0x00 }, // I
|
||||||
{ 2341, 0x004D, 41, 28, 27, 1, 43, 0, 0, 0x00 }, // M
|
{ 2341, 0x004D, 41, 28, 27, 1, 43, 0, 0, 0x00 }, // M
|
||||||
{ 2929, 0x0053, 43, 27, 27, 0, 43, 0, 0, 0x00 }, // S
|
{ 2929, 0x004F, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // O
|
||||||
{ 3523, 0x0054, 39, 27, 27, -1, 37, 0, 0, 0x00 }, // T
|
{ 3469, 0x0053, 43, 27, 27, 0, 43, 0, 0, 0x00 }, // S
|
||||||
{ 4063, 0x0061, 40, 27, 27, 0, 41, 0, 0, 0x00 }, // a
|
{ 4063, 0x0054, 39, 27, 27, -1, 37, 0, 0, 0x00 }, // T
|
||||||
{ 4603, 0x0063, 39, 27, 27, 1, 41, 0, 0, 0x00 }, // c
|
{ 4603, 0x0061, 40, 27, 27, 0, 41, 0, 0, 0x00 }, // a
|
||||||
{ 5143, 0x0064, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // d
|
{ 5143, 0x0063, 39, 27, 27, 1, 41, 0, 0, 0x00 }, // c
|
||||||
{ 5683, 0x0065, 38, 27, 27, 1, 39, 0, 0, 0x00 }, // e
|
{ 5683, 0x0064, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // d
|
||||||
{ 6196, 0x0069, 7, 27, 27, 1, 9, 0, 0, 0x00 }, // i
|
{ 6223, 0x0065, 38, 27, 27, 1, 39, 0, 0, 0x00 }, // e
|
||||||
{ 6304, 0x006B, 39, 27, 27, 1, 39, 0, 0, 0x00 }, // k
|
{ 6736, 0x0069, 7, 27, 27, 1, 9, 0, 0, 0x00 }, // i
|
||||||
{ 6844, 0x006C, 28, 27, 27, 1, 28, 0, 0, 0x00 }, // l
|
{ 6844, 0x006B, 39, 27, 27, 1, 39, 0, 0, 0x00 }, // k
|
||||||
{ 7222, 0x006E, 38, 29, 28, 1, 40, 0, 0, 0x00 }, // n
|
{ 7384, 0x006C, 28, 27, 27, 1, 28, 0, 0, 0x00 }, // l
|
||||||
{ 7773, 0x006F, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // o
|
{ 7762, 0x006E, 38, 29, 28, 1, 40, 0, 0, 0x00 }, // n
|
||||||
{ 8313, 0x0070, 38, 27, 27, 1, 39, 0, 0, 0x00 }, // p
|
{ 8313, 0x006F, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // o
|
||||||
{ 8826, 0x0072, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // r
|
{ 8853, 0x0070, 38, 27, 27, 1, 39, 0, 0, 0x00 }, // p
|
||||||
{ 9366, 0x0073, 43, 27, 27, 0, 43, 0, 0, 0x00 }, // s
|
{ 9366, 0x0072, 39, 27, 27, 1, 40, 0, 0, 0x00 }, // r
|
||||||
{ 9960, 0x0074, 39, 27, 27, -1, 37, 0, 0, 0x00 }, // t
|
{ 9906, 0x0073, 43, 27, 27, 0, 43, 0, 0, 0x00 }, // s
|
||||||
{ 10500, 0x0075, 39, 27, 27, 1, 41, 0, 0, 0x00 }, // u
|
{ 10500, 0x0074, 39, 27, 27, -1, 37, 0, 0, 0x00 }, // t
|
||||||
{ 11040, 0x0076, 38, 28, 27, -1, 36, 0, 0, 0x00 } // v
|
{ 11040, 0x0075, 39, 27, 27, 1, 41, 0, 0, 0x00 }, // u
|
||||||
|
{ 11580, 0x0076, 38, 28, 27, -1, 36, 0, 0, 0x00 } // v
|
||||||
};
|
};
|
||||||
|
|
||||||
// CHINN____40_4bpp
|
// CHINN____40_4bpp
|
||||||
|
@ -46,6 +47,6 @@ touchgfx::GeneratedFont& getFont_CHINN____40_4bpp();
|
||||||
|
|
||||||
touchgfx::GeneratedFont& getFont_CHINN____40_4bpp()
|
touchgfx::GeneratedFont& getFont_CHINN____40_4bpp()
|
||||||
{
|
{
|
||||||
static touchgfx::GeneratedFont CHINN____40_4bpp(glyphs_CHINN____40_4bpp, 25, 41, 40, 0, 0, 4, 1, 1, 1, unicodes_CHINN____40_4bpp, kerning_CHINN____40_4bpp, 63, 0, 0, 0);
|
static touchgfx::GeneratedFont CHINN____40_4bpp(glyphs_CHINN____40_4bpp, 26, 41, 40, 0, 0, 4, 1, 1, 1, unicodes_CHINN____40_4bpp, kerning_CHINN____40_4bpp, 63, 0, 0, 0);
|
||||||
return CHINN____40_4bpp;
|
return CHINN____40_4bpp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*********************************************************************************/
|
||||||
|
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||||
|
/*********************************************************************************/
|
||||||
|
#ifndef ERRORPOPUPBASE_HPP
|
||||||
|
#define ERRORPOPUPBASE_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 ErrorPopupBase : public touchgfx::Container
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ErrorPopupBase();
|
||||||
|
virtual ~ErrorPopupBase();
|
||||||
|
virtual void initialize();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
FrontendApplication& application() {
|
||||||
|
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Member Declarations
|
||||||
|
*/
|
||||||
|
touchgfx::BoxWithBorder bg;
|
||||||
|
touchgfx::TextArea title;
|
||||||
|
touchgfx::TextAreaWithOneWildcard details;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ERRORPOPUPBASE_HPP
|
|
@ -18,6 +18,7 @@
|
||||||
#include <gui/containers/DriverViewFieldSelection.hpp>
|
#include <gui/containers/DriverViewFieldSelection.hpp>
|
||||||
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
|
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
|
||||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||||
|
#include <gui/containers/ErrorPopup.hpp>
|
||||||
|
|
||||||
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
|
class DriverViewViewBase : public touchgfx::View<DriverViewPresenter>
|
||||||
{
|
{
|
||||||
|
@ -89,6 +90,7 @@ protected:
|
||||||
touchgfx::TextArea prechargeLabel;
|
touchgfx::TextArea prechargeLabel;
|
||||||
touchgfx::TextArea r2dLabel;
|
touchgfx::TextArea r2dLabel;
|
||||||
touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
|
touchgfx::TextAreaWithOneWildcard r2dProgressLabel;
|
||||||
|
ErrorPopup errorPopup;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*********************************************************************************/
|
||||||
|
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||||
|
/*********************************************************************************/
|
||||||
|
#include <gui_generated/containers/ErrorPopupBase.hpp>
|
||||||
|
#include <touchgfx/Color.hpp>
|
||||||
|
#include <texts/TextKeysAndLanguages.hpp>
|
||||||
|
|
||||||
|
ErrorPopupBase::ErrorPopupBase()
|
||||||
|
{
|
||||||
|
setWidth(450);
|
||||||
|
setHeight(150);
|
||||||
|
bg.setPosition(0, 0, 450, 150);
|
||||||
|
bg.setColor(touchgfx::Color::getColorFromRGB(197, 14, 31));
|
||||||
|
bg.setBorderColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
|
bg.setBorderSize(5);
|
||||||
|
add(bg);
|
||||||
|
|
||||||
|
title.setPosition(0, 0, 450, 49);
|
||||||
|
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
|
title.setLinespacing(0);
|
||||||
|
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_1NKF));
|
||||||
|
add(title);
|
||||||
|
|
||||||
|
details.setPosition(15, 60, 420, 75);
|
||||||
|
details.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||||
|
details.setLinespacing(0);
|
||||||
|
details.setTypedText(touchgfx::TypedText(T___SINGLEUSE_9L8R));
|
||||||
|
add(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorPopupBase::~ErrorPopupBase()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ErrorPopupBase::initialize()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -143,6 +143,10 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||||
r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_J5UH));
|
r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_J5UH));
|
||||||
r2dProgressLabel.setVisible(false);
|
r2dProgressLabel.setVisible(false);
|
||||||
add(r2dProgressLabel);
|
add(r2dProgressLabel);
|
||||||
|
|
||||||
|
errorPopup.setXY(15, 122);
|
||||||
|
errorPopup.setVisible(false);
|
||||||
|
add(errorPopup);
|
||||||
}
|
}
|
||||||
|
|
||||||
DriverViewViewBase::~DriverViewViewBase()
|
DriverViewViewBase::~DriverViewViewBase()
|
||||||
|
@ -164,6 +168,7 @@ void DriverViewViewBase::setupScreen()
|
||||||
{
|
{
|
||||||
fieldTypeSelectionListItems[i].initialize();
|
fieldTypeSelectionListItems[i].initialize();
|
||||||
}
|
}
|
||||||
|
errorPopup.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DriverViewViewBase::handleKeyEvent(uint8_t key)
|
void DriverViewViewBase::handleKeyEvent(uint8_t key)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"remap":"yes","language":"GB","language_index":0,"indices":[["157","T_DEBUGVIEWFIELD_TITLE"],["157","T_DRIVERVIEWFIELD_TITLE"],["267","T_FIELD_BBAL"],["230","T_FIELD_TSVOLTVEH"],["223","T_FIELD_TSVOLTBAT"],["243","T_FIELD_LVSOC"],["261","T_FIELD_TSSOC"],["277","T_FIELD_MAXCELLTEMP"],["282","T_FIELD_TIREFL"],["287","T_FIELD_TIREFR"],["292","T_FIELD_TIRERL"],["297","T_FIELD_TIRERR"],["272","T_FIELD_LAPCOUNT"],["167","T_FIELD_INICHKSTATE"],["237","T_FIELD_ERR"],["315","T_FIELD_SDC"],["183","T_FIELD_INVRREADY"],["175","T_FIELD_INVLREADY"],["199","T_FIELD_R2DPROGRESS"],["191","T_FIELD_ACTIVEMISSION"],["159","T_FIELD_ASSTATE"],["215","T_FIELD_TSSTATE"],["157","T_NUMBERWILDCARD"],["157","T_DEFAULTWILDCARD_CENTERED"],["157","T_DEFAULTWILDCARD_RIGHTALIGNED"],["307","T_FIELD_TSCURRENT"],["302","T_FIELD_MINCELLVOLT"],["249","T_FIELD_SPEED"],["95","T_INSPECTION_HUGE"],["148","T_EBS_HUGE"],["117","T_TRACKDRIVE_HUGE"],["128","T_AUTOX_HUGE"],["207","T_SKIDPAD_HUGE"],["82","T_ACCEL_HUGE"],["34","T_INVALID_HUGE"],["67","T_MANUAL"],["95","T_INSPECTION"],["148","T_EBS"],["117","T_TRACKDRIVE"],["128","T_AUTOX"],["207","T_SKIDPAD"],["82","T_ACCEL"],["157","T___SINGLEUSE_J5UH"],["311","T___SINGLEUSE_NGUK"],["157","T___SINGLEUSE_4E84"],["157","T___SINGLEUSE_YTAB"],["106","T___SINGLEUSE_RWCE"],["138","T___SINGLEUSE_HMH2"],["319","T___SINGLEUSE_4OBM"],["308","T___SINGLEUSE_PHFD"],["255","T___SINGLEUSE_H6UX"],["157","T___SINGLEUSE_20H3"],["17","T___SINGLEUSE_SDGP"],["51","T___SINGLEUSE_M5X7"],["0","T___SINGLEUSE_6GPV"]]}
|
{"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"]]}
|
|
@ -1 +1 @@
|
||||||
{"languages":["GB"],"textids":["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_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"]}
|
{"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"]}
|
|
@ -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,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]}
|
{"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]}
|
|
@ -1 +1 @@
|
||||||
{"databases":{"DEFAULT":[[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"],[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"}
|
{"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"}
|
|
@ -12,6 +12,7 @@ enum LANGUAGES
|
||||||
|
|
||||||
enum TEXTS
|
enum TEXTS
|
||||||
{
|
{
|
||||||
|
T_ERROR_AMS,
|
||||||
T_DEBUGVIEWFIELD_TITLE,
|
T_DEBUGVIEWFIELD_TITLE,
|
||||||
T_DRIVERVIEWFIELD_TITLE,
|
T_DRIVERVIEWFIELD_TITLE,
|
||||||
T_FIELD_BBAL,
|
T_FIELD_BBAL,
|
||||||
|
@ -54,6 +55,8 @@ enum TEXTS
|
||||||
T_AUTOX,
|
T_AUTOX,
|
||||||
T_SKIDPAD,
|
T_SKIDPAD,
|
||||||
T_ACCEL,
|
T_ACCEL,
|
||||||
|
T___SINGLEUSE_9L8R,
|
||||||
|
T___SINGLEUSE_1NKF,
|
||||||
T___SINGLEUSE_J5UH,
|
T___SINGLEUSE_J5UH,
|
||||||
T___SINGLEUSE_NGUK,
|
T___SINGLEUSE_NGUK,
|
||||||
T___SINGLEUSE_4E84,
|
T___SINGLEUSE_4E84,
|
||||||
|
|
|
@ -10,58 +10,61 @@ KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE;
|
||||||
// Remap all strings
|
// Remap all strings
|
||||||
TEXT_LOCATION_FLASH_PRAGMA
|
TEXT_LOCATION_FLASH_PRAGMA
|
||||||
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
KEEP extern const uint32_t indicesGb[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||||||
157, // T_DEBUGVIEWFIELD_TITLE: "<>"
|
128, // T_ERROR_AMS: "AMS ErrOr"
|
||||||
157, // T_DRIVERVIEWFIELD_TITLE: "<>"
|
167, // T_DEBUGVIEWFIELD_TITLE: "<>"
|
||||||
267, // T_FIELD_BBAL: "BBAL"
|
167, // T_DRIVERVIEWFIELD_TITLE: "<>"
|
||||||
230, // T_FIELD_TSVOLTVEH: "TSVVEH"
|
277, // T_FIELD_BBAL: "BBAL"
|
||||||
223, // T_FIELD_TSVOLTBAT: "TSVBAT"
|
240, // T_FIELD_TSVOLTVEH: "TSVVEH"
|
||||||
243, // T_FIELD_LVSOC: "LVSOC"
|
233, // T_FIELD_TSVOLTBAT: "TSVBAT"
|
||||||
261, // T_FIELD_TSSOC: "TSSOC"
|
253, // T_FIELD_LVSOC: "LVSOC"
|
||||||
277, // T_FIELD_MAXCELLTEMP: "TMAX"
|
271, // T_FIELD_TSSOC: "TSSOC"
|
||||||
282, // T_FIELD_TIREFL: "TTFL"
|
287, // T_FIELD_MAXCELLTEMP: "TMAX"
|
||||||
287, // T_FIELD_TIREFR: "TTFR"
|
292, // T_FIELD_TIREFL: "TTFL"
|
||||||
292, // T_FIELD_TIRERL: "TTRL"
|
297, // T_FIELD_TIREFR: "TTFR"
|
||||||
297, // T_FIELD_TIRERR: "TTRR"
|
302, // T_FIELD_TIRERL: "TTRL"
|
||||||
272, // T_FIELD_LAPCOUNT: "LAPS"
|
307, // T_FIELD_TIRERR: "TTRR"
|
||||||
167, // T_FIELD_INICHKSTATE: "ICSTATE"
|
282, // T_FIELD_LAPCOUNT: "LAPS"
|
||||||
237, // T_FIELD_ERR: "ERROR"
|
177, // T_FIELD_INICHKSTATE: "ICSTATE"
|
||||||
315, // T_FIELD_SDC: "SDC"
|
247, // T_FIELD_ERR: "ERROR"
|
||||||
183, // T_FIELD_INVRREADY: "INVRRDY"
|
325, // T_FIELD_SDC: "SDC"
|
||||||
175, // T_FIELD_INVLREADY: "INVLRDY"
|
193, // T_FIELD_INVRREADY: "INVRRDY"
|
||||||
199, // T_FIELD_R2DPROGRESS: "R2DPROG"
|
185, // T_FIELD_INVLREADY: "INVLRDY"
|
||||||
191, // T_FIELD_ACTIVEMISSION: "MISSION"
|
209, // T_FIELD_R2DPROGRESS: "R2DPROG"
|
||||||
159, // T_FIELD_ASSTATE: "ASSTATE"
|
201, // T_FIELD_ACTIVEMISSION: "MISSION"
|
||||||
215, // T_FIELD_TSSTATE: "TSSTATE"
|
169, // T_FIELD_ASSTATE: "ASSTATE"
|
||||||
157, // T_NUMBERWILDCARD: "<>"
|
225, // T_FIELD_TSSTATE: "TSSTATE"
|
||||||
157, // T_DEFAULTWILDCARD_CENTERED: "<>"
|
167, // T_NUMBERWILDCARD: "<>"
|
||||||
157, // T_DEFAULTWILDCARD_RIGHTALIGNED: "<>"
|
167, // T_DEFAULTWILDCARD_CENTERED: "<>"
|
||||||
307, // T_FIELD_TSCURRENT: "ITS"
|
167, // T_DEFAULTWILDCARD_RIGHTALIGNED: "<>"
|
||||||
302, // T_FIELD_MINCELLVOLT: "VMIN"
|
317, // T_FIELD_TSCURRENT: "ITS"
|
||||||
249, // T_FIELD_SPEED: "SPEED"
|
312, // T_FIELD_MINCELLVOLT: "VMIN"
|
||||||
|
259, // T_FIELD_SPEED: "SPEED"
|
||||||
95, // T_INSPECTION_HUGE: "Inspection"
|
95, // T_INSPECTION_HUGE: "Inspection"
|
||||||
148, // T_EBS_HUGE: "EBS Test"
|
158, // T_EBS_HUGE: "EBS Test"
|
||||||
117, // T_TRACKDRIVE_HUGE: "Trackdrive"
|
117, // T_TRACKDRIVE_HUGE: "Trackdrive"
|
||||||
128, // T_AUTOX_HUGE: "Autocross"
|
138, // T_AUTOX_HUGE: "Autocross"
|
||||||
207, // T_SKIDPAD_HUGE: "Skidpad"
|
217, // T_SKIDPAD_HUGE: "Skidpad"
|
||||||
82, // T_ACCEL_HUGE: "Acceleration"
|
82, // T_ACCEL_HUGE: "Acceleration"
|
||||||
34, // T_INVALID_HUGE: "Invalid Mission!"
|
34, // T_INVALID_HUGE: "Invalid Mission!"
|
||||||
67, // T_MANUAL: "Manual Driving"
|
67, // T_MANUAL: "Manual Driving"
|
||||||
95, // T_INSPECTION: "Inspection"
|
95, // T_INSPECTION: "Inspection"
|
||||||
148, // T_EBS: "EBS Test"
|
158, // T_EBS: "EBS Test"
|
||||||
117, // T_TRACKDRIVE: "Trackdrive"
|
117, // T_TRACKDRIVE: "Trackdrive"
|
||||||
128, // T_AUTOX: "Autocross"
|
138, // T_AUTOX: "Autocross"
|
||||||
207, // T_SKIDPAD: "Skidpad"
|
217, // T_SKIDPAD: "Skidpad"
|
||||||
82, // T_ACCEL: "Acceleration"
|
82, // T_ACCEL: "Acceleration"
|
||||||
157, // T___SINGLEUSE_J5UH: "<>"
|
167, // T___SINGLEUSE_9L8R: "<>"
|
||||||
311, // T___SINGLEUSE_NGUK: "R2D"
|
16, // T___SINGLEUSE_1NKF: ""
|
||||||
157, // T___SINGLEUSE_4E84: "<>"
|
167, // T___SINGLEUSE_J5UH: "<>"
|
||||||
157, // T___SINGLEUSE_YTAB: "<>"
|
321, // T___SINGLEUSE_NGUK: "R2D"
|
||||||
|
167, // T___SINGLEUSE_4E84: "<>"
|
||||||
|
167, // T___SINGLEUSE_YTAB: "<>"
|
||||||
106, // T___SINGLEUSE_RWCE: "PARAMETERS"
|
106, // T___SINGLEUSE_RWCE: "PARAMETERS"
|
||||||
138, // T___SINGLEUSE_HMH2: "PRECHARGE"
|
148, // T___SINGLEUSE_HMH2: "PRECHARGE"
|
||||||
319, // T___SINGLEUSE_4OBM: "LV"
|
329, // T___SINGLEUSE_4OBM: "LV"
|
||||||
308, // T___SINGLEUSE_PHFD: "TS"
|
318, // T___SINGLEUSE_PHFD: "TS"
|
||||||
255, // T___SINGLEUSE_H6UX: "TIRES"
|
265, // T___SINGLEUSE_H6UX: "TIRES"
|
||||||
157, // T___SINGLEUSE_20H3: "<>"
|
167, // T___SINGLEUSE_20H3: "<>"
|
||||||
17, // T___SINGLEUSE_SDGP: "Current Mission:"
|
17, // T___SINGLEUSE_SDGP: "Current Mission:"
|
||||||
51, // T___SINGLEUSE_M5X7: "Invalid Mission"
|
51, // T___SINGLEUSE_M5X7: "Invalid Mission"
|
||||||
0 // T___SINGLEUSE_6GPV: "Choose a mission"
|
0 // T___SINGLEUSE_6GPV: "Choose a mission"
|
||||||
|
|
|
@ -69,37 +69,38 @@ KEEP extern const touchgfx::Unicode::UnicodeChar texts_all_languages[] TEXT_LOCA
|
||||||
0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0, // @95 "Inspection"
|
0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0, // @95 "Inspection"
|
||||||
0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x0, // @106 "PARAMETERS"
|
0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x0, // @106 "PARAMETERS"
|
||||||
0x54, 0x72, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x0, // @117 "Trackdrive"
|
0x54, 0x72, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x0, // @117 "Trackdrive"
|
||||||
0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x0, // @128 "Autocross"
|
0x41, 0x4d, 0x53, 0x20, 0x45, 0x72, 0x72, 0x4f, 0x72, 0x0, // @128 "AMS ErrOr"
|
||||||
0x50, 0x52, 0x45, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x0, // @138 "PRECHARGE"
|
0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x0, // @138 "Autocross"
|
||||||
0x45, 0x42, 0x53, 0x20, 0x54, 0x65, 0x73, 0x74, 0x0, // @148 "EBS Test"
|
0x50, 0x52, 0x45, 0x43, 0x48, 0x41, 0x52, 0x47, 0x45, 0x0, // @148 "PRECHARGE"
|
||||||
0x2, 0x0, // @157 "<>"
|
0x45, 0x42, 0x53, 0x20, 0x54, 0x65, 0x73, 0x74, 0x0, // @158 "EBS Test"
|
||||||
0x41, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @159 "ASSTATE"
|
0x2, 0x0, // @167 "<>"
|
||||||
0x49, 0x43, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @167 "ICSTATE"
|
0x41, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @169 "ASSTATE"
|
||||||
0x49, 0x4e, 0x56, 0x4c, 0x52, 0x44, 0x59, 0x0, // @175 "INVLRDY"
|
0x49, 0x43, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @177 "ICSTATE"
|
||||||
0x49, 0x4e, 0x56, 0x52, 0x52, 0x44, 0x59, 0x0, // @183 "INVRRDY"
|
0x49, 0x4e, 0x56, 0x4c, 0x52, 0x44, 0x59, 0x0, // @185 "INVLRDY"
|
||||||
0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x0, // @191 "MISSION"
|
0x49, 0x4e, 0x56, 0x52, 0x52, 0x44, 0x59, 0x0, // @193 "INVRRDY"
|
||||||
0x52, 0x32, 0x44, 0x50, 0x52, 0x4f, 0x47, 0x0, // @199 "R2DPROG"
|
0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x0, // @201 "MISSION"
|
||||||
0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0, // @207 "Skidpad"
|
0x52, 0x32, 0x44, 0x50, 0x52, 0x4f, 0x47, 0x0, // @209 "R2DPROG"
|
||||||
0x54, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @215 "TSSTATE"
|
0x53, 0x6b, 0x69, 0x64, 0x70, 0x61, 0x64, 0x0, // @217 "Skidpad"
|
||||||
0x54, 0x53, 0x56, 0x42, 0x41, 0x54, 0x0, // @223 "TSVBAT"
|
0x54, 0x53, 0x53, 0x54, 0x41, 0x54, 0x45, 0x0, // @225 "TSSTATE"
|
||||||
0x54, 0x53, 0x56, 0x56, 0x45, 0x48, 0x0, // @230 "TSVVEH"
|
0x54, 0x53, 0x56, 0x42, 0x41, 0x54, 0x0, // @233 "TSVBAT"
|
||||||
0x45, 0x52, 0x52, 0x4f, 0x52, 0x0, // @237 "ERROR"
|
0x54, 0x53, 0x56, 0x56, 0x45, 0x48, 0x0, // @240 "TSVVEH"
|
||||||
0x4c, 0x56, 0x53, 0x4f, 0x43, 0x0, // @243 "LVSOC"
|
0x45, 0x52, 0x52, 0x4f, 0x52, 0x0, // @247 "ERROR"
|
||||||
0x53, 0x50, 0x45, 0x45, 0x44, 0x0, // @249 "SPEED"
|
0x4c, 0x56, 0x53, 0x4f, 0x43, 0x0, // @253 "LVSOC"
|
||||||
0x54, 0x49, 0x52, 0x45, 0x53, 0x0, // @255 "TIRES"
|
0x53, 0x50, 0x45, 0x45, 0x44, 0x0, // @259 "SPEED"
|
||||||
0x54, 0x53, 0x53, 0x4f, 0x43, 0x0, // @261 "TSSOC"
|
0x54, 0x49, 0x52, 0x45, 0x53, 0x0, // @265 "TIRES"
|
||||||
0x42, 0x42, 0x41, 0x4c, 0x0, // @267 "BBAL"
|
0x54, 0x53, 0x53, 0x4f, 0x43, 0x0, // @271 "TSSOC"
|
||||||
0x4c, 0x41, 0x50, 0x53, 0x0, // @272 "LAPS"
|
0x42, 0x42, 0x41, 0x4c, 0x0, // @277 "BBAL"
|
||||||
0x54, 0x4d, 0x41, 0x58, 0x0, // @277 "TMAX"
|
0x4c, 0x41, 0x50, 0x53, 0x0, // @282 "LAPS"
|
||||||
0x54, 0x54, 0x46, 0x4c, 0x0, // @282 "TTFL"
|
0x54, 0x4d, 0x41, 0x58, 0x0, // @287 "TMAX"
|
||||||
0x54, 0x54, 0x46, 0x52, 0x0, // @287 "TTFR"
|
0x54, 0x54, 0x46, 0x4c, 0x0, // @292 "TTFL"
|
||||||
0x54, 0x54, 0x52, 0x4c, 0x0, // @292 "TTRL"
|
0x54, 0x54, 0x46, 0x52, 0x0, // @297 "TTFR"
|
||||||
0x54, 0x54, 0x52, 0x52, 0x0, // @297 "TTRR"
|
0x54, 0x54, 0x52, 0x4c, 0x0, // @302 "TTRL"
|
||||||
0x56, 0x4d, 0x49, 0x4e, 0x0, // @302 "VMIN"
|
0x54, 0x54, 0x52, 0x52, 0x0, // @307 "TTRR"
|
||||||
0x49, 0x54, 0x53, 0x0, // @307 "ITS"
|
0x56, 0x4d, 0x49, 0x4e, 0x0, // @312 "VMIN"
|
||||||
0x52, 0x32, 0x44, 0x0, // @311 "R2D"
|
0x49, 0x54, 0x53, 0x0, // @317 "ITS"
|
||||||
0x53, 0x44, 0x43, 0x0, // @315 "SDC"
|
0x52, 0x32, 0x44, 0x0, // @321 "R2D"
|
||||||
0x4c, 0x56, 0x0 // @319 "LV"
|
0x53, 0x44, 0x43, 0x0, // @325 "SDC"
|
||||||
|
0x4c, 0x56, 0x0 // @329 "LV"
|
||||||
};
|
};
|
||||||
|
|
||||||
TEXT_LOCATION_FLASH_PRAGMA
|
TEXT_LOCATION_FLASH_PRAGMA
|
||||||
|
|
|
@ -26,6 +26,7 @@ extern const touchgfx::TypedText::TypedTextData* const typedTextDatabaseArray[];
|
||||||
|
|
||||||
TEXT_LOCATION_FLASH_PRAGMA
|
TEXT_LOCATION_FLASH_PRAGMA
|
||||||
const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
const touchgfx::TypedText::TypedTextData typedText_database_DEFAULT[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||||||
|
{ 3, touchgfx::CENTER, touchgfx::TEXT_DIRECTION_LTR },
|
||||||
{ 5, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
|
{ 5, touchgfx::LEFT, 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 },
|
||||||
|
@ -68,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 },
|
{ 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 },
|
{ 1, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR },
|
||||||
{ 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
|
{ 1, touchgfx::LEFT, touchgfx::TEXT_DIRECTION_LTR },
|
||||||
{ 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR },
|
{ 4, touchgfx::RIGHT, touchgfx::TEXT_DIRECTION_LTR },
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef ERRORPOPUP_HPP
|
||||||
|
#define ERRORPOPUP_HPP
|
||||||
|
|
||||||
|
#include "touchgfx/Unicode.hpp"
|
||||||
|
#include <gui_generated/containers/ErrorPopupBase.hpp>
|
||||||
|
|
||||||
|
class ErrorPopup : public ErrorPopupBase {
|
||||||
|
public:
|
||||||
|
ErrorPopup();
|
||||||
|
virtual ~ErrorPopup() {}
|
||||||
|
|
||||||
|
virtual void initialize();
|
||||||
|
|
||||||
|
void showAMSError();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
touchgfx::Unicode::UnicodeChar detailsBuffer[128];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ERRORPOPUP_HPP
|
|
@ -37,6 +37,9 @@ public:
|
||||||
private:
|
private:
|
||||||
DriverViewPresenter();
|
DriverViewPresenter();
|
||||||
|
|
||||||
|
void updateProgress();
|
||||||
|
void updateErrorPopup();
|
||||||
|
|
||||||
DriverViewView &view;
|
DriverViewView &view;
|
||||||
|
|
||||||
DataFieldType fields[3];
|
DataFieldType fields[3];
|
||||||
|
|
|
@ -28,6 +28,9 @@ public:
|
||||||
void setTSSoC(uint8_t soc);
|
void setTSSoC(uint8_t soc);
|
||||||
void setProgress(bool active, DriverViewProgressType type, float progress);
|
void setProgress(bool active, DriverViewProgressType type, float progress);
|
||||||
|
|
||||||
|
void showAMSError();
|
||||||
|
void clearErrorPopup();
|
||||||
|
|
||||||
void selectPrevField() override;
|
void selectPrevField() override;
|
||||||
void selectNextField() override;
|
void selectNextField() override;
|
||||||
void selectPrevFieldType() override;
|
void selectPrevFieldType() override;
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
#include <gui/containers/ErrorPopup.hpp>
|
||||||
|
|
||||||
|
#include "texts/TextKeysAndLanguages.hpp"
|
||||||
|
#include "touchgfx/Unicode.hpp"
|
||||||
|
#include "vehicle.h"
|
||||||
|
|
||||||
|
ErrorPopup::ErrorPopup() {}
|
||||||
|
|
||||||
|
void ErrorPopup::initialize() { ErrorPopupBase::initialize(); }
|
||||||
|
|
||||||
|
void ErrorPopup::showAMSError() {
|
||||||
|
title.setTypedText(T_ERROR_AMS);
|
||||||
|
title.invalidate();
|
||||||
|
switch (vehicle_state.last_ams_error.kind) {
|
||||||
|
case AMS_ERROR_NONE:
|
||||||
|
touchgfx::Unicode::strncpy(detailsBuffer, "UNKNOWN ERROR",
|
||||||
|
sizeof(detailsBuffer) / sizeof(*detailsBuffer));
|
||||||
|
break;
|
||||||
|
case AMS_ERROR_SLAVE_TIMEOUT:
|
||||||
|
touchgfx::Unicode::snprintf(
|
||||||
|
detailsBuffer, sizeof(detailsBuffer) / sizeof(*detailsBuffer),
|
||||||
|
"Slave timeout: Slave %d", vehicle_state.last_ams_error.arg);
|
||||||
|
break;
|
||||||
|
case AMS_ERROR_SLAVE_PANIC: {
|
||||||
|
const char *panicKindStr = "UNKNOWN";
|
||||||
|
switch (vehicle_state.last_ams_slave_panic.kind) {
|
||||||
|
case AMS_SLAVEPANIC_OVERTEMP:
|
||||||
|
panicKindStr = "OVERTEMPERATURE";
|
||||||
|
break;
|
||||||
|
case AMS_SLAVEPANIC_UNDERTEMP:
|
||||||
|
panicKindStr = "UNDERTEMPERATURE";
|
||||||
|
break;
|
||||||
|
case AMS_SLAVEPANIC_OVERVOLTAGE:
|
||||||
|
panicKindStr = "OVERVOLTAGE";
|
||||||
|
break;
|
||||||
|
case AMS_SLAVEPANIC_UNDERVOLTAGE:
|
||||||
|
panicKindStr = "UNDERVOLTAGE";
|
||||||
|
break;
|
||||||
|
case AMS_SLAVEPANIC_TOO_FEW_TEMP:
|
||||||
|
panicKindStr = "TOO FEW TEMP SENSORS";
|
||||||
|
break;
|
||||||
|
case AMS_SLAVEPANIC_OPENWIRE:
|
||||||
|
panicKindStr = "OPEN WIRE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
touchgfx::Unicode::UnicodeChar panicKindBuf[32];
|
||||||
|
touchgfx::Unicode::strncpy(panicKindBuf, panicKindStr,
|
||||||
|
sizeof(panicKindBuf) / sizeof(*panicKindBuf));
|
||||||
|
touchgfx::Unicode::snprintf(
|
||||||
|
detailsBuffer, sizeof(detailsBuffer) / sizeof(*detailsBuffer),
|
||||||
|
"Slave panic: Slave %d\n[ID: %d, Kind: %s, Arg: %08x]",
|
||||||
|
vehicle_state.last_ams_slave_panic.id, panicKindBuf,
|
||||||
|
vehicle_state.last_ams_slave_panic.arg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AMS_ERROR_SHUNT_TIMEOUT:
|
||||||
|
touchgfx::Unicode::strncpy(detailsBuffer, "Shunt timeout",
|
||||||
|
sizeof(detailsBuffer) / sizeof(*detailsBuffer));
|
||||||
|
break;
|
||||||
|
case AMS_ERROR_SHUNT_OVERCURRENT:
|
||||||
|
touchgfx::Unicode::strncpy(detailsBuffer, "Shunt overcurrent",
|
||||||
|
sizeof(detailsBuffer) / sizeof(*detailsBuffer));
|
||||||
|
break;
|
||||||
|
case AMS_ERROR_SHUNT_OVERTEMP:
|
||||||
|
touchgfx::Unicode::strncpy(detailsBuffer, "Shunt overtemperature",
|
||||||
|
sizeof(detailsBuffer) / sizeof(*detailsBuffer));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
details.setWildcard(detailsBuffer);
|
||||||
|
details.invalidate();
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
#include "vehicle.h"
|
#include "vehicle.h"
|
||||||
|
|
||||||
DriverViewPresenter::DriverViewPresenter(DriverViewView &v)
|
DriverViewPresenter::DriverViewPresenter(DriverViewView &v)
|
||||||
: view(v), fields{DF_MinCellVolt, DF_Speed, DF_TSCurrent} {}
|
: view(v), fields{DF_MinCellVolt, DF_TSVoltageVeh, DF_TSCurrent} {}
|
||||||
|
|
||||||
void DriverViewPresenter::activate() {
|
void DriverViewPresenter::activate() {
|
||||||
for (size_t i = 0; i < 3; i++) {
|
for (size_t i = 0; i < 3; i++) {
|
||||||
|
@ -18,6 +18,23 @@ void DriverViewPresenter::deactivate() {}
|
||||||
void DriverViewPresenter::vehicleStateUpdated() {
|
void DriverViewPresenter::vehicleStateUpdated() {
|
||||||
view.setTireTemps(vehicle_state.tire_temps);
|
view.setTireTemps(vehicle_state.tire_temps);
|
||||||
view.setTSSoC(vehicle_state.soc);
|
view.setTSSoC(vehicle_state.soc);
|
||||||
|
updateProgress();
|
||||||
|
updateErrorPopup();
|
||||||
|
|
||||||
|
view.updateFieldValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverViewPresenter::nextScreen() {
|
||||||
|
static_cast<FrontendApplication *>(Application::getInstance())
|
||||||
|
->gotoVehicleConfigScreenNoTransition();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverViewPresenter::setFieldType(size_t i, DataFieldType type) {
|
||||||
|
fields[i] = type;
|
||||||
|
view.setFieldType(i, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverViewPresenter::updateProgress() {
|
||||||
if (vehicle_state.ts_state == TS_PRECHARGE) {
|
if (vehicle_state.ts_state == TS_PRECHARGE) {
|
||||||
float progress = 0;
|
float progress = 0;
|
||||||
if (vehicle_state.ts_voltage_bat != 0) {
|
if (vehicle_state.ts_voltage_bat != 0) {
|
||||||
|
@ -32,16 +49,12 @@ void DriverViewPresenter::vehicleStateUpdated() {
|
||||||
} else {
|
} else {
|
||||||
view.setProgress(false, DriverViewProgressType::PRECHARGE, 0);
|
view.setProgress(false, DriverViewProgressType::PRECHARGE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
view.updateFieldValues();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DriverViewPresenter::nextScreen() {
|
void DriverViewPresenter::updateErrorPopup() {
|
||||||
static_cast<FrontendApplication *>(Application::getInstance())
|
if (vehicle_state.ts_state == TS_ERROR) {
|
||||||
->gotoVehicleConfigScreenNoTransition();
|
view.showAMSError();
|
||||||
}
|
} else {
|
||||||
|
view.clearErrorPopup();
|
||||||
void DriverViewPresenter::setFieldType(size_t i, DataFieldType type) {
|
}
|
||||||
fields[i] = type;
|
|
||||||
view.setFieldType(i, type);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,17 @@ void DriverViewView::setProgress(bool active, DriverViewProgressType type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DriverViewView::showAMSError() {
|
||||||
|
errorPopup.setVisible(true);
|
||||||
|
errorPopup.showAMSError();
|
||||||
|
errorPopup.invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DriverViewView::clearErrorPopup() {
|
||||||
|
errorPopup.setVisible(false);
|
||||||
|
errorPopup.invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
void DriverViewView::selectNextField() {
|
void DriverViewView::selectNextField() {
|
||||||
if (!fieldTypeSelection.isVisible()) {
|
if (!fieldTypeSelection.isVisible()) {
|
||||||
fieldTypeSelection.setVisible(true);
|
fieldTypeSelection.setVisible(true);
|
||||||
|
|
|
@ -51,6 +51,8 @@
|
||||||
<ClCompile Include="..\..\gui\src\vehicleconfig_screen\VehicleConfigPresenter.cpp"/>
|
<ClCompile Include="..\..\gui\src\vehicleconfig_screen\VehicleConfigPresenter.cpp"/>
|
||||||
<ClCompile Include="..\..\gui\src\vehicleconfig_screen\VehicleConfigView.cpp"/>
|
<ClCompile Include="..\..\gui\src\vehicleconfig_screen\VehicleConfigView.cpp"/>
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\vehicleconfig_screen\VehicleConfigViewBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\vehicleconfig_screen\VehicleConfigViewBase.cpp"/>
|
||||||
|
<ClCompile Include="..\..\gui\src\containers\ErrorPopup.cpp"/>
|
||||||
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\ErrorPopupBase.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(ApplicationRoot)\assets\texts\texts.xml"/>
|
<None Include="$(ApplicationRoot)\assets\texts\texts.xml"/>
|
||||||
|
@ -231,6 +233,8 @@
|
||||||
<ClInclude Include="..\..\gui\include\gui\vehicleconfig_screen\VehicleConfigPresenter.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\vehicleconfig_screen\VehicleConfigPresenter.hpp"/>
|
||||||
<ClInclude Include="..\..\gui\include\gui\vehicleconfig_screen\VehicleConfigView.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\vehicleconfig_screen\VehicleConfigView.hpp"/>
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\vehicleconfig_screen\VehicleConfigViewBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\vehicleconfig_screen\VehicleConfigViewBase.hpp"/>
|
||||||
|
<ClInclude Include="..\..\gui\include\gui\containers\ErrorPopup.hpp"/>
|
||||||
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\ErrorPopupBase.hpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc"/>
|
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc"/>
|
||||||
|
|
|
@ -366,6 +366,12 @@
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\vehicleconfig_screen\VehicleConfigViewBase.cpp">
|
<ClCompile Include="..\..\generated\gui_generated\src\vehicleconfig_screen\VehicleConfigViewBase.cpp">
|
||||||
<Filter>Source Files\generated\gui_generated\vehicleconfig_screen</Filter>
|
<Filter>Source Files\generated\gui_generated\vehicleconfig_screen</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\gui\src\containers\ErrorPopup.cpp">
|
||||||
|
<Filter>Source Files\gui\containers</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\ErrorPopupBase.cpp">
|
||||||
|
<Filter>Source Files\generated\gui_generated\containers</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(ApplicationRoot)\assets\texts\texts.xml">
|
<None Include="$(ApplicationRoot)\assets\texts\texts.xml">
|
||||||
|
@ -898,6 +904,12 @@
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\vehicleconfig_screen\VehicleConfigViewBase.hpp">
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\vehicleconfig_screen\VehicleConfigViewBase.hpp">
|
||||||
<Filter>Header Files\generated\gui_generated\vehicleconfig_screen</Filter>
|
<Filter>Header Files\generated\gui_generated\vehicleconfig_screen</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\gui\include\gui\containers\ErrorPopup.hpp">
|
||||||
|
<Filter>Header Files\gui\containers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\ErrorPopupBase.hpp">
|
||||||
|
<Filter>Header Files\generated\gui_generated\containers</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc">
|
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc">
|
||||||
|
|
|
@ -508,6 +508,16 @@
|
||||||
"Blue": 255
|
"Blue": 255
|
||||||
},
|
},
|
||||||
"Wildcard1": {}
|
"Wildcard1": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": "CustomContainerInstance",
|
||||||
|
"Name": "errorPopup",
|
||||||
|
"X": 15,
|
||||||
|
"Y": 122,
|
||||||
|
"Width": 450,
|
||||||
|
"Height": 150,
|
||||||
|
"Visible": false,
|
||||||
|
"CustomContainerDefinitionName": "ErrorPopup"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Interactions": [
|
"Interactions": [
|
||||||
|
@ -1134,6 +1144,62 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Interactions": []
|
"Interactions": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "ErrorPopup",
|
||||||
|
"X": -80,
|
||||||
|
"Y": 165,
|
||||||
|
"Width": 450,
|
||||||
|
"Height": 150,
|
||||||
|
"Components": [
|
||||||
|
{
|
||||||
|
"Type": "BoxWithBorder",
|
||||||
|
"Name": "bg",
|
||||||
|
"Width": 450,
|
||||||
|
"Height": 150,
|
||||||
|
"Color": {
|
||||||
|
"Red": 197,
|
||||||
|
"Green": 14,
|
||||||
|
"Blue": 31
|
||||||
|
},
|
||||||
|
"BorderColor": {
|
||||||
|
"Red": 255,
|
||||||
|
"Green": 255,
|
||||||
|
"Blue": 255
|
||||||
|
},
|
||||||
|
"BorderSize": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": "TextArea",
|
||||||
|
"Name": "title",
|
||||||
|
"Width": 450,
|
||||||
|
"Height": 49,
|
||||||
|
"TextId": "__SingleUse_1NKF",
|
||||||
|
"TextRotation": "0",
|
||||||
|
"Color": {
|
||||||
|
"Red": 255,
|
||||||
|
"Green": 255,
|
||||||
|
"Blue": 255
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": "TextArea",
|
||||||
|
"Name": "details",
|
||||||
|
"X": 15,
|
||||||
|
"Y": 60,
|
||||||
|
"Width": 420,
|
||||||
|
"Height": 75,
|
||||||
|
"TextId": "__SingleUse_9L8R",
|
||||||
|
"TextRotation": "0",
|
||||||
|
"Color": {
|
||||||
|
"Red": 255,
|
||||||
|
"Green": 255,
|
||||||
|
"Blue": 255
|
||||||
|
},
|
||||||
|
"Wildcard1": {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Interactions": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Name": "MyApplication",
|
"Name": "MyApplication",
|
||||||
|
|
Loading…
Reference in New Issue