DataField -> NamedField<FieldType>
This commit is contained in:
parent
8d701669e4
commit
09f65fcf22
|
@ -378,8 +378,8 @@ TouchGFX/generated/texts/src/Texts.cpp \
|
||||||
TouchGFX/generated/texts/src/TypedTextDatabase.cpp \
|
TouchGFX/generated/texts/src/TypedTextDatabase.cpp \
|
||||||
TouchGFX/gui/src/ami_screen/AMIPresenter.cpp \
|
TouchGFX/gui/src/ami_screen/AMIPresenter.cpp \
|
||||||
TouchGFX/gui/src/ami_screen/AMIView.cpp \
|
TouchGFX/gui/src/ami_screen/AMIView.cpp \
|
||||||
TouchGFX/gui/src/common/DataField.cpp \
|
|
||||||
TouchGFX/gui/src/common/FrontendApplication.cpp \
|
TouchGFX/gui/src/common/FrontendApplication.cpp \
|
||||||
|
TouchGFX/gui/src/common/NamedField.cpp \
|
||||||
TouchGFX/gui/src/containers/DebugViewItem.cpp \
|
TouchGFX/gui/src/containers/DebugViewItem.cpp \
|
||||||
TouchGFX/gui/src/containers/DebugViewLine.cpp \
|
TouchGFX/gui/src/containers/DebugViewLine.cpp \
|
||||||
TouchGFX/gui/src/containers/DriverViewField.cpp \
|
TouchGFX/gui/src/containers/DriverViewField.cpp \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef DATAFIELD_HPP
|
#ifndef NAMEDFIELD_HPP
|
||||||
#define DATAFIELD_HPP
|
#define NAMEDFIELD_HPP
|
||||||
|
|
||||||
#include "touchgfx/TypedText.hpp"
|
#include "touchgfx/TypedText.hpp"
|
||||||
#include "touchgfx/Unicode.hpp"
|
#include "touchgfx/Unicode.hpp"
|
||||||
|
@ -21,10 +21,10 @@ CountedEnum(DataFieldType, size_t, DF_TSState, DF_ASState, DF_ActiveMission,
|
||||||
DF_TSSoC, DF_LVSoC, DF_TSCurrent, DF_TSVoltageBat, DF_TSVoltageVeh,
|
DF_TSSoC, DF_LVSoC, DF_TSCurrent, DF_TSVoltageBat, DF_TSVoltageVeh,
|
||||||
DF_Speed, DF_BBal);
|
DF_Speed, DF_BBal);
|
||||||
|
|
||||||
enum class DataFieldKind { Float, Bool, Text, Int };
|
enum class NamedFieldKind { Float, Bool, Text, Int };
|
||||||
|
|
||||||
struct DataFieldDescription {
|
struct NamedFieldDescription {
|
||||||
DataFieldKind kind;
|
NamedFieldKind kind;
|
||||||
const char *title;
|
const char *title;
|
||||||
size_t int_digits;
|
size_t int_digits;
|
||||||
size_t decimal_digits;
|
size_t decimal_digits;
|
||||||
|
@ -32,23 +32,26 @@ struct DataFieldDescription {
|
||||||
void *(*getValue)(void);
|
void *(*getValue)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DataFieldDescription dataFieldDescs[];
|
extern NamedFieldDescription dataFieldDescs[];
|
||||||
|
|
||||||
class DataField {
|
template <class T> class NamedField {
|
||||||
public:
|
public:
|
||||||
virtual ~DataField() {}
|
NamedField(const NamedFieldDescription *fieldDescs);
|
||||||
|
virtual ~NamedField() {}
|
||||||
|
|
||||||
void setType(DataFieldType type);
|
void setType(T type);
|
||||||
DataFieldType getType();
|
T getType();
|
||||||
|
|
||||||
virtual void updateValue();
|
virtual void updateValue();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
const NamedFieldDescription *fieldDescs;
|
||||||
|
|
||||||
touchgfx::Unicode::UnicodeChar titleBuffer[16];
|
touchgfx::Unicode::UnicodeChar titleBuffer[16];
|
||||||
touchgfx::Unicode::UnicodeChar valueBuffer[16];
|
touchgfx::Unicode::UnicodeChar valueBuffer[16];
|
||||||
|
|
||||||
DataFieldType type;
|
T type;
|
||||||
const DataFieldDescription *desc;
|
const NamedFieldDescription *desc;
|
||||||
union {
|
union {
|
||||||
float f;
|
float f;
|
||||||
int b;
|
int b;
|
||||||
|
@ -68,4 +71,4 @@ private:
|
||||||
void updateValueBuffer();
|
void updateValueBuffer();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DATAFIELD_HPP
|
#endif // NAMEDFIELD_HPP
|
|
@ -1,10 +1,11 @@
|
||||||
#ifndef DEBUGVIEWITEM_HPP
|
#ifndef DEBUGVIEWITEM_HPP
|
||||||
#define DEBUGVIEWITEM_HPP
|
#define DEBUGVIEWITEM_HPP
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include <gui_generated/containers/DebugViewItemBase.hpp>
|
#include <gui_generated/containers/DebugViewItemBase.hpp>
|
||||||
|
|
||||||
class DebugViewItem : public DebugViewItemBase, public DataField {
|
class DebugViewItem : public DebugViewItemBase,
|
||||||
|
public NamedField<DataFieldType> {
|
||||||
public:
|
public:
|
||||||
DebugViewItem();
|
DebugViewItem();
|
||||||
virtual ~DebugViewItem() {}
|
virtual ~DebugViewItem() {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef DEBUGVIEWLINE_HPP
|
#ifndef DEBUGVIEWLINE_HPP
|
||||||
#define DEBUGVIEWLINE_HPP
|
#define DEBUGVIEWLINE_HPP
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "gui/containers/DebugViewItem.hpp"
|
#include "gui/containers/DebugViewItem.hpp"
|
||||||
#include <gui_generated/containers/DebugViewLineBase.hpp>
|
#include <gui_generated/containers/DebugViewLineBase.hpp>
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
#include "touchgfx/Unicode.hpp"
|
#include "touchgfx/Unicode.hpp"
|
||||||
#include <gui_generated/containers/DriverViewFieldBase.hpp>
|
#include <gui_generated/containers/DriverViewFieldBase.hpp>
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
|
|
||||||
class DriverViewField : public DriverViewFieldBase, public DataField {
|
class DriverViewField : public DriverViewFieldBase,
|
||||||
|
public NamedField<DataFieldType> {
|
||||||
public:
|
public:
|
||||||
DriverViewField();
|
DriverViewField();
|
||||||
virtual ~DriverViewField() {}
|
virtual ~DriverViewField() {}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <gui/model/ModelListener.hpp>
|
#include <gui/model/ModelListener.hpp>
|
||||||
#include <mvp/Presenter.hpp>
|
#include <mvp/Presenter.hpp>
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
|
|
||||||
using namespace touchgfx;
|
using namespace touchgfx;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef DRIVERVIEWVIEW_HPP
|
#ifndef DRIVERVIEWVIEW_HPP
|
||||||
#define DRIVERVIEWVIEW_HPP
|
#define DRIVERVIEWVIEW_HPP
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "gui/containers/DriverViewFieldSelection.hpp"
|
#include "gui/containers/DriverViewFieldSelection.hpp"
|
||||||
#include "touchgfx/containers/scrollers/DrawableList.hpp"
|
#include "touchgfx/containers/scrollers/DrawableList.hpp"
|
||||||
#include "vehicle.h"
|
#include "vehicle.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "texts/TextKeysAndLanguages.hpp"
|
#include "texts/TextKeysAndLanguages.hpp"
|
||||||
|
|
||||||
#include "touchgfx/Unicode.hpp"
|
#include "touchgfx/Unicode.hpp"
|
||||||
|
@ -232,50 +232,56 @@ void *get_zero() {
|
||||||
return &zero;
|
return &zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataFieldDescription dataFieldDescs[] = {
|
NamedFieldDescription dataFieldDescs[] = {
|
||||||
[DF_TSState] = {DataFieldKind::Text, "TSSTATE", 1, 0, get_tsstate_text},
|
[DF_TSState] = {NamedFieldKind::Text, "TSSTATE", 1, 0, get_tsstate_text},
|
||||||
[DF_ASState] = {DataFieldKind::Text, "ASSTATE", 1, 0, get_asstate_text},
|
[DF_ASState] = {NamedFieldKind::Text, "ASSTATE", 1, 0, get_asstate_text},
|
||||||
[DF_ActiveMission] = {DataFieldKind::Text, "MISSION", 1, 0,
|
[DF_ActiveMission] = {NamedFieldKind::Text, "MISSION", 1, 0,
|
||||||
get_mission_text},
|
get_mission_text},
|
||||||
[DF_R2DProgress] = {DataFieldKind::Text, "R2DPROG", 1, 0, get_r2dprog_text},
|
[DF_R2DProgress] = {NamedFieldKind::Text, "R2DPROG", 1, 0,
|
||||||
[DF_INVLReady] = {DataFieldKind::Bool, "INVLRDY", 0, 0,
|
get_r2dprog_text},
|
||||||
|
[DF_INVLReady] = {NamedFieldKind::Bool, "INVLRDY", 0, 0,
|
||||||
VEH_BIT_FIELD(errors.invl_ready)},
|
VEH_BIT_FIELD(errors.invl_ready)},
|
||||||
[DF_INVRReady] = {DataFieldKind::Bool, "INVRRDY", 0, 0,
|
[DF_INVRReady] = {NamedFieldKind::Bool, "INVRRDY", 0, 0,
|
||||||
VEH_BIT_FIELD(errors.invr_ready)},
|
VEH_BIT_FIELD(errors.invr_ready)},
|
||||||
[DF_SDC] = {DataFieldKind::Text, "SDC", 0, 0, get_sdc_text},
|
[DF_SDC] = {NamedFieldKind::Text, "SDC", 0, 0, get_sdc_text},
|
||||||
[DF_ERR] = {DataFieldKind::Text, "ERROR", 0, 0, get_err_text},
|
[DF_ERR] = {NamedFieldKind::Text, "ERROR", 0, 0, get_err_text},
|
||||||
[DF_IniChkState] = {DataFieldKind::Text, "ICSTATE", 1, 0, get_inichk_text},
|
[DF_IniChkState] = {NamedFieldKind::Text, "ICSTATE", 1, 0, get_inichk_text},
|
||||||
[DF_LapCount] = {DataFieldKind::Int, "LAPS", 3, 0, VEH_FIELD(lap_count)},
|
[DF_LapCount] = {NamedFieldKind::Int, "LAPS", 3, 0, VEH_FIELD(lap_count)},
|
||||||
[DF_TireTempFL] = {DataFieldKind::Float, "TTFL", 2, 1,
|
[DF_TireTempFL] = {NamedFieldKind::Float, "TTFL", 2, 1,
|
||||||
VEH_FIELD(tire_temps.fl)},
|
VEH_FIELD(tire_temps.fl)},
|
||||||
[DF_TireTempFR] = {DataFieldKind::Float, "TTFR", 2, 1,
|
[DF_TireTempFR] = {NamedFieldKind::Float, "TTFR", 2, 1,
|
||||||
VEH_FIELD(tire_temps.fr)},
|
VEH_FIELD(tire_temps.fr)},
|
||||||
[DF_TireTempRL] = {DataFieldKind::Float, "TTRL", 2, 1,
|
[DF_TireTempRL] = {NamedFieldKind::Float, "TTRL", 2, 1,
|
||||||
VEH_FIELD(tire_temps.rl)},
|
VEH_FIELD(tire_temps.rl)},
|
||||||
[DF_TireTempRR] = {DataFieldKind::Float, "TTRR", 2, 1,
|
[DF_TireTempRR] = {NamedFieldKind::Float, "TTRR", 2, 1,
|
||||||
VEH_FIELD(tire_temps.rr)},
|
VEH_FIELD(tire_temps.rr)},
|
||||||
[DF_MinCellVolt] = {DataFieldKind::Float, "VMIN", 1, 2,
|
[DF_MinCellVolt] = {NamedFieldKind::Float, "VMIN", 1, 2,
|
||||||
VEH_FIELD(min_cell_volt)},
|
VEH_FIELD(min_cell_volt)},
|
||||||
[DF_MaxCellTemp] = {DataFieldKind::Float, "TMAX", 2, 1,
|
[DF_MaxCellTemp] = {NamedFieldKind::Float, "TMAX", 2, 1,
|
||||||
VEH_FIELD(max_cell_temp)},
|
VEH_FIELD(max_cell_temp)},
|
||||||
[DF_TSSoC] = {DataFieldKind::Int, "TSSOC", 3, 0, VEH_FIELD(soc)},
|
[DF_TSSoC] = {NamedFieldKind::Int, "TSSOC", 3, 0, VEH_FIELD(soc)},
|
||||||
[DF_LVSoC] = {DataFieldKind::Float, "LVSOC", 3, 0, get_zero},
|
[DF_LVSoC] = {NamedFieldKind::Float, "LVSOC", 3, 0, get_zero},
|
||||||
[DF_TSCurrent] = {DataFieldKind::Float, "ITS", 3, 0, VEH_FIELD(ts_current)},
|
[DF_TSCurrent] = {NamedFieldKind::Float, "ITS", 3, 0,
|
||||||
[DF_TSVoltageBat] = {DataFieldKind::Float, "TSVBAT", 3, 1,
|
VEH_FIELD(ts_current)},
|
||||||
|
[DF_TSVoltageBat] = {NamedFieldKind::Float, "TSVBAT", 3, 1,
|
||||||
VEH_FIELD(ts_voltage_bat)},
|
VEH_FIELD(ts_voltage_bat)},
|
||||||
[DF_TSVoltageVeh] = {DataFieldKind::Float, "TSVVEH", 3, 1,
|
[DF_TSVoltageVeh] = {NamedFieldKind::Float, "TSVVEH", 3, 1,
|
||||||
VEH_FIELD(ts_voltage_veh)},
|
VEH_FIELD(ts_voltage_veh)},
|
||||||
[DF_Speed] = {DataFieldKind::Float, "SPEED", 3, 0, get_zero},
|
[DF_Speed] = {NamedFieldKind::Float, "SPEED", 3, 0, get_zero},
|
||||||
[DF_BBal] = {DataFieldKind::Float, "BBAL", 3, 1, get_zero},
|
[DF_BBal] = {NamedFieldKind::Float, "BBAL", 3, 1, get_zero},
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(dataFieldDescs) / sizeof(dataFieldDescs[0]) ==
|
static_assert(sizeof(dataFieldDescs) / sizeof(dataFieldDescs[0]) ==
|
||||||
DataFieldType_COUNT,
|
DataFieldType_COUNT,
|
||||||
"Incorrect number of data field descriptions");
|
"Incorrect number of data field descriptions");
|
||||||
|
|
||||||
void DataField::setType(DataFieldType type) {
|
template <class T>
|
||||||
|
NamedField<T>::NamedField(const NamedFieldDescription *fieldDescs)
|
||||||
|
: fieldDescs{fieldDescs} {}
|
||||||
|
|
||||||
|
template <class T> void NamedField<T>::setType(T type) {
|
||||||
this->type = type;
|
this->type = type;
|
||||||
desc = &dataFieldDescs[type];
|
desc = &fieldDescs[type];
|
||||||
|
|
||||||
touchgfx::Unicode::strncpy(titleBuffer, desc->title,
|
touchgfx::Unicode::strncpy(titleBuffer, desc->title,
|
||||||
sizeof(titleBuffer) / sizeof(*titleBuffer));
|
sizeof(titleBuffer) / sizeof(*titleBuffer));
|
||||||
|
@ -285,48 +291,48 @@ void DataField::setType(DataFieldType type) {
|
||||||
updateValue();
|
updateValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::updateValue() {
|
template <class T> void NamedField<T>::updateValue() {
|
||||||
void *val = desc->getValue();
|
void *val = desc->getValue();
|
||||||
switch (desc->kind) {
|
switch (desc->kind) {
|
||||||
case DataFieldKind::Float:
|
case NamedFieldKind::Float:
|
||||||
setFloatValue(*static_cast<float *>(val));
|
setFloatValue(*static_cast<float *>(val));
|
||||||
break;
|
break;
|
||||||
case DataFieldKind::Bool:
|
case NamedFieldKind::Bool:
|
||||||
setBoolValue(*static_cast<int *>(val));
|
setBoolValue(*static_cast<int *>(val));
|
||||||
break;
|
break;
|
||||||
case DataFieldKind::Text:
|
case NamedFieldKind::Text:
|
||||||
setStrValue(static_cast<const char *>(val));
|
setStrValue(static_cast<const char *>(val));
|
||||||
break;
|
break;
|
||||||
case DataFieldKind::Int:
|
case NamedFieldKind::Int:
|
||||||
setIntValue(*static_cast<int *>(val));
|
setIntValue(*static_cast<int *>(val));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::setFloatValue(float floatValue) {
|
template <class T> void NamedField<T>::setFloatValue(float floatValue) {
|
||||||
fieldValue.f = floatValue;
|
fieldValue.f = floatValue;
|
||||||
updateValueBuffer();
|
updateValueBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::setBoolValue(int boolValue) {
|
template <class T> void NamedField<T>::setBoolValue(int boolValue) {
|
||||||
fieldValue.b = boolValue;
|
fieldValue.b = boolValue;
|
||||||
updateValueBuffer();
|
updateValueBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::setIntValue(int intValue) {
|
template <class T> void NamedField<T>::setIntValue(int intValue) {
|
||||||
fieldValue.i = intValue;
|
fieldValue.i = intValue;
|
||||||
updateValueBuffer();
|
updateValueBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::setStrValue(const char *strValue) {
|
template <class T> void NamedField<T>::setStrValue(const char *strValue) {
|
||||||
touchgfx::Unicode::strncpy(valueBuffer, strValue,
|
touchgfx::Unicode::strncpy(valueBuffer, strValue,
|
||||||
sizeof(valueBuffer) / sizeof(*valueBuffer));
|
sizeof(valueBuffer) / sizeof(*valueBuffer));
|
||||||
updateValueBuffer();
|
updateValueBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataField::updateValueBuffer() {
|
template <class T> void NamedField<T>::updateValueBuffer() {
|
||||||
switch (desc->kind) {
|
switch (desc->kind) {
|
||||||
case DataFieldKind::Float: {
|
case NamedFieldKind::Float: {
|
||||||
size_t width = desc->int_digits;
|
size_t width = desc->int_digits;
|
||||||
if (desc->decimal_digits != 0) {
|
if (desc->decimal_digits != 0) {
|
||||||
width += desc->decimal_digits + 1; // 1 digit for the decimal point
|
width += desc->decimal_digits + 1; // 1 digit for the decimal point
|
||||||
|
@ -337,16 +343,16 @@ void DataField::updateValueBuffer() {
|
||||||
params);
|
params);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataFieldKind::Bool: {
|
case NamedFieldKind::Bool: {
|
||||||
const char *str = fieldValue.b ? "YES" : "NO";
|
const char *str = fieldValue.b ? "YES" : "NO";
|
||||||
touchgfx::Unicode::strncpy(valueBuffer, str,
|
touchgfx::Unicode::strncpy(valueBuffer, str,
|
||||||
sizeof(valueBuffer) / sizeof(*valueBuffer));
|
sizeof(valueBuffer) / sizeof(*valueBuffer));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataFieldKind::Text:
|
case NamedFieldKind::Text:
|
||||||
// This is handled by the child class in setValue()
|
// This is handled by the child class in setValue()
|
||||||
break;
|
break;
|
||||||
case DataFieldKind::Int:
|
case NamedFieldKind::Int:
|
||||||
touchgfx::Unicode::snprintf(valueBuffer,
|
touchgfx::Unicode::snprintf(valueBuffer,
|
||||||
sizeof(valueBuffer) / sizeof(*valueBuffer),
|
sizeof(valueBuffer) / sizeof(*valueBuffer),
|
||||||
"%*d", desc->int_digits, fieldValue.i);
|
"%*d", desc->int_digits, fieldValue.i);
|
||||||
|
@ -354,3 +360,5 @@ void DataField::updateValueBuffer() {
|
||||||
}
|
}
|
||||||
valueBufferUpdated();
|
valueBufferUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template class NamedField<DataFieldType>;
|
|
@ -1,6 +1,6 @@
|
||||||
#include <gui/containers/DebugViewItem.hpp>
|
#include <gui/containers/DebugViewItem.hpp>
|
||||||
|
|
||||||
DebugViewItem::DebugViewItem() {}
|
DebugViewItem::DebugViewItem() : NamedField(dataFieldDescs) {}
|
||||||
|
|
||||||
void DebugViewItem::initialize() { DebugViewItemBase::initialize(); }
|
void DebugViewItem::initialize() { DebugViewItemBase::initialize(); }
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "touchgfx/Color.hpp"
|
#include "touchgfx/Color.hpp"
|
||||||
#include <gui/containers/DebugViewLine.hpp>
|
#include <gui/containers/DebugViewLine.hpp>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "texts/TextKeysAndLanguages.hpp"
|
#include "texts/TextKeysAndLanguages.hpp"
|
||||||
#include "touchgfx/Color.hpp"
|
#include "touchgfx/Color.hpp"
|
||||||
#include "touchgfx/TypedText.hpp"
|
#include "touchgfx/TypedText.hpp"
|
||||||
#include "touchgfx/Unicode.hpp"
|
#include "touchgfx/Unicode.hpp"
|
||||||
#include <gui/containers/DriverViewField.hpp>
|
#include <gui/containers/DriverViewField.hpp>
|
||||||
|
|
||||||
DriverViewField::DriverViewField() {}
|
DriverViewField::DriverViewField() : NamedField(dataFieldDescs) {}
|
||||||
|
|
||||||
void DriverViewField::initialize() { DriverViewFieldBase::initialize(); }
|
void DriverViewField::initialize() { DriverViewFieldBase::initialize(); }
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@ void DriverViewField::setSelected(int selected) {
|
||||||
|
|
||||||
void DriverViewField::typeUpdated() {
|
void DriverViewField::typeUpdated() {
|
||||||
switch (desc->kind) {
|
switch (desc->kind) {
|
||||||
case DataFieldKind::Float:
|
case NamedFieldKind::Float:
|
||||||
case DataFieldKind::Int:
|
case NamedFieldKind::Int:
|
||||||
value.setTypedText(T_NUMBERWILDCARD);
|
value.setTypedText(T_NUMBERWILDCARD);
|
||||||
break;
|
break;
|
||||||
case DataFieldKind::Bool:
|
case NamedFieldKind::Bool:
|
||||||
case DataFieldKind::Text:
|
case NamedFieldKind::Text:
|
||||||
value.setTypedText(T_DEFAULTWILDCARD_CENTERED);
|
value.setTypedText(T_DEFAULTWILDCARD_CENTERED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include <gui/debugview_screen/DebugViewView.hpp>
|
#include <gui/debugview_screen/DebugViewView.hpp>
|
||||||
|
|
||||||
DebugViewView::DebugViewView() {}
|
DebugViewView::DebugViewView() {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <gui/driverview_screen/DriverViewPresenter.hpp>
|
#include <gui/driverview_screen/DriverViewPresenter.hpp>
|
||||||
#include <gui/driverview_screen/DriverViewView.hpp>
|
#include <gui/driverview_screen/DriverViewView.hpp>
|
||||||
|
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "vehicle.h"
|
#include "vehicle.h"
|
||||||
|
|
||||||
DriverViewPresenter::DriverViewPresenter(DriverViewView &v)
|
DriverViewPresenter::DriverViewPresenter(DriverViewView &v)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "gui/common/DataField.hpp"
|
#include "gui/common/NamedField.hpp"
|
||||||
#include "gui/containers/DriverViewField.hpp"
|
#include "gui/containers/DriverViewField.hpp"
|
||||||
#include "gui/driverview_screen/DriverViewPresenter.hpp"
|
#include "gui/driverview_screen/DriverViewPresenter.hpp"
|
||||||
#include "texts/TextKeysAndLanguages.hpp"
|
#include "texts/TextKeysAndLanguages.hpp"
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\TireTempBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\TireTempBase.cpp"/>
|
||||||
<ClCompile Include="..\..\gui\src\containers\DriverViewField.cpp"/>
|
<ClCompile Include="..\..\gui\src\containers\DriverViewField.cpp"/>
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp"/>
|
||||||
<ClCompile Include="..\..\gui\src\common\DataField.cpp"/>
|
|
||||||
<ClCompile Include="..\..\gui\src\containers\DriverViewFieldSelection.cpp"/>
|
<ClCompile Include="..\..\gui\src\containers\DriverViewFieldSelection.cpp"/>
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldSelectionBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldSelectionBase.cpp"/>
|
||||||
<ClCompile Include="..\..\gui\src\containers\DebugViewItem.cpp"/>
|
<ClCompile Include="..\..\gui\src\containers\DebugViewItem.cpp"/>
|
||||||
|
@ -46,6 +45,7 @@
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\debugview_screen\DebugViewViewBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\debugview_screen\DebugViewViewBase.cpp"/>
|
||||||
<ClCompile Include="..\..\gui\src\containers\DebugViewLine.cpp"/>
|
<ClCompile Include="..\..\gui\src\containers\DebugViewLine.cpp"/>
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\DebugViewLineBase.cpp"/>
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\DebugViewLineBase.cpp"/>
|
||||||
|
<ClCompile Include="..\..\gui\src\common\NamedField.cpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(ApplicationRoot)\assets\texts\texts.xml"/>
|
<None Include="$(ApplicationRoot)\assets\texts\texts.xml"/>
|
||||||
|
@ -211,7 +211,6 @@
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\TireTempBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\TireTempBase.hpp"/>
|
||||||
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewField.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewField.hpp"/>
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp"/>
|
||||||
<ClInclude Include="..\..\gui\include\gui\common\DataField.hpp"/>
|
|
||||||
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewFieldSelection.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewFieldSelection.hpp"/>
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldSelectionBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldSelectionBase.hpp"/>
|
||||||
<ClInclude Include="..\..\gui\include\gui\containers\DebugViewItem.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\containers\DebugViewItem.hpp"/>
|
||||||
|
@ -221,6 +220,7 @@
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\debugview_screen\DebugViewViewBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\debugview_screen\DebugViewViewBase.hpp"/>
|
||||||
<ClInclude Include="..\..\gui\include\gui\containers\DebugViewLine.hpp"/>
|
<ClInclude Include="..\..\gui\include\gui\containers\DebugViewLine.hpp"/>
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DebugViewLineBase.hpp"/>
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DebugViewLineBase.hpp"/>
|
||||||
|
<ClInclude Include="..\..\gui\include\gui\common\NamedField.hpp"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc"/>
|
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc"/>
|
||||||
|
|
|
@ -309,9 +309,6 @@
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp">
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\DriverViewFieldBase.cpp">
|
||||||
<Filter>Source Files\generated\gui_generated\containers</Filter>
|
<Filter>Source Files\generated\gui_generated\containers</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\gui\src\common\DataField.cpp">
|
|
||||||
<Filter>Source Files\gui\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\gui\src\containers\DriverViewFieldSelection.cpp">
|
<ClCompile Include="..\..\gui\src\containers\DriverViewFieldSelection.cpp">
|
||||||
<Filter>Source Files\gui\containers</Filter>
|
<Filter>Source Files\gui\containers</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -339,6 +336,9 @@
|
||||||
<ClCompile Include="..\..\generated\gui_generated\src\containers\DebugViewLineBase.cpp">
|
<ClCompile Include="..\..\generated\gui_generated\src\containers\DebugViewLineBase.cpp">
|
||||||
<Filter>Source Files\generated\gui_generated\containers</Filter>
|
<Filter>Source Files\generated\gui_generated\containers</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\gui\src\common\NamedField.cpp">
|
||||||
|
<Filter>Source Files\gui\common</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(ApplicationRoot)\assets\texts\texts.xml">
|
<None Include="$(ApplicationRoot)\assets\texts\texts.xml">
|
||||||
|
@ -826,9 +826,6 @@
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp">
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DriverViewFieldBase.hpp">
|
||||||
<Filter>Header Files\generated\gui_generated\containers</Filter>
|
<Filter>Header Files\generated\gui_generated\containers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\gui\include\gui\common\DataField.hpp">
|
|
||||||
<Filter>Header Files\gui\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewFieldSelection.hpp">
|
<ClInclude Include="..\..\gui\include\gui\containers\DriverViewFieldSelection.hpp">
|
||||||
<Filter>Header Files\gui\containers</Filter>
|
<Filter>Header Files\gui\containers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -856,6 +853,9 @@
|
||||||
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DebugViewLineBase.hpp">
|
<ClInclude Include="..\..\generated\gui_generated\include\gui_generated\containers\DebugViewLineBase.hpp">
|
||||||
<Filter>Header Files\generated\gui_generated\containers</Filter>
|
<Filter>Header Files\generated\gui_generated\containers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\gui\include\gui\common\NamedField.hpp">
|
||||||
|
<Filter>Header Files\gui\common</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc">
|
<ResourceCompile Include="$(ApplicationRoot)\generated\simulator\touchgfx.rc">
|
||||||
|
|
Loading…
Reference in New Issue