mirror of
https://github.com/team2059/Zaphod
synced 2025-01-07 22:14:14 -05:00
Enabled the compressor. Should work because loops runs at lower speed than SimpleTemplate
This commit is contained in:
parent
b9b25144b6
commit
fdd3561801
@ -3,7 +3,6 @@ HHCompressor::HHCompressor(){
|
||||
compressor=new Compressor(COMPRESSOR_GAUGE_SIDECAR, COMPRESSOR_GAUGE, COMPRESSOR_RELAY_SIDECAR, COMPRESSOR_RELAY);
|
||||
solenoid1=new Solenoid(COMPRESSOR_SOLENOID_ONE);
|
||||
solenoid2=new Solenoid(COMPRESSOR_SOLENOID_TWO);
|
||||
time(&t);
|
||||
}
|
||||
void HHCompressor::CompressorSystemPeriodic(){
|
||||
switch(e_CollectorSolenoidState){
|
||||
@ -20,17 +19,11 @@ void HHCompressor::CompressorSystemPeriodic(){
|
||||
default:
|
||||
break;
|
||||
}
|
||||
time_t f;
|
||||
time(&f);
|
||||
printf("%f",difftime(t,f));
|
||||
if(difftime(t,f)>1.0f){
|
||||
if(compressor->GetPressureSwitchValue()==1){
|
||||
compressor->Start();
|
||||
compressor->Start()
|
||||
}else{
|
||||
compressor->Stop();
|
||||
}
|
||||
t=clock();
|
||||
}
|
||||
e_CollectorSolenoidState=IDLE;
|
||||
}
|
||||
void HHCompressor::ExtendCollector(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user