-
Notifications
You must be signed in to change notification settings - Fork 14
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
Mirror climb #88
Mirror climb #88
Conversation
Add mirror climb function to js. Copies the values from the current holds, resets them and sets the mirrored hold.
Temp button on a new row, need to disable if board is not mirrored.
Added Mirror Climb button to dropdown.
Making button toggle.
Toggle and auto mirroring the climbs during draw climb. Also updating sends/attempts for mirrored.
Nice, had a quick play today – logging seems to work fine 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ItsDang! Tested and looks great to me, nice clean implementation as well. Just one change needed to hide (or disable) the button on non-symmetrical layouts.
Added <li> id, and added script to hide Mirror Climb button if there isn't a circle with data-mirror-id attribute.
Instead of using DOM search pass is_mirrored through instead.
Change from is_mirrored to layout_is_mirrored and is_mirrored to is_mirrored_mode so avoid confusion with whether the mirror mode is on or not.
Create mirroredFrames variable, passing blank from search query. Alternative is to create and store in the db, would require changes in Boardlib. Still need to create bluetooth packet and have it send the mirrored when mirrored mode is on.
Refactored isMirroredMode(). Pulling whether layout is mirrored from db instead of from DOM. Removed console logs. Passing frames as mirroredFrames, until in js determined layout is mirrored and generate real mirroredFrames. Could use sql, but way more complex.
Pulling whether layout is mirrored from db and using to show or hide Mirror Climb button. Updated Bluetooth to pass mirrored, will test on a TB2 at another gym when I can. Refactored whether the the Mirror Climb button is pressed or not. |
Realized I mixed up the mirrored sending to board over Bluetooth, was able to test on tb2 at another gym. |
Was sending mirrored when should be unmirrored, and vice versa, corrected.
Commited the change to light up the right version, should be ready for review. |
Removed variables that were being passed from db, that weren't didn't contain real data. Also swapped bluetooth pass to be more concise per Luke's comment.
Thanks for comments, it's cleaner. I've implemented and tested the mirrored button except for the Bluetooth on an actual board. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for this very useful feature. I won't be near a board to test the bluetooth anytime soon, but the logic looks correct and we can always push another update if needed. Will get this merged and deployed now
Nice and really needed addition! |
@lemeryfertitta, Thanks for the help cleaning up the code! And thanks for testing @gardaholm. |
Didn't had any troubles with mirroring and lighting up the routes. Also behaves as I would expect it (similar to the app). If you mirror once, all upcoming routes show up as mirrored. Really nice! Only issue I had is documented here #45 (comment), but thats part of the overall bluetoot discussion I guess |
For #48, Added mirror climb button to drop down menu. It acts like a toggle. Currently it resets back to not mirrored if you refresh or switch searches. Also logs mirrored send, I've tested send.