mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 08:07:37 +00:00
support for battery if any + TPMS app to ext (#2129)
* batt initial * batt widgets * settings modify * batt info screen * ability to hide icon * battView * redo tmps * hide curr + charge if no data * fix flashing
This commit is contained in:
@@ -123,6 +123,7 @@ class Message {
|
||||
EnvironmentData = 65,
|
||||
AudioBeep = 66,
|
||||
PocsagTosend = 67,
|
||||
BatteryStateData = 68,
|
||||
MAX
|
||||
};
|
||||
|
||||
@@ -1409,4 +1410,20 @@ class PocsagTosendMessage : public Message {
|
||||
uint64_t addr = 0;
|
||||
};
|
||||
|
||||
class BatteryStateMessage : public Message {
|
||||
public:
|
||||
constexpr BatteryStateMessage(
|
||||
uint8_t percent,
|
||||
bool on_charger,
|
||||
uint16_t voltage)
|
||||
: Message{ID::BatteryStateData},
|
||||
percent{percent},
|
||||
on_charger{on_charger},
|
||||
voltage{voltage} {
|
||||
}
|
||||
uint8_t percent = 0;
|
||||
bool on_charger = false;
|
||||
uint16_t voltage = 0; // mV
|
||||
};
|
||||
|
||||
#endif /*__MESSAGE_H__*/
|
||||
|
Reference in New Issue
Block a user