quectel: Try to update voltage only, when received "vbatt"

As there are some more sources of +QIND: activated, do now only update
voltage when we get the
+QIND: "vbatt",-1
but not on things like
+QIND: "act","LTE"
or
+QIND: "csq",20,99
This commit is contained in:
Lars Poeschel 2020-08-04 14:38:48 +02:00 committed by Denis Kenzior
parent ab8d482af1
commit 446a5ae394
1 changed files with 5 additions and 3 deletions

View File

@ -425,10 +425,12 @@ static void qind_notify(GAtResult *result, void *user_data)
if (!g_at_result_iter_next_string(&iter, &type))
return;
if (!g_at_result_iter_next_number(&iter, &event))
return;
if (g_strcmp0("vbatt", type)) {
if (!g_at_result_iter_next_number(&iter, &event))
return;
voltage_handle(hw->modem, event);
voltage_handle(hw->modem, event);
}
}
static void power_notify(GAtResult *result, void *user_data)