2
0
mirror of https://github.com/team2059/Zaphod synced 2024-12-18 20:12:28 -05:00

Made runCompressor clearer

This commit is contained in:
Austen Adler 2014-04-03 15:13:42 -04:00
parent 5653ed54eb
commit eef71313f0

View File

@ -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();
}