mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 18:09:04 +00:00
Add channel bitrate to myNodeInfo #959
This commit is contained in:
parent
465f7a6935
commit
eefef1dceb
@ -200,7 +200,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
||||||
// and waking from light sleep
|
// and waking from light sleep
|
||||||
// #define PMU_IRQ 35
|
// #define PMU_IRQ 35
|
||||||
// #define AXP192_SLAVE_ADDRESS 0x34
|
#define AXP192_SLAVE_ADDRESS 0x34
|
||||||
|
|
||||||
#elif defined(TBEAM_V07)
|
#elif defined(TBEAM_V07)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
|
@ -590,6 +590,13 @@ void setup()
|
|||||||
else
|
else
|
||||||
router->addInterface(rIf);
|
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
|
// 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
|
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();
|
powerFSMthread = new PowerFSMThread();
|
||||||
|
Loading…
Reference in New Issue
Block a user