Build every screen from one shared core plus a small file per board, the same firmware as before (0.2.84)
The two board profiles (5,000 lines each, 87 % the same text) become packages/core.yaml and one file per board under packages/boards/: the hardware, a table of 84 sizes and font sizes, 18 hooks with the lines of C++ only that board adds inside a shared lambda, and the board's own sections. packages/cyd.yaml and packages/guition.yaml keep their names and places (a screen installed from ESP Screens builds as before); home-like-2432s028.yaml and guition-4848s040.yaml become the same entries for a checkout. The firmware stays 0.2.70: the C++ ESPHome generates for each board, through the checkout profile and through the GitHub package route, was compared line by line with the old profiles' (docs/TEST_RESULTS_0284.md). tools/check_packages.py replaces tools/generate_packages.py; tools/profiles.py gives the tests and tools the three files as one; docs/PROFILES.md says how the files fit together and how a board is added. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
"""Regression checks for the 320x240 page geometry and event guards."""
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SOURCE = (ROOT / 'home-like-2432s028.yaml').read_text()
|
||||
sys.path.insert(0, str(ROOT / 'tools'))
|
||||
import profiles # noqa: E402
|
||||
SOURCE = profiles.resolved('home-like-2432s028.yaml')
|
||||
VALUES = dict(re.findall(r'^ (\w+): "([^"]*)"', SOURCE, re.M))
|
||||
|
||||
class LayoutTests(unittest.TestCase):
|
||||
@@ -40,7 +43,7 @@ class LayoutTests(unittest.TestCase):
|
||||
def test_page_keys_are_the_halves_of_the_band_under_the_tiles(self):
|
||||
"""Firmware 0.2.69+: a chevron in each half of the band, the dots between them take no touches."""
|
||||
for name in ('home-like-2432s028.yaml', 'guition-4848s040.yaml'):
|
||||
source = (ROOT / name).read_text()
|
||||
source = profiles.resolved(name)
|
||||
values = dict(re.findall(r'^ (\w+): "([^"]*)"', source, re.M))
|
||||
band = int(values['DISPLAY_H']) - int(values['SCROLL_Y']) - int(values['SCROLL_H'])
|
||||
half = int(values['DISPLAY_W']) // 2
|
||||
|
||||
Reference in New Issue
Block a user