mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
dc3d613a01
commit
b0a1b3831f
|
@ -97,7 +97,8 @@ typedef struct {
|
||||||
float fuelLevel;
|
float fuelLevel;
|
||||||
float knockLevel;
|
float knockLevel;
|
||||||
int totalTriggerErrorCounter;
|
int totalTriggerErrorCounter;
|
||||||
int unused3[9];
|
float wallFuelAmount;
|
||||||
|
int unused3[8];
|
||||||
} TunerStudioOutputChannels;
|
} TunerStudioOutputChannels;
|
||||||
|
|
||||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||||
|
|
|
@ -385,7 +385,7 @@ void updateDevConsoleState(Engine *engine) {
|
||||||
scheduleLogging(&logger);
|
scheduleLogging(&logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* command example:
|
* command example:
|
||||||
|
@ -428,7 +428,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
|
||||||
static void showFuelInfo(void) {
|
static void showFuelInfo(void) {
|
||||||
showFuelInfo2((float) getRpmE(engine), getEngineLoadT(PASS_ENGINE_PARAMETER_F));
|
showFuelInfo2((float) getRpmE(engine), getEngineLoadT(PASS_ENGINE_PARAMETER_F));
|
||||||
}
|
}
|
||||||
|
@ -453,12 +453,12 @@ extern engine_pins_s enginePins;
|
||||||
static OutputPin *leds[] = { &warningPin, &runningPin, &enginePins.errorLedPin, &communicationPin, &checkEnginePin };
|
static OutputPin *leds[] = { &warningPin, &runningPin, &enginePins.errorLedPin, &communicationPin, &checkEnginePin };
|
||||||
|
|
||||||
static void initStatisLeds() {
|
static void initStatisLeds() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
outputPinRegister("communication status 1", &communicationPin,
|
outputPinRegister("communication status 1", &communicationPin,
|
||||||
LED_COMMUNICATION_PORT, LED_COMMUNICATION_PIN);
|
LED_COMMUNICATION_PORT, LED_COMMUNICATION_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_WARNING_LED
|
#if EFI_WARNING_LED || defined(__DOXYGEN__)
|
||||||
outputPinRegister("warning", &warningPin, LED_WARNING_PORT,
|
outputPinRegister("warning", &warningPin, LED_WARNING_PORT,
|
||||||
LED_WARNING_PIN);
|
LED_WARNING_PIN);
|
||||||
outputPinRegister("is running status", &runningPin, LED_RUNNING_STATUS_PORT,
|
outputPinRegister("is running status", &runningPin, LED_RUNNING_STATUS_PORT,
|
||||||
|
@ -544,7 +544,9 @@ static void lcdThread(void *arg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
|
||||||
|
|
||||||
|
extern WallFuel wallFuel;
|
||||||
|
|
||||||
extern fuel_Map3D_t veMap;
|
extern fuel_Map3D_t veMap;
|
||||||
|
|
||||||
|
@ -598,6 +600,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
tsOutputChannels->fuelLevel = engine->engineState.fuelLevel;
|
tsOutputChannels->fuelLevel = engine->engineState.fuelLevel;
|
||||||
tsOutputChannels->hasFatalError = hasFirmwareError();
|
tsOutputChannels->hasFatalError = hasFirmwareError();
|
||||||
tsOutputChannels->totalTriggerErrorCounter = triggerCentral.triggerState.totalTriggerErrorCounter;
|
tsOutputChannels->totalTriggerErrorCounter = triggerCentral.triggerState.totalTriggerErrorCounter;
|
||||||
|
tsOutputChannels->wallFuelAmount = wallFuel.getWallFuel();
|
||||||
|
|
||||||
tsOutputChannels->checkEngine = hasErrorCodes();
|
tsOutputChannels->checkEngine = hasErrorCodes();
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
int eventsCount;
|
int eventsCount;
|
||||||
private:
|
private:
|
||||||
void clear();
|
void clear();
|
||||||
void registerInjectionEvent(NamedOutputPin *output, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
|
void registerInjectionEvent(int injectorIndex, float angle, bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -114,7 +114,7 @@ percent_t getInjectorDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns Length of fuel injection, in milliseconds
|
* @returns Length of each individual fuel injection, in milliseconds
|
||||||
*/
|
*/
|
||||||
floatms_t getFuelMs(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
floatms_t getFuelMs(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
||||||
float theoreticalInjectionLength;
|
float theoreticalInjectionLength;
|
||||||
|
|
|
@ -112,8 +112,11 @@ void initializeIgnitionActions(angle_t advance, angle_t dwellAngle,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FuelSchedule::registerInjectionEvent(NamedOutputPin *output, float angle,
|
void FuelSchedule::registerInjectionEvent(int injectorIndex, float angle,
|
||||||
bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S) {
|
bool_t isSimultanious DECLARE_ENGINE_PARAMETER_S) {
|
||||||
|
|
||||||
|
NamedOutputPin *output = &enginePins.injectors[injectorIndex];
|
||||||
|
|
||||||
if (!isSimultanious && !isPinAssigned(output)) {
|
if (!isSimultanious && !isPinAssigned(output)) {
|
||||||
// todo: extact method for this index math
|
// todo: extact method for this index math
|
||||||
warning(OBD_PCM_Processor_Fault, "no_pin_inj #%s", output->name);
|
warning(OBD_PCM_Processor_Fault, "no_pin_inj #%s", output->name);
|
||||||
|
@ -173,7 +176,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
|
||||||
int index = getCylinderId(engineConfiguration->specs.firingOrder, i) - 1;
|
int index = getCylinderId(engineConfiguration->specs.firingOrder, i) - 1;
|
||||||
float angle = baseAngle
|
float angle = baseAngle
|
||||||
+ (float) CONFIG(engineCycle) * i / CONFIG(specs.cylindersCount);
|
+ (float) CONFIG(engineCycle) * i / CONFIG(specs.cylindersCount);
|
||||||
registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER);
|
registerInjectionEvent(index, angle, false PASS_ENGINE_PARAMETER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IM_SIMULTANEOUS:
|
case IM_SIMULTANEOUS:
|
||||||
|
@ -185,7 +188,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
|
||||||
* We do not need injector pin here because we will control all injectors
|
* We do not need injector pin here because we will control all injectors
|
||||||
* simultaneously
|
* simultaneously
|
||||||
*/
|
*/
|
||||||
registerInjectionEvent(NULL, angle, true PASS_ENGINE_PARAMETER);
|
registerInjectionEvent(0, angle, true PASS_ENGINE_PARAMETER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IM_BATCH:
|
case IM_BATCH:
|
||||||
|
@ -193,7 +196,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
|
||||||
int index = i % (engineConfiguration->specs.cylindersCount / 2);
|
int index = i % (engineConfiguration->specs.cylindersCount / 2);
|
||||||
float angle = baseAngle
|
float angle = baseAngle
|
||||||
+ i * (float) CONFIG(engineCycle) / CONFIG(specs.cylindersCount);
|
+ i * (float) CONFIG(engineCycle) / CONFIG(specs.cylindersCount);
|
||||||
registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER);
|
registerInjectionEvent(index, angle, false PASS_ENGINE_PARAMETER);
|
||||||
|
|
||||||
if (CONFIG(twoWireBatch)) {
|
if (CONFIG(twoWireBatch)) {
|
||||||
|
|
||||||
|
@ -201,7 +204,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
|
||||||
* also fire the 2nd half of the injectors so that we can implement a batch mode on individual wires
|
* also fire the 2nd half of the injectors so that we can implement a batch mode on individual wires
|
||||||
*/
|
*/
|
||||||
index = index + (CONFIG(specs.cylindersCount) / 2);
|
index = index + (CONFIG(specs.cylindersCount) / 2);
|
||||||
registerInjectionEvent(&enginePins.injectors[index], angle, false PASS_ENGINE_PARAMETER);
|
registerInjectionEvent(index, angle, false PASS_ENGINE_PARAMETER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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 20150822;
|
return 20150823;
|
||||||
}
|
}
|
||||||
|
|
|
@ -662,6 +662,10 @@ fileVersion = { 20150625 }
|
||||||
pedalPosition = scalar, F32, 136, "%", 1, 0
|
pedalPosition = scalar, F32, 136, "%", 1, 0
|
||||||
injectorDutyCycle= scalar, F32, 140, "%", 1, 0
|
injectorDutyCycle= scalar, F32, 140, "%", 1, 0
|
||||||
knockCount = scalar, U32, 144, "counter", 1, 0
|
knockCount = scalar, U32, 144, "counter", 1, 0
|
||||||
|
; fuelLevel 148
|
||||||
|
; knockLevel 152
|
||||||
|
; totalTriggerErrorCounter 156
|
||||||
|
wallFuelAmount = scalar, F32, 160, "ms", 1, 0
|
||||||
egoCorrection = { 100 }
|
egoCorrection = { 100 }
|
||||||
time = { timeNow }
|
time = { timeNow }
|
||||||
; engineLoad = { algorithm == 0 ? MAF : TPS }
|
; engineLoad = { algorithm == 0 ? MAF : TPS }
|
||||||
|
|
|
@ -88,6 +88,9 @@ public enum Sensor {
|
||||||
INJECTOR_4_DWELL("inj #4", SensorCategory.SNIFFING),
|
INJECTOR_4_DWELL("inj #4", SensorCategory.SNIFFING),
|
||||||
|
|
||||||
CURRENT_VE(SensorCategory.OPERATIONS, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
CURRENT_VE(SensorCategory.OPERATIONS, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
||||||
|
MAP_ACCEL_DELTA(SensorCategory.OPERATIONS, FieldType.FLOAT, 124, BackgroundColor.MUD),
|
||||||
|
TPS_ACCEL_FUEL(SensorCategory.OPERATIONS, FieldType.FLOAT, 128, BackgroundColor.MUD),
|
||||||
|
WALL_FUEL(SensorCategory.OPERATIONS, FieldType.FLOAT, 160, BackgroundColor.MUD),
|
||||||
|
|
||||||
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
||||||
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
||||||
|
|
Loading…
Reference in New Issue