Output source option of Value & Gauge widgets in a symbolic way
This commit is contained in:
@@ -168,10 +168,19 @@ uint8_t select_zov(void* user, uint8_t* data, uint32_t bitoffs)
|
||||
data += bitoffs >> 3UL;
|
||||
data -= sizeof(ZoneOptionValueEnum);
|
||||
ZoneOptionValueEnum* p_zovt = (ZoneOptionValueEnum*)data;
|
||||
if (*p_zovt > ZOV_String)
|
||||
return 0;
|
||||
if (*p_zovt > ZOV_Source) return 0;
|
||||
return *p_zovt;
|
||||
}
|
||||
|
||||
#define r_zov_source nullptr
|
||||
|
||||
bool w_zov_source(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
auto p_val = reinterpret_cast<ZoneOptionValue*>(data);
|
||||
return w_mixSrcRaw(nullptr, p_val->unsignedValue, wf, opaque);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t select_mod_type(void* user, uint8_t* data, uint32_t bitoffs)
|
||||
|
||||
Reference in New Issue
Block a user