Mutimeter works with negative voltages

This commit is contained in:
Chris Esposito 2020-12-02 13:39:38 +11:00
parent 2d8430c9f9
commit 0893106ea5
1 changed files with 8 additions and 8 deletions

View File

@ -843,16 +843,16 @@ void isoDriver::multimeterStats(){
bool mvMax, mvMin, mvMean, mvRMS, maMax, maMin, maMean, maRMS, kOhms, uFarads; //We'll let the compiler work out this one. bool mvMax, mvMin, mvMean, mvRMS, maMax, maMin, maMean, maRMS, kOhms, uFarads; //We'll let the compiler work out this one.
if(autoMultimeterV){ if(autoMultimeterV){
mvMax = currentVmax < 1; mvMax = abs(currentVmax) < 1.;
mvMin = currentVmin < 1; mvMin = abs(currentVmin) < 1.;
mvMean = currentVmean < 1; mvMean = abs(currentVmean) < 1.;
mvRMS = currentVRMS < 1; mvRMS = abs(currentVRMS) < 1.;
} }
if(autoMultimeterI){ if(autoMultimeterI){
maMax = (currentVmax / seriesResistance) < 1; maMax = abs(currentVmax / seriesResistance) < 1.;
maMin = (currentVmin / seriesResistance) < 1; maMin = abs(currentVmin / seriesResistance) < 1.;
maMean = (currentVmean / seriesResistance) < 1; maMean = abs(currentVmean / seriesResistance) < 1.;
maRMS = (currentVRMS / seriesResistance) < 1; maRMS = abs(currentVRMS / seriesResistance) < 1.;
} }
if(forceMillivolts){ if(forceMillivolts){