Make card filename const

Fixes warning in filename_wldsd
This commit is contained in:
Petr Ledvina 2018-07-17 17:31:40 +02:00
parent d64754468a
commit baddf38dbc
3 changed files with 9 additions and 9 deletions

View file

@ -8082,7 +8082,7 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
int ix = 0;
int iy = 0;
char* filename_wldsd = "wldsd.txt";
const char* filename_wldsd = "wldsd.txt";
char data_wldsd[70];
char numb_wldsd[10];

View file

@ -258,7 +258,7 @@ void CardReader::pauseSDPrint()
}
void CardReader::openLogFile(char* name)
void CardReader::openLogFile(const char* name)
{
logging = true;
openFile(name, false);
@ -289,7 +289,7 @@ void CardReader::getAbsFilename(char *t)
t[0]=0;
}
void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
void CardReader::openFile(const char* name,bool read, bool replace_current/*=true*/)
{
if(!cardOK)
return;
@ -341,7 +341,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
SdFile myDir;
curDir=&root;
char *fname=name;
const char *fname=name;
char *dirname_start,*dirname_end;
if(name[0]=='/')
@ -429,7 +429,7 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
}
void CardReader::removeFile(char* name)
void CardReader::removeFile(const char* name)
{
if(!cardOK)
return;
@ -439,7 +439,7 @@ void CardReader::removeFile(char* name)
SdFile myDir;
curDir=&root;
char *fname=name;
const char *fname=name;
char *dirname_start,*dirname_end;
if(name[0]=='/')

View file

@ -19,9 +19,9 @@ public:
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
void checkautostart(bool x);
void openFile(char* name,bool read,bool replace_current=true);
void openLogFile(char* name);
void removeFile(char* name);
void openFile(const char* name,bool read,bool replace_current=true);
void openLogFile(const char* name);
void removeFile(const char* name);
void closefile(bool store_location=false);
void release();
void startFileprint();