auto-sync

This commit is contained in:
rusEfi 2015-04-27 12:09:32 -04:00
parent 2f2ffbf63d
commit 6d71409968
3 changed files with 12 additions and 4 deletions

View File

@ -85,13 +85,14 @@ typedef struct {
unsigned int isMapError : 1; // bit 2
unsigned int isIatError : 1; // bit 3
unsigned int isAcSwitchEngaged : 1; // bit 4
unsigned int isTriggerError : 1; // bit 5
int tsConfigVersion;
egt_values_s egtValues;
float rpmAcceleration;
float massAirFlowValue;
float veValue;
float deltaTps;
float unused120;
int triggerErrorsCounter;
float currentMapAccelDelta;
float tpsAccelFuel;
int unused3[16];

View File

@ -476,6 +476,11 @@ static void setBlinkingPeriod(int value) {
extern efitick_t lastDecodingErrorTime;
static bool_t isTriggerErrorNow() {
bool_t justHadError = (getTimeNowNt() - lastDecodingErrorTime) < US2NT(2 * 1000 * 3 * blinkingPeriod);
return justHadError || isTriggerDecoderError();
}
/**
* this thread has a lower-then-usual stack size so we cannot afford *print* methods here
*/
@ -500,8 +505,7 @@ static void blinkingThread(void *arg) {
communicationPin.setValue(1);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
bool_t justHadError = (getTimeNowNt() - lastDecodingErrorTime) < US2NT(2 * 1000 * delayMs);
if (justHadError || isTriggerDecoderError() || isIgnitionTimingError())
if (isTriggerErrorNow() || isIgnitionTimingError())
warningPin.setValue(1);
#endif
chThdSleepMilliseconds(delayMs);
@ -563,10 +567,11 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->currentMapAccelDelta = engine->mapAccelEnrichment.getMapEnrichment(PASS_ENGINE_PARAMETER_F) * 100 / getMap();
tsOutputChannels->tpsAccelFuel = engine->tpsAccelEnrichment.getTpsEnrichment(PASS_ENGINE_PARAMETER_F);
tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getDelta();
tsOutputChannels->triggerErrorsCounter = triggerCentral.triggerState.totalTriggerErrorCounter;
tsOutputChannels->checkEngine = hasErrorCodes();
#if EFI_PROD_CODE || defined(__DOXYGEN__)
tsOutputChannels->isTriggerError = isTriggerErrorNow();
#if EFI_MAX_31855 || defined(__DOXYGEN__)
for (int i = 0; i < EGT_CHANNEL_COUNT; i++)

View File

@ -46,6 +46,8 @@ static void speedInfo(void) {
engineConfiguration->vehicleSpeedCoef,
vssCounter,
getVehicleSpeed());
scheduleMsg(logger, "vss diff %d", vssDiff);
}
void initVehicleSpeed(Logging *l) {