Code: Select all
auto channel = getChanelByChannelNumber(oled[state->currentFrame].chanelSensor);
if (channel) {
TSuplaChannelExtendedValue* extValue = channel->getExtValue();
if (extValue == nullptr)
return;
TElectricityMeter_ExtendedValue_V2* emValue = reinterpret_cast<TElectricityMeter_ExtendedValue_V2*>(extValue->value);
if (emValue->m_count < 1 || emValue == nullptr)
return;
displayUiGeneral(display, state, x, y, String(emValue->m[0].power_active[0] / 100000.0, 1), "W");
}
