Advertisement
Guest User

paparazzi_problem

a guest
Apr 28th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. void handle_periodic_tasks_ap(void) {
  2.     FILE *f = fopen("/home/myusername/file.txt", "w");
  3.     if (f == NULL)
  4.     {
  5.         printf("Error opening file!\n");
  6.         exit(1);
  7.     }
  8.    
  9.     /* print some text */
  10.     const char *text = "Write this to the file";
  11.     fprintf(f, "Some text: %s\n", text);
  12.  
  13.     fclose(f);
  14.  
  15.     if (sys_time_check_and_ack_timer(sensors_tid))
  16.             sensors_task();
  17.  
  18.     if (sys_time_check_and_ack_timer(navigation_tid))
  19.         navigation_task();
  20.  
  21.     ....
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement