mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-06 01:55:32 +00:00
NULL txt_freq fix
This commit is contained in:
@ -83,8 +83,9 @@ void CControllerBL0942::saveTo(struct cJSON *j_obj) {
|
||||
cJSON_AddStringToObject(j_obj, "voltage", this->txt_voltage->getText());
|
||||
cJSON_AddStringToObject(j_obj, "current", this->txt_current->getText());
|
||||
cJSON_AddStringToObject(j_obj, "power", this->txt_power->getText());
|
||||
cJSON_AddStringToObject(j_obj, "frequency", this->txt_freq->getText());
|
||||
|
||||
if (this->txt_freq) {
|
||||
cJSON_AddStringToObject(j_obj, "frequency", this->txt_freq->getText());
|
||||
}
|
||||
}
|
||||
void CControllerBL0942::loadFrom(struct cJSON *j_obj) {
|
||||
cJSON *v = cJSON_GetObjectItemCaseSensitive(j_obj, "voltage");
|
||||
|
||||
@ -18,7 +18,7 @@ class CControllerBL0942 : public CControllerBase {
|
||||
public:
|
||||
CControllerBL0942() {
|
||||
rx = tx = 0;
|
||||
txt_voltage = txt_current = txt_power = 0;
|
||||
txt_voltage = txt_current = txt_power = txt_freq = 0;
|
||||
realCurrent = 0.25f;
|
||||
realPower = 60.0f;
|
||||
realVoltage = 220.0f;
|
||||
|
||||
Reference in New Issue
Block a user