From 89c7e3822099b9dcbf77433b6aeb1bcef2c4eb0b Mon Sep 17 00:00:00 2001 From: dmezh <54985569+dmezh@users.noreply.github.com> Date: Fri, 26 Feb 2021 21:48:42 +0000 Subject: [PATCH 1/3] Added yellow NOTE: Yellow shows up as white on my terminal for some reason so it is temporarily set as cyan --- src/core.cpp | 2 +- src/core.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.cpp b/src/core.cpp index 9959da8..b82d15d 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -12,7 +12,7 @@ namespace core void estop() { current_mode = modes::ESTOP; - LOGMSG(core, 1, "ESTOP TRIGGERED! Previous mode: %d", current_mode.load()); + LOGMSG(core, 2, "ESTOP TRIGGERED! Previous mode: %d", current_mode.load()); LOGMSG(core, 1, "-> Now exiting after estop"); exit(99); } diff --git a/src/core.h b/src/core.h index 536d3c8..788e3a4 100644 --- a/src/core.h +++ b/src/core.h @@ -39,10 +39,10 @@ namespace core int _LOGMSG_len = (int)strlen(#TASK);\ int _LOGMSG_adj = (16-_LOGMSG_len)%2 ? 0 : 1;\ fprintf(stderr, "%s[ %*c%s%*c ]\t" COLOR_NORMAL msg "\n", \ - (angry ? COLOR_RED : COLOR_GREEN), \ + (angry == 0) ? COLOR_GREEN : ((angry == 1) ? COLOR_RED : COLOR_CYAN), \ (16-_LOGMSG_len)/2, ' ', #TASK, \ (16-_LOGMSG_len)/2 - _LOGMSG_adj, ' '\ __VA_OPT__(,) __VA_ARGS__);\ } while(0) -#endif \ No newline at end of file +#endif From cadce8c0cb2d7899b912634538ef542fe897e8c9 Mon Sep 17 00:00:00 2001 From: dmezh <54985569+dmezh@users.noreply.github.com> Date: Fri, 26 Feb 2021 22:22:31 +0000 Subject: [PATCH 2/3] ssh from new user test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 From 884aa1cd5ad110449e58d1b467d58a133c90ecc3 Mon Sep 17 00:00:00 2001 From: Neil Sawhney Date: Fri, 26 Feb 2021 23:00:40 +0000 Subject: [PATCH 3/3] on ctrl-c confirmation, message is now cyan instead of red. (will later be changed to yellow) --- src/core.cpp | 2 +- src/watchdog.cpp | 2 +- test | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 test diff --git a/src/core.cpp b/src/core.cpp index b82d15d..9959da8 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -12,7 +12,7 @@ namespace core void estop() { current_mode = modes::ESTOP; - LOGMSG(core, 2, "ESTOP TRIGGERED! Previous mode: %d", current_mode.load()); + LOGMSG(core, 1, "ESTOP TRIGGERED! Previous mode: %d", current_mode.load()); LOGMSG(core, 1, "-> Now exiting after estop"); exit(99); } diff --git a/src/watchdog.cpp b/src/watchdog.cpp index fe97556..aca35e2 100644 --- a/src/watchdog.cpp +++ b/src/watchdog.cpp @@ -50,7 +50,7 @@ int main() { if (sigcaught) { // use of many functions (like fprintf) is limited inside signal handlers, so do it here putchar('\n'); - LOGMSG(watchdog, 1, "!!! Caught SIGINT, will exit on next occurence!"); + LOGMSG(watchdog, 2, "!!! Caught SIGINT, will exit on next occurence!"); sigcaught = 0; } diff --git a/test b/test deleted file mode 100644 index e69de29..0000000