Add status boxes
This commit is contained in:
37
TouchGFX/gui/include/gui/containers/DriverViewStatusItem.hpp
Normal file
37
TouchGFX/gui/include/gui/containers/DriverViewStatusItem.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef DRIVERVIEWSTATUSITEM_HPP
|
||||
#define DRIVERVIEWSTATUSITEM_HPP
|
||||
|
||||
#include "touchgfx/Color.hpp"
|
||||
#include "touchgfx/hal/Types.hpp"
|
||||
#include <gui_generated/containers/DriverViewStatusItemBase.hpp>
|
||||
|
||||
enum class DriverViewStatusType { TS_R2D, AMS, SDC, SCS, PDU, INV };
|
||||
|
||||
class DriverViewStatusItem : public DriverViewStatusItemBase {
|
||||
public:
|
||||
DriverViewStatusItem();
|
||||
virtual ~DriverViewStatusItem() {}
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
virtual void setType(DriverViewStatusType type);
|
||||
|
||||
void update();
|
||||
|
||||
static inline colortype COLOR_OFF =
|
||||
touchgfx::Color::getColorFromRGB(0x00, 0x00, 0x00);
|
||||
static inline colortype COLOR_OK =
|
||||
touchgfx::Color::getColorFromRGB(0x0D, 0xBF, 0x00);
|
||||
static inline colortype COLOR_WARNING =
|
||||
touchgfx::Color::getColorFromRGB(0xEB, 0xC4, 0x00);
|
||||
static inline colortype COLOR_ERROR =
|
||||
touchgfx::Color::getColorFromRGB(0xC5, 0x0E, 0x1F);
|
||||
static inline colortype COLOR_TS =
|
||||
touchgfx::Color::getColorFromRGB(0xEB, 0x7D, 0x00);
|
||||
|
||||
protected:
|
||||
private:
|
||||
DriverViewStatusType type;
|
||||
};
|
||||
|
||||
#endif // DRIVERVIEWSTATUSITEM_HPP
|
||||
@ -23,6 +23,7 @@ public:
|
||||
|
||||
void setFieldType(size_t i, DataFieldType type);
|
||||
void updateFieldValues();
|
||||
void updateStatusItems();
|
||||
|
||||
void setTemps(const Temperatures &temps);
|
||||
void setTSSoC(uint8_t soc);
|
||||
|
||||
Reference in New Issue
Block a user