This CLSID returns the ignition spark advance.
Ignition timing advance
Read, shareable or exclusive
Type: | VT_I2 (signed short fixed point decimal) |
Low: | –64.0 |
High: | +63.5 |
None
Type: | VT_I2 (signed short fixed point decimal) |
Measurement: | VIOMEASUREMENT_ROTATION |
Units: | VIOUNITS_DEGREES |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | SHORT * |
Size: | 2 bytes |
Description: | Ignition advance in 0.1 degree increments |
HRESULT hr;
IVIO_Device *pTiming;
VIODEVICEMETRICS dmMetrics;
VARIANT vDeviceData;
float fTiming;
//Create an instance of the ignition timing advance device and get its
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_TIMING_ADVANCE, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pTiming);
//Get the metrics for the ignition timing advance device.
pTiming->get_Metrics(&dmMetrics);
//Ask the device for timing, given in fixed-point form.
pTiming->GetData(&vDeviceData, 3000);
//Get the timing and convert it to a float type.
fTiming = ((float) vDeviceData.iVal) * (10.0 ^ dmMetrics.lExponent);
//Release the reference to the interface.
pTiming->Release();