As part of #37, allow continually outputting the PDM waveform with the last known parameters rather than just a single period. Using multicore functionality, a separate core monitors the serial input and updates the LIM control message through a mutex lock. We still need to implement expiration time for safety reasons.
Changes
Create a global variable to store the velocity and throttle
Add a mutex to prevent concurrent access to it
Utilize Raspberry Pi Pico's second core to run a function to read input and update the global variable
As part of #37, allow continually outputting the PDM waveform with the last known parameters rather than just a single period. Using multicore functionality, a separate core monitors the serial input and updates the LIM control message through a mutex lock. We still need to implement expiration time for safety reasons.
Changes