auto-sync
This commit is contained in:
parent
d2abfea5fb
commit
f7835b3df1
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "mazda_miata.h"
|
#include "mazda_miata.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
#include "advance_map.h"
|
||||||
|
|
||||||
// setFrankenso_01_LCD
|
// setFrankenso_01_LCD
|
||||||
#include "honda_accord.h"
|
#include "honda_accord.h"
|
||||||
|
@ -259,7 +260,7 @@ void setMiata1994(engine_configuration_s *engineConfiguration, board_configurati
|
||||||
|
|
||||||
boardConfiguration->fuelPumpPin = GPIOE_4;
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
||||||
|
|
||||||
boardConfiguration->injectionPins[0] = GPIO_NONE;
|
boardConfiguration->injectionPins[0] = GPIOD_7;
|
||||||
boardConfiguration->injectionPins[1] = GPIOE_2;
|
boardConfiguration->injectionPins[1] = GPIOE_2;
|
||||||
boardConfiguration->injectionPins[2] = GPIOB_8;
|
boardConfiguration->injectionPins[2] = GPIOB_8;
|
||||||
boardConfiguration->injectionPins[3] = GPIOB_7;
|
boardConfiguration->injectionPins[3] = GPIOB_7;
|
||||||
|
|
|
@ -8,19 +8,10 @@
|
||||||
#ifndef ADVANCE_H_
|
#ifndef ADVANCE_H_
|
||||||
#define ADVANCE_H_
|
#define ADVANCE_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#define AD_LOAD_COUNT 16
|
#define AD_LOAD_COUNT 16
|
||||||
#define AD_RPM_COUNT 16
|
#define AD_RPM_COUNT 16
|
||||||
|
|
||||||
float getAdvance(int rpm, float engineLoad);
|
float getAdvance(int rpm, float engineLoad);
|
||||||
void prepareTimingMap(void);
|
void prepareTimingMap(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* ADVANCE_H_ */
|
#endif /* ADVANCE_H_ */
|
||||||
|
|
|
@ -28,6 +28,8 @@ typedef struct {
|
||||||
short int crankingRpm;
|
short int crankingRpm;
|
||||||
} cranking_parameters_s;
|
} cranking_parameters_s;
|
||||||
|
|
||||||
|
#define INJECTION_PIN_COUNT 12
|
||||||
|
|
||||||
#define FUEL_RPM_COUNT 16
|
#define FUEL_RPM_COUNT 16
|
||||||
#define FUEL_LOAD_COUNT 16
|
#define FUEL_LOAD_COUNT 16
|
||||||
#define VE_RPM_COUNT 16
|
#define VE_RPM_COUNT 16
|
||||||
|
@ -115,7 +117,7 @@ typedef struct {
|
||||||
brain_pin_e fuelPumpPin;
|
brain_pin_e fuelPumpPin;
|
||||||
pin_output_mode_e fuelPumpPinMode;
|
pin_output_mode_e fuelPumpPinMode;
|
||||||
|
|
||||||
brain_pin_e injectionPins[12];
|
brain_pin_e injectionPins[INJECTION_PIN_COUNT];
|
||||||
pin_output_mode_e injectionPinMode;
|
pin_output_mode_e injectionPinMode;
|
||||||
|
|
||||||
brain_pin_e ignitionPins[12];
|
brain_pin_e ignitionPins[12];
|
||||||
|
|
|
@ -428,6 +428,20 @@ static void setPotSpi(int spi) {
|
||||||
boardConfiguration->digitalPotentiometerSpiDevice = (spi_device_e) spi;
|
boardConfiguration->digitalPotentiometerSpiDevice = (spi_device_e) spi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
||||||
|
int index = atoi(indexStr);
|
||||||
|
if (index < 0 || index > INJECTION_PIN_COUNT)
|
||||||
|
return;
|
||||||
|
brain_pin_e pin = parseBrainPin(pinName);
|
||||||
|
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||||
|
if (pin == GPIO_INVALID) {
|
||||||
|
scheduleMsg(&logger, "invalid pin name [%s]", pinName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scheduleMsg(&logger, "setting injection pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
|
boardConfiguration->injectionPins[index] = pin;
|
||||||
|
}
|
||||||
|
|
||||||
static void setTriggerInputPin(const char *indexStr, const char *pinName) {
|
static void setTriggerInputPin(const char *indexStr, const char *pinName) {
|
||||||
int index = atoi(indexStr);
|
int index = atoi(indexStr);
|
||||||
if (index < 0 || index > 2)
|
if (index < 0 || index > 2)
|
||||||
|
@ -673,6 +687,7 @@ void initSettings(void) {
|
||||||
addConsoleActionF("set_vbatt_divider", setVBattDivider);
|
addConsoleActionF("set_vbatt_divider", setVBattDivider);
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
addConsoleActionSS("set_injection_pin", setInjectionPin);
|
||||||
addConsoleActionSS("set_trigger_input_pin", setTriggerInputPin);
|
addConsoleActionSS("set_trigger_input_pin", setTriggerInputPin);
|
||||||
addConsoleActionSS("set_trigger_simulator_pin", setTriggerSimulatorPin);
|
addConsoleActionSS("set_trigger_simulator_pin", setTriggerSimulatorPin);
|
||||||
addConsoleActionSS("set_trigger_simulator_mode", setTriggerSimulatorMode);
|
addConsoleActionSS("set_trigger_simulator_mode", setTriggerSimulatorMode);
|
||||||
|
|
Loading…
Reference in New Issue