Skip to content

[Offline Mode] Remove requirement for secrets.json #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/provisioning/tinyusb/Wippersnapper_FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,6 @@ Wippersnapper_FS::Wippersnapper_FS() {
setStatusLEDColor(RED);
HaltFilesystem("FATAL ERROR: Could not write filesystem contents!");
}

// If we wrote a fresh secrets.json file, halt until user edits the file and
// RESETs the device Signal to user that action must be taken (edit
// secrets.json)
if (_is_secrets_file_empty) {
WriteFileBoot(
"Please edit the secrets.json file. Then, reset your board.\n");
#ifdef USE_DISPLAY
WsV2._ui_helper->show_scr_error(
"INVALID SETTINGS FILE",
"The settings.json file on the WIPPER drive contains default values. "
"Please edit it to reflect your Adafruit IO and network credentials. "
"When you're done, press RESET on the board.");
#endif
HaltFilesystem(
"The settings.json file on the WIPPER drive contains default "
"values\n. Using a text editor, edit it to reflect your Adafruit IO "
"and WiFi credentials. Then, reset the board.");
}
}

/************************************************************/
Expand Down Expand Up @@ -256,9 +237,7 @@ bool Wippersnapper_FS::MakeDefaultFilesystem() {

// Check if secrets.json file already exists
if (!GetFileSecrets()) {
// Create new secrets.json file and halt
CreateFileSecrets();
_is_secrets_file_empty = true;
}

CreateFileConfig();
Expand Down
1 change: 0 additions & 1 deletion src/provisioning/tinyusb/Wippersnapper_FS.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class Wippersnapper_FS {
// getter for _doc_cfg
JsonDocument &GetDocCfg() { return _doc_cfg; }
private:
bool _is_secrets_file_empty = false;
JsonDocument _doc_cfg;
};
extern Wippersnapper_V2 WsV2;
Expand Down
Loading