diff --git a/shared/display.py b/shared/display.py index 816705b2..ea6820bd 100644 --- a/shared/display.py +++ b/shared/display.py @@ -404,7 +404,7 @@ class Display: y += 8 if is_addr and is_change: - self.text(x+4, y+8, "CHANGE", FontTiny) + self.text(x+4, y+8, "CHANGE BACK", FontTiny) else: # hand-positioned for known cases # - sidebar = (text, #of char per line) diff --git a/shared/lcd_display.py b/shared/lcd_display.py index 5c995cea..e5adad1d 100644 --- a/shared/lcd_display.py +++ b/shared/lcd_display.py @@ -775,8 +775,11 @@ class Display: self.text(-1, 0, idx_hint) if is_addr and is_change: - for i, c in enumerate("CHANGE"): - self.text(0, i, c) + for i, c in enumerate("CHANGE", start=4): + self.text(1, i, c) + + for i, c in enumerate("BACK", start=6): + self.text(-1, i, c) # pass a max brightness flag here, which will be cleared after next show self.show(max_bright=True) diff --git a/testing/conftest.py b/testing/conftest.py index 769bea30..a50babb0 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -622,21 +622,35 @@ def verify_qr_address(cap_screen_qr, cap_screen, is_q1): # - insists on some spaces full = cap_screen() if is_q1: + full_split = full.split("\n") if is_change: - for c, line in zip("CHANGE", full.split('\n')): - assert line.startswith(c) + for i, (c, line) in enumerate(zip("XXXXCHANGE", full_split)): + if i > 3: + assert line.startswith(c) + else: + assert not line.startswith(c) + + for i, (c, line) in enumerate(zip("XXXXXXBACK", full_split)): + if i > 5: + assert line.endswith(c) + else: + assert not line.endswith(c) + elif is_change is False: - for c, line in zip("CHANGE", full.split('\n')): + for c, line in zip("XXXXCHANGE", full_split): assert not line.startswith(c) + for c, line in zip("XXXXXXBACK", full_split): + assert not line.endswith(c) + txt = ''.join(l for l in full.split() if len(l)>4).replace('~', '') else: if is_change: - assert "CHANGE" in full + assert "CHANGE BACK" in full elif is_change is False: - assert "CHANGE" not in full + assert "CHANGE BACK" not in full - txt = ''.join(full.split()).replace('CHANGE', '') + txt = ''.join(full.split("\n")).replace('CHANGE BACK', '') if txt: assert txt == qr