From ea111c4cf2229502c19fc739737527670c20ec1e Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Sun, 19 Jul 2020 21:30:59 +0100 Subject: [PATCH] sns: set pH decimals to 3 (#2306) --- code/espurna/sensor.cpp | 2 ++ code/espurna/sensor.h | 1 + code/espurna/sensors/BaseSensor.h | 2 ++ 3 files changed, 5 insertions(+) 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; }