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

Hourly forecast should not be limited to 24 hours #62

Closed
3 tasks done
orontee opened this issue Oct 21, 2023 · 4 comments
Closed
3 tasks done

Hourly forecast should not be limited to 24 hours #62

orontee opened this issue Oct 21, 2023 · 4 comments
Labels
enhancement New feature or request feature screenshots Issue implies screenshots update translation

Comments

@orontee
Copy link
Owner

orontee commented Oct 21, 2023

Context

On Friday evening or Saturday morning, I often organize the week-end cycling activities where hourly forecasts for Sunday matters. Openweather API offers hourly forecasts for 48 hours.

But the hourly forecast view of Taranis is currently limited to 24 hours. This limit is arbitrary: https://github.com/orontee/taranis/blob/v1.5.0-rc0/src/service.h#L48

Proposition

  • Increase the hourly forecast limit to 48 hours

Remarks

The number of "screens" of the hourly forecast view will increase from 3 to 6 (since the number of visible bars is hard-coded, equal to 8). As a consequence, the days of the displayed data may become more ambiguous than it already is. Thus one must display those days and a convenient way to switch to the daily forecast view.

  • Add a label to identify the day of the displayed data
  • Long press on previous or next key switch to daily forecast

Details on how to display the day

Add a top row to the daily forecast frame. This row may display two labels on its left and right ends. The left label will display the date of the day corresponding to the first bar and the right label will display the date of the day corresponding to the last bar. When both days are equal, the right label is hidden. Attempt is made to display "Today" or "Tomorrow" in place of dates.

@orontee orontee added enhancement New feature or request feature screenshots Issue implies screenshots update translation labels Oct 21, 2023
@orontee orontee added this to the Birthday milestone milestone Oct 21, 2023
@orontee orontee pinned this issue Oct 21, 2023
@neilswann80
Copy link

neilswann80 commented Oct 21, 2023

Would it be possible to:

  • Double press skips between the start of the two 24 hour periods, today/tomorrow
  • Long press switches to Daily view

@orontee
Copy link
Owner Author

orontee commented Oct 21, 2023

Would it be possible to:

  • Double press skips between the start of the two 24 hour periods, today/tomorrow

Good idea! But AFAICS the SDK doesn't provide any way to handle double press. So, I may try to implement this but in a second time and a dedicated issue since it may imply a rewrite of parts of the application and it's not required for the feature to be released.

  • Long press switches to Daily view

Another good idea 🤩 I saw there's a EVT_KEYREPEAT event that triggers when a key is pressed for long time; It should be easy to support this right now.

@neilswann80
Copy link

This hints at something to do with a double-press...

enum globalaction_on_event_e {
	GLOBALACTION_ON_KEYPRESS = 0, //masked by mpc->gka0
	GLOBALACTION_ON_KEYHOLD, //masked by mpc->gka1
	GLOBALACTION_ON_DOUBLECLICK, //masked by mpc->gka2
};

orontee added a commit that referenced this issue Oct 21, 2023
orontee added a commit that referenced this issue Oct 21, 2023
orontee added a commit that referenced this issue Oct 21, 2023
orontee added a commit that referenced this issue Oct 21, 2023
orontee added a commit that referenced this issue Oct 21, 2023
@orontee
Copy link
Owner Author

orontee commented Oct 21, 2023

Available from https://github.com/orontee/taranis/releases/tag/v1.5.0-rc1

Translations will arrive later (after #61 is merged into main branch).

@orontee orontee closed this as completed Oct 21, 2023
orontee added a commit that referenced this issue Oct 21, 2023
@orontee orontee unpinned this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature screenshots Issue implies screenshots update translation
Projects
None yet
Development

No branches or pull requests

2 participants