From 3da9c7b081a92251396909499959f256e3fa27e6 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sun, 5 Dec 2021 10:20:16 -0800 Subject: [PATCH 1/2] Update lastlat/lastlong int32 #956 --- src/plugins/PositionPlugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/PositionPlugin.h b/src/plugins/PositionPlugin.h index 5ffe0480..402650af 100644 --- a/src/plugins/PositionPlugin.h +++ b/src/plugins/PositionPlugin.h @@ -14,8 +14,8 @@ class PositionPlugin : public ProtobufPlugin, private concurrency::OST uint32_t lastGpsSend = 0; // Store the latest good lat / long - uint32_t lastGpsLatitude = 0; - uint32_t lastGpsLongitude = 0; + int32_t lastGpsLatitude = 0; + int32_t lastGpsLongitude = 0; /// We force a rebroadcast if the radio settings change uint32_t currentGeneration = 0; From eefef1dcebfa99f37285c062765f88191132694d Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sun, 5 Dec 2021 16:17:13 -0800 Subject: [PATCH 2/2] Add channel bitrate to myNodeInfo #959 --- src/configuration.h | 2 +- src/main.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/configuration.h b/src/configuration.h index a331c644..4e73531d 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -200,7 +200,7 @@ along with this program. If not, see . // Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts // and waking from light sleep // #define PMU_IRQ 35 -// #define AXP192_SLAVE_ADDRESS 0x34 +#define AXP192_SLAVE_ADDRESS 0x34 #elif defined(TBEAM_V07) // This string must exactly match the case used in release file names or the android updater won't work diff --git a/src/main.cpp b/src/main.cpp index d28b8431..4429391d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -590,6 +590,13 @@ void setup() else router->addInterface(rIf); + // Calculate and save the bit rate to myNodeInfo + // TODO: This needs to be added what ever method changes the channel from the phone. + myNodeInfo.bitrate = (float(Constants_DATA_PAYLOAD_LEN) / + (float(rIf->getPacketTime(Constants_DATA_PAYLOAD_LEN))) + ) * 1000; + DEBUG_MSG("myNodeInfo.bitrate = %f bytes / sec\n", myNodeInfo.bitrate); + // This must be _after_ service.init because we need our preferences loaded from flash to have proper timeout values PowerFSM_setup(); // we will transition to ON in a couple of seconds, FIXME, only do this for cold boots, not waking from SDS powerFSMthread = new PowerFSMThread();