Rui Marinho
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
0 deletions
-
code/espurna/sensor.cpp
-
code/espurna/sensor.h
-
code/espurna/sensors/BaseSensor.h
|
|
@ -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; |
|
|
|
|
|
@ -57,6 +57,7 @@ enum class Unit : int { |
|
|
|
MicrosievertPerHour, // 2nd unit of local dose rate (Geiger counting) |
|
|
|
Meter, |
|
|
|
Hertz, |
|
|
|
Ph, |
|
|
|
Max_ |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|