Skip to content

Commit 148e6cd

Browse files
committed
fix do not start the BLEAgent if disabled from AgentsManager
1 parent 0e9bda0 commit 148e6cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ConfiguratorAgents/AgentsManager.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ bool AgentsManagerClass::begin(uint8_t id) {
2929
pinMode(LED_BUILTIN, OUTPUT);
3030

3131
for (std::list<ConfiguratorAgent *>::iterator agent = _agentsList.begin(); agent != _agentsList.end(); ++agent) {
32+
if((*agent)->getAgentType() == ConfiguratorAgent::AgentTypes::BLE) {
33+
if (!_bleAgentEnabled) {
34+
continue;
35+
}
36+
}
3237
if ((*agent)->begin() == ConfiguratorAgent::AgentConfiguratorStates::ERROR) {
3338
DEBUG_ERROR("AgentsManagerClass::%s agent type %d fails", __FUNCTION__, (int)(*agent)->getAgentType());
3439
return false;

0 commit comments

Comments
 (0)