mirror of https://github.com/rusefi/wideband.git
uppercase functions
This commit is contained in:
parent
1ce6981b53
commit
0a117089b8
|
@ -2,17 +2,17 @@
|
|||
|
||||
static Fault currentFault = Fault::None;
|
||||
|
||||
void setFault(Fault fault)
|
||||
void SetFault(Fault fault)
|
||||
{
|
||||
currentFault = fault;
|
||||
}
|
||||
|
||||
bool hasFault()
|
||||
bool HasFault()
|
||||
{
|
||||
return currentFault != Fault::None;
|
||||
}
|
||||
|
||||
Fault getCurrentFault()
|
||||
Fault GetCurrentFault()
|
||||
{
|
||||
return currentFault;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
enum class Fault
|
||||
#include <cstdint>
|
||||
|
||||
enum class Fault : uint8_t
|
||||
{
|
||||
None = 0,
|
||||
|
||||
|
@ -10,6 +12,6 @@ enum class Fault
|
|||
SensorUnderheat = 5,
|
||||
};
|
||||
|
||||
void setFault(Fault fault);
|
||||
bool hasFault();
|
||||
Fault getCurrentFault();
|
||||
void SetFault(Fault fault);
|
||||
bool HasFault();
|
||||
Fault GetCurrentFault();
|
||||
|
|
|
@ -61,7 +61,7 @@ static HeaterState GetNextState(HeaterState state, float sensorEsr)
|
|||
}
|
||||
else if (timeCounter == 0)
|
||||
{
|
||||
setFault(Fault::SensorDidntHeat);
|
||||
SetFault(Fault::SensorDidntHeat);
|
||||
return HeaterState::Stopped;
|
||||
}
|
||||
|
||||
|
@ -71,12 +71,12 @@ static HeaterState GetNextState(HeaterState state, float sensorEsr)
|
|||
case HeaterState::ClosedLoop:
|
||||
if (sensorEsr < HEATER_OVERHEAT_ESR)
|
||||
{
|
||||
setFault(Fault::SensorOverheat);
|
||||
SetFault(Fault::SensorOverheat);
|
||||
return HeaterState::Stopped;
|
||||
}
|
||||
else if (sensorEsr > HEATER_UNDERHEAT_ESR)
|
||||
{
|
||||
setFault(Fault::SensorUnderheat);
|
||||
SetFault(Fault::SensorUnderheat);
|
||||
return HeaterState::Stopped;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ int main() {
|
|||
|
||||
while(true)
|
||||
{
|
||||
auto fault = getCurrentFault();
|
||||
auto fault = GetCurrentFault();
|
||||
|
||||
if (fault == Fault::None)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue