Browse Source

sns: set pH decimals to 3 (#2306)

mcspr-patch-1
Rui Marinho 4 years ago
committed by GitHub
parent
commit
ea111c4cf2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions
  1. +2
    -0
      code/espurna/sensor.cpp
  2. +1
    -0
      code/espurna/sensor.h
  3. +2
    -0
      code/espurna/sensors/BaseSensor.h

+ 2
- 0
code/espurna/sensor.cpp View File

@ -574,6 +574,8 @@ unsigned char _sensorUnitDecimals(sensor::Unit unit) {
return 1; return 1;
case sensor::Unit::UltravioletIndex: case sensor::Unit::UltravioletIndex:
return 3; return 3;
case sensor::Unit::Ph:
return 3;
case sensor::Unit::None: case sensor::Unit::None:
default: default:
return 0; return 0;


+ 1
- 0
code/espurna/sensor.h View File

@ -57,6 +57,7 @@ enum class Unit : int {
MicrosievertPerHour, // 2nd unit of local dose rate (Geiger counting) MicrosievertPerHour, // 2nd unit of local dose rate (Geiger counting)
Meter, Meter,
Hertz, Hertz,
Ph,
Max_ Max_
}; };


+ 2
- 0
code/espurna/sensors/BaseSensor.h View File

@ -135,6 +135,8 @@ class BaseSensor {
return sensor::Unit::Meter; return sensor::Unit::Meter;
case MAGNITUDE_FREQUENCY: case MAGNITUDE_FREQUENCY:
return sensor::Unit::Hertz; return sensor::Unit::Hertz;
case MAGNITUDE_PH:
return sensor::Unit::Ph;
default: default:
return sensor::Unit::None; return sensor::Unit::None;
} }


Loading…
Cancel
Save