schedule.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*******************************************************************************************
  2. * @file schedule.c
  3. *
  4. * @brief 小车任务调度
  5. *
  6. * (c) Copyright 2021, Shandong Huali electromechanical Co., Ltd..
  7. * This is protected by international copyright laws. Knowledge of the
  8. * source code may not be used to write a similar product. This file may
  9. * only be used in accordance with a license and should not be redistributed
  10. * in any way. We appreciate your understanding and fairness.
  11. *
  12. *
  13. * @author Simon
  14. * @date Created: 2021.06.17-T14:17:03+0800
  15. *
  16. *******************************************************************************************/
  17. #include "stdint.h"
  18. #include "wcs.h"
  19. #include "task_scheduler.h"
  20. int sch_trajectory(uint8_t task_id, uint8_t seg_no, wcs_point_t *point)
  21. {
  22. // uint8_t i;
  23. // uint8_t point_x;
  24. // for(i = 0; i < seg_no; i++)
  25. // {
  26. // point_x = point[i].x;
  27. // point[i].x = point[i].y;
  28. // point[i].y = point_x;
  29. // }
  30. return task_add_trajectory(task_id, seg_no, (point_t *)point);
  31. }
  32. int sch_target(uint8_t task_id, uint8_t seg_no)
  33. {
  34. return task_set(task_id, seg_no);
  35. }
  36. int sch_get_status(void)
  37. {
  38. return task_get_status();
  39. }