mirror of https://github.com/rusefi/rusefi-1.git
rusEFI online engine crc
This commit is contained in:
parent
c59271c669
commit
fcbba66e89
|
@ -765,8 +765,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter;
|
tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter;
|
||||||
// 132
|
// 132
|
||||||
tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter;
|
tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter;
|
||||||
// 134 we take 2 bytes of crc32, no idea if it's right to call it crc16 or not
|
|
||||||
tsOutputChannels->engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE);
|
|
||||||
// 68
|
// 68
|
||||||
tsOutputChannels->baroCorrection = engine->engineState.baroCorrection;
|
tsOutputChannels->baroCorrection = engine->engineState.baroCorrection;
|
||||||
// 140
|
// 140
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "gppwm.h"
|
#include "gppwm.h"
|
||||||
|
|
||||||
|
#if EFI_TUNER_STUDIO
|
||||||
|
#include "tunerstudio_configuration.h"
|
||||||
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
#include "bench_test.h"
|
#include "bench_test.h"
|
||||||
#else
|
#else
|
||||||
|
@ -238,11 +242,17 @@ void Engine::reset() {
|
||||||
* so that we can prepare some helper structures
|
* so that we can prepare some helper structures
|
||||||
*/
|
*/
|
||||||
void Engine::preCalculate(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void Engine::preCalculate(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
// todo: start using this 'adcToVoltageInputDividerCoefficient' micro-optimization or... throw it away?
|
||||||
#if HAL_USE_ADC
|
#if HAL_USE_ADC
|
||||||
adcToVoltageInputDividerCoefficient = adcToVolts(1) * engineConfiguration->analogInputDividerCoefficient;
|
adcToVoltageInputDividerCoefficient = adcToVolts(1) * engineConfiguration->analogInputDividerCoefficient;
|
||||||
#else
|
#else
|
||||||
adcToVoltageInputDividerCoefficient = engineConfigurationPtr->analogInputDividerCoefficient;
|
adcToVoltageInputDividerCoefficient = engineConfigurationPtr->analogInputDividerCoefficient;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if EFI_TUNER_STUDIO
|
||||||
|
// we take 2 bytes of crc32, no idea if it's right to call it crc16 or not
|
||||||
|
tsOutputChannels.engineMakeCodeNameCrc16 = crc32(engineConfiguration->engineMake, 3 * VEHICLE_INFO_SIZE);
|
||||||
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_SHAFT_POSITION_INPUT
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
|
|
|
@ -1406,6 +1406,7 @@ void validateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
if (engineConfiguration->adcVcc > 5.0f || engineConfiguration->adcVcc < 1.0f) {
|
if (engineConfiguration->adcVcc > 5.0f || engineConfiguration->adcVcc < 1.0f) {
|
||||||
engineConfiguration->adcVcc = 3.0f;
|
engineConfiguration->adcVcc = 3.0f;
|
||||||
}
|
}
|
||||||
|
engine->preCalculate(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
|
|
Loading…
Reference in New Issue