Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSW Weather emulator support #376

Closed

Conversation

Lorenzosciacca
Copy link
Contributor

This pull request introduces changes to enable emulator support in the application OSW Weather. The key enhancement is the ability of the emulator to load a JSON file containing a valid API response from OpenWeather.

Changes:

Added emulator support to OSW Weather
Documentation update

@@ -430,19 +483,21 @@ int OswAppWeather::getPrevDay() {


void OswAppWeather::setup() {
OSW_LOG_I("Setup ");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you cleanup these debug-prints? Or remove them from the release-build via OSW_LOG_D?

@@ -6,15 +6,23 @@ OswAppWeatherEncoder::OswAppWeatherEncoder() {}
bool OswAppWeatherEncoder::setUpdate(OswAppWeather::weather_update_t update) {
bool update_ok = true;
if(update.temp > 99 || update.temp < -99 ) {
update_ok = false;
OSW_LOG_I("ERROR TEMP");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> OSW_LOG_E 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or OSW_LOG_W if you can still continue with the primary function)

@simonmicro
Copy link
Member

Hmmm, this is still a draft...

@Lorenzosciacca Lorenzosciacca marked this pull request as ready for review January 5, 2024 19:32
@simonmicro simonmicro self-assigned this Apr 6, 2024
@simonmicro simonmicro added ⭐ enhancement New feature or request src/osw-app This PR / issue impacts the current release of the OS labels Apr 6, 2024
@RuffaloLavoisier RuffaloLavoisier requested review from RuffaloLavoisier and removed request for RuffaloLavoisier April 6, 2024 07:41
@simonmicro simonmicro mentioned this pull request Apr 6, 2024
@simonmicro
Copy link
Member

I'll cleanup and finalize this PR in #382, as the author did not authorize modifications on its fork before merge. As I cannot change this PRs source, I'll close it instead.

@simonmicro simonmicro closed this Apr 6, 2024
simonmicro added a commit that referenced this pull request Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src/osw-app This PR / issue impacts the current release of the OS ⭐ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants