rusEFI
The most advanced open source ECU
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 ()
 
float * getRangeStateArray (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 GenericGearController, AutomaticGearController, and ButtonShiftController.

Definition at line 16 of file gear_controller.h.

16  {
18  }

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  switch (i) {
79  case 1 :
80  return config->tcu_rangePlus;
81  break;
82  case 2 :
83  return config->tcu_rangeMinus;
84  break;
85  case 3 :
86  return config->tcu_rangeP;
87  break;
88  case 4 :
89  return config->tcu_rangeR;
90  break;
91  case 5 :
92  return config->tcu_rangeN;
93  break;
94  case 6 :
95  return config->tcu_rangeD;
96  break;
97  case 7 :
98  return config->tcu_rangeM;
99  break;
100  case 8 :
101  return config->tcu_rangeM3;
102  break;
103  case 9 :
104  return config->tcu_rangeM2;
105  break;
106  case 10 :
107  return config->tcu_rangeM1;
108  break;
109  case 11 :
110  return config->tcu_rangeLow;
111  break;
112  default:
113  return NULL;
114  }
115 }
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 GenericGearController, AutomaticGearController, and ButtonShiftController.

Definition at line 6 of file gear_controller.cpp.

6  {
8 }

Referenced by ButtonShiftController::init(), AutomaticGearController::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
engine_configuration_s * engineConfiguration
SimpleTransmissionController * getSimpleTransmissionController()
Definition: simple_tcu.cpp:35
Generic4TransmissionController * getGeneric4TransmissionController()
Definition: tc_4.cpp:123
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:96
virtual gear_e getDesiredGear() const
Engine * engine

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 GenericGearController, AutomaticGearController, and ButtonShiftController.

Definition at line 28 of file gear_controller.cpp.

28  {
29  if (transmissionController == NULL) {
32  // TODO de-init here
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 initTransmissionController(), and update().


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