mirror of https://github.com/rusefi/wideband.git
extract fault
This commit is contained in:
parent
79821c3d3f
commit
2bda28226a
|
@ -1,5 +1,7 @@
|
|||
#include "fault.h"
|
||||
|
||||
using namespace wbo;
|
||||
|
||||
static Fault currentFault = Fault::None;
|
||||
|
||||
void SetFault(Fault fault)
|
||||
|
|
|
@ -2,16 +2,8 @@
|
|||
|
||||
#include <cstdint>
|
||||
|
||||
enum class Fault : uint8_t
|
||||
{
|
||||
None = 0,
|
||||
#include "../for_rusefi/wideband_can.h"
|
||||
|
||||
// First fault code at 3 so it's easier to see
|
||||
SensorDidntHeat = 3,
|
||||
SensorOverheat = 4,
|
||||
SensorUnderheat = 5,
|
||||
};
|
||||
|
||||
void SetFault(Fault fault);
|
||||
void SetFault(wbo::Fault fault);
|
||||
bool HasFault();
|
||||
Fault GetCurrentFault();
|
||||
wbo::Fault GetCurrentFault();
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include "sampling.h"
|
||||
#include "pid.h"
|
||||
|
||||
using namespace wbo;
|
||||
|
||||
// 400khz / 1024 = 390hz PWM
|
||||
Pwm heaterPwm(HEATER_PWM_DEVICE, HEATER_PWM_CHANNEL, 400'000, 1024);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "uart.h"
|
||||
#include "io_pins.h"
|
||||
|
||||
using namespace wbo;
|
||||
|
||||
/*
|
||||
* Application entry point.
|
||||
|
|
|
@ -10,6 +10,16 @@
|
|||
|
||||
namespace wbo
|
||||
{
|
||||
enum class Fault : uint8_t
|
||||
{
|
||||
None = 0,
|
||||
|
||||
// First fault code at 3 so it's easier to see
|
||||
SensorDidntHeat = 3,
|
||||
SensorOverheat = 4,
|
||||
SensorUnderheat = 5,
|
||||
};
|
||||
|
||||
struct StandardData
|
||||
{
|
||||
uint8_t Version;
|
||||
|
@ -30,4 +40,6 @@ struct DiagData
|
|||
|
||||
uint16_t pad;
|
||||
};
|
||||
|
||||
|
||||
} // namespace wbo
|
||||
|
|
Loading…
Reference in New Issue