auto-sync

This commit is contained in:
rusEfi 2015-04-26 12:04:47 -04:00
parent 74a1c2d9fe
commit 756006d95e
4 changed files with 16 additions and 8 deletions

View File

@ -82,7 +82,7 @@ extern board_configuration_s *boardConfiguration;
extern bool hasFirmwareErrorFlag;
#define FULL_LOGGING_KEY "fl"
static char LOGGING_BUFFER[700];
static char LOGGING_BUFFER[1400];
static Logging logger("status loop", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
static void setWarningEnabled(int value) {
@ -167,7 +167,7 @@ static void printSensors(Logging *log, bool fileFormat) {
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
if (engineConfiguration->hasMapSensor) {
reportSensorF(log, fileFormat, "MAP", "kPa", getMap(), 2);
reportSensorF(log, fileFormat, "map_r", "V", getRawMap(), 2);
// reportSensorF(log, fileFormat, "map_r", "V", getRawMap(), 2);
}
if (engineConfiguration->hasBaroSensor) {
reportSensorF(log, fileFormat, "baro", "kPa", getBaroPressure(), 2);

View File

@ -613,15 +613,22 @@ static void setIdlePin(const char *pinName) {
boardConfiguration->idle.solenoidPin = pin;
}
static void setFuelPumpPin(const char *pinName) {
static void setIndividualPin(const char *pinName, brain_pin_e *targetPin, const char *name) {
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 fuelPump pin to %s please save&restart", hwPortname(pin));
boardConfiguration->fuelPumpPin = pin;
scheduleMsg(&logger, "setting %s pin to %s please save&restart", name, hwPortname(pin));
*targetPin = pin;
}
static void setACPin(const char *pinName) {
setIndividualPin(pinName, &boardConfiguration->acRelayPin, "A/C");
}
static void setFuelPumpPin(const char *pinName) {
setIndividualPin(pinName, &boardConfiguration->fuelPumpPin, "fuelPump");
}
static void setInjectionPin(const char *indexStr, const char *pinName) {
@ -991,6 +998,7 @@ void initSettings(engine_configuration_s *engineConfiguration) {
addConsoleActionSS("set_trigger_simulator_mode", setTriggerSimulatorMode);
addConsoleActionS("set_fuel_pump_pin", setFuelPumpPin);
addConsoleActionS("set_ac_pin", setACPin);
addConsoleActionS("set_idle_pin", setIdlePin);
addConsoleAction("mapinfo", printMAPInfo);

View File

@ -290,5 +290,5 @@ int getRusEfiVersion(void) {
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
return 20150425;
return 20150426;
}

View File

@ -318,7 +318,7 @@ Logging::Logging() {
Logging::Logging(char const *name, char *buffer, int bufferSize) {
baseConstructor();
#if ! EFI_UNIT_TEST
initLoggingExt(this, "settings control", buffer, bufferSize);
initLoggingExt(this, name, buffer, bufferSize);
#endif /* ! EFI_UNIT_TEST */
}