mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Some cli improvements
Improve loop rate formatting Show cpu temperature in sys command
This commit is contained in:
parent
965813e8f0
commit
81037d94ec
@ -36,7 +36,7 @@ const char* motd =
|
|||||||
"cr - calibrate RC\n"
|
"cr - calibrate RC\n"
|
||||||
"ca - calibrate accel\n"
|
"ca - calibrate accel\n"
|
||||||
"mfr, mfl, mrr, mrl - test motor (remove props)\n"
|
"mfr, mfl, mrr, mrl - test motor (remove props)\n"
|
||||||
"sys - show system information\n"
|
"sys - show system info\n"
|
||||||
"reset - reset drone's state\n"
|
"reset - reset drone's state\n"
|
||||||
"reboot - reboot the drone\n";
|
"reboot - reboot the drone\n";
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ void doCommand(String str, bool echo = false) {
|
|||||||
resetParameters();
|
resetParameters();
|
||||||
} else if (command == "time") {
|
} else if (command == "time") {
|
||||||
print("Time: %f\n", t);
|
print("Time: %f\n", t);
|
||||||
print("Loop rate: %f\n", loopRate);
|
print("Loop rate: %.0f\n", loopRate);
|
||||||
print("dt: %f\n", dt);
|
print("dt: %f\n", dt);
|
||||||
} else if (command == "ps") {
|
} else if (command == "ps") {
|
||||||
Vector a = attitude.toEulerZYX();
|
Vector a = attitude.toEulerZYX();
|
||||||
@ -108,7 +108,7 @@ void doCommand(String str, bool echo = false) {
|
|||||||
print("gyro: %f %f %f\n", rates.x, rates.y, rates.z);
|
print("gyro: %f %f %f\n", rates.x, rates.y, rates.z);
|
||||||
print("acc: %f %f %f\n", acc.x, acc.y, acc.z);
|
print("acc: %f %f %f\n", acc.x, acc.y, acc.z);
|
||||||
printIMUCal();
|
printIMUCal();
|
||||||
print("rate: %f\n", loopRate);
|
print("rate: %.0f\n", loopRate);
|
||||||
print("landed: %d\n", landed);
|
print("landed: %d\n", landed);
|
||||||
} else if (command == "rc") {
|
} else if (command == "rc") {
|
||||||
print("Raw: throttle %d yaw %d pitch %d roll %d armed %d mode %d\n",
|
print("Raw: throttle %d yaw %d pitch %d roll %d armed %d mode %d\n",
|
||||||
@ -138,6 +138,7 @@ void doCommand(String str, bool echo = false) {
|
|||||||
} else if (command == "sys") {
|
} else if (command == "sys") {
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
print("Chip: %s\n", ESP.getChipModel());
|
print("Chip: %s\n", ESP.getChipModel());
|
||||||
|
print("Temperature: %.1f °C\n", temperatureRead());
|
||||||
print("Free heap: %d\n", ESP.getFreeHeap());
|
print("Free heap: %d\n", ESP.getFreeHeap());
|
||||||
// Print tasks table
|
// Print tasks table
|
||||||
print("Num Task Stack Prio Core CPU%%\n");
|
print("Num Task Stack Prio Core CPU%%\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user