Browse Source

removed debug logs

master
n0m1s 6 years ago
parent
commit
fc128232f5
1 changed files with 0 additions and 20 deletions
  1. +0
    -20
      settings.cpp

+ 0
- 20
settings.cpp View File

@ -13,15 +13,6 @@ Settings::~Settings()
void Settings::add_line(char const* section, char const* key, char const* val) void Settings::add_line(char const* section, char const* key, char const* val)
{ {
//TODO: do something with the line
Serial.print("Section: \"");
Serial.print(section);
Serial.print("\", Key: \"");
Serial.print(key);
Serial.print("\", Val: \"");
Serial.print(val);
Serial.println("\"");
if(string_starts_by(section, "wifi")) if(string_starts_by(section, "wifi"))
{ {
char const* network_name = "0"; char const* network_name = "0";
@ -43,24 +34,15 @@ void Settings::add_line(char const* section, char const* key, char const* val)
Settings const* Settings::load(char const* settings_filename) Settings const* Settings::load(char const* settings_filename)
{ {
Serial.println(""); //TODO: remove debug message
if(!SD.begin(D8)) if(!SD.begin(D8))
{
Serial.println("cannot open SD card");
return NULL; return NULL;
}
File file = SD.open("settings.ini", FILE_READ); File file = SD.open("settings.ini", FILE_READ);
if(!file) if(!file)
{
Serial.println("cannot open settings file");
return NULL; return NULL;
}
Settings* settings = new Settings(); Settings* settings = new Settings();
Serial.println("----Settings----"); //TODO: remove debug message
bool first_char_of_line = true; bool first_char_of_line = true;
bool is_comment_line = false; bool is_comment_line = false;
bool is_section_line = false; bool is_section_line = false;
@ -161,7 +143,5 @@ Settings const* Settings::load(char const* settings_filename)
file.close(); file.close();
Serial.println("----End settings----"); //TODO: remove debug log
return settings; return settings;
} }

Loading…
Cancel
Save