Giter VIP home page Giter VIP logo

Comments (7)

5ocworkshop avatar 5ocworkshop commented on July 21, 2024

It's after midnight here and I posted my message and shut things down and left the shop. As I was about to turn in for the night I thought "I wonder if I'm blocking the light by accident". So I stuck a delay(2000) in after the rgb_set_state(RGB_WHITE) call and sure enough the light popped on.

I'll improve my state handling in the morning, so you can disregard my request.

Before I forget though, I did have to change something in your code to get it to compile. I changed line 86 in your mcode example from:

return state == Status_Unhandled && user_mcode.validate ? user_mcode.validate(gc_block, parameter_words) : state;

to

return state == Status_Unhandled && user_mcode.validate ? user_mcode.validate(gc_block, deprecated) : state;

It was a guess on my part, please advise if this is a valid change.

Thanks.

from core.

terjeio avatar terjeio commented on July 21, 2024

So I stuck a delay(2000) in

If you want your plugin to be generic (usable by all drivers having enough ioports) use
hal.delay_ms(2000, NULL);
instead.

It was a guess on my part, please advise if this is a valid change.

It is valid, I'll fix the template.

from core.

5ocworkshop avatar 5ocworkshop commented on July 21, 2024

If you want your plugin to be generic (usable by all drivers having enough ioports) use
hal.delay_ms(2000, NULL);
instead.

Yes, I would like it to be usable by all drivers.

I only threw the delay in temporarily as a debug method since I knew it would block, but is that hal call a non-blocking way to generate a delay? That would be very helpful.

from core.

5ocworkshop avatar 5ocworkshop commented on July 21, 2024

Also, I noticed the "plugins" link in the last sentence of the readme summary on the Templates repo is a broken link.

"The HAL supports a wide range of extension possibilities, this without touching the core grbl codebase. Some examples can be found in the plugins folder."

from core.

5ocworkshop avatar 5ocworkshop commented on July 21, 2024

I was just looking through the codes at Marlin and this one caught my eye (amusingly, only 1 off from the code I chose). Is it your preference to adopt codes already in use at Marlin, in applicable? This one is a reasonable approximation of the inspection light function I am adding: https://marlinfw.org/docs/gcode/M355.html

from core.

terjeio avatar terjeio commented on July 21, 2024

First stop for determining a new M-code is LinuxCNC then Marlin. If no good match is found I try to avoid Marlin codes that has a fair chance of beeing relevant for grblHAL.

from core.

terjeio avatar terjeio commented on July 21, 2024

but is that hal call a non-blocking way to generate a delay

Yes, if you supply a callback function. Note that currently only one callback can be active at any time - I plan to change this.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.