diff --git a/device/PowerSensor/PowerSensor.ino b/device/PowerSensor/PowerSensor.ino index d73eb01..04ecc17 100644 --- a/device/PowerSensor/PowerSensor.ino +++ b/device/PowerSensor/PowerSensor.ino @@ -278,9 +278,11 @@ void serialEvent() { break; case 'V': // Send firmware version in human-readable format - Serial.print(VERSION); #ifdef DEMO - Serial.print("-DEMO"); + Serial.print(VERSION); + Serial.println("-DEMO"); +#else + Serial.println(VERSION); #endif break; case 'Z': diff --git a/host/src/PowerSensor.cc b/host/src/PowerSensor.cc index bb95030..9812302 100644 --- a/host/src/PowerSensor.cc +++ b/host/src/PowerSensor.cc @@ -596,6 +596,8 @@ std::string PowerSensor::getVersion() { c = readCharFromDevice(); version += c; } + // remove newline from version string + version.pop_back(); startIOThread(); return version; }