Advertisement
Guest User

Untitled

a guest
Apr 20th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     while( true ) {
  2.         // wait for next measurement and receive it
  3.         int32_t force = receive_measurement();
  4.  
  5.         // get timestamp and motor position
  6.         uint32_t timestamp = timestamp_cycles();
  7.         uint32_t position = *position_var;
  8.  
  9.         // ... control algorithm goes here ...
  10.  
  11.         send_message( ++id, timestamp, force, position );
  12.     }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement