auto-sync
This commit is contained in:
parent
cdc3fecc00
commit
836188c674
|
@ -38,18 +38,18 @@ void setMazda626EngineConfiguration(engine_configuration_s *engineConfiguration)
|
|||
|
||||
setCommonNTCSensor(&engineConfiguration->clt);
|
||||
engineConfiguration->clt.bias_resistor = 2700;
|
||||
// setCommonNTCSensor(&engineConfiguration->iat);
|
||||
// engineConfiguration->iat.bias_resistor = 2700;
|
||||
//
|
||||
setCommonNTCSensor(&engineConfiguration->iat);
|
||||
engineConfiguration->iat.bias_resistor = 2700;
|
||||
|
||||
commonFrankensoAnalogInputs(engineConfiguration);
|
||||
// engineConfiguration->hasTpsSensor = false;
|
||||
// engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
|
||||
//// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
// engineConfiguration->mafAdcChannel = EFI_ADC_0;
|
||||
// engineConfiguration->cltAdcChannel = EFI_ADC_12;
|
||||
// engineConfiguration->iatAdcChannel = EFI_ADC_11;
|
||||
//
|
||||
// // todo: 8.2 or 10k?
|
||||
// engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
engineConfiguration->hasTpsSensor = false;
|
||||
engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
|
||||
// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_0;
|
||||
engineConfiguration->cltAdcChannel = EFI_ADC_12;
|
||||
engineConfiguration->iatAdcChannel = EFI_ADC_11;
|
||||
|
||||
// todo: 8.2 or 10k?
|
||||
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
|
||||
}
|
||||
|
|
|
@ -83,6 +83,8 @@ int getTPS10bitAdc(DECLARE_ENGINE_PARAMETER_F) {
|
|||
if (mockTps != MOCK_UNDEFINED)
|
||||
return mockTps;
|
||||
#endif
|
||||
if(engineConfiguration->tpsAdcChannel==EFI_ADC_NONE)
|
||||
return -1;
|
||||
int adc = getAdcValue(engineConfiguration->tpsAdcChannel);
|
||||
return (int) adc / 4; // Only for TunerStudio compatibility. Max TS adc value in 1023
|
||||
}
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
|
||||
#define getAdcValue(channel) getMcp3208adc(channel)
|
||||
#define adcToVoltsDivided(adc) (5.0f / 4095 * adc)
|
||||
#define getVoltageDivided(channel) adcToVoltsDivided(getAdcValue(channel))
|
||||
#define getVoltageDivided(channel) (channel == EFI_ADC_NONE ? 66.66 : adcToVoltsDivided(getAdcValue(channel)))
|
||||
|
||||
#endif /* ADC_EXTERNAL_H_ */
|
||||
|
|
|
@ -115,7 +115,7 @@ ADC_TwoSamplingDelay_5Cycles, // cr1
|
|||
ADC_CR2_SWSTART, // cr2
|
||||
|
||||
0, // sample times for channels 10...18
|
||||
// todo: IS SOMETHING MISSING HERE?
|
||||
// todo: IS SOMETHING MISSING HERE?
|
||||
ADC_SMPR2_SMP_AN0(MY_SAMPLING_FAST), // In this field must be specified the sample times for channels 0...9
|
||||
|
||||
0, // Conversion group sequence 13...16 + sequence length
|
||||
|
@ -181,6 +181,11 @@ static void pwmpcb_fast(PWMDriver *pwmp) {
|
|||
}
|
||||
|
||||
int getInternalAdcValue(adc_channel_e hwChannel) {
|
||||
if (hwChannel == EFI_ADC_NONE) {
|
||||
firmwareError("should not be asking for NONE");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (boardConfiguration->adcHwChannelEnabled[hwChannel] == ADC_FAST) {
|
||||
int internalIndex = fastAdc.internalAdcIndexByHardwareIndex[hwChannel];
|
||||
return fastAdc.samples[internalIndex];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by Version2Header
|
||||
// Thu Feb 19 07:53:56 EST 2015
|
||||
// Sun Feb 22 23:12:26 EST 2015
|
||||
#ifndef VCS_VERSION
|
||||
#define VCS_VERSION "6949"
|
||||
#define VCS_VERSION "6979"
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="CmdLine" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.rusefi.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.CmdLine" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="ui" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,7 +1,5 @@
|
|||
package com.rusefi;
|
||||
|
||||
import com.rusefi.FileLog;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.rusefi;
|
||||
|
||||
/**
|
||||
* this test connects to real hardware via serial port
|
||||
* (c) Andrey Belomutskiy 2013-2015
|
||||
* 2/22/2015
|
||||
*/
|
||||
public class RealHwTest {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ public class EngineState {
|
|||
};
|
||||
public static final String PACKING_DELIMITER = ":";
|
||||
public static final String RUS_EFI_VERSION_TAG = "rusEfiVersion";
|
||||
public static final String OUTPIN_TAG = "outpin";
|
||||
/**
|
||||
* If we get this tag we have probably connected to the wrong port
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,7 @@ public class CmdLine {
|
|||
LinkManager.start(port);
|
||||
LinkManager.open();
|
||||
LinkManager.engineState.registerStringValueAction(EngineState.RUS_EFI_VERSION_TAG, (EngineState.ValueCallback<String>) EngineState.ValueCallback.VOID);
|
||||
LinkManager.engineState.registerStringValueAction(EngineState.OUTPIN_TAG, (EngineState.ValueCallback<String>) EngineState.ValueCallback.VOID);
|
||||
|
||||
IoUtil.sendCommand(command);
|
||||
System.out.println("Done!");
|
||||
|
|
|
@ -71,7 +71,7 @@ public class EngineSnifferPanel {
|
|||
private boolean isPaused;
|
||||
|
||||
public EngineSnifferPanel(Node config) {
|
||||
LinkManager.engineState.registerStringValueAction("outpin", new EngineState.ValueCallback<String>() {
|
||||
LinkManager.engineState.registerStringValueAction(EngineState.OUTPIN_TAG, new EngineState.ValueCallback<String>() {
|
||||
@Override
|
||||
public void onUpdate(String value) {
|
||||
String pinInfo[] = value.split("@");
|
||||
|
|
Loading…
Reference in New Issue