Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Colin J. Brigato 2018-09-05 20:39:56 +02:00
commit 76e2d7502a
17 changed files with 509 additions and 407 deletions

View file

@ -13,6 +13,7 @@
static int CmdHelp(const char *Cmd);
static int CmdQuit(const char *Cmd);
static int CmdRev(const char *Cmd);
static int CmdRem(const char *Cmd);
//For storing command that are received from the device
static UsbCommand cmdBuffer[CMD_BUFFER_SIZE];
@ -33,6 +34,7 @@ static command_t CommandTable[] = {
{"hf", CmdHF, 1, "{ High Frequency commands... }"},
{"hw", CmdHW, 1, "{ Hardware commands... }"},
{"lf", CmdLF, 1, "{ Low Frequency commands... }"},
{"rem", CmdRem, 1, "{ Add text to row in log file }"},
{"reveng", CmdRev, 1, "{ Crc calculations from the software reveng 1.53... }"},
{"script", CmdScript, 1, "{ Scripting commands }"},
{"trace", CmdTrace, 1, "{ Trace manipulation... }"},
@ -51,6 +53,18 @@ command_t* getTopLevelCommandTable() {
return CommandTable;
}
int CmdRem(const char *Cmd) {
char buf[22];
memset(buf, 0x00, sizeof(buf));
struct tm *curTime;
time_t now = time(0);
curTime = gmtime(&now);
strftime (buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", curTime); // ISO8601
PrintAndLogEx(NORMAL, "%s remark: %s", buf, Cmd);
return 0;
}
int CmdHelp(const char *Cmd) {
CmdsHelp(CommandTable);
return 0;