debug review

- DPRINT_IVID
- MI: some small changes
This commit is contained in:
rejoe2 2023-03-24 15:26:14 +01:00 committed by GitHub
parent 5a1a600327
commit 32092ede0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 123 additions and 113 deletions

View file

@ -143,10 +143,11 @@ class Inverter {
template <typename T>
void enqueCommand(uint8_t cmd) {
_commandQueue.push(std::make_shared<T>(cmd));
DPRINT(DBG_INFO, F("(#"));
DBGPRINT(String(id));
DBGPRINT(F(") enqueCommand: 0x"));
DHEX(cmd);
DPRINT_IVID(DBG_INFO, id);
//DPRINT(DBG_INFO, F("(#"));
//DBGPRINT(String(id));
DBGPRINTLN(F("enqueCommand: 0x") + String(cmd, HEX));
//DBGHEXLN(cmd);
}
void setQueuedCmdFinished() {
@ -289,7 +290,8 @@ class Inverter {
alarmMesIndex = rec->record[pos];
//enqueCommand<InfoCommand>(AlarmUpdate); // What is the function of AlarmUpdate?
DPRINTLN(DBG_INFO, "alarm ID incremented to " + String(alarmMesIndex));
DPRINT(DBG_INFO, "alarm ID incremented to ");
DBGPRINTLN(String(alarmMesIndex));
enqueCommand<InfoCommand>(AlarmData);
}
}
@ -303,7 +305,7 @@ class Inverter {
DPRINTLN(DBG_DEBUG, "add config");
if (getPosByChFld(0, FLD_ACT_ACTIVE_PWR_LIMIT, rec) == pos){
actPowerLimit = rec->record[pos];
DPRINT(DBG_DEBUG, F("Inverter actual power limit: ") + String(actPowerLimit, 1));
DPRINTLN(DBG_DEBUG, F("Inverter actual power limit: ") + String(actPowerLimit, 1));
}
}
else if (rec->assign == AlarmDataAssignment) {