馃悰 Prevent MString infinite recursion - #26037
Conversation
|
The bootlooping has stopped with this PR, but now temperatures are not reported correctly over serial: OctoPrint log:
I also can't connect to the motherboard with a BTT TFT (connected over serial) and it always says "No printer attached!". |
|
No change on eeprom issue. stock RAMPS with EEPROM_SETTINGS enabled (and the sim) M500
|
That is because the temperature reporting is completely broken/missing after #24390 and #26037. The BTT TFT uses the temperature reporting to confirm it's connected. |
I don't see an error on an SKR V3 (with onboard EEPROM): Also no error with an SKR V2 (emulated EEPROM via flash): |
|
@thisiskeithb Marlin/Marlin/src/module/temperature.cpp Line 4184 in 4985aca to: #ifdef SERIAL_FLOAT_PRECISION
#define SFP _MIN(SERIAL_FLOAT_PRECISION, 2)
#else
#define SFP 2
#endifand: Marlin/Marlin/src/module/temperature.cpp Line 4188 in 4985aca to: s += F(":"); s += p_float_t(c, SFP);This should resolve the temperature reporting issue and possibly the connection with the BTT TFT. |
Indeed, that does fix the temperature reporting & BTT TFT connectivity issues. |
Followup to #24390
Add a single
typename Ttemplate forMString::appendto handle unspecified types (by appending '?' to the string). This removes the infinite recursion warning for the variadic templateMString::append(T, ...)and may avoid actual infinite recursion if unhandled types are passed inMString::append(T, ...).Add a standard handler for explicit
int8_t&so this type will be handled as a small integer instead of being handled as acharor deferring to the fallbacktypename T.Suppress warnings about deprecated
sprintfon native platforms.