tiny refactoring (#5646)
Co-authored-by: andreika-git <andrei.home@gmail.com>
This commit is contained in:
parent
46c5923f25
commit
2507d4e467
|
@ -22,6 +22,7 @@ OutputPin* getVvtOutputPin(int index);
|
|||
|
||||
#define BANK_BY_INDEX(index) (index / CAMS_PER_BANK)
|
||||
#define CAM_BY_INDEX(index) (index % CAMS_PER_BANK)
|
||||
#define INDEX_BY_BANK_CAM(bank, cam) ((bank) * CAMS_PER_BANK + (cam))
|
||||
|
||||
class VvtController : public EngineModule, public ClosedLoopController<angle_t, percent_t>, public vvt_s {
|
||||
public:
|
||||
|
|
|
@ -256,7 +256,11 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
|
|||
// sensor noise + self-stim = loss of trigger sync
|
||||
return;
|
||||
}
|
||||
handleVvtCamSignal(front, nowNt, index);
|
||||
}
|
||||
|
||||
void handleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
|
||||
TriggerCentral *tc = getTriggerCentral();
|
||||
if (index == 0) {
|
||||
engine->outputChannels.vvtChannel1 = front == TriggerValue::RISE;
|
||||
} else if (index == 1) {
|
||||
|
|
|
@ -215,6 +215,7 @@ void hwHandleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp);
|
|||
void handleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp);
|
||||
void hwHandleVvtCamSignal(TriggerValue front, efitick_t timestamp, int index);
|
||||
void hwHandleVvtCamSignal(bool isRising, efitick_t timestamp, int index);
|
||||
void handleVvtCamSignal(TriggerValue front, efitick_t timestamp, int index);
|
||||
|
||||
void validateTriggerInputs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue