mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
ca2b169066
commit
2ae8edf14a
|
@ -65,8 +65,6 @@
|
|||
*/
|
||||
#define EFI_SHAFT_POSITION_INPUT TRUE
|
||||
|
||||
#define EFI_ANALOG_INPUTS TRUE
|
||||
|
||||
/**
|
||||
* Maybe we are just sniffing what's going on?
|
||||
*/
|
||||
|
|
|
@ -557,7 +557,9 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
|
|||
tsOutputChannels->airFuelRatio = getAfr();
|
||||
tsOutputChannels->v_batt = getVBatt(engineConfiguration);
|
||||
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
|
||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||
tsOutputChannels->atmospherePressure = getBaroPressure();
|
||||
#endif /* EFI_ANALOG_SENSORS */
|
||||
tsOutputChannels->manifold_air_pressure = getMap();
|
||||
tsOutputChannels->engineLoad = engineLoad;
|
||||
tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration();
|
||||
|
@ -565,9 +567,12 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
|
|||
tsOutputChannels->minDelta = engine->accelEnrichment.minDelta;
|
||||
|
||||
tsOutputChannels->checkEngine = hasErrorCodes();
|
||||
#if EFI_PROD_CODE
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
|
||||
#if EFI_MAX_31855 || defined(__DOXYGEN__)
|
||||
for (int i = 0; i < EGT_CHANNEL_COUNT; i++)
|
||||
tsOutputChannels->egtValues.values[i] = getEgtValue(i);
|
||||
#endif /* EFI_MAX_31855 */
|
||||
|
||||
tsOutputChannels->needBurn = getNeedToWriteConfiguration();
|
||||
tsOutputChannels->hasSdCard = isSdCardAlive();
|
||||
|
@ -579,10 +584,13 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
|
|||
tsOutputChannels->cylinder_cleanup_enabled = engineConfiguration->isCylinderCleanupEnabled;
|
||||
tsOutputChannels->cylinder_cleanup_activated = engine->isCylinderCleanupMode;
|
||||
tsOutputChannels->secondTriggerChannelEnabled = engineConfiguration->secondTriggerChannelEnabled;
|
||||
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
||||
tsOutputChannels->vehicleSpeedKph = getVehicleSpeed();
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
tsOutputChannels->isCltError = !isValidCoolantTemperature(getCoolantTemperature(engine));
|
||||
tsOutputChannels->isIatError = !isValidIntakeAirTemperature(getIntakeAirTemperature(engine));
|
||||
#endif
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
tsOutputChannels->clutchUpState = engine->clutchUpState;
|
||||
tsOutputChannels->clutchDownState = engine->clutchDownState;
|
||||
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
|
||||
|
|
|
@ -219,7 +219,11 @@ void initMapAveraging(Logging *sharedLogger, Engine *engine) {
|
|||
#else
|
||||
|
||||
float getMap(void) {
|
||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||
return getRawMap();
|
||||
#else
|
||||
return NAN;
|
||||
#endif /* EFI_ANALOG_SENSORS */
|
||||
}
|
||||
|
||||
#endif /* EFI_MAP_AVERAGING */
|
||||
|
|
|
@ -110,4 +110,9 @@ void initMapDecoder(DECLARE_ENGINE_PARAMETER_F) {
|
|||
//engine->configurationListeners.registerCallback(applyConfiguration);
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
|
||||
void initMapDecoder(DECLARE_ENGINE_PARAMETER_F) {
|
||||
}
|
||||
|
||||
#endif /* EFI_ANALOG_SENSORS */
|
||||
|
|
|
@ -367,14 +367,12 @@ static void printThermistor(const char *msg, Thermistor *thermistor) {
|
|||
scheduleMsg(&logger, "@%s", getPinNameByAdcChannel(adcChannel, pinNameBuffer));
|
||||
scheduleMsg(&logger, "bias=%f A=%..100000f B=%..100000f C=%..100000f", thermistor->config->bias_resistor,
|
||||
thermistor->config->s_h_a, thermistor->config->s_h_b, thermistor->config->s_h_c);
|
||||
//#if EFI_ANALOG_INPUTS
|
||||
scheduleMsg(&logger, "==============================");
|
||||
//#endif
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
static void printMAPInfo(void) {
|
||||
#if EFI_ANALOG_INPUTS
|
||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||
scheduleMsg(&logger, "map type=%d raw=%f MAP=%f", engineConfiguration->map.sensor.type, getRawMap(), getMap());
|
||||
if (engineConfiguration->map.sensor.type == MT_CUSTOM) {
|
||||
scheduleMsg(&logger, "at0=%f at5=%f", engineConfiguration->map.sensor.valueAt0,
|
||||
|
@ -386,7 +384,7 @@ static void printMAPInfo(void) {
|
|||
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->baroSensor.valueAt0,
|
||||
engineConfiguration->baroSensor.valueAt5);
|
||||
}
|
||||
#endif
|
||||
#endif /* EFI_ANALOG_SENSORS */
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
|
|
|
@ -288,9 +288,11 @@ void triggerInfo(Engine *engine) {
|
|||
|
||||
if (engine->triggerShape.needSecondTriggerInput) {
|
||||
scheduleMsg(logger, "secondary trigger input: %s", hwPortname(boardConfiguration->triggerInputPins[1]));
|
||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||
scheduleMsg(logger, "secondary trigger simulator: %s %s phase=%d",
|
||||
hwPortname(boardConfiguration->triggerSimulatorPins[1]),
|
||||
getPin_output_mode_e(boardConfiguration->triggerSimulatorPinModes[1]), triggerSignal.safe.phaseIndex);
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
}
|
||||
// scheduleMsg(logger, "3rd trigger simulator: %s %s", hwPortname(boardConfiguration->triggerSimulatorPins[2]),
|
||||
// getPin_output_mode_e(boardConfiguration->triggerSimulatorPinModes[2]));
|
||||
|
|
|
@ -72,9 +72,6 @@ static bool isEmulating = true;
|
|||
static Logging *logger;
|
||||
static LocalVersionHolder emulatorConfigVersion;
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
||||
#if EFI_WAVE_CHART
|
||||
#include "wave_chart.h"
|
||||
extern WaveChart waveChart;
|
||||
|
|
|
@ -280,7 +280,7 @@ static void timeInfo(void) {
|
|||
static void runChibioTest(void) {
|
||||
print("EFI_SHAFT_POSITION_INPUT=%d\r\n", EFI_SHAFT_POSITION_INPUT);
|
||||
print("EFI_EMULATE_POSITION_SENSORS=%d\r\n", EFI_EMULATE_POSITION_SENSORS);
|
||||
print("EFI_ANALOG_INPUTS=%d\r\n", EFI_ANALOG_INPUTS);
|
||||
print("EFI_ANALOG_SENSORS=%d\r\n", EFI_ANALOG_SENSORS);
|
||||
print("EFI_INTERNAL_ADC=%d\r\n", EFI_INTERNAL_ADC);
|
||||
print("EFI_HD44780_LCD=%d\r\n", EFI_HD44780_LCD);
|
||||
print("EFI_MAP_AVERAGING=%d\r\n", EFI_MAP_AVERAGING);
|
||||
|
|
|
@ -129,6 +129,7 @@ static void canMazdaRX8(void) {
|
|||
|
||||
commonTxInit(CAN_MAZDA_RX_RPM_SPEED);
|
||||
|
||||
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
||||
float kph = getVehicleSpeed();
|
||||
|
||||
setShortValue(&txmsg, SWAP_UINT16(engine_rpm * 4), 0);
|
||||
|
@ -136,6 +137,7 @@ static void canMazdaRX8(void) {
|
|||
setShortValue(&txmsg, SWAP_UINT16((int )(100 * kph + 10000)), 4);
|
||||
setShortValue(&txmsg, 0, 6);
|
||||
sendMessage();
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
|
||||
commonTxInit(CAN_MAZDA_RX_STATUS_2);
|
||||
txmsg.data8[0] = 0xFE; //Unknown
|
||||
|
|
Loading…
Reference in New Issue