TCU cherry

This commit is contained in:
rusefillc 2021-06-11 23:48:57 -04:00
parent cc2a7babc7
commit 4fa19b88a0
2 changed files with 13 additions and 1 deletions

View File

@ -275,7 +275,10 @@ typedef struct {
scaled_percent fuelTrim[2]; // 296 & 298
uint8_t unusedAtTheEnd[38]; // we have some unused bytes to allow compatible TS changes
uint8_t tcuCurrentState; // 299
uint8_t one; // 300
uint8_t unusedAtTheEnd[36]; // we have some unused bytes to allow compatible TS changes
// Temporary - will remove soon
TsDebugChannels* getDebugChannels() {

View File

@ -6,6 +6,7 @@
#include "engine_configuration_generated_structures.h"
#include "globalaccess.h"
#include "simple_tcu.h"
#include "debounce.h"
class GearControllerBase {
public:
@ -17,7 +18,15 @@ public:
private:
gear_e desiredGear = NEUTRAL;
protected:
adc_channel_e getAnalogInputPin(int);
brain_pin_e* getDigitalInputPin(int);
pin_input_mode_e* getDigitalInputPinMode(int);
int getInputRoleD();
int getInputRoleA();
ButtonDebounce tcuDigitalInputs[TCU_INPUT_COUNT];
adc_channel_e tcuAnalogInputs[TCU_INPUT_COUNT];
gear_e setDesiredGear(gear_e);
int getInputRole();
private:
void postState();