Qrome / marquee-scroller

Marquee Scroller Clock News Weather and More
https://www.thingiverse.com/thing:2867294
MIT License
328 stars 159 forks source link

Hi/Lo Temp decimals #217

Closed ik0adr closed 2 years ago

ik0adr commented 2 years ago

Hi and thanks for the nice work. Would it be possible to have Hi/Lo Temps shown as integers, without decimals? I see this cyted in some pull request, but in current 2.18 they are shown as XX.XX... Many thanks again,

Federico from Rome, Italy

Qrome commented 2 years ago

There have been no pull request on the official code line for this. Though this is a very simple change.

Edit the OpenWeatherMapClient.cpp file and on line 259 and on 264 rap the returned value with rouncValue().

Example, change the following line 259:

return weathers[index].high;

to

return roundValue(weathers[index].high);

Do the same thing for line 264.

I will include this on the 2.19 -- just so people understand, the high/low, it is the current high and low values of the current weather from several stations in the region.

ik0adr commented 2 years ago

Ok, thanks for the quick reply and info. I will wait for 2.19, I uploaded the bin file, much easier 😜

Inviato da iPhone

Il giorno 12 nov 2021, alle ore 14:45, Qrome @.***> ha scritto:

 There have been no pull request on the official code line for this. Though this is a very simple change.

Edit the OpenWeatherMapClient.cpp file and on line 259 and on 264 rap the returned value with rouncValue().

Example, change the following line 259:

return weathers[index].high;

to

return roundValue(weathers[index].high);

Do the same thing for line 264.

I will include this on the 2.19 -- just so people understand, the high/low, it is the current high and low values of the current weather from several stations in the region.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

davsav commented 2 years ago

@ik0adr I too was bothered by the two decimal place temperature conversion and had previously edited and recompiled the code to fix that.

Since the code had to be updated to fix the time issue and I had to do the fix again, I did a fork and my compiled binary (marquee.ino.d1_mini_2.18a.bin) is available at

https://github.com/davsav/marquee-scroller/blob/davsav-patch-round-temp/marquee.ino.d1_mini_2.18a.bin

You can do an over the air update to what I called 2.18a. Note: I did not compile a wide version, just the narrow since that is what I'm using.

I did a pull request, my first, so forgive me if I screwed it up, which it appears I did as the edited CPP files are not in the files directory.

(Sorry about the edits but the link didn't work but it is fixed now and I learned about the preview tab at the top of this box]

ik0adr commented 2 years ago

Sorry, link doesn't work..

Il giorno ven 12 nov 2021 alle ore 18:28 davsav @.***> ha scritto:

@ik0adr https://github.com/ik0adr I too was bothered by the two decimal place temperature conversion and had previously edited and recompiled the code to fix that.

Since the code had to be updated to fix the time issue and I had to do the fix again, I did a fork and my compiled binary is available at

https://github.com/davsav/marquee-scroller/blob/davsav-patch-round-temp/marquee.ino.d1_mini_2.18a.bin http://url

You can do an over the air update to what I called 2.18a. Note: I did not compile a wide version, just the narrow since that is what I'm using.

I did a pull request, my first, so forgive me if I screwed it up, which it appears I did as the edited CPP files are not in the files directory.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Qrome/marquee-scroller/issues/217#issuecomment-967289074, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIHM7MLSSZJXPTZ4SGEVP3ULVFEXANCNFSM5H4SAR5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ik0adr commented 2 years ago

Don't mind, it worked like a charm, thanks a lot

davsav commented 2 years ago

Sorry, my bad. I fixed it in my post above but here it is again:

https://github.com/davsav/marquee-scroller/blob/davsav-patch-round-temp/marquee.ino.d1_mini_2.18a.bin

At that page, click the download button on the right side about half way down.

ik0adr commented 2 years ago

Thanks!!!