-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Fixing Rigidbot LCD Panel Support #2848
Conversation
@KiteLab's comment from the closed PR.
is a bit less time and space consuming. Calling mills() inside the interrupt is a bad idea. |
@KiteLab I've changed the code according to your comments in commit 89ab33d98241c2462a7687782ed75b185c4852af . Code worked with next_button_update_ms instead of next_fake_encoder_update_ms variable. Furthermore, reduced number of mills() calls to one. Had to bring next_fake_encoder_update_ms = now+30 inside every if condition, to make sure responsiveness (otherwise there is a 300ms delay even w/o a button press). |
It appears that you can still have two calls to millis() in that routine. And you changes need to be rebased to the current RCBugFix I'm also concerned the some of your proposed changes will affect others who do not have this particular hardware. For example, your change in cardreader,cpp, would affect anyone who selected the SDEXTRASLOW option. |
Instead of changing SDEXTRASLOW variable to a slower speed, the new SDULTRASLOW is used for rigidbot panel.
@Wackerbarth I rebased this to the current RCBugFix About mills() I could do this:
I just want to confirm with you whether something like above is okay? Not sure #if || works though. |
Yes, the millis() is a better approach. As for the slowdown, let me suggest that we change the whole thing. Why do we need SDEXTRASLOW, et. al. Why not just use one of these in your configuration file when you need the slowdown.
then, in the cardreader, or Conditionals
|
Sure, let me do those changes. |
If |
@Wackerbarth @KiteLab, I think if next_button_update_ms exceeded it does not test the buttons in every interrupt. It checks in every 300ms. Furthermore, when I take that out following button stops working. Is there a way around it? |
Ah. Now i see. |
pinMode(BTN_LFT,INPUT); | ||
pinMode(BTN_RT,INPUT); | ||
#endif | ||
|
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.
Maybe SET_INPUT
is preferable over pinMode
. We already have enough problems where Arduino an FastIO pin mapping is confused.
@AnHardt Thank you. I have changed the code to use SET_INPUT instead of pinMode. |
@AnHardt, @Wackerbarth & @KiteLab If changes I made are okay, could this be merged please? Thank you. |
Looks OK to me now. |
Fixing Rigidbot LCD Panel Support
The LCD panel of Rigidbot printer is broken/not working in current RC. This PR fixes that.
Fixes are based on mikenz's MarlinFirmware/MarlinDev#184