Skip to content

Commit dcf5768

Browse files
increase upload timeout to 100ms (hackclub#2292)
1 parent c3bd474 commit dcf5768

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Diff for: firmware/spade/src/rpi/upload.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,14 @@ static void upl_flush_buf(void) {
374374
static int upl_stdin_read(void) {
375375
memset(&upl_state, 0, sizeof(upl_state));
376376

377-
int timeout = 1000; // 1ms; we're already in upload mode
377+
int timeout = 100 * 1000; // 100ms; we're already in upload mode
378378

379379
for (;;) {
380380
int c = getchar_timeout_us(timeout);
381-
if (c == PICO_ERROR_TIMEOUT) return 0;
381+
if (c == PICO_ERROR_TIMEOUT) {
382+
puts("Upload timeout!");
383+
return 0;
384+
}
382385

383386
switch (upl_state.prog) {
384387
case UplProg_Init: {

Diff for: firmware/spade/src/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "2.0.0"
2+
"version": "2.0.1"
33
}

Diff for: public/pico-os.uf2

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)