From 040f6298976839120b07ee8a34e11494a370d401 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Mon, 22 Feb 2021 19:03:47 -0500 Subject: [PATCH 1/2] udpate protobufs for environmental measurement preferences --- mesh.proto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/mesh.proto b/mesh.proto index b29b177..d372c92 100644 --- a/mesh.proto +++ b/mesh.proto @@ -897,6 +897,34 @@ message RadioConfig { */ bool store_forward_plugin_enabled = 136; uint32 store_forward_plugin_records = 137; + + /** + Preferences for the EnvironmentalMeasurement Plugin + FIXME - Move this out of UserPreferences and into a section for plugin configuration. + */ + /* + * Enable/Disable the environmental measurement plugin + */ + bool environmental_measurement_plugin_enabled = 140; + /* + * Sometimes sensor reads can fail. If this happens, we + * will retry a configurable number of attempts + * Each attempt will be delayed by the minimum + * required refresh rate for that sensor + */ + uint32 environmental_measurement_plugin_read_error_count_threshold = 141; + /* + * Interval in seconds of how often we should try to send our + * measurements to the mesh + */ + uint32 environmental_measurement_plugin_update_interval = 142; + /* Sometimes we can end up with more than read_error_count_threshold + * failures. In this case, we will stop trying to read from the sensor + * for a while. Wait this long until trying to read from the sensor again + */ + uint32 environmental_measurement_plugin_recovery_interval = 143; + + } UserPreferences preferences = 1; From d70f6f6f669df79c9423795caf34adbd28967e19 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Mon, 22 Feb 2021 20:39:23 -0500 Subject: [PATCH 2/2] update protobufs --- mesh.proto | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mesh.proto b/mesh.proto index d372c92..a5f0314 100644 --- a/mesh.proto +++ b/mesh.proto @@ -903,26 +903,30 @@ message RadioConfig { FIXME - Move this out of UserPreferences and into a section for plugin configuration. */ /* - * Enable/Disable the environmental measurement plugin + * Enable/Disable the environmental measurement plugin measurement collection */ - bool environmental_measurement_plugin_enabled = 140; + bool environmental_measurement_plugin_measurement_enabled = 140; + /* + * Enable/Disable the environmental measurement plugin on-device display + */ + bool environmental_measurement_plugin_screen_enabled = 141; /* * Sometimes sensor reads can fail. If this happens, we * will retry a configurable number of attempts * Each attempt will be delayed by the minimum * required refresh rate for that sensor */ - uint32 environmental_measurement_plugin_read_error_count_threshold = 141; + uint32 environmental_measurement_plugin_read_error_count_threshold = 142; /* * Interval in seconds of how often we should try to send our * measurements to the mesh */ - uint32 environmental_measurement_plugin_update_interval = 142; + uint32 environmental_measurement_plugin_update_interval = 143; /* Sometimes we can end up with more than read_error_count_threshold * failures. In this case, we will stop trying to read from the sensor * for a while. Wait this long until trying to read from the sensor again */ - uint32 environmental_measurement_plugin_recovery_interval = 143; + uint32 environmental_measurement_plugin_recovery_interval = 144; }