color refactoring
This commit is contained in:
@ -118,28 +118,28 @@ static void parseAndPrintFrame(t_mbusCommHandle *mbusCommHandle) {
|
||||
mbus_data_variable *data_var = &(frame_data.data_var);
|
||||
logMsg("papf sts: %02x", data_var->header.status);
|
||||
if ((data_var->header.status & 0x01)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Application Busy\x1b[0m");
|
||||
errMsg("papf sts: Application Busy");
|
||||
}
|
||||
if ((data_var->header.status & 0x02)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Any Application Error\x1b[0m");
|
||||
errMsg("papf sts: Any Application Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x04)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Power Low\x1b[0m");
|
||||
errMsg("papf sts: Power Low");
|
||||
}
|
||||
if ((data_var->header.status & 0x08)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Permanent Error\x1b[0m");
|
||||
errMsg("papf sts: Permanent Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x10)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Temporary Error\x1b[0m");
|
||||
errMsg("papf sts: Temporary Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x20)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 1\x1b[0m");
|
||||
errMsg("papf sts: Specific to manufacturer Error 1");
|
||||
}
|
||||
if ((data_var->header.status & 0x40)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 2\x1b[0m");
|
||||
errMsg("papf sts: Specific to manufacturer Error 2");
|
||||
}
|
||||
if ((data_var->header.status & 0x80)) {
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 3\x1b[0m");
|
||||
errMsg("papf sts: Specific to manufacturer Error 3");
|
||||
}
|
||||
mbus_data_record *record;
|
||||
int i;
|
||||
@ -161,7 +161,6 @@ static void parseAndPrintFrame(t_mbusCommHandle *mbusCommHandle) {
|
||||
} else {
|
||||
logMsg("papf err: unable to parse frame");
|
||||
}
|
||||
logMsg("\x1b[0m");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user