diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2020-08-04 14:38:48 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-08-07 11:11:39 -0500 |
commit | 446a5ae3941d983252d7a5a09e01b729041cec39 (patch) | |
tree | a5151789bcf4ddd2bb53b456385f0dee19ee67e6 | |
parent | ab8d482af16f2ba89da98a61cd7820f5a2893462 (diff) | |
download | ofono-446a5ae3941d983252d7a5a09e01b729041cec39.tar.gz |
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
-rw-r--r-- | plugins/quectel.c | 8 |
1 files changed, 5 insertions, 3 deletions
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) |