BoostControl is relatively simple compared to WideBand or OnlineCourse/VeLearning implementation
The trick is the very flexible boost-target calculation.
Actuation implementation
Since the solenoids people kept finding were on/off type with 20..30 Hz max frequency, the original high frequency softpwm implementation had to be changed.
3 parts:
- initialize
- pid (userspace) calculations. Ideally best to calculate pid just before actuation (eg. always before falling edge - since the rising edge timing varies).
- actuation (userspace or interrupt)
- actuation in interrupt with EventQueue the same way as OutputTrigger mst..msp..msq.. would be simplest.
- alternatively actuation in userspace from a lowered freq softpwm
My proposal:
- call pid() calculation from vems.c mainloop every ? msec using softelapsed(). Do one edge right from there
- schedule the other edge via eventqueue. Take care with duty overflow (the same way it's done for injection should be OK)