call frontendInit later, however, still not working correctly
This commit is contained in:
@ -21,9 +21,9 @@ static volatile bool frontendEnabled = false;
|
||||
|
||||
|
||||
void frontendInit() {
|
||||
double u_threshold = I_THRESHOLD * SHUNT_RESISTOR;
|
||||
frontendAdcThreshold = (uint16_t) (u_threshold / U_REF * ((double) N_MAX));
|
||||
logMsg("frontendInit, threshold calculated: %d", frontendAdcThreshold);
|
||||
// double u_threshold = I_THRESHOLD * SHUNT_RESISTOR;
|
||||
// frontendAdcThreshold = (uint16_t) (u_threshold / U_REF * ((double) N_MAX));
|
||||
// logMsg("frontendInit, threshold calculated: %d", frontendAdcThreshold);
|
||||
|
||||
HAL_ADCEx_Calibration_Start(&frontendAdc);
|
||||
logMsg("frontendInit, calibration done");
|
||||
|
@ -19,7 +19,6 @@
|
||||
void my_setup_1() {
|
||||
schInit();
|
||||
logInit();
|
||||
// frontendInit();
|
||||
}
|
||||
|
||||
void my_errorHandler() {
|
||||
@ -38,6 +37,8 @@ void my_setup_2() {
|
||||
led(RED, OFF);
|
||||
led(GREEN, ON);
|
||||
|
||||
frontendInit();
|
||||
|
||||
schAdd(helloMeterbus, NULL, 0, 10000);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user