Need support? support@freenove.com
118
119
120
121
122
123
124
125
126
case ACTION_DANCING:
mqMotion.enterForced(msg);
controlTask(TASK_MOTION_SERVICE, TASK_RESUME);
break;
default:
mqInfo.enterForced(msg);
break;
}
}
Events handled by the main thread.
34
35
36
37
38
39
40
41
42
43
44
45
void loop() {
task_CommandService(NULL);
task_BleUploadService(NULL);
task_showBuiltInLed(NULL);
vTaskDelay(20);
static uint32_t lastT = 0;
if (millis() - lastT > 1000) {
// Serial.printf("Total heap: %d\r\n", ESP.getHeapSize());
// Serial.printf("Free heap: %d\r\n", ESP.getFreeHeap());
lastT = millis();
}
}
Events handled by the task thread.
47
48
49
50
51
52
53
54
55
56
57
58
void loopSecondary(void *pvParameters) {
while (1) {
task_BatteryPowerListener(NULL);
task_showRGBLeds(NULL);
task_AutoWalking(NULL);
task_BuzzerService(NULL);
task_TouchPad(NULL);
vTaskDelay(50);
}
vTaskDelete(xTaskGetCurrentTaskHandle());
}