2020-10-09 20:34:45 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "global.h"
|
|
|
|
#include "io_pins.h"
|
|
|
|
#include "persistent_configuration.h"
|
|
|
|
#include "engine_configuration_generated_structures.h"
|
|
|
|
#include "globalaccess.h"
|
|
|
|
#include "simple_tcu.h"
|
2022-04-06 14:37:30 -07:00
|
|
|
#include "tc_4l6x.h"
|
2020-10-09 20:34:45 -07:00
|
|
|
|
2022-04-23 04:34:39 -07:00
|
|
|
#if EFI_TCU
|
2021-11-16 13:52:11 -08:00
|
|
|
class GearControllerBase {
|
2020-10-09 20:34:45 -07:00
|
|
|
public:
|
2022-04-06 14:37:30 -07:00
|
|
|
virtual void update();
|
2022-04-18 17:09:27 -07:00
|
|
|
virtual gear_e getDesiredGear() const;
|
2022-04-06 14:37:30 -07:00
|
|
|
virtual void init();
|
2022-04-18 17:09:27 -07:00
|
|
|
virtual GearControllerMode getMode() const {
|
|
|
|
return GearControllerMode::ButtonShift;
|
|
|
|
}
|
2020-10-09 20:34:45 -07:00
|
|
|
protected:
|
2022-04-18 17:09:27 -07:00
|
|
|
virtual gear_e setDesiredGear(gear_e);
|
2022-04-06 14:37:30 -07:00
|
|
|
void initTransmissionController();
|
2022-04-18 17:09:27 -07:00
|
|
|
TransmissionControllerBase *transmissionController;
|
2020-12-06 04:32:38 -08:00
|
|
|
private:
|
2022-04-18 17:09:27 -07:00
|
|
|
gear_e desiredGear = NEUTRAL;
|
2022-04-06 14:37:30 -07:00
|
|
|
void postState();
|
2020-10-09 20:34:45 -07:00
|
|
|
};
|
2022-04-06 14:37:30 -07:00
|
|
|
|
|
|
|
void initGearController();
|
2022-04-23 04:34:39 -07:00
|
|
|
#endif // EFI_TCU
|