mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 20:19:12 +08:00
add [ESP700]support for FS
Add Header for FS file name Add flag for FILESYSTEM_FEATURE in sources do some AStyle Change line number from uint16_t to uint32_t
This commit is contained in:
parent
f7dd60c39f
commit
027ab132ae
@ -499,12 +499,19 @@ bool Commands::execute_internal_command (int cmd, const char* cmd_params, level_
|
|||||||
response = ESP610(cmd_params, auth_type, output);
|
response = ESP610(cmd_params, auth_type, output);
|
||||||
break;
|
break;
|
||||||
#endif //NOTIFICATION_FEATURE
|
#endif //NOTIFICATION_FEATURE
|
||||||
#ifdef FILESYSTEM_FEATURE
|
#if defined(FILESYSTEM_FEATURE)
|
||||||
//Format ESP Filesystem
|
//Format ESP Filesystem
|
||||||
//[ESP710]FORMAT pwd=<admin password>
|
//[ESP710]FORMAT pwd=<admin password>
|
||||||
case 710:
|
case 710:
|
||||||
response = ESP710(cmd_params, auth_type, output);
|
response = ESP710(cmd_params, auth_type, output);
|
||||||
break;
|
break;
|
||||||
|
#endif //FILESYSTEM_FEATURE
|
||||||
|
#ifdef FILESYSTEM_FEATURE
|
||||||
|
//Open local file
|
||||||
|
//[ESP700]<filname>
|
||||||
|
case 700:
|
||||||
|
response = ESP700(cmd_params, auth_type, output);
|
||||||
|
break;
|
||||||
|
|
||||||
//List ESP Filesystem
|
//List ESP Filesystem
|
||||||
//[ESP720]<Root> pwd=<admin password>
|
//[ESP720]<Root> pwd=<admin password>
|
||||||
|
@ -112,6 +112,9 @@ public:
|
|||||||
bool ESP600(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
bool ESP600(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
||||||
bool ESP610(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
bool ESP610(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
||||||
#endif //NOTIFICATION_FEATURE
|
#endif //NOTIFICATION_FEATURE
|
||||||
|
#if defined(FILESYSTEM_FEATURE)
|
||||||
|
bool ESP700(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
||||||
|
#endif //FILESYSTEM_FEATURE
|
||||||
#if defined(FILESYSTEM_FEATURE)
|
#if defined(FILESYSTEM_FEATURE)
|
||||||
bool ESP710(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
bool ESP710(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
||||||
bool ESP720(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
bool ESP720(const char* cmd_params, level_authenticate_type auth_level, ESP3DOutput * output);
|
||||||
|
50
esp3d/src/core/espcmd/ESP700.cpp
Normal file
50
esp3d/src/core/espcmd/ESP700.cpp
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
ESP700.cpp - ESP3D command class
|
||||||
|
|
||||||
|
Copyright (c) 2014 Luc Lebosse. All rights reserved.
|
||||||
|
|
||||||
|
This library 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 library 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 library; 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 (FILESYSTEM_FEATURE)
|
||||||
|
#include "../commands.h"
|
||||||
|
#include "../esp3doutput.h"
|
||||||
|
#include "../settings_esp3d.h"
|
||||||
|
#include "../../modules/authentication/authentication_service.h"
|
||||||
|
#include "../../modules/filesystem/esp_filesystem.h"
|
||||||
|
#include "../../modules/gcode_host/gcode_host.h"
|
||||||
|
////read local file
|
||||||
|
//[ESP700]<filename>
|
||||||
|
bool Commands::ESP700(const char* cmd_params, level_authenticate_type auth_type, ESP3DOutput * output)
|
||||||
|
{
|
||||||
|
bool response = true;
|
||||||
|
String parameter;
|
||||||
|
parameter = get_param (cmd_params, "");
|
||||||
|
#ifdef AUTHENTICATION_FEATURE
|
||||||
|
if (auth_type != LEVEL_ADMIN) {
|
||||||
|
output->printERROR("Wrong authentication!", 401);
|
||||||
|
response = false;
|
||||||
|
} else
|
||||||
|
#else
|
||||||
|
(void)auth_type;
|
||||||
|
#endif //AUTHENTICATION_FEATURE
|
||||||
|
{
|
||||||
|
esp3d_gcode_host.processFile(parameter.c_str(), auth_type, output);
|
||||||
|
output->printMSG("ok");
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //FILESYSTEM_FEATURE
|
@ -18,6 +18,7 @@
|
|||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
#include "../../include/esp3d_config.h"
|
#include "../../include/esp3d_config.h"
|
||||||
|
#ifdef FILESYSTEM_FEATURE
|
||||||
#include "esp_filesystem.h"
|
#include "esp_filesystem.h"
|
||||||
#include "../../core/genLinkedList.h"
|
#include "../../core/genLinkedList.h"
|
||||||
#ifdef FILESYSTEM_TIMESTAMP_FEATURE
|
#ifdef FILESYSTEM_TIMESTAMP_FEATURE
|
||||||
@ -215,3 +216,5 @@ ESP_File& ESP_File::operator=(const ESP_File & other)
|
|||||||
#endif //FILESYSTEM_TIMESTAMP_FEATURE
|
#endif //FILESYSTEM_TIMESTAMP_FEATURE
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif //FILESYSTEM_FEATURE
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#define ESP_FILE_WRITE 1
|
#define ESP_FILE_WRITE 1
|
||||||
#define ESP_FILE_APPEND 2
|
#define ESP_FILE_APPEND 2
|
||||||
|
|
||||||
|
#define ESP_FLASH_FS_HEADER "/FS:"
|
||||||
|
|
||||||
#define ESP_MAX_OPENHANDLE 4
|
#define ESP_MAX_OPENHANDLE 4
|
||||||
|
|
||||||
class ESP_File
|
class ESP_File
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
#ifdef ESP_GCODE_HOST_FEATURE
|
#ifdef ESP_GCODE_HOST_FEATURE
|
||||||
#include "gcode_host.h"
|
#include "gcode_host.h"
|
||||||
#include "../../core/settings_esp3d.h"
|
#include "../../core/settings_esp3d.h"
|
||||||
|
#include "../../core/commands.h"
|
||||||
#include "../serial/serial_service.h"
|
#include "../serial/serial_service.h"
|
||||||
|
#include "../filesystem/esp_filesystem.h"
|
||||||
|
|
||||||
GcodeHost esp3d_gcode_host;
|
GcodeHost esp3d_gcode_host;
|
||||||
|
|
||||||
@ -54,37 +56,43 @@ void GcodeHost::handle()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t GcodeHost::Checksum(const char * command, uint16_t commandSize)
|
uint8_t GcodeHost::Checksum(const char * command, uint32_t commandSize)
|
||||||
{
|
{
|
||||||
uint8_t checksum_val =0;
|
uint8_t checksum_val =0;
|
||||||
if (command == NULL) return 0;
|
if (command == NULL) {
|
||||||
for (uint16_t i=0; i < commandSize; i++)
|
return 0;
|
||||||
{
|
}
|
||||||
|
for (uint32_t i=0; i < commandSize; i++) {
|
||||||
checksum_val = checksum_val ^ ((uint8_t)command[i]);
|
checksum_val = checksum_val ^ ((uint8_t)command[i]);
|
||||||
}
|
}
|
||||||
return checksum_val;
|
return checksum_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
String GcodeHost::CheckSumCommand(const char* command, uint16_t commandnb){
|
String GcodeHost::CheckSumCommand(const char* command, uint32_t commandnb)
|
||||||
String commandchecksum = "N" + String((uint16_t)commandnb)+ " " + command;
|
{
|
||||||
|
String commandchecksum = "N" + String((uint32_t)commandnb)+ " " + command;
|
||||||
uint8_t crc = Checksum(commandchecksum.c_str(), commandchecksum.length());
|
uint8_t crc = Checksum(commandchecksum.c_str(), commandchecksum.length());
|
||||||
commandchecksum+="*"+String(crc);
|
commandchecksum+="*"+String(crc);
|
||||||
return commandchecksum;
|
return commandchecksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GcodeHost::wait_for_data(uint32_t timeout){
|
size_t GcodeHost::wait_for_data(uint32_t timeout)
|
||||||
uint32_t start = millis();
|
|
||||||
while ((serial_service.available() < 2) && ((millis()-start) < timeout))
|
|
||||||
{
|
{
|
||||||
|
uint32_t start = millis();
|
||||||
|
while ((serial_service.available() < 2) && ((millis()-start) < timeout)) {
|
||||||
Hal::wait (0); //minimum delay is 10 actually
|
Hal::wait (0); //minimum delay is 10 actually
|
||||||
}
|
}
|
||||||
return serial_service.available();
|
return serial_service.available();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GcodeHost::resetCommandNumbering(){
|
bool GcodeHost::resetCommandNumbering()
|
||||||
|
{
|
||||||
String resetcmd = "M110 N0";
|
String resetcmd = "M110 N0";
|
||||||
if (Settings_ESP3D::GetFirmwareTarget() == SMOOTHIEWARE)resetcmd = "N0 M110";
|
if (Settings_ESP3D::GetFirmwareTarget() == SMOOTHIEWARE) {
|
||||||
else resetcmd = "M110 N0";
|
resetcmd = "N0 M110";
|
||||||
|
} else {
|
||||||
|
resetcmd = "M110 N0";
|
||||||
|
}
|
||||||
_commandnumber = 1;
|
_commandnumber = 1;
|
||||||
return sendCommand(resetcmd.c_str());
|
return sendCommand(resetcmd.c_str());
|
||||||
}
|
}
|
||||||
@ -94,12 +102,12 @@ bool GcodeHost::resetCommandNumbering(){
|
|||||||
return true;
|
return true;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack){
|
bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack)
|
||||||
|
{
|
||||||
_needcommandnumber = _commandnumber;
|
_needcommandnumber = _commandnumber;
|
||||||
uint32_t start = millis();
|
uint32_t start = millis();
|
||||||
String answer = "";
|
String answer = "";
|
||||||
while ((millis()-start) < timeout)
|
while ((millis()-start) < timeout) {
|
||||||
{
|
|
||||||
size_t len = serial_service.available();
|
size_t len = serial_service.available();
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
uint8_t * sbuf = (uint8_t *)malloc(len+1);
|
uint8_t * sbuf = (uint8_t *)malloc(len+1);
|
||||||
@ -110,7 +118,7 @@ bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack){
|
|||||||
sbuf[len] = '\0';
|
sbuf[len] = '\0';
|
||||||
answer+= (const char *)sbuf;
|
answer+= (const char *)sbuf;
|
||||||
free(sbuf);
|
free(sbuf);
|
||||||
log_esp3d("Answer: %s",anwer.c_str());
|
log_esp3d("Answer: %s",answer.c_str());
|
||||||
//check for ack
|
//check for ack
|
||||||
if (ack!=nullptr) {
|
if (ack!=nullptr) {
|
||||||
if (answer.indexOf(ack) != -1) {
|
if (answer.indexOf(ack) != -1) {
|
||||||
@ -118,6 +126,7 @@ bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//wait is not an ack as it can appear any time
|
||||||
if (answer.indexOf("ok") != -1) {
|
if (answer.indexOf("ok") != -1) {
|
||||||
if (!checksum) {
|
if (!checksum) {
|
||||||
_error = ERROR_NO_ERROR;
|
_error = ERROR_NO_ERROR;
|
||||||
@ -161,7 +170,8 @@ bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack){
|
|||||||
//others error cancel the sending
|
//others error cancel the sending
|
||||||
//number mismatch / skip / timeout error must be managed out of this function
|
//number mismatch / skip / timeout error must be managed out of this function
|
||||||
//line number incrementation is not done in this function neither
|
//line number incrementation is not done in this function neither
|
||||||
bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, const char * ack){
|
bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, const char * ack)
|
||||||
|
{
|
||||||
log_esp3d("Send command: %s", command);
|
log_esp3d("Send command: %s", command);
|
||||||
String s;
|
String s;
|
||||||
if(checksum) {
|
if(checksum) {
|
||||||
@ -221,14 +231,15 @@ bool GcodeHost::sendCommand(const char* command, bool checksum, bool wait4ack, c
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GcodeHost::purge(uint32_t timeout){
|
bool GcodeHost::purge(uint32_t timeout)
|
||||||
|
{
|
||||||
uint32_t start = millis();
|
uint32_t start = millis();
|
||||||
uint8_t buf [51];
|
uint8_t buf [51];
|
||||||
_error = 0;
|
_error = 0;
|
||||||
log_esp3d("Purge started")
|
log_esp3d("Purge started");
|
||||||
while (serial_service.available() > 0) {
|
while (serial_service.available() > 0) {
|
||||||
if ((millis() - start ) > timeout) {
|
if ((millis() - start ) > timeout) {
|
||||||
log_esp3d("Purge timeout\r\n")
|
log_esp3d("Purge timeout\r\n");
|
||||||
_error = ERROR_TIME_OUT;
|
_error = ERROR_TIME_OUT;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -238,17 +249,20 @@ bool GcodeHost::purge(uint32_t timeout){
|
|||||||
if ( (Settings_ESP3D::GetFirmwareTarget() == REPETIER4DV) || (Settings_ESP3D::GetFirmwareTarget() == REPETIER) || _waitwhenidle) {
|
if ( (Settings_ESP3D::GetFirmwareTarget() == REPETIER4DV) || (Settings_ESP3D::GetFirmwareTarget() == REPETIER) || _waitwhenidle) {
|
||||||
String s = (const char *)buf;
|
String s = (const char *)buf;
|
||||||
//repetier never stop sending data so no need to wait if have 'wait' or 'busy'
|
//repetier never stop sending data so no need to wait if have 'wait' or 'busy'
|
||||||
if((s.indexOf ("wait") > -1) || (s.indexOf ("busy") > -1))return true;
|
if((s.indexOf ("wait") > -1) || (s.indexOf ("busy") > -1)) {
|
||||||
log_esp3d("Impossible to purge\r\n")
|
return true;
|
||||||
|
}
|
||||||
|
log_esp3d("Impossible to purge\r\n");
|
||||||
}
|
}
|
||||||
Hal::wait (0);
|
Hal::wait (0);
|
||||||
}
|
}
|
||||||
log_esp3d("Purge done")
|
log_esp3d("Purge done");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t GcodeHost::Get_commandNumber(String & response){
|
uint32_t GcodeHost::Get_commandNumber(String & response)
|
||||||
int64_t l = 0;
|
{
|
||||||
|
uint32_t l = 0;
|
||||||
String sresend = "Resend:";
|
String sresend = "Resend:";
|
||||||
if ( Settings_ESP3D::GetFirmwareTarget() == SMOOTHIEWARE) {
|
if ( Settings_ESP3D::GetFirmwareTarget() == SMOOTHIEWARE) {
|
||||||
sresend = "rs N";
|
sresend = "rs N";
|
||||||
@ -264,7 +278,76 @@ uint16_t GcodeHost::Get_commandNumber(String & response){
|
|||||||
//remove potential unwished char
|
//remove potential unwished char
|
||||||
snum.replace("\r", "");
|
snum.replace("\r", "");
|
||||||
l = snum.toInt();
|
l = snum.toInt();
|
||||||
log_esp3d("Command number to resend is %s", String(l).c_str());
|
log_esp3d("Command number to resend is %s", String((uint32_t)l).c_str());
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GcodeHost::processFSFile(const char * filename, level_authenticate_type auth_type, ESP3DOutput * output)
|
||||||
|
{
|
||||||
|
bool res = true;
|
||||||
|
log_esp3d("Processing FS : %s", filename);
|
||||||
|
if (!ESP_FileSystem::exists(filename)) {
|
||||||
|
log_esp3d("Cannot find file");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ESP_File f = ESP_FileSystem::open(filename);
|
||||||
|
if (!f.isOpen()) {
|
||||||
|
log_esp3d("Cannot open file");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
size_t filesize = f.size();
|
||||||
|
int8_t ch;
|
||||||
|
String cmd = "";
|
||||||
|
for (size_t c = 0; c< filesize ; c++) {
|
||||||
|
ch = f.read();
|
||||||
|
if (ch == -1) {
|
||||||
|
log_esp3d("Error reading file");
|
||||||
|
f.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((ch == 13)||(ch == 10) || (c==(filesize-1))) {
|
||||||
|
//for end of file without \n neither \r
|
||||||
|
if (!((ch == 13)||(ch == 10)) && (c==(filesize-1))) {
|
||||||
|
cmd+=(char)ch;
|
||||||
|
}
|
||||||
|
cmd.trim();
|
||||||
|
if(cmd.length() > 0) {
|
||||||
|
//ignore comments
|
||||||
|
if (cmd[0]!=';') {
|
||||||
|
//it is internal or not ?
|
||||||
|
if(esp3d_commands.is_esp_command((uint8_t *)cmd.c_str(), cmd.length())) {
|
||||||
|
esp3d_commands.process((uint8_t *)cmd.c_str(), cmd.length(), output, auth_type);
|
||||||
|
} else {
|
||||||
|
if (!sendCommand(cmd.c_str(),false, true)) {
|
||||||
|
log_esp3d("Error sending command");
|
||||||
|
//To stop instead of continue may need some trigger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmd="";
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
cmd+=(char)ch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.close();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GcodeHost::processFile(const char * filename, level_authenticate_type auth_type, ESP3DOutput * output)
|
||||||
|
{
|
||||||
|
String FileName = filename;
|
||||||
|
FileName.trim();
|
||||||
|
log_esp3d("Processing: %s", FileName.c_str());
|
||||||
|
if (FileName.startsWith(ESP_FLASH_FS_HEADER)) {
|
||||||
|
String f = FileName.substring(strlen(ESP_FLASH_FS_HEADER),FileName.length());
|
||||||
|
return processFSFile(f.c_str(), auth_type, output);
|
||||||
|
}
|
||||||
|
//TODO SD = SDCard
|
||||||
|
//TODO UD = USB DISK
|
||||||
|
log_esp3d("Invalid filename");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#endif //ESP_GCODE_HOST_FEATURE
|
#endif //ESP_GCODE_HOST_FEATURE
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
#ifndef _GCODE_HOST_H
|
#ifndef _GCODE_HOST_H
|
||||||
#define _GCODE_HOST_H
|
#define _GCODE_HOST_H
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include "../authentication/authentication_service.h"
|
||||||
|
class ESP3DOutput;
|
||||||
|
|
||||||
#define DEFAULT_TIMOUT 2000
|
#define DEFAULT_TIMOUT 2000
|
||||||
#define MAX_TRY_2_SEND 5
|
#define MAX_TRY_2_SEND 5
|
||||||
#define ERROR_NO_ERROR 0
|
#define ERROR_NO_ERROR 0
|
||||||
@ -44,20 +48,34 @@ public:
|
|||||||
void end();
|
void end();
|
||||||
void handle();
|
void handle();
|
||||||
bool sendCommand(const char* command, bool checksum = false, bool wait4ack = true, const char * ack=nullptr);
|
bool sendCommand(const char* command, bool checksum = false, bool wait4ack = true, const char * ack=nullptr);
|
||||||
uint16_t currentCommandNumber(){return _commandnumber;}
|
uint32_t currentCommandNumber()
|
||||||
void setCommandNumber(uint16_t n){_commandnumber = n;}
|
{
|
||||||
|
return _commandnumber;
|
||||||
|
}
|
||||||
|
void setCommandNumber(uint32_t n)
|
||||||
|
{
|
||||||
|
_commandnumber = n;
|
||||||
|
}
|
||||||
bool resetCommandNumbering();
|
bool resetCommandNumbering();
|
||||||
uint8_t Checksum(const char * command, uint16_t commandSize);
|
uint8_t Checksum(const char * command, uint32_t commandSize);
|
||||||
String CheckSumCommand(const char* command, uint16_t commandnb);
|
String CheckSumCommand(const char* command, uint32_t commandnb);
|
||||||
size_t wait_for_data(uint32_t timeout = DEFAULT_TIMOUT);
|
size_t wait_for_data(uint32_t timeout = DEFAULT_TIMOUT);
|
||||||
bool wait_for_ack(uint32_t timeout = DEFAULT_TIMOUT, bool checksum=false, const char * ack=nullptr);
|
bool wait_for_ack(uint32_t timeout = DEFAULT_TIMOUT, bool checksum=false, const char * ack=nullptr);
|
||||||
bool purge(uint32_t timeout = DEFAULT_TIMOUT);
|
bool purge(uint32_t timeout = DEFAULT_TIMOUT);
|
||||||
uint16_t Get_commandNumber(String & response);
|
uint32_t Get_commandNumber(String & response);
|
||||||
bool waitWhenIdle(){ return _waitwhenidle;}
|
bool waitWhenIdle()
|
||||||
uint8_t getErrorNum(){ return _error;}
|
{
|
||||||
|
return _waitwhenidle;
|
||||||
|
}
|
||||||
|
uint8_t getErrorNum()
|
||||||
|
{
|
||||||
|
return _error;
|
||||||
|
}
|
||||||
|
bool processFile(const char * filename, level_authenticate_type auth_type, ESP3DOutput * output);
|
||||||
|
bool processFSFile(const char * filename, level_authenticate_type auth_type, ESP3DOutput * output);
|
||||||
private:
|
private:
|
||||||
uint16_t _commandnumber;
|
uint32_t _commandnumber;
|
||||||
uint16_t _needcommandnumber;
|
uint32_t _needcommandnumber;
|
||||||
bool _waitwhenidle;
|
bool _waitwhenidle;
|
||||||
uint8_t _error;
|
uint8_t _error;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user