Skip to content

Commit

Permalink
Merge pull request #117 from shinhub/version_change_num
Browse files Browse the repository at this point in the history
Add commit ID in VERSION
  • Loading branch information
iceman1001 authored Aug 17, 2019
2 parents 28678d3 + 826b024 commit 7d7a391
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
5 changes: 3 additions & 2 deletions Firmware/Chameleon-Mini/Terminal/Commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
extern const PROGMEM CommandEntryType CommandTable[];

CommandStatusIdType CommandGetVersion(char* OutParam) {
//snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Chameleon-new-1.0"));
snprintf_P(OutParam, TERMINAL_BUFFER_SIZE, PSTR("Chameleon Mini %s v%d.%d (%s)"),FIRMWARE_NAME, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, FIRMWARE_FORK_AUTHOR );
snprintf_P( OutParam, TERMINAL_BUFFER_SIZE, PSTR("ChameleonMini-%s v%d.%d (%s: %s)"),
FIRMWARE_NAME, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR,
FIRMWARE_FORK_AUTHOR, FIRMWARE_COMMIT_STRING );
return COMMAND_INFO_OK_WITH_TEXT_ID;
}

Expand Down
37 changes: 21 additions & 16 deletions Firmware/Chameleon-Mini/Terminal/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@

#include "../Common.h"

#define MAX_COMMAND_LENGTH 16 // If this is more than 16 bytes, my unit becomes unresponsive with 8th entry.
#define MAX_STATUS_LENGTH 32
#define MAX_COMMAND_LENGTH 16 // If this is more than 16 bytes, my unit becomes unresponsive with 8th entry.
#define MAX_STATUS_LENGTH 32

// Firmware version details.
#define FIRMWARE_VERSION_MAJOR 1
#define FIRMWARE_VERSION_MINOR 3
#define FIRMWARE_NAME "Rebooted"
#define FIRMWARE_FORK_AUTHOR "Iceman"
#define FIRMWARE_VERSION_MAJOR 1
#define FIRMWARE_VERSION_MINOR 3
#define FIRMWARE_NAME "rebooted"
#define FIRMWARE_FORK_AUTHOR "Iceman"
#ifdef COMMIT_ID
#define FIRMWARE_COMMIT_STRING COMMIT_ID
#else
#define FIRMWARE_COMMIT_STRING "N/A"
#endif

#define COMMAND_INFO_OK_ID 100
#define COMMAND_INFO_OK "OK"
Expand All @@ -84,10 +89,10 @@
#define TIMEOUT_COMMAND 255 // this is just for the CommandLine module to know that this is a timeout command


#define COMMAND_CHAR_TRUE '1'
#define COMMAND_CHAR_FALSE '0'
#define COMMAND_CHAR_TRUE '1'
#define COMMAND_CHAR_FALSE '0'

#define COMMAND_UID_BUFSIZE 32
#define COMMAND_UID_BUFSIZE 32

typedef uint8_t CommandStatusIdType;
typedef const char CommandStatusMessageType[MAX_STATUS_LENGTH];
Expand Down Expand Up @@ -118,11 +123,11 @@ CommandStatusIdType CommandSetConfig(char* OutMessage, const char* InParam);
CommandStatusIdType CommandGetUid(char* OutParam);
CommandStatusIdType CommandSetUid(char* OutMessage, const char* InParam);

#define COMMAND_ATQA "ATQA"
#define COMMAND_ATQA "ATQA"
CommandStatusIdType CommandGetAtqa(char* OutParam);
CommandStatusIdType CommandSetAtqa(char* OutMessage, const char* InParam);

#define COMMAND_SAK "SAK"
#define COMMAND_SAK "SAK"
CommandStatusIdType CommandGetSak(char* OutParam);
CommandStatusIdType CommandSetSak(char* OutMessage, const char* InParam);

Expand Down Expand Up @@ -158,24 +163,24 @@ CommandStatusIdType CommandExecButtonLong(char* OutMessage);
CommandStatusIdType CommandGetButtonLong(char* OutParam);
CommandStatusIdType CommandSetButtonLong(char* OutMessage, const char* InParam);

#define COMMAND_SETTING "SETTING"
#define COMMAND_SETTING "SETTING"
CommandStatusIdType CommandGetSetting(char* OutParam);
CommandStatusIdType CommandSetSetting(char* OutMessage, const char* InParam);

#define COMMAND_CLEAR "CLEAR"
#define COMMAND_CLEAR "CLEAR"
CommandStatusIdType CommandExecClear(char* OutParam);

#define COMMAND_HELP "HELP"
CommandStatusIdType CommandExecHelp(char* OutMessage);

#define COMMAND_RSSI "RSSI"
#define COMMAND_RSSI "RSSI"
CommandStatusIdType CommandGetRssi(char* OutParam);

#define COMMAND_PWD "PWD"
#define COMMAND_PWD "PWD"
CommandStatusIdType CommandGetUltralightPassword(char* OutParam);

#ifdef CONFIG_MF_DETECTION_SUPPORT
#define COMMAND_DETECTION "DETECTION"
#define COMMAND_DETECTION "DETECTION"
CommandStatusIdType CommandGetDetection(char* OutParam);
CommandStatusIdType CommandSetDetection(char* OutMessage, const char* InParam);
#endif
Expand Down

0 comments on commit 7d7a391

Please sign in to comment.