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

Feature request: pages max and page loop #38

Closed
nagyrobi opened this issue Mar 31, 2021 · 6 comments
Closed

Feature request: pages max and page loop #38

nagyrobi opened this issue Mar 31, 2021 · 6 comments

Comments

@nagyrobi
Copy link
Collaborator

nagyrobi commented Mar 31, 2021

A way to specify how many pages are configured on the plate. Looks like hasp-lvgl only sends data about how many pages are maximum possible on the plate, not the number of pages containing objects. This currently results in the possibility to also switch to empty pages with next and previous.

Having a page interval configured would allow us not to go beyond that with previous and next, so the end-user doesn't get surprised by empty pages.
Having an optional loop setting would allow for navigation to the first page after the last one when pressing next, and reversely to the last page after the first one when pressing prev.

Service to change page by the number directly would allow to jump to pages outside the interval, this would be helpful to show pages the user normally can't navigate to, for exceptional cases when warning messages have to be sent out like when on fire alarm, or handle special cases when a notification has to be dismissed first etc. Navigating away from this with prev/next would jump to the next page from the interval according to the loop above.
This would also make a big difference between page next/prev and change page services, and would add a plus justification why we need both types of services.

@fvanroie
Copy link
Collaborator

fvanroie commented Mar 31, 2021

With the feature pagenav, an option has been built-in to set a different page-number for next, prev and back/home commands.
With this option you can arbitrarily assign any other page number for the page next, page prev and page back command.

This is not yet exposed as a parameter, but can/will be in a future update. Using these parameters, you can set as many/few pages you want to expose to the user using next/prev/home buttons. It is not tied to counting objects on a page. Some users might actually want an empty page...

This way, the user is in charge of the order of all pages. You can have "groups" of pages 1->2->3->1 and 4->5->6->4 etc...
At the moment this order is initialized as a single group using all 12 pages by default, but can be configurable.

@nagyrobi
Copy link
Collaborator Author

Sounds nice. Looking forward to reading documentation about this.

@dgomes
Copy link
Collaborator

dgomes commented Apr 15, 2021

So should this be transferred to the firmware repo ?

@fvanroie
Copy link
Collaborator

These CC configurations can be handled by local page action on the plate:

    pages:
      prev_obj: "p0b1"
      home_obj: "p0b2"
      next_obj: "p0b3"

Pages max and page loop can now be configured in jsonl HASwitchPlate/openHASP#114.

@nagyrobi
Copy link
Collaborator Author

@dgomes please remove, and also from config

@dgomes
Copy link
Collaborator

dgomes commented Apr 17, 2021

Done in e39213b

@dgomes dgomes closed this as completed Apr 17, 2021
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

No branches or pull requests

3 participants