terjeio / grblHAL

This repo has moved to a new home https://github.com/grblHAL
231 stars 90 forks source link

Control, limit, coolant now managed and Probe, safety door managed through digital SR Latch #277

Closed Volksolive closed 3 years ago

Volksolive commented 3 years ago

Control, limit, safety door and probe input are now managed through IRQ, no debounce for control input but that can easily be added. Safety door and probe are managed through a digital SR latch as discussed and seems to work fine. I couldn't try the probing though, only tested with a terminal and ? report. The SR latch could also easily be added to all input.

Regarding the inversion of pin signal, I have not done the same thing as the other drivers. In other drivers, the pull up disable is XORed with the invert but I don't really see the point of that. F.ex when using an active proximity sensor, you would disable the pull up but that doesn't mean that the signal has to be inverted. Anyway I can modify my code to align with other driver if needed, let me know. I have used the inover / outover function of the Pico to invert the signal between the pad and peripheral so I always check for the signal being "normal" (not inverted) and don't do any invert computation on the signal, only the config of the signal during the setting change.

For info, as the code is right now I get an error in usb_serial.c for #define "tusb.h" : No such file or directory also for eeprom_xxx.c, I have to had ../driver.h to compile

USB wasn't working for me so I commented the #define USB_SERIAL_CDC in driver,h so you can ignore my change and also the #define ENABLE_SAFETY_DOOR_INPUT_PIN in config.h. I made a bit of cleaning in generic_map, removed all the PORT define that are not needed for the pico. I kept the outmode as these can be used for IO expander if needed.

terjeio commented 3 years ago

Thanks, this will be the last merge accepted for this repo and I will stop updating it. Switch to the new repo found here.