Open taesungh opened 6 months ago
Update: the Pico is running bare metal (no OS), so the arm-none-eabi
compiler doesn't support threads. Sam instead suggested we look into the Pico's multicore capabilities.
Functionality to sustain parameters and adjust on the fly added in #39, looking into expiration time next.
Following from #24/#36, the inverter will output a single period of the PDM waveform for each control message. To have a consistent flow of power, this would require the pod's FSM to be synchronized with the AC frequency, but this is not known by the pod. To avoid overfilling a buffer of messages, we can set an expiration time on the control message and assume the same parameters (velocity and throttle) for subsequent periods until the previous message has expired at which point the inverter must wait for another message.
read_control_message
function to provide the previous known command if it has not expired