Skip to content

Commit a300c65

Browse files
authored
Add support for Celsius to Fahreneit conversion (InfiniTimeOrg#136)
1 parent 46f2e0d commit a300c65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sim/components/ble/SimpleWeatherService.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class SimpleWeatherService {
8888
std::optional<CurrentWeather> Current() const;
8989
std::optional<Forecast> GetForecast() const;
9090

91+
static int16_t CelsiusToFahrenheit(int16_t celsius) {
92+
return celsius * 9 / 5 + 3200;
93+
}
94+
9195
private:
9296
// 00050000-78fc-48fe-8e23-433b3a1942d0
9397
//static constexpr ble_uuid128_t BaseUuid() {

0 commit comments

Comments
 (0)