rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Private Member Functions | Private Attributes
GearControllerBase Class Reference

#include <gear_controller.h>

Inheritance diagram for GearControllerBase:
Inheritance graph
[legend]
Collaboration diagram for GearControllerBase:
Collaboration graph
[legend]

Public Member Functions

virtual void update ()
 
virtual gear_e getDesiredGear () const
 
virtual void init ()
 
virtual GearControllerMode getMode () const
 

Data Fields

TransmissionControllerBasetransmissionController
 

Protected Member Functions

virtual gear_e setDesiredGear (gear_e)
 
void initTransmissionController ()
 
floatgetRangeStateArray (int)
 

Private Member Functions

void postState ()
 

Private Attributes

gear_e desiredGear = NEUTRAL
 

Detailed Description

Definition at line 11 of file gear_controller.h.

Member Function Documentation

◆ getDesiredGear()

gear_e GearControllerBase::getDesiredGear ( ) const
virtual

Definition at line 47 of file gear_controller.cpp.

47 {
48 return desiredGear;
49}

Referenced by postState(), setDesiredGear(), ButtonShiftController::update(), AutomaticGearController::update(), GenericGearController::update(), and update().

Here is the caller graph for this function:

◆ getMode()

virtual GearControllerMode GearControllerBase::getMode ( ) const
inlinevirtual

Reimplemented in ButtonShiftController, AutomaticGearController, and GenericGearController.

Definition at line 16 of file gear_controller.h.

Referenced by doPeriodicSlowCallback().

Here is the caller graph for this function:

◆ getRangeStateArray()

float * GearControllerBase::getRangeStateArray ( int  i)
protected

Definition at line 77 of file gear_controller.cpp.

77 {
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}
static constexpr persistent_config_s * config

Referenced by GenericGearController::isNearest(), and GenericGearController::update().

Here is the caller graph for this function:

◆ init()

void GearControllerBase::init ( )
virtual

Reimplemented in ButtonShiftController, and GenericGearController.

Definition at line 6 of file gear_controller.cpp.

Referenced by ButtonShiftController::init(), GenericGearController::init(), and initGearController().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initTransmissionController()

void GearControllerBase::initTransmissionController ( )
protected

Definition at line 10 of file gear_controller.cpp.

10 {
14 break;
17 break;
20 break;
21 default :
23 return;
24 }
26}
TransmissionControllerBase * transmissionController
virtual void init()
Definition tcu.cpp:14
static constexpr engine_configuration_s * engineConfiguration
SimpleTransmissionController * getSimpleTransmissionController()
Generic4TransmissionController * getGeneric4TransmissionController()
Definition tc_4.cpp:128
Gm4l6xTransmissionController * getGm4l6xTransmissionController()
Definition tc_4l6x.cpp:50

Referenced by init(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postState()

void GearControllerBase::postState ( )
private

Definition at line 56 of file gear_controller.cpp.

56 {
57#if EFI_TUNER_STUDIO
59#endif
60}
TunerStudioOutputChannels outputChannels
Definition engine.h:109
virtual gear_e getDesiredGear() const
static EngineAccessor engine
Definition engine.h:413

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDesiredGear()

gear_e GearControllerBase::setDesiredGear ( gear_e  gear)
protectedvirtual

Definition at line 51 of file gear_controller.cpp.

51 {
52 desiredGear = gear;
53 return getDesiredGear();
54}

Referenced by AutomaticGearController::shift(), ButtonShiftController::update(), AutomaticGearController::update(), and GenericGearController::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void GearControllerBase::update ( )
virtual

Reimplemented in ButtonShiftController, AutomaticGearController, and GenericGearController.

Definition at line 28 of file gear_controller.cpp.

28 {
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}
virtual TransmissionControllerMode getMode() const
Definition tcu.h:27
virtual void update(gear_e)
Definition tcu.cpp:17

Referenced by doPeriodicSlowCallback(), ButtonShiftController::update(), AutomaticGearController::update(), and GenericGearController::update().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ desiredGear

gear_e GearControllerBase::desiredGear = NEUTRAL
private

Definition at line 25 of file gear_controller.h.

Referenced by getDesiredGear(), and setDesiredGear().

◆ transmissionController

TransmissionControllerBase* GearControllerBase::transmissionController

Definition at line 19 of file gear_controller.h.

Referenced by getLiveData(), initTransmissionController(), and update().


The documentation for this class was generated from the following files: