mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
676a33ac9a
commit
dcd8652842
|
@ -95,7 +95,8 @@ typedef struct {
|
|||
float injectorDutyCycle;
|
||||
int knockCount;
|
||||
float fuelLevel;
|
||||
int unused3[11];
|
||||
float knockLevel;
|
||||
int unused3[10];
|
||||
} TunerStudioOutputChannels;
|
||||
|
||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
#include "settings.h"
|
||||
#include "rusefi_outputs.h"
|
||||
|
||||
extern float knockVolts;
|
||||
|
||||
extern bool_t main_loop_started;
|
||||
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
|
@ -185,6 +187,7 @@ static void printSensors(Logging *log, bool fileFormat) {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
reportSensorF(log, fileFormat, "ks", "count", engine->knockCount, 0);
|
||||
reportSensorF(log, fileFormat, "kv", "v", knockVolts, 2);
|
||||
|
||||
|
||||
// reportSensorF(log, fileFormat, "vref", "V", getVRef(engineConfiguration), 2);
|
||||
|
@ -592,6 +595,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
tsOutputChannels->baroCorrection = engine->engineState.baroCorrection;
|
||||
tsOutputChannels->pedalPosition = getPedalPosition(PASS_ENGINE_PARAMETER_F);
|
||||
tsOutputChannels->knockCount = engine->knockCount;
|
||||
tsOutputChannels->knockLevel = knockVolts;
|
||||
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER);
|
||||
tsOutputChannels->fuelLevel = engine->engineState.fuelLevel;
|
||||
tsOutputChannels->hasFatalError = hasFirmwareError();
|
||||
|
|
|
@ -58,6 +58,7 @@ static int settingUpdateCount = 0;
|
|||
static int totalKnockEventsCount = 0;
|
||||
static int currentPrescaler;
|
||||
static float hipValueMax = 0;
|
||||
// todo: move this to engine state
|
||||
float knockVolts = 0;
|
||||
static int spiCount = 0;
|
||||
|
||||
|
@ -379,9 +380,17 @@ static THD_WORKING_AREA(hipTreadStack, UTILITY_THREAD_STACK_SIZE);
|
|||
|
||||
static msg_t hipThread(void *arg) {
|
||||
chRegSetThreadName("hip9011 init");
|
||||
|
||||
// some time to let the hardware start
|
||||
hipCs.setValue(true);
|
||||
chThdSleepMilliseconds(100);
|
||||
hipCs.setValue(false);
|
||||
chThdSleepMilliseconds(100);
|
||||
hipCs.setValue(true);
|
||||
|
||||
while (true) {
|
||||
// some time to let the hardware start
|
||||
chThdSleepMilliseconds(500);
|
||||
chThdSleepMilliseconds(100);
|
||||
|
||||
if (needToInit) {
|
||||
hipStartupCode();
|
||||
needToInit = false;
|
||||
|
|
|
@ -291,5 +291,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 20150710;
|
||||
return 20150711;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public enum Sensor {
|
|||
PPS("pedal", SensorCategory.SENSOR_INPUTS, "%", 100),
|
||||
VSS("Speed", SensorCategory.SENSOR_INPUTS, "kph", 100),
|
||||
KS("Knock", SensorCategory.SENSOR_INPUTS, "count", 30),
|
||||
KV("Knock level", SensorCategory.SENSOR_INPUTS, "v", 6),
|
||||
|
||||
ENGINE_LOAD("Engine Load", SensorCategory.SENSOR_INPUTS, "x", 300),
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ public class SensorCentral {
|
|||
addDoubleSensor(Sensor.ADVANCE2, es);
|
||||
addDoubleSensor(Sensor.ADVANCE3, es);
|
||||
addDoubleSensor(Sensor.KS, es);
|
||||
addDoubleSensor(Sensor.KV, es);
|
||||
|
||||
addDoubleSensor("tch", Sensor.T_CHARGE, es);
|
||||
addDoubleSensor(Sensor.AFR, es);
|
||||
|
|
Loading…
Reference in New Issue