From eef71313f0e9cf63a85c83d4f75e81d0078eb172 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 3 Apr 2014 15:13:42 -0400 Subject: [PATCH] Made runCompressor clearer --- MyRobot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MyRobot.cpp b/MyRobot.cpp index b8d23cc..02af8f1 100644 --- a/MyRobot.cpp +++ b/MyRobot.cpp @@ -252,12 +252,12 @@ public: } //}}} //runCompressor{{{ - void runCompressor(int timer, int refreshInterval){ - if(timer%refreshInterval==0&compressing&compressor.GetPressureSwitchValue()==1){ + void runCompressor(int i, int refreshInterval){ + if(i%refreshInterval==0&compressing&compressor.GetPressureSwitchValue()==1){ compressing=false; compressor.Stop(); } - if(timer%refreshInterval==0&!compressing&compressor.GetPressureSwitchValue()==0){ + if(i%refreshInterval==0&!compressing&compressor.GetPressureSwitchValue()==0){ compressing=true; compressor.Start(); }