From 80ddd96ac5715a8fd4376f376c76a32a0ccb4ea7 Mon Sep 17 00:00:00 2001 From: Michal Demin Date: Thu, 15 Jun 2017 22:11:38 +0200 Subject: [PATCH] Add CLONE command to button. Signed-off-by: Michal Demin --- Firmware/Chameleon-Mini/Button.c | 7 +++++++ Firmware/Chameleon-Mini/Button.h | 1 + 2 files changed, 8 insertions(+) diff --git a/Firmware/Chameleon-Mini/Button.c b/Firmware/Chameleon-Mini/Button.c index 458db97..e2d2b6b 100644 --- a/Firmware/Chameleon-Mini/Button.c +++ b/Firmware/Chameleon-Mini/Button.c @@ -4,6 +4,7 @@ #include "Settings.h" #include "Memory.h" #include "Map.h" +#include "Terminal/CommandLine.h" #include "Application/Application.h" #define BUTTON_PORT PORTA @@ -27,6 +28,7 @@ static const MapEntryType PROGMEM ButtonActionMap[] = { { .Id = BUTTON_ACTION_RECALL_MEM, .Text = "RECALL_MEM" }, { .Id = BUTTON_ACTION_TOGGLE_FIELD, .Text = "TOGGLE_FIELD" }, { .Id = BUTTON_ACTION_STORE_LOG, .Text = "STORE_LOG" }, + { .Id = BUTTON_ACTION_CLONE, .Text = "CLONE" }, }; static void ExecuteButtonAction(ButtonActionEnum ButtonAction) @@ -180,6 +182,11 @@ static void ExecuteButtonAction(ButtonActionEnum ButtonAction) break; } + case BUTTON_ACTION_CLONE: + { + CommandExecute("CLONE"); + break; + } default: break; diff --git a/Firmware/Chameleon-Mini/Button.h b/Firmware/Chameleon-Mini/Button.h index 0bc67c9..c23f013 100644 --- a/Firmware/Chameleon-Mini/Button.h +++ b/Firmware/Chameleon-Mini/Button.h @@ -32,6 +32,7 @@ typedef enum { BUTTON_ACTION_RECALL_MEM, BUTTON_ACTION_TOGGLE_FIELD, BUTTON_ACTION_STORE_LOG, + BUTTON_ACTION_CLONE, /* This has to be last element */ BUTTON_ACTION_COUNT