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

View File

@@ -32,13 +32,6 @@ using namespace std::chrono_literals;
#endif
#include "presets.h"
#include "statistics.h"
#ifdef FEATURE_BLUETOOTH
#include "actions/bluetoothbeginaction.h"
#include "actions/bluetoothbeginmasteraction.h"
#ifdef FEATURE_BMS
#include "actions/bluetoothconnectbmsaction.h"
#endif
#endif
#ifdef FEATURE_BLE
#include "ble_bobby.h"
#endif
@@ -140,26 +133,6 @@ extern "C" void app_main()
task.setup();
}
#ifdef FEATURE_BLUETOOTH
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();
}
#endif
#ifdef FEATURE_CAN
bootLabel.redraw("can");
can::initCan();
@@ -181,11 +154,6 @@ extern "C" void app_main()
initLedStrip();
#endif
raw_gas = std::nullopt;
raw_brems = std::nullopt;
gas = std::nullopt;
brems = std::nullopt;
for (Controller &controller : controllers)
controller.command.buzzer = {};