1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Timer implementation from INAV

This commit is contained in:
Bas Delfos 2017-10-29 12:29:44 +01:00
parent 116280f7e1
commit 800e44906d
12 changed files with 386 additions and 30 deletions

View file

@ -24,6 +24,7 @@
#include <ctype.h>
#include "platform.h"
#include "common/time.h"
// FIXME remove this for targets that don't need a CLI. Perhaps use a no-op macro when USE_CLI is not enabled
// signal that we're in cli mode
@ -2958,6 +2959,15 @@ static void cliStatus(char *cmdline)
UNUSED(cmdline);
cliPrintLinef("System Uptime: %d seconds", millis() / 1000);
#ifdef USE_RTC_TIME
char buf[FORMATTED_DATE_TIME_BUFSIZE];
dateTime_t dt;
rtcGetDateTime(&dt);
dateTimeFormatLocal(buf, &dt);
cliPrintLinef("Current Time: %s", buf);
#endif
cliPrintLinef("Voltage: %d * 0.1V (%dS battery - %s)", getBatteryVoltage(), getBatteryCellCount(), getBatteryStateString());
cliPrintf("CPU Clock=%dMHz", (SystemCoreClock / 1000000));
@ -3689,6 +3699,7 @@ const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("vtx", "vtx channels on switch", NULL, cliVtx),
#endif
};
static void cliHelp(char *cmdline)
{
UNUSED(cmdline);