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

BLE GATT Battery Service #542

Merged
merged 5 commits into from Aug 18, 2020
Merged

Conversation

jjok
Copy link
Contributor

@jjok jjok commented Aug 6, 2020

This is the battery service widget that we talked about here http://forum.espruino.com/conversations/351959/.

There are probably a few tweaks to be made.

@gfwilliams
Copy link
Member

Thanks! Looks great!

I guess it doesn't need to be a widget (could just be boot code) but at least this way you can extend it to display data if you want to later

@jjok jjok changed the title Initial commit of BLE GATT Battery Service BLE GATT Battery Service Aug 8, 2020
apps/widgattbat/widget.js Outdated Show resolved Hide resolved
@jjok
Copy link
Contributor Author

jjok commented Aug 11, 2020

I guess it doesn't need to be a widget (could just be boot code)

Where would it live if it was boot code? Would it still be something people can choose to install, or would it always run for everyone?

@jjok
Copy link
Contributor Author

jjok commented Aug 13, 2020

FYI This is what it looks like in Home Assistant.

image

@gfwilliams
Copy link
Member

That's great! I'm going to have to give home assistant a go :)

Where would it live if it was boot code?

Basically the same as right now: still in apps.json, but just myapp.boot.js rather than myapp.widget.js

However if you remove the WIDGETS["gattbat"] as you suggest then the difference will be small (it'll just get loaded regardless of whether the app in question requests widgets)

@jjok
Copy link
Contributor Author

jjok commented Aug 17, 2020

I decided to change it to boot code. Should the type still be "widget", or should it be "app", or something else?

@gfwilliams
Copy link
Member

I'd make it type:"bootloader" - thanks!

@jjok jjok marked this pull request as ready for review August 18, 2020 11:05
@jjok
Copy link
Contributor Author

jjok commented Aug 18, 2020

Should I rebase to fix the conflict? I know that can make the "Files changed" diff go a bit crazy once the PR has been opened.

@gfwilliams
Copy link
Member

No, that's fine - I just did the merge here. I'll just wait for the CI check to complete and then I'll merge this :)

@gfwilliams gfwilliams merged commit d250e69 into espruino:master Aug 18, 2020
@gfwilliams
Copy link
Member

Thanks! All sorted - it'll be live on the development apps repo now, and hopefully banglejs.com/apps when I push an update in a day or two

@jjok jjok deleted the gatt-battery-service branch August 18, 2020 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants