looping
This commit is contained in:
parent
e3c16ef712
commit
d613d278ec
@ -1,7 +1,7 @@
|
||||
#include <main.h>
|
||||
#include <loopCtrl.h>
|
||||
#include <show.h>
|
||||
|
||||
#include <logger.h>
|
||||
|
||||
bool loopActive = false;
|
||||
|
||||
@ -9,12 +9,14 @@ void loopEnable() {
|
||||
loopActive = true;
|
||||
HAL_GPIO_WritePin(Loop_Enable_GPIO_Port, Loop_Enable_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(Loop_Enable_GPIO_Port, Loop_Enable_Pin, GPIO_PIN_RESET);
|
||||
coloredMsg(LOG_HIGH, true, "lc le loop is enabled");
|
||||
}
|
||||
|
||||
void loopDisable() {
|
||||
HAL_GPIO_WritePin(Loop_Disable_GPIO_Port, Loop_Disable_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(Loop_Disable_GPIO_Port, Loop_Disable_Pin, GPIO_PIN_RESET);
|
||||
loopActive = false;
|
||||
coloredMsg(LOG_HIGH, true, "lc ld loop is disabled");
|
||||
}
|
||||
|
||||
void loopStatusCallback() {
|
||||
|
@ -618,11 +618,13 @@ static void mbusCommScheduler(void *handle) {
|
||||
if (! isNetworkAvailable()) {
|
||||
coloredMsg(LOG_GREEN, true, "mbc mcs deactivate scheduler by network");
|
||||
schDel(triggerMBusRequest, NULL);
|
||||
loopDisable();
|
||||
state = 0;
|
||||
}
|
||||
if (! mbusCommEnabled) {
|
||||
coloredMsg(LOG_GREEN, true, "mbc mcs deactivate scheduler by request");
|
||||
schDel(triggerMBusRequest, NULL);
|
||||
loopDisable();
|
||||
state = 2;
|
||||
}
|
||||
for (uint8_t i = 0; i < numOfDevices; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user