ternary to if/else
This commit is contained in:
parent
bcc675f278
commit
1a7750b2a2
|
@ -32,7 +32,10 @@ void fanControl()
|
|||
{
|
||||
int onTemp = (int)configPage6.fanSP - CALIBRATION_TEMPERATURE_OFFSET;
|
||||
int offTemp = onTemp - configPage6.fanHyster;
|
||||
bool fanPermit = configPage6.fanWhenOff ? true : BIT_CHECK(currentStatus.engine, BIT_ENGINE_RUN);
|
||||
bool fanPermit = false;
|
||||
|
||||
if ( configPage6.fanWhenOff ) { fanPermit = true; }
|
||||
else { fanPermit = BIT_CHECK(currentStatus.engine, BIT_ENGINE_RUN); }
|
||||
|
||||
if ( currentStatus.coolant >= onTemp && fanPermit )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue