Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Show unspecified core as * in sys command

Oleg Kalacheve389d717d66e
diff --git a/flix/cli.ino b/flix/cli.ino
index 9e21e8b..f611106 100644
--- a/flix/cli.ino
+++ b/flix/cli.ino
@@ -145,9 +145,9 @@ void doCommand(String str, bool echo = false) {
uint32_t totalRunTime;
uxTaskGetSystemState(systemState, taskCount, &totalRunTime);
for (int i = 0; i < taskCount; i++) {
- int core = systemState[i].xCoreID == tskNO_AFFINITY ? -1 : systemState[i].xCoreID;
+ String core = systemState[i].xCoreID == tskNO_AFFINITY ? "*" : String(systemState[i].xCoreID);
int cpuPercentage = systemState[i].ulRunTimeCounter / (totalRunTime / 100);
- print("%-5d%-20s%-7d%-6d%-6d%d\n",systemState[i].xTaskNumber, systemState[i].pcTaskName,
+ print("%-5d%-20s%-7d%-6d%-6s%d\n",systemState[i].xTaskNumber, systemState[i].pcTaskName,
systemState[i].usStackHighWaterMark, systemState[i].uxCurrentPriority, core, cpuPercentage);
}
delete[] systemState;