more colors
This commit is contained in:
parent
e3bbc8e61b
commit
bef20bcaed
@ -173,7 +173,7 @@ void scheduleMBusRequest(void *handle) {
|
||||
if (devices[i].delay <= 0) {
|
||||
devices[i].delay = devices[i].period;
|
||||
devices[i].waiting = true;
|
||||
logMsg("\x1b[7m *** Scheduled: %s\x1b[0m ", devices[i].deviceName);
|
||||
logMsg("\x1b[32;1m *** Scheduled: %s\x1b[0m ", devices[i].deviceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,6 @@ static t_mbusCommHandle mbusCommHandle = { .state = MBCS_IDLE, .retryCnt = 0, .c
|
||||
|
||||
|
||||
static void parseAndPrintFrame(t_mbusCommHandle *mbusCommHandle) {
|
||||
logMsg("\x1b[1m");
|
||||
t_longframe *frame = &(mbusCommHandle->frame);
|
||||
|
||||
mbus_frame reply;
|
||||
@ -119,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("papf sts: Application Busy");
|
||||
logMsg("\x1b[31;1mpapf sts: Application Busy\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x02)) {
|
||||
logMsg("papf sts: Any Application Error");
|
||||
logMsg("\x1b[31;1mpapf sts: Any Application Error\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x04)) {
|
||||
logMsg("papf sts: Power Low");
|
||||
logMsg("\x1b[31;1mpapf sts: Power Low\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x08)) {
|
||||
logMsg("papf sts: Permanent Error");
|
||||
logMsg("\x1b[31;1mpapf sts: Permanent Error\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x10)) {
|
||||
logMsg("papf sts: Temporary Error");
|
||||
logMsg("\x1b[31;1mpapf sts: Temporary Error\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x20)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 1");
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 1\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x40)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 2");
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 2\x1b[0m");
|
||||
}
|
||||
if ((data_var->header.status & 0x80)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 3");
|
||||
logMsg("\x1b[31;1mpapf sts: Specific to manufacturer Error 3\x1b[0m");
|
||||
}
|
||||
mbus_data_record *record;
|
||||
int i;
|
||||
@ -150,7 +149,7 @@ static void parseAndPrintFrame(t_mbusCommHandle *mbusCommHandle) {
|
||||
for (uint8_t j = 0; j < MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS; j++) {
|
||||
if ((mbusCommHandle->device->consideredField[j].index == i) &&
|
||||
(strlen(mbusCommHandle->device->consideredField[j].label) > 0)) {
|
||||
logMsg("papf txt: I:%d, L:%s, U:%s V:%s",
|
||||
logMsg("\x1b[1mpapf txt: I:%d, L:%s, U:%s V:%s\x1b[0m",
|
||||
i,
|
||||
mbusCommHandle->device->consideredField[j].label,
|
||||
mbus_data_record_unit(record),
|
||||
@ -422,7 +421,7 @@ e_mbusCommRequestResult mbusCommRequest(t_mbusDevice *mbusDevice) {
|
||||
|
||||
if (mbusCommHandle.state == MBCS_IDLE) {
|
||||
logMsg("");
|
||||
logMsg("*** NEW REQUEST %s R:%d F:%d C:%d ***",
|
||||
logMsg("\x1b[34;1m*** NEW REQUEST %s R:%d F:%d C:%d ***\x1b[0m",
|
||||
mbusDevice->deviceName,
|
||||
mbusDevice->requests,
|
||||
mbusDevice->failures,
|
||||
|
Loading…
x
Reference in New Issue
Block a user