Skip to content

Commit

Permalink
init task timer && send monitor data use timer task thread
Browse files Browse the repository at this point in the history
  • Loading branch information
WSCKY committed Nov 30, 2018
1 parent 59bdcc5 commit 3a8d2e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion Projects/ds_twr_Responder/RTLS/ds_resp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ void ds_responder_task_function (void * pvParameter)
while (true)
{
ds_resp_run();
SendDataToMonitor();
/* Delay a task for a given number of ticks */
// vTaskDelay(RNG_DELAY_MS);
// /* Tasks must be implemented to never return... */
Expand Down
7 changes: 6 additions & 1 deletion Projects/ds_twr_Responder/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int main(void)
//dwt_setpreambledetecttimeout(0); // PRE_TIMEOUT

//-------------dw1000 ini------end---------------------------
TaskTimerInit(100);
// IF WE GET HERE THEN THE LEDS WILL BLINK
ds_responder_task_function(0);
while(1) {
Expand All @@ -99,14 +100,18 @@ int main(void)
}
}

void TaskTimerCallback(void)
{
SendDataToMonitor();
}

uint32_t tim_1s_cnt = 0;
void SysTickIrqCallback(void)
{
if(tim_1s_cnt < 1000)
tim_1s_cnt ++;
else {
tim_1s_cnt = 0;
// FrameRateCountCallback(1);
LED_TOG();
}
}
Expand Down
2 changes: 2 additions & 0 deletions Projects/ds_twr_Responder/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "Delay.h"
#include "TimerCounter.h"

#include "TaskTimer.h"

#include "DW1000.h"

#include "usbd_cdc_core.h"
Expand Down

0 comments on commit 3a8d2e7

Please sign in to comment.