hakatashi / smart-cube-timer

Proof-of-concept smart timer for GiiKER
https://hakatashi.github.io/smart-cube-timer/
MIT License
72 stars 22 forks source link

Add option to reset to solved state #15

Open geocine opened 6 years ago

geocine commented 6 years ago

Sometimes the scramble is unsynced with the cube's solved state . The scramble letters turns gray even though I haven't turned the cube yet. It happens rarely, but when it happens I have to refresh the browser and connect the cube again

We can reset the solved state and generate a new scramble or just reset the state to solved

shiv19 commented 6 years ago

Yes, I faced it a few times too.

hakatashi commented 6 years ago

Well, I think it would be enough you to follow the scramble anyway and start timer, then press "reset" button once it's solved, since you should solve the cube in both way.

Or, the unsync always happens on the very first turn of the scramble? Then I doubt the greyout is triggered by overturn from the last solve, and just following scramble could work it out.

geocine commented 6 years ago

It doesn't always happen . I agree you could press reset once solved , sometimes though I quit solving when I messed up something and hit reset. So , it is a convenient feature to have.

geocine commented 6 years ago

Thank you @hakatashi for developing this tool. I did some experiments on my fork and implemented these things:

RESET during scramble phase

RESET during inspect phase

RESET during solve phase

You can try it here: https://geocine.github.io/smart-cube-timer/

If anything of this is of interest to @hakatashi , I will be doing a pull request.

shiv19 commented 6 years ago

@geocine, When I tried your version, The first time, i hit reset during a solve, then finished the solve after that i hit reset again. It stopped syncing my moves after that.

The second time, I hit reset during a solve, then finished solving the cube, it recognized that the cube is solved and showed me a scramble. After the first 2 moves of the scramble, it stopped syncing again.

I don't face these issues on the timer by @hakatashi

geocine commented 6 years ago

@shiv19

I will try to understand and reproduce your issue, thanks for your feedback. Maybe the context of reset is confusing to someone that uses it other than what I have intended it to do. Nonethless, if scramble stops syncing just solve it and hit reset.

I noticed though even on @hakatashi , the scramble gets unsynced if you move too fast during a scramble. Just my observation.

hakatashi commented 6 years ago

@geocine Thanks for your contribution. The feature you proposed may empower the app, but after few tries of your timer I feel like the meaning of "RESET" button may vary by context and confusing. That means, RESET could mean "cancel the current solve" or "sync the inner state of timer to solved". But now I think having both cancel and sync feature is good thing.

If anything of this is of interest to @hakatashi , I will be doing a pull request.

Feel free to send me a pull request😉. For the above reason I cannot just merge your commits, but I can continue working on it.

geocine commented 6 years ago

@hakatashi I agree the context of reset is confusing on different cases. I tried doing this without adding an extra button.

This is not a good feature to pull request. At least I have proven a point as to why this could be a good thing and glad that you are considering it :+1: