using System.Threading; using System.Threading.Tasks; namespace HC_APTBS.Services { /// /// Handles DFI (injection timing offset) calibration read/write operations /// on the VP44 pump ECU over the K-Line / KWP2000 protocol. /// public interface ICalibrationService { // ── DFI ─────────────────────────────────────────────────────────────────── /// /// Reads the current DFI calibration value stored in ECU EEPROM. /// /// Cancellation token. /// DFI offset in degrees. Task ReadDfiAsync(CancellationToken ct = default); /// /// Writes a new DFI calibration value to ECU EEPROM and verifies the write /// by reading the value back. /// /// Target DFI value in degrees (clamped to ±1.45°). /// Cancellation token. /// Verified DFI value read back after the write. Task WriteDfiAsync(double dfiDegrees, CancellationToken ct = default); /// /// Writes DFI and then triggers a pump power cycle to activate the new calibration. /// Returns the DFI value verified after the restart. /// Task WriteDfiAndRestartAsync(double dfiDegrees, CancellationToken ct = default); } }