initial commit
This commit is contained in:
36
Services/ICalibrationService.cs
Normal file
36
Services/ICalibrationService.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HC_APTBS.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles DFI (injection timing offset) calibration read/write operations
|
||||
/// on the VP44 pump ECU over the K-Line / KWP2000 protocol.
|
||||
/// </summary>
|
||||
public interface ICalibrationService
|
||||
{
|
||||
// ── DFI ───────────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// Reads the current DFI calibration value stored in ECU EEPROM.
|
||||
/// </summary>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
/// <returns>DFI offset in degrees.</returns>
|
||||
Task<double> ReadDfiAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a new DFI calibration value to ECU EEPROM and verifies the write
|
||||
/// by reading the value back.
|
||||
/// </summary>
|
||||
/// <param name="dfiDegrees">Target DFI value in degrees (clamped to ±1.45°).</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
/// <returns>Verified DFI value read back after the write.</returns>
|
||||
Task<double> WriteDfiAsync(double dfiDegrees, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Writes DFI and then triggers a pump power cycle to activate the new calibration.
|
||||
/// Returns the DFI value verified after the restart.
|
||||
/// </summary>
|
||||
Task<double> WriteDfiAndRestartAsync(double dfiDegrees, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user