upd
This commit is contained in:
23
User/main.c
23
User/main.c
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user