If the "additional" word is used for the recirculate, please update everywhere to recirculate. The additional is for extra blood return, and recirculation is just to recirculate the blood to prevent clogging.
Define what 3 means (#define up top). If 3 means 3 x 50ms general task interval, define it as shown below: #define AIR_PUMP_STALL_PERSISTENCE ( 150 / TASK_GENERAL_INTERVAL ) ///< How long stall condition must persist before alarming.
Add a comment explaining what we're looking for here (i.e. we are commanding air pump to run but zero measured pump speed indicates it is not running).
Implied boolean assignment. Use ternary operator to assign TRUE or FALSE explicitly or don't initialize in declaration and use if else below to assign.
I tried the suggested change and tested. But it did not provide the expected results. If a on was requested while an off was still pending to be processed, the off-request flag gets cleared without the actual request being processed and the off request was never executed.