Anyone know what is the proper way to program to get text to print

Anyone know what is the proper way to program to get text to print on the next line on an LCD in smoothieware? See example: This is obviously not programmed correctly.

Have you tried \n ?

@Dushyant_Ahuja that works, but it indents it all the way to the right and breaks it into two lines. Also adds a weird 0 symbol after the first line.

Hmmm. That’s not good. maybe @Arthur_Wolf ​ can help.

@Dushyant_Ahuja How would you write it? Just to make sure I got it right.

This is what it looks like.
missing/deleted image from Google+

\r\n ?

@Arthur_Wolf is this correct? I’ve tried many ways and still get the same result.

return “Printer HALTED.”
“\r\nReset power.”;

I’m not sure what’s up with the two strings on separate lines there, is that even valid C++ ?
You just do :

return “Printer HALTED.\r\nReset power.”;

Tried that already, it gives the same result :frowning: Any ideas?

Well, I believe the panel isn’t done to be controlled like a console ( with
carriage returns etc ), but rather that you are going to have to look at
the panel code, and see how to actually get it to display two separate
lines, with the proper function calls to the underlying panel driver.

Which file(s) would that be? My C++ isn’t so good. Is it Panel.cpp?

@Arthur_Wolf C++ will never see it, the two strings are just concatenated by the CPP.

@Shai_Schechter You are going to have to browse the panel folder and understand how it all interconnects and find what you want, you can’t really do modifications to Smoothie in the “understand the minimum required for it to run” mode and still do safe edits … Have to dig a bit.

Maybe just add spaces and it will wrap automatically?