Teacup_Firmware icon indicating copy to clipboard operation
Teacup_Firmware copied to clipboard

Wrong codes > 255 reported wrongly

Open thomaskilian opened this issue 5 years ago • 3 comments

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?

thomaskilian avatar Oct 18 '18 09:10 thomaskilian

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.

Wurstnase avatar Oct 18 '18 17:10 Wurstnase

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 ;-)

thomaskilian avatar Oct 18 '18 21:10 thomaskilian

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

Wurstnase avatar Oct 19 '18 05:10 Wurstnase