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:
parent
cd16b4da0e
commit
da8c0297c4
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue