LennartHennigs / ESPTelnet

ESP library that allows you to setup a telnet server for debugging.
MIT License
213 stars 32 forks source link

change to "send indvidual characters" #26

Closed LennartHennigs closed 1 year ago

LennartHennigs commented 1 year ago
    // send indvidual characters
} else {
  if (on_input != NULL) {
    if (input.length()) {
      on_input(input + c);//**
      input = "";
    } else {
      on_input(String(c));
    }
  }

//** on_input(input + String(c));

Originally posted by @kantat in https://github.com/LennartHennigs/ESPTelnet/issues/6#issuecomment-1258463723

LennartHennigs commented 1 year ago

Hey @kantat, please help me understand your comment.

You changed lines 125ff in ESPTelnet.c from this...

// send individual characters
} else {
      if (on_input != NULL) {
        if (input.length()) {
          on_input(input + c);
          input = "";
        } else {
          on_input(String(c));
        }
      }

...to this...

// send individual characters
} else {
      if (on_input != NULL) {
        if (input.length()) {
          on_input(input + String(c));
        }
      }

Could you please explain your change a bit more? Thx and cheers, l.

kantat commented 1 year ago

VS2022 + vMicro. ESP8266. The compiler cursed at the specified line. Corrected for the proposed entry. Compiler notes are now missing. Thanks for YOUR work. I am retired and this is my hobby.

LennartHennigs commented 1 year ago

Ah, I see. thank you!