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

Add configuration options to gps.py (position, vertical line spacing) #919

Merged
merged 6 commits into from
Apr 18, 2021

Conversation

crahan
Copy link
Contributor

@crahan crahan commented Sep 20, 2020

Description

Similar to #918, this pull request adds the ability to configure the position (via main.plugins.gps.position) and vertical line spacing (via main.plugins.gps.linespacing) of the gps plugin. It also corrects the default x-position values for some of the screens and removes redundant leading whitespace from the coordinate values (but keeps the ending space workaround in place).

Motivation and Context

Fixes #921

  • I have raised an issue to propose this change (required)

Providing the ability for users to tweak the position and vertical line spacing of the gps plugin enables them to customize the plugin to their liking without the need for code updates. Together with #918 it also allows users to more easily match the output for the gps and memtemp plugins so lines properly align with each other.

How Has This Been Tested?

This has been tested on a WaveShare v2 display on a Pi Zero W and Pi 3b. The default setup without any of the new configuration options was tested to ensure the plugin updates do not break the current version. Then each of the configuration options were tested (individually and together).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

- added support for configuring the plugin position and vertical line spacing
- fix default values for some displays which appeared to be incorrect
- change `ui.is_dfrobot_v2` to a function (to match other display entries)
- version bump to 1.0.2
@crahan crahan changed the title Add position and vertical line spacing configuration options to gps.py Add configuration options to gps.py (position, vertical line spacing) Sep 20, 2020
@evilsocket
Copy link
Owner

hi @crahan and sorry for the huge delay :D can you check this conflicts please? thank you!

@crahan
Copy link
Contributor Author

crahan commented Apr 18, 2021

Hi @evilsocket, thanks for considering this contribution.

I've resolved the merge conflicts. The issue was due to the update to gps.py as a result of pull request #967. My PR contains this fix as well and all should be good to go now. The hardcoded label positions will still be used whenever the user does not specify a customized label position.

@evilsocket evilsocket merged commit 712d014 into evilsocket:master Apr 18, 2021
@evilsocket
Copy link
Owner

thanks a lot!

@crahan
Copy link
Contributor Author

crahan commented Apr 18, 2021

Quick followup question. What would be the best way to contribute some documentation for the additional configuration options for both the gps.py and memtemp.py plugins? Would commented out example entries in https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.toml be acceptable?

@crahan crahan deleted the gps_config branch April 18, 2021 15:57
@evilsocket
Copy link
Owner

@crahan definitely a PR to this repo would be the best and quickest :D https://github.com/evilsocket/www.pwnagotchi.ai

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.

Add position and linespacing configuration options to gps.py
2 participants