diff --git a/src/ui/DebugConsole.cc b/src/ui/DebugConsole.cc index 2684e3ad603a06d087fdfcf9754a1004158c004a..e6ee4e188c156608cd37cf269ba0a28dacb11f4d 100644 --- a/src/ui/DebugConsole.cc +++ b/src/ui/DebugConsole.cc @@ -299,12 +299,21 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes) { // Accept line feed and tab case (unsigned char)'\n': + { + if (lastByte != '\r') + { + // Do not break line again for CR+LF + // only break line for single LF bytes + str.append(byte); + } + } + break; case (unsigned char)'\t': str.append(byte); break; // Catch and ignore carriage return case (unsigned char)'\r': - // Ignore + str.append(byte); break; default: str.append(QChar(QChar::ReplacementCharacter)); @@ -324,6 +333,7 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes) str.append(str2); } lineBuffer.append(str); + lastByte = byte; } else { @@ -340,8 +350,6 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes) m_ui->receiveText->ensureCursorVisible(); lineBuffer.clear(); } - - } else if (link == currLink && holdOn) { diff --git a/src/ui/HDDisplay.cc b/src/ui/HDDisplay.cc index d598f458fdafa244affd911148dabac7130a8d34..608dc665f356443171aea9aed7336af1ccb339c3 100644 --- a/src/ui/HDDisplay.cc +++ b/src/ui/HDDisplay.cc @@ -293,12 +293,12 @@ void HDDisplay::addGauge() } else { - items.append(QString("%1,%2,%3,%4").arg("-180").arg(key).arg(unit).arg("+180")); + items.append(QString("%1,%2,%3,%4").arg("0").arg(key).arg(unit).arg("+100")); } } bool ok; QString item = QInputDialog::getItem(this, tr("Add Gauge Instrument"), - tr("Format: min, curve name, max[,s]"), items, 0, true, &ok); + tr("Format: min, curve name, unit, max[,s]"), items, 0, true, &ok); if (ok && !item.isEmpty()) { addGauge(item);