mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
small code changes
This commit is contained in:
@@ -168,20 +168,20 @@ class DeviceValue {
|
|||||||
, state(state) {
|
, state(state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasValue();
|
bool hasValue() const;
|
||||||
bool get_min_max(int16_t & dv_set_min, int16_t & dv_set_max);
|
bool get_min_max(int16_t & dv_set_min, int16_t & dv_set_max);
|
||||||
|
|
||||||
// state flags
|
// state flags
|
||||||
inline void add_state(uint8_t s) {
|
void add_state(uint8_t s) {
|
||||||
state |= s;
|
state |= s;
|
||||||
}
|
}
|
||||||
inline bool has_state(uint8_t s) const {
|
bool has_state(uint8_t s) const {
|
||||||
return (state & s) == s;
|
return (state & s) == s;
|
||||||
}
|
}
|
||||||
inline void remove_state(uint8_t s) {
|
void remove_state(uint8_t s) {
|
||||||
state &= ~s;
|
state &= ~s;
|
||||||
}
|
}
|
||||||
inline uint8_t get_state() const {
|
uint8_t get_state() const {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user