2020-07-05 23:07:22 -07:00
|
|
|
#pragma once
|
2019-09-03 16:30:51 -07:00
|
|
|
#include "rusefi_types.h"
|
|
|
|
struct trigger_state_s {
|
|
|
|
/**
|
2022-09-07 19:41:09 -07:00
|
|
|
* Crank sync counter
|
|
|
|
* Usually matches crank revolutions
|
2019-09-03 16:30:51 -07:00
|
|
|
* offset 0
|
|
|
|
*/
|
2022-09-07 19:24:28 -07:00
|
|
|
uint32_t crankSynchronizationCounter = (uint32_t)0;
|
2021-12-09 18:59:51 -08:00
|
|
|
/**
|
|
|
|
* offset 4
|
|
|
|
*/
|
2022-10-08 19:22:51 -07:00
|
|
|
float vvtSyncGapRatio = (float)0;
|
2022-05-08 05:05:34 -07:00
|
|
|
/**
|
|
|
|
* offset 8
|
|
|
|
*/
|
2022-10-08 19:22:51 -07:00
|
|
|
float vvtCurrentPosition = (float)0;
|
2022-05-08 05:05:34 -07:00
|
|
|
/**
|
2022-05-08 06:06:44 -07:00
|
|
|
* @@GAUGE_NAME_TRG_GAP@@
|
2022-05-08 05:05:34 -07:00
|
|
|
* offset 12
|
|
|
|
*/
|
2022-10-08 19:22:51 -07:00
|
|
|
float triggerSyncGapRatio = (float)0;
|
2022-05-08 05:05:34 -07:00
|
|
|
/**
|
|
|
|
* offset 16
|
|
|
|
*/
|
|
|
|
uint8_t triggerStateIndex = (uint8_t)0;
|
|
|
|
/**
|
2023-01-03 04:55:38 -08:00
|
|
|
* offset 17
|
2022-05-08 05:05:34 -07:00
|
|
|
*/
|
|
|
|
uint8_t vvtCounter = (uint8_t)0;
|
|
|
|
/**
|
2023-01-03 04:55:38 -08:00
|
|
|
* offset 18
|
2022-05-08 05:05:34 -07:00
|
|
|
*/
|
2022-08-09 17:32:39 -07:00
|
|
|
uint8_t camResyncCounter = (uint8_t)0;
|
2022-05-08 05:05:34 -07:00
|
|
|
/**
|
2023-01-03 04:55:38 -08:00
|
|
|
* offset 19
|
2022-05-08 05:05:34 -07:00
|
|
|
*/
|
|
|
|
uint8_t vvtStateIndex = (uint8_t)0;
|
2019-09-03 16:30:51 -07:00
|
|
|
};
|
2023-01-03 04:55:38 -08:00
|
|
|
static_assert(sizeof(trigger_state_s) == 20);
|
2019-09-03 16:30:51 -07:00
|
|
|
|