38 lines
889 B
C++
38 lines
889 B
C++
#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
|