Skip to content

Commit

Permalink
Let device send only FW version itself, not including prefix nor newline
Browse files Browse the repository at this point in the history
psconfig/psinfo now print the prefix
  • Loading branch information
loostrum committed Nov 18, 2024
1 parent 6cddd5d commit 2ab0f64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 2 additions & 5 deletions device/PowerSensor/PowerSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,9 @@ void serialEvent() {
break;
case 'V':
// Send firmware version in human-readable format
Serial.print("Firmware version: ");
#ifdef DEMO
Serial.print(VERSION);
Serial.println("-DEMO");
#else
Serial.println(VERSION);
#ifdef DEMO
Serial.print("-DEMO");
#endif
break;
case 'Z':
Expand Down
3 changes: 1 addition & 2 deletions host/src/psconfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ void autoCalibrate() {


void print() {
// firmware version
std::cout << powerSensor->getVersion() << std::endl;
std::cout << "Device firmware version: " << powerSensor->getVersion() << std::endl;

PowerSensor3::State startState, stopState;

Expand Down
3 changes: 1 addition & 2 deletions host/src/psinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ void getPowerSensor(std::string device) {


void printInfo() {
// firmware version
std::cout << powerSensor->getVersion() << std::endl;
std::cout << "Device firmware version: " << powerSensor->getVersion() << std::endl;

PowerSensor3::State state = powerSensor->read();

Expand Down

0 comments on commit 2ab0f64

Please sign in to comment.