-
Notifications
You must be signed in to change notification settings - Fork 7
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
unlock,reset and status while in alarm or estop #12
Comments
Hmm, I think the new task executor might be a cleaner fix. Change this line to: |
I tried your suggestions but I've only had partial success, couple issues
does this make sense to you? |
|
I'm testing on a makerbase DLC 32 so ESP32 driver, the board is not powered by USB. |
Real-time requests are not passed through from the keypad plugin, the version above should do so. But perhaps it should not, in normal operation two clients should not requests status reports simultaneously, either enable auto-reporting or MPG mode? With MPG mode enabled the keypad client should take full control if the main stream is silent and only then request regular status reports. |
This is something I already tried, I commented out the line you changed, but as I told you I can see the status request command coming in but I get a response for the first 4 polls and then silence. I understand that status report should only be requested while in exclusive access, but right now my code checks for status reports and if none are received starts polling (without entering MPG) and as soon as reports are detected (with a period less than 250ms) it stops requesting, some sort of automatic fallback. Do status polling requests pose some risks if for any reason they are received from 2 streams? |
It might be that one of the stream output buffers fills up and then blocks? This function will be called repeatedly if so.
Some senders may not like to get unsolicited reports, so I consider it risky. |
ok, then I'll have to try a new approach: I'll let you know if this along the changes you suggest will allow for reset and unlock in estop and alarm modes |
I have a ESP32-S3 dev board at hand and just verified that keypad status requests get sent to the MPG stream even when the main stream, which is a native USB stream, is not connected to a client. I have only one USB C cable available so cannot check that the USB stream is getting data when connected, but I believe it is. |
MPG or keypad stream? Remember that in my use case scenario MPG is not enabled, perhaps that's the issue? |
Ok, the keypad plugin alone is input only. If you want output to the stream used by the keypad you have to enable MPG output (mode 1) as well. More here. |
sorry I should have said MPG is enabled but MPG mode is off i.e. MPG:0, and when MPG:0 I'd like to be able to request status reports and allow for unlock and reset |
but I understand that's the very reason you provide MPG mode :-) I was hoping to replicate what Log2K does but it's using I2C so another story actually |
add X (and H) to the tests in line175+ to keypad.c I linked above:
ok? |
unfortunately I already tried relaxing these conditions by commenting it and no joy, but I'll try using proper MPG mode and should work |
My memory is failing me, too many details to keep track of... |
this does not work on DLC32 but does work on STM32Fxx, so I guess that on the DLC32 somethink is blocking the tx buffer, so thanks a lot :-) |
Hi,
I'd like to be able to reset, unlock and get realtime status reports while in alarm or estop, I kind of hacked the code together getting an inspiration from the Log2k plugin code, it "seems" to work all right but I might be missing something.
BTW I had to remap macro codes for making all this work to 0xF[1-8]
this is my branch
https://github.com/yaapu/Plugin_keypad/blob/yaapu/keypad/keypad.c
The text was updated successfully, but these errors were encountered: