diff --git a/code/espurna/sensor.cpp b/code/espurna/sensor.cpp index 6d324c27..ae74e09b 100644 --- a/code/espurna/sensor.cpp +++ b/code/espurna/sensor.cpp @@ -574,6 +574,8 @@ unsigned char _sensorUnitDecimals(sensor::Unit unit) { return 1; case sensor::Unit::UltravioletIndex: return 3; + case sensor::Unit::Ph: + return 3; case sensor::Unit::None: default: return 0; diff --git a/code/espurna/sensor.h b/code/espurna/sensor.h index 9798f0ee..d66232b4 100644 --- a/code/espurna/sensor.h +++ b/code/espurna/sensor.h @@ -57,6 +57,7 @@ enum class Unit : int { MicrosievertPerHour, // 2nd unit of local dose rate (Geiger counting) Meter, Hertz, + Ph, Max_ }; diff --git a/code/espurna/sensors/BaseSensor.h b/code/espurna/sensors/BaseSensor.h index b1f8cd79..daceebbe 100644 --- a/code/espurna/sensors/BaseSensor.h +++ b/code/espurna/sensors/BaseSensor.h @@ -135,6 +135,8 @@ class BaseSensor { return sensor::Unit::Meter; case MAGNITUDE_FREQUENCY: return sensor::Unit::Hertz; + case MAGNITUDE_PH: + return sensor::Unit::Ph; default: return sensor::Unit::None; }