mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 23:13:07 +01:00
Fix for config pages with more values
This commit is contained in:
@@ -413,7 +413,15 @@ void sensorTask(void *param){
|
||||
if(millis() > starttime8 + 1000 && (String(powsensor1) == "INA219" || String(powsensor1) == "INA226")){
|
||||
starttime8 = millis();
|
||||
if(String(powsensor1) == "INA226" && INA226_1_ready == true){
|
||||
sensors.batteryVoltage = ina226_1.getBusVoltage();
|
||||
double voltage = ina226_1.getBusVoltage();
|
||||
// Limiter for voltage average building
|
||||
if(voltage < -30){
|
||||
voltage = -30;
|
||||
}
|
||||
if(voltage > 30){
|
||||
voltage = 30;
|
||||
}
|
||||
sensors.batteryVoltage = voltage;
|
||||
sensors.batteryCurrent = ina226_1.getCurrent() * corrFactor;
|
||||
// Eliminates bit jitter by zero current values
|
||||
float factor = maxCurrent / 100;
|
||||
|
||||
Reference in New Issue
Block a user