rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
gear_controller.cpp
Go to the documentation of this file.
1#include "pch.h"
2
3#include "gear_controller.h"
4
5#if EFI_TCU
9
27
29 if (transmissionController == NULL) {
32 // TODO de-init here to allow change without power cycling
34 }
35
36 // check if it was init'd (it wouldn't be if set to NONE)
37 if (transmissionController != NULL) {
38 // We are responsible for telling the transmission controller
39 // what gear we want.
41 }
42
43 // Post state to TS
44 postState();
45}
46
50
55
57#if EFI_TUNER_STUDIO
59#endif
60}
61
76
78 // I don't remember why I put manual +/- first.
79 // I think maybe I had some concern about them needing to override under-specified ranges?
80 // e.g. with it this way, you could put 2 in the cells for +/- pins in everything else.
81 // So this way might make it a little easier/foolproof to configure, but not necessary.
82 switch (i) {
83 case 1 :
84 return config->tcu_rangePlus;
85 break;
86 case 2 :
87 return config->tcu_rangeMinus;
88 break;
89 case 3 :
90 return config->tcu_rangeP;
91 break;
92 case 4 :
93 return config->tcu_rangeR;
94 break;
95 case 5 :
96 return config->tcu_rangeN;
97 break;
98 case 6 :
99 return config->tcu_rangeD;
100 break;
101 case 7 :
102 return config->tcu_rangeM;
103 break;
104 case 8 :
105 return config->tcu_rangeM3;
106 break;
107 case 9 :
108 return config->tcu_rangeM2;
109 break;
110 case 10 :
111 return config->tcu_rangeM1;
112 break;
113 case 11 :
114 return config->tcu_rangeLow;
115 break;
116 default:
117 return NULL;
118 }
119}
120#endif // EFI_TCU
ButtonShiftController * getButtonShiftController()
GearControllerBase * gearController
Definition engine.h:210
TunerStudioOutputChannels outputChannels
Definition engine.h:109
TransmissionControllerBase * transmissionController
virtual void init()
virtual void update()
float * getRangeStateArray(int)
virtual gear_e getDesiredGear() const
virtual gear_e setDesiredGear(gear_e)
virtual TransmissionControllerMode getMode() const
Definition tcu.h:27
virtual void update(gear_e)
Definition tcu.cpp:17
virtual void init()
Definition tcu.cpp:14
static EngineAccessor engine
Definition engine.h:413
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
GenericGearController * getGenericGearController()
void initGearController()
gear_e
SimpleTransmissionController * getSimpleTransmissionController()
Generic4TransmissionController * getGeneric4TransmissionController()
Definition tc_4.cpp:128
Gm4l6xTransmissionController * getGm4l6xTransmissionController()
Definition tc_4l6x.cpp:50