Giter Site home page Giter Site logo

Comments (5)

dresco avatar dresco commented on August 17, 2024 1

@rcp1 Out of interest, I was hacking around with a gamepad addon for CNCjs as well. Was working generally okay, but had a troublesome memory leak on the Pi that I never got to the bottom of..

I've just stuck my code up on github in case it's helpful to you - https://github.com/dresco/cncjs-pendant-gamecontroller

from imxrt1062.

terjeio avatar terjeio commented on August 17, 2024

... send a lot of $J=G91G21X-3.3Y0.0Z0.0F1000.00 jog commands to grblHal

Avoid this, send a single long distance jog command on key down and jog cancel on key up if possible.

It may be a stupid question, but is it expected that a full buffer leads to becoming unresponsive?

It should not - is it a bug in my code or the Teensy USB code? Can you try with setting USB_SERIAL_CDC to 1 in my_machine.h and reflash?

Is it the task of the sender to stop sending in sight of a full buffer?

Yes! It is potentially dangerous to overflow the buffer as overflowing characters are lost.

from imxrt1062.

rcp1 avatar rcp1 commented on August 17, 2024

Okay, so in general this is already an edge case since the sender does / I do not care about the buffer.

And yes, I've just tested with USB_SERIAL_CDC as 1 and it happens, too.

[VER:1.1f.20211010:]
[OPT:VNMZSL,35,1024,3,0]
[NEWOPT:ENUMS,RT+,HOME,ES,EXPR,TC,SED]
[FIRMWARE:grblHAL]
[NVS STORAGE:*FLASH]
[DRIVER:iMXRT1062]
[DRIVER VERSION:210930]
[DRIVER OPTIONS:USB.1]
[BOARD:T41U5XBB]
[AUX IO:4,3,0,0]

from imxrt1062.

rcp1 avatar rcp1 commented on August 17, 2024

@rcp1 Out of interest, I was hacking around with a gamepad addon for CNCjs as well. Was working generally okay, but had a troublesome memory leak on the Pi that I never got to the bottom of..

I've just stuck my code up on github in case it's helpful to you - https://github.com/dresco/cncjs-pendant-gamecontroller

@dresco Nice, you actually check for the acknowledge of grbl... I will probably copy that part... (see cncjs-pendant-gamepad for my current version)

from imxrt1062.

terjeio avatar terjeio commented on August 17, 2024

A pity that the Teensy is not debuggable otherwise I might be tempted to try to replicate this and find out where it hangs. But since it hangs when stressing the system beyond what I regard is safe (and is designed for) I will give it a pass for now.

What might be of interest to you is that I have modified they keypad plugin slightly so that input from a serial port or HID device can be used instead of a I2C keypad. The plugin decodes single character commands for many different functions including jogging. There are support for three different jog modes: fast, slow and step. Jog moves are terminated by sending a standard jog cancel command (on key up events).

A serial port interface will be the easiest to get working as many drivers has support for more than one port. A HID device will be more work and only a few drivers supports host mode(?). The Pro board by @phil-barrett has a connector for a second USB port so this could be used, it would be great if somebody could add host mode support for gamepads to that....

from imxrt1062.

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.