diff --git a/docs/Commands.txt b/docs/Commands.txt index ce604f5a..d862b313 100644 --- a/docs/Commands.txt +++ b/docs/Commands.txt @@ -122,9 +122,6 @@ Flash pins (6~11) cannot be used * Touch Calibration [ESP215] json= [pwd=] -* Take screen snapshot -[ESP216] json= [pwd=] - * Show defined pins [ESP220] json= [pwd=] diff --git a/esp3d/configuration.h b/esp3d/configuration.h index 27bf772f..8b93429b 100644 --- a/esp3d/configuration.h +++ b/esp3d/configuration.h @@ -268,12 +268,6 @@ #define DEBUG_ESP3D_OUTPUT_PORT 8000 #endif //ESP_DEBUG_FEATURE -#if defined (DISPLAY_DEVICE) && (DISPLAY_UI_TYPE == UI_TYPE_ADVANCED) -//allows to use [ESP216]SNAP to do screen capture -#define DISPLAY_SNAPSHOT_FEATURE -#define AUTO_SNAPSHOT_FEATURE -#endif //DISPLAY_DEVICE - /************************************ * * Serial Communications diff --git a/esp3d/src/core/commands.cpp b/esp3d/src/core/commands.cpp index 39e82809..bb202b50 100644 --- a/esp3d/src/core/commands.cpp +++ b/esp3d/src/core/commands.cpp @@ -568,13 +568,6 @@ bool Commands::execute_internal_command (int cmd, const char* cmd_params, level_ response = ESP215(cmd_params, auth_type, output); break; #endif //DISPLAY_TOUCH_DRIVER -#if defined(DISPLAY_SNAPSHOT_FEATURE) - //Take screen snapshot - //[ESP216][pwd=] - case 216: - response = ESP216(cmd_params, auth_type, output); - break; -#endif //DISPLAY_SNAPSHOT_FEATURE #ifdef BUZZER_DEVICE //Play sound //[ESP250]F= D= [pwd=] diff --git a/esp3d/src/core/commands.h b/esp3d/src/core/commands.h index 6a7238c5..7a9a3688 100644 --- a/esp3d/src/core/commands.h +++ b/esp3d/src/core/commands.h @@ -109,9 +109,6 @@ public: #if defined(DISPLAY_TOUCH_DRIVER) bool ESP215(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output); #endif //DISPLAY_TOUCH_DRIVER -#if defined(DISPLAY_SNAPSHOT_FEATURE) - bool ESP216(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output); -#endif //DISPLAY_TOUCH_DRIVER #endif //DISPLAY_DEVICE #ifdef SENSOR_DEVICE bool ESP210(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output); diff --git a/esp3d/src/core/espcmd/ESP0.cpp b/esp3d/src/core/espcmd/ESP0.cpp index 3bd8407a..2e71a16f 100644 --- a/esp3d/src/core/espcmd/ESP0.cpp +++ b/esp3d/src/core/espcmd/ESP0.cpp @@ -94,9 +94,6 @@ const char * help[]= {"[ESP] (id) - display this help", #if defined(DISPLAY_TOUCH_DRIVER) "[ESP215](CALIBRATE) - display state / start touch calibration", #endif //DISPLAY_TOUCH_DRIVER -#if defined(DISPLAY_SNAPSHOT_FEATURE) - "[ESP216](SNAP) - Take screen snapshot", -#endif //DISPLAY_SNAPSHOT_FEATURE #endif //DISPLAY_DEVICE "[ESP220] - Show used pins", #ifdef BUZZER_DEVICE @@ -230,9 +227,6 @@ const uint cmdlist[]= {0, #if defined(DISPLAY_TOUCH_DRIVER) 215, #endif //DISPLAY_TOUCH_DRIVER -#if defined(DISPLAY_SNAPSHOT_FEATURE) - 216, -#endif //DISPLAY_SNAPSHOT_FEATURE #endif //DISPLAY_DEVICE 220, #ifdef BUZZER_DEVICE diff --git a/esp3d/src/core/espcmd/ESP216.cpp b/esp3d/src/core/espcmd/ESP216.cpp deleted file mode 100644 index 0ab32f90..00000000 --- a/esp3d/src/core/espcmd/ESP216.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - ESP216.cpp - ESP3D command class - - Copyright (c) 2014 Luc Lebosse. All rights reserved. - - This code is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This code is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with This code; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ -#include "../../include/esp3d_config.h" -#if defined(DISPLAY_SNAPSHOT_FEATURE) -#include "../commands.h" -#include "../esp3doutput.h" -#include "../settings_esp3d.h" -#include "../../modules/authentication/authentication_service.h" -#include "../../modules/display/display.h" -//Take screen snapshot -//[ESP216] json=[pwd=] -#define COMMANDID 216 -bool Commands::ESP216(const char* cmd_params, level_authenticate_type auth_type, ESP3DOutput * output) -{ - bool noError = true; - bool json = has_tag (cmd_params, "json"); - String response; - String parameter; - int errorCode = 200; //unless it is a server error use 200 as default and set error in json instead -#ifdef AUTHENTICATION_FEATURE - if (auth_type == LEVEL_GUEST) { - response = format_response(COMMANDID, json, false, "Guest user can't use this command"); - noError = false; - errorCode = 401; - } -#else - (void)auth_type; -#endif //AUTHENTICATION_FEATURE - if (noError) { - parameter = clean_param(get_param (cmd_params, "")); - //get - if (parameter.length() == 0) { - response = format_response(COMMANDID, json, false, "Invalid parameter"); - noError = false; - } else { //set - parameter.toUpperCase(); - if (has_tag (cmd_params, "SNAP")) { - if (!json) { - output->printMSG("Creating snapshot"); - } - if(esp3d_display.snapshot()) { - response = format_response(COMMANDID, json, true, "ok"); - } else { - response = format_response(COMMANDID, json, false, "Cannot save snapshot"); - noError = false; - } - } else { - response = format_response(COMMANDID, json, false, "Invalid parameter"); - response = false; - } - } - } - if (noError) { - if (json) { - output->printLN (response.c_str() ); - } else { - output->printMSG (response.c_str() ); - } - } else { - output->printERROR(response.c_str(), errorCode); - } - return noError; -} - -#endif //DISPLAY_SNAPSHOT_FEATURE