Closed LaurentLM closed 4 years ago
Hello, the control mask for inverting buttons is in https://github.com/Schildkroet/GRBL-Advanced/blob/48cd2aa65596d6a5345bc55f2344d25d993ab9e7/grbl/util.h#L81
The actual reading happens in https://github.com/Schildkroet/GRBL-Advanced/blob/f1df62453c11b7769aae0a6ac1416a0eba1c3b0c/grbl/System.c#L61-L89
Yes, it is a bit messy right now. Maybe i find some time to fix it
I fixed the missing invert command. You can now invert your pins as you like. These are the corresponding bits https://github.com/Schildkroet/GRBL-Advanced/blob/69a3cb81a4d2d1876fe689bc3f9c87dfba74984b/grbl/Settings.h#L34-L40
You can set it with DEFAULT_SYSTEM_INVERT_MASK or $0=xxx
Thanks for looking into it, $0=0 sorted the problem. Just out of curiosity, what happened to the "Step pulse, microseconds" setting that $0 used to control?
Also, would it make sense to change this:
https://github.com/Schildkroet/GRBL-Advanced/blob/69a3cb81a4d2d1876fe689bc3f9c87dfba74984b/HAL/GPIO/GPIO.c#L187
into GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
?
That would match the standard GRBL behaviour.
I set it to a fixed value. All common drivers work the same, so i don't think it is necessary.
Makes sense. Thanks again or the great work!
Hi, Thanks for the good work, I have been using this for a mini mill for a while and it's great. I am using a Nucleo F401RE and when wiring new buttons recently, I noticed the abort/hold pins were inverted compared with standard Arduino GRBL. I have Abort on A1 & Hold on A0. I cannot find where this is defined in the code.
I also noticed they were not pulled up, but that's easy to change (line 187 of gpio.c). Not a huge deal, but I thought I'd report it.