mirror of
https://github.com/team2059/Zaphod
synced 2025-01-07 22:14:14 -05:00
Made runCompressor clearer
This commit is contained in:
parent
5653ed54eb
commit
eef71313f0
@ -252,12 +252,12 @@ public:
|
|||||||
}
|
}
|
||||||
//}}}
|
//}}}
|
||||||
//runCompressor{{{
|
//runCompressor{{{
|
||||||
void runCompressor(int timer, int refreshInterval){
|
void runCompressor(int i, int refreshInterval){
|
||||||
if(timer%refreshInterval==0&compressing&compressor.GetPressureSwitchValue()==1){
|
if(i%refreshInterval==0&compressing&compressor.GetPressureSwitchValue()==1){
|
||||||
compressing=false;
|
compressing=false;
|
||||||
compressor.Stop();
|
compressor.Stop();
|
||||||
}
|
}
|
||||||
if(timer%refreshInterval==0&!compressing&compressor.GetPressureSwitchValue()==0){
|
if(i%refreshInterval==0&!compressing&compressor.GetPressureSwitchValue()==0){
|
||||||
compressing=true;
|
compressing=true;
|
||||||
compressor.Start();
|
compressor.Start();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user