auto-sync
This commit is contained in:
parent
9743a75d7c
commit
2edf54e6a1
|
@ -181,8 +181,8 @@ static void printSensors(Logging *log, bool fileFormat) {
|
||||||
reportSensorF(log, fileFormat, "vss", "kph", getVehicleSpeed(), 2);
|
reportSensorF(log, fileFormat, "vss", "kph", getVehicleSpeed(), 2);
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
reportSensorF(log, fileFormat, "vref", "V", getVRef(engineConfiguration), 2);
|
// reportSensorF(log, fileFormat, "vref", "V", getVRef(engineConfiguration), 2);
|
||||||
reportSensorF(log, fileFormat, "vbatt", "V", getVBatt(engineConfiguration), 2);
|
reportSensorF(log, fileFormat, "vbatt", "V", getVBatt(PASS_ENGINE_PARAMETER_F), 2);
|
||||||
|
|
||||||
reportSensorF(log, fileFormat, "TP", "%", getTPS(PASS_ENGINE_PARAMETER_F), 2);
|
reportSensorF(log, fileFormat, "TP", "%", getTPS(PASS_ENGINE_PARAMETER_F), 2);
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
tsOutputChannels->massAirFlowValue = getRealMaf();
|
tsOutputChannels->massAirFlowValue = getRealMaf();
|
||||||
tsOutputChannels->veValue = veMap.getValue(getMap(), rpm);
|
tsOutputChannels->veValue = veMap.getValue(getMap(), rpm);
|
||||||
tsOutputChannels->airFuelRatio = getAfr();
|
tsOutputChannels->airFuelRatio = getAfr();
|
||||||
tsOutputChannels->vBatt = getVBatt(engineConfiguration);
|
tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_F);
|
||||||
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
|
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
|
||||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||||
tsOutputChannels->baroPressure = getBaroPressure();
|
tsOutputChannels->baroPressure = getBaroPressure();
|
||||||
|
|
|
@ -41,7 +41,7 @@ void Engine::updateSlowSensors() {
|
||||||
engineState.iat = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
|
engineState.iat = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
|
||||||
engineState.clt = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
engineState.clt = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
injectorLagMs = getInjectorLag(getVBatt(engineConfiguration) PASS_ENGINE_PARAMETER);
|
injectorLagMs = getInjectorLag(getVBatt(PASS_ENGINE_PARAMETER_F) PASS_ENGINE_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::onTriggerEvent(uint64_t nowNt) {
|
void Engine::onTriggerEvent(uint64_t nowNt) {
|
||||||
|
|
|
@ -36,9 +36,9 @@ static msg_t AltCtrlThread(int param) {
|
||||||
while (true) {
|
while (true) {
|
||||||
chThdSleepMilliseconds(boardConfiguration->alternatorDT);
|
chThdSleepMilliseconds(boardConfiguration->alternatorDT);
|
||||||
|
|
||||||
currentAltDuty = engineConfiguration->alternatorOffset + altPid.getValue(boardConfiguration->targetVBatt, getVBatt(engineConfiguration), 1);
|
currentAltDuty = engineConfiguration->alternatorOffset + altPid.getValue(boardConfiguration->targetVBatt, getVBatt(PASS_ENGINE_PARAMETER_F), 1);
|
||||||
if (boardConfiguration->isVerboseAlternator) {
|
if (boardConfiguration->isVerboseAlternator) {
|
||||||
scheduleMsg(logger, "alt duty: %f/vbatt=%f/p=%f/i=%f/d=%f int=%f", currentAltDuty, getVBatt(engineConfiguration),
|
scheduleMsg(logger, "alt duty: %f/vbatt=%f/p=%f/i=%f/d=%f int=%f", currentAltDuty, getVBatt(PASS_ENGINE_PARAMETER_F),
|
||||||
altPid.getP(), altPid.getI(), altPid.getD(), altPid.getIntegration());
|
altPid.getP(), altPid.getI(), altPid.getD(), altPid.getIntegration());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ void showAltInfo(void) {
|
||||||
boardConfiguration->alternatorDT);
|
boardConfiguration->alternatorDT);
|
||||||
scheduleMsg(logger, "p=%f/i=%f/d=%f offset=%f", engineConfiguration->alternatorControlPFactor,
|
scheduleMsg(logger, "p=%f/i=%f/d=%f offset=%f", engineConfiguration->alternatorControlPFactor,
|
||||||
0, 0, engineConfiguration->alternatorOffset); // todo: i & d
|
0, 0, engineConfiguration->alternatorOffset); // todo: i & d
|
||||||
scheduleMsg(logger, "vbatt=%f/duty=%f/target=%f", getVBatt(engineConfiguration), currentAltDuty,
|
scheduleMsg(logger, "vbatt=%f/duty=%f/target=%f", getVBatt(PASS_ENGINE_PARAMETER_F), currentAltDuty,
|
||||||
boardConfiguration->targetVBatt);
|
boardConfiguration->targetVBatt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action) {
|
||||||
case LE_METHOD_FAN:
|
case LE_METHOD_FAN:
|
||||||
return enginePins.fanRelay.getLogicValue();
|
return enginePins.fanRelay.getLogicValue();
|
||||||
case LE_METHOD_AC_TOGGLE:
|
case LE_METHOD_AC_TOGGLE:
|
||||||
return getAcToggle(engine);
|
return getAcToggle(PASS_ENGINE_PARAMETER_F);
|
||||||
case LE_METHOD_COOLANT:
|
case LE_METHOD_COOLANT:
|
||||||
return getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
return getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
|
||||||
case LE_METHOD_INTAKE_AIR:
|
case LE_METHOD_INTAKE_AIR:
|
||||||
|
@ -82,7 +82,7 @@ float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action) {
|
||||||
case LE_METHOD_FAN_ON_SETTING:
|
case LE_METHOD_FAN_ON_SETTING:
|
||||||
return engineConfiguration->fanOnTemperature;
|
return engineConfiguration->fanOnTemperature;
|
||||||
case LE_METHOD_VBATT:
|
case LE_METHOD_VBATT:
|
||||||
return getVBatt(engine->engineConfiguration);
|
return getVBatt(PASS_ENGINE_PARAMETER_F);
|
||||||
default:
|
default:
|
||||||
warning(OBD_PCM_Processor_Fault, "FSIO unexpected %d", action);
|
warning(OBD_PCM_Processor_Fault, "FSIO unexpected %d", action);
|
||||||
return NAN;
|
return NAN;
|
||||||
|
|
|
@ -103,7 +103,7 @@ void initLcdController(void) {
|
||||||
static char * prepareVBattMapLine(engine_configuration_s *engineConfiguration, char *buffer) {
|
static char * prepareVBattMapLine(engine_configuration_s *engineConfiguration, char *buffer) {
|
||||||
char *ptr = buffer;
|
char *ptr = buffer;
|
||||||
*ptr++ = 'V';
|
*ptr++ = 'V';
|
||||||
ptr = ftoa(ptr, getVBatt(engineConfiguration), 10.0f);
|
ptr = ftoa(ptr, getVBatt(PASS_ENGINE_PARAMETER_F), 10.0f);
|
||||||
|
|
||||||
ptr = appendStr(ptr, " M");
|
ptr = appendStr(ptr, " M");
|
||||||
ptr = ftoa(ptr, getRawMap(), 10.0f);
|
ptr = ftoa(ptr, getRawMap(), 10.0f);
|
||||||
|
@ -228,7 +228,7 @@ static void showLine(lcd_line_e line, int screenY) {
|
||||||
lcdPrintf("Throttle %f%%", getTPS());
|
lcdPrintf("Throttle %f%%", getTPS());
|
||||||
return;
|
return;
|
||||||
case LL_VBATT:
|
case LL_VBATT:
|
||||||
lcdPrintf("Battery %fv", getVBatt(engineConfiguration));
|
lcdPrintf("Battery %fv", getVBatt(PASS_ENGINE_PARAMETER_F));
|
||||||
return;
|
return;
|
||||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||||
case LL_BARO:
|
case LL_BARO:
|
||||||
|
|
|
@ -10,14 +10,15 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
|
|
||||||
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
||||||
initThermistors(sharedLogger PASS_ENGINE_PARAMETER);
|
initThermistors(sharedLogger PASS_ENGINE_PARAMETER);
|
||||||
initMapDecoder(PASS_ENGINE_PARAMETER_F);
|
initMapDecoder(PASS_ENGINE_PARAMETER_F);
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: move this somewhere else? maybe.
|
// todo: move this somewhere else? maybe.
|
||||||
bool getAcToggle(Engine *engine) {
|
bool getAcToggle(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
|
||||||
/**
|
/**
|
||||||
* todo: make this flexible
|
* todo: make this flexible
|
||||||
*
|
*
|
||||||
|
|
|
@ -27,6 +27,6 @@
|
||||||
|
|
||||||
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
void initSensors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S);
|
||||||
|
|
||||||
bool getAcToggle(Engine *engine);
|
bool getAcToggle(DECLARE_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
#endif /*SENSORS_H_*/
|
#endif /*SENSORS_H_*/
|
||||||
|
|
|
@ -8,14 +8,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine.h"
|
||||||
#include "adc_inputs.h"
|
#include "adc_inputs.h"
|
||||||
#include "voltage.h"
|
#include "voltage.h"
|
||||||
|
|
||||||
float getVRef(engine_configuration_s *engineConfiguration) {
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
|
float getVRef(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
return getVoltageDivided("vref", engineConfiguration->vRefAdcChannel);
|
return getVoltageDivided("vref", engineConfiguration->vRefAdcChannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
float getVBatt(engine_configuration_s *engineConfiguration) {
|
float getVBatt(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
return getVoltage("vbatt", engineConfiguration->vbattAdcChannel) * engineConfiguration->vbattDividerCoeff;
|
return getVoltage("vbatt", engineConfiguration->vbattAdcChannel) * engineConfiguration->vbattDividerCoeff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
|
||||||
float getVRef(engine_configuration_s *engineConfiguration);
|
float getVRef(DECLARE_ENGINE_PARAMETER_F);
|
||||||
float getVBatt(engine_configuration_s *engineConfiguration);
|
float getVBatt(DECLARE_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -200,7 +200,7 @@ int getInternalAdcValue(const char *msg, adc_channel_e hwChannel) {
|
||||||
return fastAdc.samples[internalIndex];
|
return fastAdc.samples[internalIndex];
|
||||||
}
|
}
|
||||||
if (adcHwChannelEnabled[hwChannel] != ADC_SLOW) {
|
if (adcHwChannelEnabled[hwChannel] != ADC_SLOW) {
|
||||||
warning(OBD_PCM_Processor_Fault, "ADC is off %d", hwChannel);
|
warning(OBD_PCM_Processor_Fault, "ADC is off [%s] index=%d", msg, hwChannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
return slowAdc.getAdcValueByHwChannel(hwChannel);
|
return slowAdc.getAdcValueByHwChannel(hwChannel);
|
||||||
|
@ -492,6 +492,7 @@ static void configureInputs(void) {
|
||||||
addChannel("hip", engineConfiguration->hipOutputChannel, ADC_FAST);
|
addChannel("hip", engineConfiguration->hipOutputChannel, ADC_FAST);
|
||||||
|
|
||||||
addChannel("VBatt", engineConfiguration->vbattAdcChannel, ADC_SLOW);
|
addChannel("VBatt", engineConfiguration->vbattAdcChannel, ADC_SLOW);
|
||||||
|
addChannel("Vref", engineConfiguration->vRefAdcChannel, ADC_SLOW);
|
||||||
addChannel("CLT", engineConfiguration->clt.adcChannel, ADC_SLOW);
|
addChannel("CLT", engineConfiguration->clt.adcChannel, ADC_SLOW);
|
||||||
addChannel("IAT", engineConfiguration->iat.adcChannel, ADC_SLOW);
|
addChannel("IAT", engineConfiguration->iat.adcChannel, ADC_SLOW);
|
||||||
addChannel("AFR", engineConfiguration->afr.hwChannel, ADC_SLOW);
|
addChannel("AFR", engineConfiguration->afr.hwChannel, ADC_SLOW);
|
||||||
|
|
|
@ -291,5 +291,5 @@ int getRusEfiVersion(void) {
|
||||||
return 123; // this is here to make the compiler happy about the unused array
|
return 123; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||||
return 3211; // this is here to make the compiler happy about the unused array
|
return 3211; // this is here to make the compiler happy about the unused array
|
||||||
return 20150522;
|
return 20150523;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see com.rusefi.StartupFrame
|
* @see com.rusefi.StartupFrame
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20150520;
|
public static final int CONSOLE_VERSION = 20150523;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
private static final String TAB_INDEX = "main_tab";
|
private static final String TAB_INDEX = "main_tab";
|
||||||
protected static final String PORT_KEY = "port";
|
protected static final String PORT_KEY = "port";
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class RecentCommands {
|
||||||
private static final String TSINFO = "tsinfo";
|
private static final String TSINFO = "tsinfo";
|
||||||
private static final String FUELINFO = "fuelinfo";
|
private static final String FUELINFO = "fuelinfo";
|
||||||
private static final String TEMPINFO = "tempinfo";
|
private static final String TEMPINFO = "tempinfo";
|
||||||
|
private static final String HIPINFO = "hipinfo";
|
||||||
|
|
||||||
private final static Map<String, Icon> COMMAND_ICONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
private final static Map<String, Icon> COMMAND_ICONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ public class RecentCommands {
|
||||||
COMMAND_ICONS.put(TSINFO, infoIcon);
|
COMMAND_ICONS.put(TSINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(TEMPINFO, infoIcon);
|
COMMAND_ICONS.put(TEMPINFO, infoIcon);
|
||||||
|
COMMAND_ICONS.put(HIPINFO, infoIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
||||||
|
@ -112,6 +114,7 @@ public class RecentCommands {
|
||||||
add(ACCELINFO);
|
add(ACCELINFO);
|
||||||
add(FUELINFO);
|
add(FUELINFO);
|
||||||
add(TEMPINFO);
|
add(TEMPINFO);
|
||||||
|
add(HIPINFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(String command) {
|
public void add(String command) {
|
||||||
|
|
|
@ -95,7 +95,7 @@ void testFuelMap(void) {
|
||||||
assertEqualsM("IAT", 2, iatCorrection);
|
assertEqualsM("IAT", 2, iatCorrection);
|
||||||
float cltCorrection = getCltCorrection(getCoolantTemperature(PASS_ENGINE_PARAMETER_F) PASS_ENGINE_PARAMETER);
|
float cltCorrection = getCltCorrection(getCoolantTemperature(PASS_ENGINE_PARAMETER_F) PASS_ENGINE_PARAMETER);
|
||||||
assertEqualsM("CLT", 1, cltCorrection);
|
assertEqualsM("CLT", 1, cltCorrection);
|
||||||
float injectorLag = getInjectorLag(getVBatt(engineConfiguration) PASS_ENGINE_PARAMETER);
|
float injectorLag = getInjectorLag(getVBatt(PASS_ENGINE_PARAMETER_F) PASS_ENGINE_PARAMETER);
|
||||||
assertEquals(0, injectorLag);
|
assertEquals(0, injectorLag);
|
||||||
|
|
||||||
testMafValue = 5;
|
testMafValue = 5;
|
||||||
|
|
Loading…
Reference in New Issue