Skip to content

Commit b6c36de

Browse files
committed
Remove requirement for secrets.json config default for offline mode
1 parent 5564777 commit b6c36de

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/provisioning/tinyusb/Wippersnapper_FS.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,25 +142,6 @@ Wippersnapper_FS::Wippersnapper_FS() {
142142
setStatusLEDColor(RED);
143143
HaltFilesystem("FATAL ERROR: Could not write filesystem contents!");
144144
}
145-
146-
// If we wrote a fresh secrets.json file, halt until user edits the file and
147-
// RESETs the device Signal to user that action must be taken (edit
148-
// secrets.json)
149-
if (_is_secrets_file_empty) {
150-
WriteFileBoot(
151-
"Please edit the secrets.json file. Then, reset your board.\n");
152-
#ifdef USE_DISPLAY
153-
WsV2._ui_helper->show_scr_error(
154-
"INVALID SETTINGS FILE",
155-
"The settings.json file on the WIPPER drive contains default values. "
156-
"Please edit it to reflect your Adafruit IO and network credentials. "
157-
"When you're done, press RESET on the board.");
158-
#endif
159-
HaltFilesystem(
160-
"The settings.json file on the WIPPER drive contains default "
161-
"values\n. Using a text editor, edit it to reflect your Adafruit IO "
162-
"and WiFi credentials. Then, reset the board.");
163-
}
164145
}
165146

166147
/************************************************************/
@@ -256,9 +237,7 @@ bool Wippersnapper_FS::MakeDefaultFilesystem() {
256237

257238
// Check if secrets.json file already exists
258239
if (!GetFileSecrets()) {
259-
// Create new secrets.json file and halt
260240
CreateFileSecrets();
261-
_is_secrets_file_empty = true;
262241
}
263242

264243
CreateFileConfig();

src/provisioning/tinyusb/Wippersnapper_FS.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class Wippersnapper_FS {
7171
// getter for _doc_cfg
7272
JsonDocument &GetDocCfg() { return _doc_cfg; }
7373
private:
74-
bool _is_secrets_file_empty = false;
7574
JsonDocument _doc_cfg;
7675
};
7776
extern Wippersnapper_V2 WsV2;

0 commit comments

Comments
 (0)