diff --git a/USBNova.ino b/USBNova.ino index 11f94a5..4689c3c 100644 --- a/USBNova.ino +++ b/USBNova.ino @@ -69,6 +69,11 @@ void setup() { if (!msc::exists(PREFERENCES_PATH)) { preferences::save(); } + + // Create main_script.txt if it doesn't exist yet + if (!msc::exists(preferences::getMainScript().c_str())) { + msc::write(preferences::getMainScript().c_str(), "# Hello World\n", 14); + } // Setup background tasks tasks::setCallback(update); diff --git a/src/preferences/preferences.cpp b/src/preferences/preferences.cpp index e91f840..5192097 100644 --- a/src/preferences/preferences.cpp +++ b/src/preferences/preferences.cpp @@ -36,7 +36,7 @@ namespace preferences { std::string default_layout { "US" }; int default_delay { 5 }; - std::string main_script { "main.script" }; + std::string main_script { "main_script.txt" }; int attack_color[4] { 128, 0, 0, 0 }; int setup_color[4] { 0, 0, 20, 0 }; @@ -215,7 +215,7 @@ namespace preferences { default_layout = "US"; default_delay = 5; - main_script = "main.script"; + main_script = "main_script.txt"; attack_color[0] = 128; attack_color[1] = 0;