send heater duty

This commit is contained in:
Matthew Kennedy 2022-01-04 11:16:46 -08:00
parent 4f2fd95c46
commit 6557809da2
4 changed files with 9 additions and 1 deletions

View File

@ -128,5 +128,6 @@ void SendRusefiFormat(uint8_t idx)
frame.get().NernstDc = GetNernstDc() * 1000;
frame.get().PumpDuty = GetPumpOutputDuty() / 4;
frame.get().Status = GetCurrentFault();
frame.get().HeaterDuty = GetHeaterDuty() / 4;
}
}

View File

@ -204,3 +204,8 @@ void SetHeaterAllowed(bool allowed)
{
heaterAllowed = allowed;
}
uint16_t GetHeaterDuty()
{
return heaterPwm.GetLastDuty();
}

View File

@ -6,3 +6,4 @@ void StartHeaterControl();
bool IsRunningClosedLoop();
void SetBatteryVoltage(float vbatt);
void SetHeaterAllowed(bool allowed);
uint16_t GetHeaterDuty();

View File

@ -38,7 +38,8 @@ struct DiagData
uint8_t PumpDuty;
Fault Status;
uint16_t pad;
uint8_t HeaterDuty;
uint8_t pad;
};
static const char* describeFault(Fault fault) {