1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

[CLI] Function "print time" added

This commit is contained in:
Bertrand Songis 2015-10-12 23:02:13 +02:00
parent cd16b4da0e
commit da8c0297c4

View file

@ -235,6 +235,11 @@ int cliDisplay(const char ** argv)
serialPrint("outputs[%d] = %04X", i, channelOutputs[i]);
}
}
else if (!strcmp(argv[1], "time")) {
struct gtm utm;
gettime(&utm);
serialPrint("time = %4d-%02d-%02d %02d:%02d:%02d.%02d0,", utm.tm_year+1900, utm.tm_mon+1, utm.tm_mday, utm.tm_hour, utm.tm_min, utm.tm_sec, g_ms100);
}
else if (toInt(argv, 1, &address) > 0) {
int size = 256;
if (toInt(argv, 2, &size) >= 0) {