From 446a5ae3941d983252d7a5a09e01b729041cec39 Mon Sep 17 00:00:00 2001 From: Lars Poeschel Date: Tue, 4 Aug 2020 14:38:48 +0200 Subject: 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 --- plugins/quectel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/quectel.c b/plugins/quectel.c index 3c3c61a8..203b702e 100644 --- a/plugins/quectel.c +++ b/plugins/quectel.c @@ -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) -- cgit v1.2.1