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

Touch control to swipe between pages #27

Closed
orontee opened this issue Sep 7, 2023 · 10 comments
Closed

Touch control to swipe between pages #27

orontee opened this issue Sep 7, 2023 · 10 comments
Labels
enhancement New feature or request ui

Comments

@orontee orontee added enhancement New feature or request ui labels Sep 7, 2023
orontee added a commit that referenced this issue Sep 18, 2023
@orontee orontee added this to the Winter 2023 version milestone Sep 18, 2023
@orontee orontee closed this as completed Sep 18, 2023
@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

@neilswann80 I'd be happy to have your feedback on this feature.

It's available from this pre-release: https://github.com/orontee/taranis/releases/tag/v1.2.0-rc1.

@neilswann80
Copy link

neilswann80 commented Sep 18, 2023

Nicely done. Was it difficult to implement?

What I did notice is that long swipes work 100% of the time, but smaller swipes (if holding one-handed for instance) weren't always acknowledged. Can the swipe distance to activate the page turn be reduced a little?

There's quite a large gap (red box) in the 8-day view now, between windspeed and rainfall. Looks to be an empty column. Is there a new feature appearing there?

Is if feasible to add the day/number of the month in the blue box?

scr0014

@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

Nicely done. Was it difficult to implement?

Not really, around 100 lines. See: https://github.com/orontee/taranis/blob/main/src/swipe.h#L19.

What I did notice is that long swipes work 100% of the time, but smaller swipes (if holding one-handed for instance) weren't always acknowledged. Can the swipe distance to activate the page turn be reduced a little?

What do you mean by "long"? Long duration or long distance? There are threshold for both in the code. I guess we'll have to find better values than the arbitrary I've chosen.

Don't know whether it works well with large screens...

There's quite a large gap in the 8-day view now, between windspeed and rainfall. Looks to be an empty column. Is there a new feature appearing there?

Yep, see #42.

@neilswann80
Copy link

neilswann80 commented Sep 18, 2023

What do you mean by "long"? Long duration or long distance? There are threshold for both in the code. I guess we'll have to find better values than the arbitrary I've chosen.

Long distance.

I'd guess it would be better to set a specific pixel distance rather than a percentage of ScreenWidth(). I'd think swipe distance is likely more uniform than the sizes of device screen (not sure how it's calculated... I'd need to stare at you code fpr a while to get my head around it)

@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

What do you mean by "long"? Long duration or long distance? There are threshold for both in the code. I guess we'll have to find better values than the arbitrary I've chosen.

Long distance.

I'd guess it would be better to set a specific pixel distance rather than a percentage of ScreenWidth(). I'd think swipe distance is likely more uniform than the sizes of device screen. :)

Yes. But right now distance is expressed in pixels, resolution should enters the equation.

@neilswann80
Copy link

neilswann80 commented Sep 18, 2023

Ah yes, PPI between old and new devices could be quite different

Moon phase is another nice feature. I often like to run on an evening with a full moon, as strange as that may sound. Insomnia crossed with a smidge of lycanthropy I guess.

I'm having a headache creating an object of a class that has a member initialiser list... all I want to do is grab some variables from a class function to use elsewhere. If I leave the object uninitialized the compiler errors and if I initialise the object it compiles but program crashes. If I remove the object declaration it compiles and runs fine. Grrrrr. Driving me mad, but I'll get there. I'm very new to CPP, a keen tinkerer though. 😄

@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

Hum alignment of columns is wrong (not surprising but so ugly)...

@neilswann80
Copy link

neilswann80 commented Sep 18, 2023

Hum alignment of columns is wrong (not surprising but so ugly)...

Worth adding a zero before all single digit numbers? But I guess not every number of the font is the same width anyway. And there's also cold weather figures with a - sign to account for.

@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

Unfortunately since we're using a variable pitch font it's not that simple!

@orontee
Copy link
Owner Author

orontee commented Sep 18, 2023

Is if feasible to add the day/number of the month in the blue box?

Yeah, could be done, #48.

Thinking of red box again, did you change units? Depending on the unit system, this space could be narrower. May be moon phase is not that important; I'll try to work on a better layout first, better in the sense that there are columns and space is evenly distributed between columns.

I am also thinking of wind direction in place of humidity. But it's another topic.

orontee added a commit that referenced this issue Sep 18, 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 ui
Projects
None yet
Development

No branches or pull requests

2 participants