SHOW:
|
|
- or go back to the newest paste.
| 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 loop goes here ... |
| 9 | + | // ... control algorithm goes here ... |
| 10 | ||
| 11 | send_message( ++id, timestamp, force, position ); | |
| 12 | } | |
| 13 |