mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
unify activity detection in PhoneAPI, turn off BLE API while serial API in use
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "SerialConsole.h"
|
||||
#include "configuration.h"
|
||||
#include "target_specific.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#define Port Serial
|
||||
@@ -34,4 +35,10 @@ void SerialConsole::handleToRadio(const uint8_t *buf, size_t len)
|
||||
canWrite = true;
|
||||
|
||||
StreamAPI::handleToRadio(buf, len);
|
||||
}
|
||||
|
||||
/// Hookable to find out when connection changes
|
||||
void SerialConsole::onConnectionChanged(bool connected)
|
||||
{
|
||||
setBluetoothEnable(!connected); // To prevent user confusion, turn off bluetooth while using the serial port api
|
||||
}
|
||||
Reference in New Issue
Block a user