To use the compressor, you must first declare it in the .h file in the inout interface using Compressor name where name is whatever you want to name the compressor in the code. Then, you set it up in the .cpp file by putting in these two values like this: name(x, y). x is the spike channel and y is the pressure regulator channel. If you have already done all this correctly, then the only other thing to check is if moving compress.Start() to the OperatorControl method right here will work
Code:
void OperatorControl(void)
{
rd.SetSafetyEnabled(true);
compress.Start();
while (IsEnabled() && IsOperatorControl())
{