#pragma once #include #include "can.h" enum class HeaterState { Preheat, WarmupRamp, ClosedLoop, Stopped, NoHeaterSupply, }; struct ISampler; struct IHeaterController { virtual void Update(const ISampler& sampler, HeaterAllow heaterAllowState) = 0; virtual bool IsRunningClosedLoop() const = 0; virtual float GetHeaterEffectiveVoltage() const = 0; virtual HeaterState GetHeaterState() const = 0; }; const IHeaterController& GetHeaterController(int ch); void StartHeaterControl(); float GetHeaterDuty(int ch); HeaterState GetHeaterState(int ch); const char* describeHeaterState(HeaterState state);