Skip to content

Commit

Permalink
Add support for Celsius to Fahreneit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JF002 committed Dec 24, 2023
1 parent 46f2e0d commit edee83b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sim/components/ble/SimpleWeatherService.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class SimpleWeatherService {
std::optional<CurrentWeather> Current() const;
std::optional<Forecast> GetForecast() const;

static int16_t CelsiusToFahrenheit(int16_t celsius) {
return celsius * 9 / 5 + 3200;
}

private:
// 00050000-78fc-48fe-8e23-433b3a1942d0
//static constexpr ble_uuid128_t BaseUuid() {
Expand Down

0 comments on commit edee83b

Please sign in to comment.