bluetooth to taskmanager migrated

This commit is contained in:
2021-12-19 02:37:48 +01:00
parent 304ce9925f
commit 2ec19d2def
6 changed files with 56 additions and 34 deletions

37
main/bluetooth_bobby.cpp Normal file
View File

@@ -0,0 +1,37 @@
#include "bluetooth_bobby.h"
// local includes
#ifdef FEATURE_BLUETOOTH
#include "actions/bluetoothbeginaction.h"
#include "actions/bluetoothbeginmasteraction.h"
#ifdef FEATURE_BMS
#include "actions/bluetoothconnectbmsaction.h"
#endif
#endif
#ifdef FEATURE_BLUETOOTH
void bluetooth_init()
{
if (settings.bluetoothSettings.autoBluetoothMode == BluetoothMode::Master)
{
bootLabel.redraw("bluetooth begin master");
BluetoothBeginMasterAction{}.triggered();
#ifdef FEATURE_BMS
if (settings.autoConnectBms)
{
bootLabel.redraw("connect BMS");
BluetoothConnectBmsAction{}.triggered();
}
#endif
}
else if (settings.bluetoothSettings.autoBluetoothMode == BluetoothMode::Slave)
{
bootLabel.redraw("bluetooth begin");
BluetoothBeginAction{}.triggered();
}
}
void bluetooth_update()
{
}
#endif