random code from Ola
This commit is contained in:
parent
ebe67b6be3
commit
392c3a1d0c
|
@ -202,16 +202,17 @@ static void cjUpdateAnalogValues() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
// todo: some solution for testing
|
// todo: some solution for testing
|
||||||
waitForSlowAdc(lastSlowAdcCounter);
|
waitForSlowAdc(lastSlowAdcCounter);
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
globalInstance.vUr = getUr();
|
globalInstance.vUr = getUr();
|
||||||
globalInstance.vUa = getUa();
|
globalInstance.vUa = getUa();
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
// todo: some solution for testing
|
// todo: some solution for testing
|
||||||
lastSlowAdcCounter = getSlowAdcCounter();
|
lastSlowAdcCounter = getSlowAdcCounter();
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cjCalibrate(void) {
|
void cjCalibrate(void) {
|
||||||
globalInstance.cjIdentify();
|
globalInstance.cjIdentify();
|
||||||
|
|
||||||
scheduleMsg(logger, "cj125: Starting calibration...");
|
scheduleMsg(logger, "cj125: Starting calibration...");
|
||||||
|
@ -227,7 +228,7 @@ static void cjCalibrate(void) {
|
||||||
// todo: some testing solution
|
// todo: some testing solution
|
||||||
// wait for the start of the calibration
|
// wait for the start of the calibration
|
||||||
chThdSleepMilliseconds(CJ125_CALIBRATION_DELAY);
|
chThdSleepMilliseconds(CJ125_CALIBRATION_DELAY);
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
globalInstance.vUaCal = 0.0f;
|
globalInstance.vUaCal = 0.0f;
|
||||||
globalInstance.vUrCal = 0.0f;
|
globalInstance.vUrCal = 0.0f;
|
||||||
// wait for some more ADC samples
|
// wait for some more ADC samples
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2020
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HW_LAYER_SENSORS_CJ125_H_
|
#pragma once
|
||||||
#define HW_LAYER_SENSORS_CJ125_H_
|
|
||||||
|
|
||||||
#include "cj125_logic.h"
|
#include "cj125_logic.h"
|
||||||
|
|
||||||
|
@ -105,8 +104,7 @@ void cjPostState(TunerStudioOutputChannels *tsOutputChannels);
|
||||||
|
|
||||||
void initCJ125(Logging *shared DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void initCJ125(Logging *shared DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
void cjCalibrate(void);
|
||||||
float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void cj125defaultPinout();
|
void cj125defaultPinout();
|
||||||
|
|
||||||
#endif /* HW_LAYER_SENSORS_CJ125_H_ */
|
|
||||||
|
|
Loading…
Reference in New Issue