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

オープン
#363 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Python
スター
205
フォーク
18
平均マージ
3時間 49分
マージ済み PR(30日)
89

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

txoof/PaperPi のほかの issue

txoof/PaperPi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。