Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Wrong codes > 255 reported wrongly #308

Open
thomaskilian opened this issue Oct 18, 2018 · 3 comments
Open

Wrong codes > 255 reported wrongly #308

thomaskilian opened this issue Oct 18, 2018 · 3 comments

Comments

@thomaskilian
Copy link

I was puzzled why Teacup echoes 144 after a M400:

2018-10-17 11:19:08,262 - Send: N32239 M400*46
2018-10-17 11:19:08,319 - Recv: E: Bad M-code 144

Well, obviously it assumes the code to be < 256. A test shows that sending M255 will report a 0.

For sure no high priority. But probably not difficult to fix, I guess?

@Wurstnase
Copy link
Collaborator

Yes, gcode is parsed to 8bit. So numbers should be between 0 and 255.
We could increase this to 16bit, but most gcodes are not supported > 255.

Teacup wants to be small and compact. So instead of M400 this command in Teacup is G4. You can use it with P. E.g. G4 P100. Then this will wait also for 100 milliseconds.

@thomaskilian
Copy link
Author

Yes, I know about G4 (it's mentioned in the Reprap wiki). However, I thought that 16 instead of 8 bit would not blow the whole thing. And today you get 15€ boards with everything on it from Chine with a large processor. So the need for tiny tiny is not as demanding as, say, 1-2 years ago.

Maybe (dunno) it's possible to parametrize this so Scotsmen can use 8 bit and wealthy oligarchs can use 16 bits ;-)

@Wurstnase
Copy link
Collaborator

Yes, but why using 16bit, when you don't need it? 🤔
All teacup commands are between 0 and 255.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants