Skip to content

Commit

Permalink
increase upload timeout to 100ms (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
recursiveforte authored Sep 4, 2024
1 parent c3bd474 commit dcf5768
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions firmware/spade/src/rpi/upload.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,14 @@ static void upl_flush_buf(void) {
static int upl_stdin_read(void) {
memset(&upl_state, 0, sizeof(upl_state));

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

for (;;) {
int c = getchar_timeout_us(timeout);
if (c == PICO_ERROR_TIMEOUT) return 0;
if (c == PICO_ERROR_TIMEOUT) {
puts("Upload timeout!");
return 0;
}

switch (upl_state.prog) {
case UplProg_Init: {
Expand Down
2 changes: 1 addition & 1 deletion firmware/spade/src/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.0.0"
"version": "2.0.1"
}
Binary file modified public/pico-os.uf2
Binary file not shown.

0 comments on commit dcf5768

Please sign in to comment.