You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#defineFILE_AN_ISSUE translate("\nPlease file an issue with the contents of your CIRCUITPY drive at \nhttps://github.com/adafruit/circuitpython/issues\n")
121
-
122
120
voidprint_safe_mode_message(safe_mode_treason) {
123
121
if (reason==NO_SAFE_MODE) {
124
122
return;
125
123
}
126
-
serial_write("\n");
124
+
125
+
serial_write("\r\n");
126
+
serial_write_compressed(translate("You are in safe mode because:\n"));
127
+
128
+
constcompressed_string_t*message=NULL;
129
+
130
+
// First check for safe mode reasons that do not necessarily reflect bugs.
serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n"));
142
-
return;
143
+
message=translate("You pressed the reset button during boot. Press again to exit safe mode.");
144
+
break;
143
145
casePROGRAMMATIC_SAFE_MODE:
144
-
serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n"));
145
-
return;
146
-
default:
146
+
message=translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.");
147
147
break;
148
-
}
149
-
150
-
serial_write_compressed(translate("You are in safe mode: something unanticipated happened.\n"));
151
-
switch (reason) {
152
148
caseBROWNOUT:
153
-
serial_write_compressed(translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n"));
154
-
return;
155
-
caseHEAP_OVERWRITTEN:
156
-
serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:"));
157
-
serial_write_compressed(FILE_AN_ISSUE);
158
-
return;
159
-
caseNO_HEAP:
160
-
serial_write_compressed(translate("CircuitPython was unable to allocate the heap.\n"));
161
-
serial_write_compressed(FILE_AN_ISSUE);
162
-
return;
149
+
message=translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).");
150
+
break;
151
+
caseUSB_TOO_MANY_ENDPOINTS:
152
+
message=translate("USB devices need more endpoints than are available.");
153
+
break;
154
+
caseUSB_TOO_MANY_INTERFACE_NAMES:
155
+
message=translate("USB devices specify too many interface names.");
message=translate("USB devices need more endpoints than are available.");
201
-
break;
202
-
caseUSB_TOO_MANY_INTERFACE_NAMES:
203
-
message=translate("USB devices specify too many interface names.");
204
-
break;
205
206
default:
206
207
message=translate("Unknown reason.");
207
208
break;
208
209
}
209
210
serial_write_compressed(message);
210
-
serial_write_compressed(FILE_AN_ISSUE);
211
+
serial_write_compressed(translate("\nPlease file an issue with the contents of your CIRCUITPY drive at \nhttps://github.com/adafruit/circuitpython/issues\n"));
0 commit comments