summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-09-29 15:35:00 +1000
committerjacqueline <me@jacqueline.id.au>2023-09-29 15:35:00 +1000
commit95618239e64d150ed2471820aa0758f72407d252 (patch)
treee8871506b0c96f4566acaa2d6dabd44a26347535 /src
parentba940baa0aff05ad26d265f32f1d185a1f410373 (diff)
downloadtangara-fw-95618239e64d150ed2471820aa0758f72407d252.tar.gz
Fix `tasks` config flag guarding
Diffstat (limited to 'src')
-rw-r--r--src/app_console/app_console.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp
index b4fef130..ebd5559a 100644
--- a/src/app_console/app_console.cpp
+++ b/src/app_console/app_console.cpp
@@ -338,11 +338,11 @@ void RegisterDbDump() {
}
int CmdTasks(int argc, char** argv) {
- if (!configUSE_TRACE_FACILITY) {
- std::cout << "configUSE_TRACE_FACILITY must be enabled" << std::endl;
- std::cout << "also consider configTASKLIST_USE_COREID" << std::endl;
- return 1;
- }
+#if (configUSE_TRACE_FACILITY == 0)
+ std::cout << "configUSE_TRACE_FACILITY must be enabled" << std::endl;
+ std::cout << "also consider configTASKLIST_USE_COREID" << std::endl;
+ return 1;
+#endif
static const std::pmr::string usage = "usage: tasks";
if (argc != 1) {
@@ -395,13 +395,13 @@ int CmdTasks(int argc, char** argv) {
str << "\t";
}
- if (configTASKLIST_INCLUDE_COREID) {
- if (start_status[i].xCoreID == tskNO_AFFINITY) {
- str << "any\t";
- } else {
- str << start_status[i].xCoreID << "\t";
- }
+#if (configTASKLIST_INCLUDE_COREID == 1)
+ if (start_status[i].xCoreID == tskNO_AFFINITY) {
+ str << "any\t";
+ } else {
+ str << start_status[i].xCoreID << "\t";
}
+#endif
str << std::fixed << std::setprecision(1) << depth_kib;
str << " KiB";
@@ -424,9 +424,9 @@ int CmdTasks(int argc, char** argv) {
});
std::cout << "name\t\t";
- if (configTASKLIST_INCLUDE_COREID) {
- std::cout << "core\t";
- }
+#if (configTASKLIST_INCLUDE_COREID == 1)
+ std::cout << "core\t";
+#endif
std::cout << "free stack\trun time" << std::endl;
for (const auto& i : info_strings) {
std::cout << i.second << std::endl;