This commit is contained in:
2026-01-13 01:14:51 +01:00
parent eed612f457
commit 6a48dcd61e
10 changed files with 163 additions and 52 deletions

View File

@@ -82,10 +82,16 @@ TaskHandle_t Task2Task_Handler;
// uint8_t bufIn[260];
uint8_t bootedUp = 0;
void task2_task (void *pvParameters) {
char x;
MESH_LOGD (TAG, "Task2 boot");
while (1) {
if (bootedUp == 0) {
vTaskDelay(pdMS_TO_TICKS(1000));
continue;
}
if (USART_GetFlagStatus (USART1, USART_FLAG_RXNE) == SET) {
x = USART_ReceiveData (USART1);
if (x == 'M') {
@@ -147,14 +153,17 @@ void task1_task (void *pvParameters) {
memset (&stats, 0, sizeof (stats));
DiscoverRequestPayload discReq;
discReq.prefixOnly = 0;
discReq.since = 0;
discReq.tag = RTC_GetCounter();
discReq.typeFilter = 0xFF;
sendDiscoverRequest (&discReq);
/*
DiscoverRequestPayload discReq;
discReq.prefixOnly = 0;
discReq.since = 0;
discReq.tag = RTC_GetCounter();
discReq.typeFilter = 0xFF;
sendDiscoverRequest (&discReq);
sendAdvert (1);
*/
sendAdvert (0);
bootedUp = 1;
while (1) {
start_time = xTaskGetTickCount();