Strange print issue terminal

Hio… having issues with this blasted terminal. >.< might just need a pair of fresh eyes or its something else. (fishy… :fish: buggy… :bug: ). I just can’t see why this happens as every other print works.

Operation
I’m using a custom function for printing data both to serial monitor and to blynk terminal
Looks like this

void printEvent(const String& txt)
{
  String log_event = getTimeStamp() + ": " + txt;
  Serial.println(log_event);  
  if (Blynk.connected())
  {
    terminal.println(txt);
    terminal.flush();
  }
}

The getTimeStamp function returns current time in the format of “HH:MM:SS” as a string.

Problem
If you look at the images, the terminal somehow breaks on the “Recheck time” string, but works as it should on the serial monitor. And for some reason the texts I am to print before the “Chip RstReason…” is not showing.

// in setup vv
Blynk.syncAll();
delay(10);
sendRstReason();                    // @ D_SleepHandler
// in setup ^^ 

/* ----------- CUSTOM_SETTINGS ----------- */
BLYNK_WRITE(vPin_sleepSlider)
{
  sleepInterval = param.asInt();
  printEvent(String("Sleep time: ") + String(60/sleepInterval) + String(" minutes"));  
  Blynk.virtualWrite(vPin_sleepTimeSet, String(60/sleepInterval));
}

BLYNK_WRITE(vPin_recheckSlider)
{  
  recheckTime = param.asInt();  
  printEvent(String("Recheck time: ") + param.asStr() + " seconds");     
  Blynk.virtualWrite(vPin_recheckTimeSet, recheckTime);
}

void sendRstReason()
{
  printText = "Wake Reason: ";
  printText += ((doorBoot) ? "Timer" : "Door open");  
  printEvent(printText);
  
  printText = "Chip RstReason: ";
  printText += (rstReason = ESP.getResetReason());
  printEvent(printText);
}

Try using the Blynk.virtualWrite() method instead… there appears to be some dissimilarities between the two methods still

Alright will do :slight_smile: I suppose I must hard code the linebreaks myself then with escaped n ?
Not at home now so can’t test =D

This should do the same thing…

Blynk.virtualWrite(Vx, txt + "\n");

1 Like

It did the trick, though I do not like that as a “Solution” :wink: I’ll be happy for now