probonopd / WirelessPrinting

Print wirelessly from Cura, PrusaSlicer or Slic3r to your 3D printer connected to an ESP8266 or ESP32 module
352 stars 65 forks source link

Clean up telnet log #84

Closed probonopd closed 5 years ago

probonopd commented 5 years ago

I do not understand what the following means:

Unhandled line received:`// This does not start with < or > because it is a comment
<T:41.52 E:0 B:29.1 // This has been received by the printer
T:44.16 E:0 B:29.1 // WHAT IS THIS?
T:47.67 E:0 B:29.5 // WHAT IS THIS?
GMagician commented 5 years ago

ok.. that's a weird thing in prusa firmware...

        KEEPALIVE_STATE(NOT_BUSY);
        while ( (target_direction)&&(!cancel_heatup) ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) )
        {
          if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up.
          {
              if (!farm_mode) {
                  float tt = degHotend(active_extruder);
                  SERIAL_PROTOCOLPGM("T:");
                  SERIAL_PROTOCOL(tt);
                  SERIAL_PROTOCOLPGM(" E:");
                  SERIAL_PROTOCOL((int)active_extruder);
                  SERIAL_PROTOCOLPGM(" B:");
                  SERIAL_PROTOCOL_F(degBed(), 1);
                  SERIAL_PROTOCOLLN("");
              }
                  codenum = millis();

}

if set system not busy and when open a loop waiting for temp...and it report a custom temp message

WOW it is busy to wait temp but it set a no busy state....that may be defined as pure logic!

probonopd commented 5 years ago

Why are some lines not prefixed with <? Are they not coming from the printer?

GMagician commented 5 years ago

yes since there is no ok and is not parsed as a know line it goes to "unhandled"

GMagician commented 5 years ago

..and there no timeout reset... I'm working now to fix this and other issue

probonopd commented 5 years ago

We should make the code more robust by printing everything coming from the printer to telnet, prefixed with <, and reset the "alive" timer. Regardless of what it is. And only thereafter try to do something with it. If we can't do something with the line, we could say "Last line could not be interpreted".