Files
bobbycar-boardcomputer-firm…/main/bluetooth_bobby.cpp

41 lines
978 B
C++
Raw Normal View History

2021-12-19 02:37:48 +01:00
#include "bluetooth_bobby.h"
// compilation will be broken as there is no config parameter
2021-12-19 02:37:48 +01:00
// local includes
#ifdef FEATURE_BLUETOOTH
#include "actions/bluetoothbeginaction.h"
#include "actions/bluetoothbeginmasteraction.h"
#ifdef FEATURE_BMS
#include "actions/bluetoothconnectbmsaction.h"
#endif
#include "bluetoothmode.h"
2021-12-19 02:37:48 +01:00
#endif
#ifdef FEATURE_BLUETOOTH
void bluetooth_init()
{
if (configs.bluetooth.autoBluetoothMode.value == BluetoothMode::Master)
2021-12-19 02:37:48 +01:00
{
bootLabel.redraw("bluetooth begin master");
BluetoothBeginMasterAction{}.triggered();
#ifdef FEATURE_BMS
if (configs.autoConnectBms.value)
2021-12-19 02:37:48 +01:00
{
bootLabel.redraw("connect BMS");
BluetoothConnectBmsAction{}.triggered();
}
#endif
}
else if (configs.bluetooth.autoBluetoothMode.value == BluetoothMode::Slave)
2021-12-19 02:37:48 +01:00
{
bootLabel.redraw("bluetooth begin");
BluetoothBeginAction{}.triggered();
}
}
void bluetooth_update()
{
}
#endif