task_ec800_upload(8079).c 759 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "task_ec800_upload.h"
  2. //-------------------------define
  3. #define ANGLE_UPDATE_TIME 50 // 角度更新时间 2s 单位100ms
  4. /**
  5. * @brief 上传任务内容
  6. * @param None
  7. * @note None
  8. * @retval None
  9. */
  10. void task_ec800_content(void)
  11. {
  12. // unsigned long times = 0;
  13. static uint8_t cnt = 0;
  14. // 4G模块的操作
  15. EC800_stateTransition_use();
  16. // 每2s获取一次角度值
  17. if((cnt % ANGLE_UPDATE_TIME) == 1){
  18. printf("The app1 is runing.\r\n");
  19. }
  20. if(cnt < 255){
  21. cnt++;
  22. }else{
  23. cnt = 0;
  24. }
  25. // 判断车辆是否正在转弯
  26. // if (isTurning()) {
  27. // printf("The vehicle is turning.\r\n");
  28. // } else {
  29. // printf("Vehicle not turning.\r\n");
  30. // }
  31. // times = getRunTimeCounterValue();
  32. // printf("任务运行时间: %ld\r\n", times);
  33. osDelay(1000);
  34. }