Moved bms into task manager
This commit is contained in:
@ -39,6 +39,11 @@ bool send6Bit(int zhen_tou, int address, int data)
|
|||||||
return sent == 6;
|
return sent == 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void update()
|
void update()
|
||||||
{
|
{
|
||||||
const auto now = espchrono::millis_clock::now();
|
const auto now = espchrono::millis_clock::now();
|
||||||
|
@ -172,10 +172,6 @@ extern "C" void app_main()
|
|||||||
performance.lastTime = now;
|
performance.lastTime = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEATURE_BMS
|
|
||||||
bms::update();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FEATURE_DNS_NS
|
#ifdef FEATURE_DNS_NS
|
||||||
handle_dns_announce();
|
handle_dns_announce();
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
#include "potis.h"
|
#include "potis.h"
|
||||||
#ifdef FEATURE_BLUETOOTH
|
#ifdef FEATURE_BLUETOOTH
|
||||||
#include "bluetooth_bobby.h"
|
#include "bluetooth_bobby.h"
|
||||||
|
#ifdef FEATURE_BMS
|
||||||
|
#include "bmsutils.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEATURE_CAN
|
#ifdef FEATURE_CAN
|
||||||
#include "can.h"
|
#include "can.h"
|
||||||
@ -106,6 +109,9 @@ espcpputils::SchedulerTask schedulerTasksArr[] {
|
|||||||
espcpputils::SchedulerTask { "potis", initPotis, readPotis, 20ms },
|
espcpputils::SchedulerTask { "potis", initPotis, readPotis, 20ms },
|
||||||
#ifdef FEATURE_BLUETOOTH
|
#ifdef FEATURE_BLUETOOTH
|
||||||
espcpputils::SchedulerTask { "bluetooth", bluetooth_init, bluetooth_update, 100ms },
|
espcpputils::SchedulerTask { "bluetooth", bluetooth_init, bluetooth_update, 100ms },
|
||||||
|
#ifdef FEATURE_BMS
|
||||||
|
espcpputils::SchedulerTask { "bms", bms::init, bms::update, 100ms },
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEATURE_CAN
|
#ifdef FEATURE_CAN
|
||||||
espcpputils::SchedulerTask { "can", can::initCan, can::parseCanInput, 10ms },
|
espcpputils::SchedulerTask { "can", can::initCan, can::parseCanInput, 10ms },
|
||||||
|
Reference in New Issue
Block a user