Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
change to const char* name = root[i]["name"]
  • Loading branch information
HWHardsoft authored Dec 4, 2023
1 parent ee7b4f2 commit c812e0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions emonMbus.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* MBUS master for Arduino MBUS Master Shield
* https://www.hwhardsoft.de/english/projects/m-bus-mkr-shield/
*
* Version 2.0
* Version 2.1
* Copyright (C) 2023 Hartmut Wendt www.zihatec.de
*
*
Expand Down Expand Up @@ -101,8 +101,10 @@ void loop() {
for (uint8_t i=0; i<fields; i++) {
float value = root[i]["value_scaled"].as<float>();
uint8_t code = root[i]["code"].as<int>();
const char* name = root[i]["name"];
Serial.print("Field "); Serial.print(i+1);
Serial.print(" ("); Serial.print((char *) payload.getCodeName(code));
//Serial.print(" ("); Serial.print((char *) payload.getCodeName(code));
Serial.print(" ("); Serial.print(name);
Serial.print("): ");
Serial.print(value); Serial.print(" "); Serial.print((char *) payload.getCodeUnits(code));
Serial.println();
Expand Down

0 comments on commit c812e0e

Please sign in to comment.