mirror of https://github.com/FOME-Tech/fome-fw.git
auto-sync
This commit is contained in:
parent
cc289c818d
commit
a5cd50b59a
|
@ -69,7 +69,7 @@ void setMazdaMiataNbEngineConfiguration(engine_configuration_s *engineConfigurat
|
|||
boardConfiguration->fanPinMode = OM_DEFAULT;
|
||||
|
||||
boardConfiguration->electronicThrottlePin1 = GPIO_UNASSIGNED;
|
||||
boardConfiguration->idleSwitchPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||
|
||||
// set_whole_fuel_map 3
|
||||
setWholeFuelMap(engineConfiguration, 3);
|
||||
|
|
|
@ -435,6 +435,10 @@ case Force_4b_pin_input_mode:
|
|||
return "Force_4b_pin_input_mode";
|
||||
case PI_DEFAULT:
|
||||
return "PI_DEFAULT";
|
||||
case PI_PULLUP:
|
||||
return "PI_PULLUP";
|
||||
case PI_PULLDOWN:
|
||||
return "PI_PULLDOWN";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -422,7 +422,8 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
boardConfiguration->fanPin = GPIOC_15;
|
||||
boardConfiguration->fanPinMode = OM_DEFAULT;
|
||||
|
||||
boardConfiguration->idleSwitchPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->clutchUpPin = GPIO_UNASSIGNED;
|
||||
|
||||
boardConfiguration->triggerSimulatorPins[0] = GPIOD_1;
|
||||
boardConfiguration->triggerSimulatorPins[1] = GPIOD_2;
|
||||
|
|
|
@ -146,10 +146,13 @@ typedef struct {
|
|||
pin_output_mode_e electronicThrottlePin1Mode;
|
||||
|
||||
/**
|
||||
* Idle switch input signal
|
||||
* some cars have a switch to indicate that clutch pedal is all the way down
|
||||
*/
|
||||
brain_pin_e idleSwitchPin;
|
||||
pin_input_mode_e idleSwitchPinMode;
|
||||
brain_pin_e clutchDownPin;
|
||||
/**
|
||||
* some cars have a switch to indicate that clutch pedal is all the way down
|
||||
*/
|
||||
pin_input_mode_e clutchDownPinMode;
|
||||
|
||||
brain_pin_e alternatorControlPin;
|
||||
pin_output_mode_e alternatorControlPinMode;
|
||||
|
@ -598,7 +601,12 @@ typedef struct {
|
|||
*/
|
||||
float cylinderBore;
|
||||
|
||||
int unused3[84];
|
||||
/**
|
||||
* Some vehicles have a switch to indicate that clutch pedal is all the way up
|
||||
*/
|
||||
brain_pin_e clutchUpPin;
|
||||
pin_input_mode_e clutchUpPinMode;
|
||||
int unused3[82];
|
||||
|
||||
} engine_configuration_s;
|
||||
|
||||
|
|
|
@ -238,6 +238,8 @@ typedef enum {
|
|||
|
||||
typedef enum {
|
||||
PI_DEFAULT = 0,
|
||||
PI_PULLUP = 1,
|
||||
PI_PULLDOWN = 2,
|
||||
|
||||
Force_4b_pin_input_mode = ENUM_SIZE_HACK,
|
||||
} pin_input_mode_e;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "engine_configuration.h"
|
||||
#include "engine.h"
|
||||
|
||||
#define FLASH_DATA_VERSION 6100
|
||||
#define FLASH_DATA_VERSION 6130
|
||||
|
||||
void readFromFlash(void);
|
||||
void initFlash(Engine *engine);
|
||||
|
|
|
@ -96,9 +96,9 @@ static msg_t ivThread(int param) {
|
|||
chThdSleepMilliseconds(boardConfiguration->idleThreadPeriod);
|
||||
|
||||
// this value is not used yet
|
||||
if (boardConfiguration->idleSwitchPin != GPIO_UNASSIGNED) {
|
||||
idleSwitchState = palReadPad(getHwPort(boardConfiguration->idleSwitchPin),
|
||||
getHwPin(boardConfiguration->idleSwitchPin));
|
||||
if (boardConfiguration->clutchDownPin != GPIO_UNASSIGNED) {
|
||||
idleSwitchState = palReadPad(getHwPort(boardConfiguration->clutchDownPin),
|
||||
getHwPin(boardConfiguration->clutchDownPin));
|
||||
}
|
||||
|
||||
if (engineConfiguration->idleMode != IM_AUTO)
|
||||
|
@ -149,8 +149,11 @@ void startIdleThread(Engine *engine) {
|
|||
|
||||
// this is idle switch INPUT - sometimes there is a switch on the throttle pedal
|
||||
// this switch is not used yet
|
||||
if (boardConfiguration->idleSwitchPin != GPIO_UNASSIGNED)
|
||||
mySetPadMode2("idle switch", boardConfiguration->idleSwitchPin, PAL_MODE_INPUT);
|
||||
if (boardConfiguration->clutchDownPin != GPIO_UNASSIGNED)
|
||||
mySetPadMode2("clutch down switch", boardConfiguration->clutchDownPin, PAL_MODE_INPUT);
|
||||
|
||||
if (engineConfiguration->clutchUpPin != GPIO_UNASSIGNED)
|
||||
mySetPadMode2("clutch up switch", engineConfiguration->clutchUpPin, PAL_MODE_INPUT);
|
||||
|
||||
addConsoleAction("idleinfo", showIdleInfo);
|
||||
addConsoleActionI("set_idle_rpm", setIdleRpmAction);
|
||||
|
|
Loading…
Reference in New Issue