2024-09-27 10:16:13 -07:00
|
|
|
//
|
|
|
|
// Created by kifir on 9/27/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "shift_torque_reduction_state_generated.h"
|
|
|
|
|
|
|
|
class ShiftTorqueReductionController : public shift_torque_reduction_state_s {
|
2024-10-02 07:00:39 -07:00
|
|
|
public:
|
|
|
|
void update();
|
2024-10-04 15:19:48 -07:00
|
|
|
|
|
|
|
float getSparkSkipRatio() const;
|
2024-10-02 07:00:39 -07:00
|
|
|
private:
|
|
|
|
void updateTriggerPinState();
|
|
|
|
void updateTriggerPinState(switch_input_pin_e pin, bool isPinInverted);
|
2024-10-02 10:54:35 -07:00
|
|
|
|
|
|
|
void updateTimeConditionSatisfied();
|
2024-10-03 11:07:33 -07:00
|
|
|
void updateRpmConditionSatisfied();
|
2024-10-03 13:27:15 -07:00
|
|
|
void updateAppConditionSatisfied();
|
2024-10-02 10:54:35 -07:00
|
|
|
|
|
|
|
Timer m_pinTriggeredTimer;
|
2024-09-27 10:16:13 -07:00
|
|
|
};
|