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

Port 'Location' demo to Python #89

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Port 'Location' demo to Python #89

merged 2 commits into from
Feb 29, 2024

Conversation

rolandlo
Copy link
Contributor

I followed the Javascript demo except for using GLib.DateTime for getting and formatting the timestamp. That is also done in the Vala implementation and I think Javascript should also use it rather than a Javascript only Date object.

The demo seems to work, although I have to say the accuracy is very low (sometimes the location is off by around 90 km) and the altitude I get (from WIFI data) is worth nothing (it seems to be the smallest float that can be represented, something like -1.7*10^308). It's the same with the Javascript implementation.

The Vala demo doesn't run on my system, since it can't find libportal/portal.h. I would have assumed that having the Vala extension installed should be enough to get all Vala demos running.

@theCapypara
Copy link
Contributor

About the Vala issue: Can you open an issue in the main Workbench repo about this? I'm pretty sure your assumption is correct.

Copy link
Contributor

@theCapypara theCapypara left a comment

Choose a reason for hiding this comment

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

LGTM except the variable naming issue below. I added Sonny as a reviewer as I can not get Workbench to access location services.

demos/Location/main.py Outdated Show resolved Hide resolved
@theCapypara theCapypara removed the request for review from sonnyp February 22, 2024 13:03
@sonnyp
Copy link
Contributor

sonnyp commented Feb 29, 2024

@rolandlo is this ready for re-review?

Don't forget to hit the button

image

Copy link
Contributor

@theCapypara theCapypara left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@theCapypara theCapypara merged commit deb429a into main Feb 29, 2024
1 check passed
@theCapypara theCapypara deleted the python-location branch February 29, 2024 19:37
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.

3 participants