mirror of https://github.com/rusefi/rusefi-1.git
Starter is engaged on start-up in pull-up configuration #1969
maintainability
This commit is contained in:
parent
fe93dfd8df
commit
3878cbb550
|
@ -14,8 +14,8 @@ ButtonShiftController buttonShiftController;
|
|||
|
||||
|
||||
ButtonShiftController::ButtonShiftController() :
|
||||
debounceUp("up"),
|
||||
debounceDown("down")
|
||||
debounceUp("gear_up"),
|
||||
debounceDown("gear_down")
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
ButtonDebounce acDebounce("ac");
|
||||
ButtonDebounce acDebounce("ac_switch");
|
||||
|
||||
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
initMapDecoder(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
ButtonDebounce startStopButtonDebounce("start");
|
||||
ButtonDebounce startStopButtonDebounce("start_button");
|
||||
|
||||
void initStartStopButton(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
/* startCrankingDuration is efitimesec_t, so we need to multiply it by 1000 to get milliseconds*/
|
||||
|
|
|
@ -219,6 +219,16 @@ void EnginePins::unregisterPins() {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
void EnginePins::debug() {
|
||||
#if EFI_PROD_CODE
|
||||
RegisteredOutputPin * pin = registeredOutputHead;
|
||||
while (pin != nullptr) {
|
||||
scheduleMsg(logger, "%s %d", pin->registrationName, pin->currentLogicValue);
|
||||
pin = pin->next;
|
||||
}
|
||||
#endif // EFI_PROD_CODE
|
||||
}
|
||||
|
||||
void EnginePins::startPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
#if EFI_ENGINE_CONTROL
|
||||
startInjectionPins();
|
||||
|
@ -564,6 +574,8 @@ void initPrimaryPins(Logging *sharedLogger) {
|
|||
criticalErrorLedPort = getHwPort("CRITICAL", LED_CRITICAL_ERROR_BRAIN_PIN);
|
||||
criticalErrorLedPin = getHwPin("CRITICAL", LED_CRITICAL_ERROR_BRAIN_PIN);
|
||||
criticalErrorLedState = (LED_ERROR_BRAIN_PIN_MODE == INVERTED_OUTPUT) ? 0 : 1;
|
||||
|
||||
addConsoleAction("gpio_pins", EnginePins::debug);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
|
|
|
@ -145,8 +145,8 @@ public:
|
|||
void init(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void unregister();
|
||||
RegisteredOutputPin *next;
|
||||
private:
|
||||
const char *registrationName;
|
||||
private:
|
||||
short pinOffset;
|
||||
short pinModeOffset;
|
||||
bool isPinConfigurationChanged();
|
||||
|
@ -162,6 +162,7 @@ public:
|
|||
EnginePins();
|
||||
void startPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void reset();
|
||||
static void debug();
|
||||
bool stopPins();
|
||||
void unregisterPins();
|
||||
RegisteredOutputPin mainRelay;
|
||||
|
|
Loading…
Reference in New Issue