Installer: don't ask the IT8951 screen size, read it from the board

Abierto
#363 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with epdlib/drivers/it8951/__init__.py and its _read_info flow, then trace how installer config supplies model to DisplaySettings.size and layout_size for the scheduler, web pages, and CLI. The issue also names the install and screen documentation pages; read those alongside the config handling. Done means a fresh install asks only for VCOM, the board-reported dimensions are used, and existing configs with model still work.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:install enhancement

What happens now

The installer asks which IT8951 screen size is in use (6, 7.8, 9.7 or 10.3 inch). The answer goes into the config as model, and PaperPi takes the screen's width and height in pixels from epdlib's MODELS table for that size.

Why the question is not needed

The IT8951 board tells us its size. When epdlib starts the screen it asks the board for its information (_read_info in epdlib/drivers/it8951/__init__.py), and the answer holds the width and height in pixels. Today epdlib only uses that answer to check the chosen model, and stops with "the controller reports WxH, but ... check the selected model" when they differ.

So the size question only adds a way to get it wrong.

Points to handle

  • 7.8" and 10.3" report the same size (1872x1404). The board cannot tell them apart, but for drawing they are the same, so this does not matter. Only the name shown (for example in the screen report link) would be less exact.
  • PaperPi needs the size before the screen is open. DisplaySettings.size / layout_size are used by the scheduler, the web pages (plugin previews, pictures, system page) and the CLI, which take it from the config, not from the screen. Options:
    1. Read it each time PaperPi starts the screen, and keep it in a small state file for the parts that run without the screen (web, CLI). Until the first start, use a default size.
    2. Read it at install time and write it into the config. Harder: the installer does not open the screen itself, and on a new Pi SPI only works after a restart.
  • epdlib change: let IT8951Driver work without a model (take width and height from the board in init), and keep model as an optional check for people who set it.
  • Config: model becomes optional for type = "it8951". Existing configs with model keep working.
  • Docs: the install page and the screen pages mention the size question; update them.

Done when

  • A fresh install with an IT8951 screen asks only for the VCOM voltage, not the size.
  • PaperPi draws at the size the board reports.
  • Configs that already have model still work.
Lenguaje dominante
Python
Estrellas
205
Forks
17
Merge medio
3 h 49 min
PR fusionados (30 d)
89

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de txoof/PaperPi

Todos los issues de txoof/PaperPi

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.