Skip to content

Commit 3723f42

Browse files
committed
Report "unknown" when we can't detect the shuttle (e.g. when we have trouble reading the ROM).
previously, we reported "tt04", which is not a good UX.
1 parent eee4e08 commit 3723f42

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
create-release:
77
env:
88
RPOS_UF2FILE: RPI_PICO-20241025-v1.24.0.uf2
9-
TT_RUNS_SUPPORTED: "tt04 tt05 tt06 tt07"
9+
TT_RUNS_SUPPORTED: "unknown tt04 tt05 tt06 tt07"
1010
runs-on: ubuntu-24.04
1111
steps:
1212

src/ttboard/boot/rom.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__(self, project_mux):
1818
self.project_mux = project_mux
1919
self._contents = None
2020
self._pins = project_mux.pins
21+
self._rom_data = None
2122

2223

2324
def _send_and_rcv(self, send:int):
@@ -58,7 +59,7 @@ def contents(self):
5859
self.project_mux.reset_and_clock_mux(0)
5960

6061
self._contents = {
61-
'shuttle': 'tt04',
62+
'shuttle': 'unknown',
6263
'repo': '',
6364
'commit': ''
6465
}
@@ -81,21 +82,20 @@ def contents(self):
8182
if byte == 0:
8283
break
8384
rom_data += chr(byte)
84-
85-
log.info(f'Got ROM data\n{rom_data}')
85+
self._rom_data = rom_data
8686

87-
self._contents = {'shuttle':'tt04', 'commit':'FAKEDATA'}
8887
if not len(rom_data):
8988
log.warn("ROM data empty")
9089
else:
90+
log.info(f'Got ROM data\n{rom_data}')
9191
for l in rom_data.splitlines():
9292
try:
9393
k,v = l.split('=')
9494
self._contents[k] = v
9595
except:
9696
log.warn(f"Issue splitting {l}")
9797
pass
98-
log.debug(f"GOT ROM: {self._contents}")
98+
log.debug(f"Parsed ROM contents: {self._contents}")
9999
self.project_mux.disable()
100100
return self._contents
101101

0 commit comments

Comments
 (0)