LennartHennigs / ESPTelnet

ESP library that allows you to setup a telnet server for debugging.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change to "send indvidual characters"

LennartHennigs opened this issue · comments

    // 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 #6 (comment)

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.

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.

Ah, I see. thank you!