-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
WeatherService #353
WeatherService #353
Conversation
56bb44f
to
d1eab7f
Compare
73e4b0a
to
dae3932
Compare
This comment has been minimized.
This comment has been minimized.
d04e468
to
3e27268
Compare
3e27268
to
96fa090
Compare
96fa090
to
0bd70c9
Compare
Needs a bit of bug squashing, then it's quite ready for companion apps. Some really neat watchface etc. integrations can come later. |
Writing data to the watch should now be fully testable for those wishing to develop a companion. |
I guess @Arsen6331, @alexr4535, @piggz you could try and take a look and see if (currently only) pushing data is sufficient and clear for you, or if you find any bugs. |
Can you please provide the format of the data I need to write, and to which characteristics? I tried to follow the code to figure it out, but the most I've done in C++ is hello world, so I cannot figure it out. |
@Arsen6331 Check out src/components/ble/weather/WeatherData.h#20 and src/components/ble/weather/WeatherService.h#111 |
8b0e104
to
260756b
Compare
Ok, I got the characteristics. How do I enable the screen to see what I am actually doing? |
@Arsen6331
I accidentally commited the changes that enables it under Navigation's icon, but now you can nicely see them here: 86e21f5 I don't want to make it visible by-default because it's not an end-user app for displaying weather. |
I am trying to get it to accept my CBOR. This looks right to me, but it returns an error. Am I doing it incorrectly? This is for precipitation:
|
Yes, absolutely @Avamander :-) |
@Arsen6331 Capitalize the keys, I think |
Ok, that works. Thank you. You should add that to the comment in src/components/ble/weather/WeatherData.h |
I have all the events working. This is actually very simple once I figured out what to do. |
@Arsen6331 Anything you miss? Manipulations you'd like to do on the timeline from the companion side? |
82fbe82
to
5f50f0e
Compare
Just make sure there is a way to have it only run/work/be enabled when Gadgetbridge is active and linked. (InfiniLink is still in development for IOS stuff) |
This is enough for me to work with. There is some data I may not be able to fill, but most of it should be fine. I've implemented it in my library locally, so I can test any changes and such easily. I will also be trying to implement it locally in ITD so I can see what it would take. Thank you. |
If left unpopulated, the components fetching data from the Timeline should check for reserved and zero values and gracefully fall back. |
Companion developers please kindly version-lock your support to 1.7.1 to 1.8.0. If all goes well we don't have to change anything in Weather (only release the lock), but if we do, companions won't break when InfiniTime changes. |
Thought ... all the Timeline classes ... as theyre just public data members, wouldnt it be better to make them structs? Only difference is structs are public by default and youre setting everything public anyway. |
@piggz In theory one could, but I don't see much benefit from that. It's just limits our options a bit, preemptively. Structs don't allow constructors for example, and it'd be a bit annoying to go changing it around once that is determined to yield nicer code. |
Actually they do ... in c++the only difference between structs and classes is the default visibility. The syntax for constructors is the same :) depends if you think there will be functions added, and private members, of if theyre just structures used for data transfer. |
Ooh, my misconception.
Not out of the question. The first thing that comes to mind is that someone might wish to add a In the end it should be fine? |
@Avamander Which app do you use as a provider? The weather is disabled for InfiniTime on the official GadgetBridge. |
@devnoname120 Upstream GB doesn't have weather sending-remapping at the moment, I wrote my own. I couldn't upstream it because I couldn't get TWG to send weather intents (I can't test receiving actual intents). Siglo has some support available I think. |
ITD also sends the weather every hour, or upon running a command, for any location you configure in the config file. |
This PR aims to implement a WeatherService for both short-term and long-term forecasting.
Currently implemented:
develop
made it work when runningmcuboot-app
, don't ask me why)Needs more work:
Not in scope:
std::vector
size, implement a purge algorithm for still valid events over set sizeFixes #208