Skip to content

docs: Expand README for ssd1327 driver.#218

Merged
nedseb merged 2 commits intomainfrom
ssd1327-expend-readme
Mar 23, 2026
Merged

docs: Expand README for ssd1327 driver.#218
nedseb merged 2 commits intomainfrom
ssd1327-expend-readme

Conversation

@Charly-sketch
Copy link
Copy Markdown
Contributor

Closes #192
Parent issue #194

Description

Expand SSD1327 README to match other drivers documentation level.

Changes

  • Add Features, Display Specifications and I2C Address sections
  • Add Basic Usage example
  • Document full API (drawing, display control, power management)
  • Explain FrameBuffer integration
  • Add complete examples table (15 files)
  • Fix typos and improve consistency

Checklist

  • README expanded with all sections
  • All public methods documented
  • FrameBuffer integration explained
  • All examples listed

Copy link
Copy Markdown
Contributor

@nedseb nedseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonne base, le README couvre les fonctionnalités principales. Cependant plusieurs erreurs factuelles à corriger :

Erreurs dans les noms de fichiers exemples

La table des exemples contient 4 noms de fichiers incorrects sur 15. Compare avec le contenu réel de examples/ :

Dans le README (faux) Fichier réel
framebuf_pixel.py framebuf_pixels.py
framebuf_rect.py framebuf_rects.py
random_pixel.py random_pixels.py
rotating_3D_cube.py rotating_3d_cube.py

Rappel important : avant de soumettre, lance un simple ls lib/ssd1327/examples/ et vérifie que chaque nom correspond. Ce type d'erreur est typique d'un copier-coller depuis un LLM sans vérification.

Descriptions d'exemples trop vagues

"Draw a line", "Draw a pixel", "Display a text" — ces descriptions répètent le nom du fichier sans rien ajouter. Propose des descriptions qui expliquent ce que l'exemple montre concrètement (ex: "Draw lines with different greyscale levels across the screen").

Méthodes manquantes dans l'API Reference

  • lookup(data) — méthode publique pour modifier la table de niveaux de gris, non documentée
  • reset() — méthode sur SSD1327_SPI pour reset hardware via la pin, non documentée

Méthodes internes exposées

write_cmd() / write_data() sont listées dans l'API publique avec la mention "(Implemented internally)". Si ce sont des méthodes internes, retire-les de la section API Reference. Si elles sont utiles au développeur, documente-les correctement avec signature et paramètres.

Cohérence avec les autres README

  • Section I²C Address : un bloc de code avec juste 0x3C est disproportionné. Une ligne "Default I²C address: 0x3C" ou un retour dans le tableau des specs suffit.
  • Section Notes : les blocs de code pour la formule de taille du buffer et pour show() sont excessifs. Une phrase inline suffit : "The internal buffer uses width × height / 2 bytes (4-bit per pixel). Call show() to push the buffer to the display."
  • Pas de section "Supported Display" : les autres README harmonisés ont une section dédiée au composant avec référence exacte et caractéristiques.

Source

"This library is a port of the original MicroPython SSD1327 driver." — la référence est tout en bas du fichier. Soit mets le lien directement dans cette phrase d'intro (ex: "This library is a port of micropython-ssd1327."), soit supprime cette phrase d'intro vague.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the ssd1327 driver README to provide feature/specification details, usage guidance, and a more complete API/examples reference, aligning it more closely with other driver documentation in the repo.

Changes:

  • Added Features, Display Specifications, I2C Address, Basic Usage, FrameBuffer Integration, API Reference, and Notes sections.
  • Added a more comprehensive Examples table and an mpremote invocation snippet.
  • Updated source attribution section and general formatting/consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/ssd1327/README.md Outdated
* rotation
* Power management:
* display on/off
* Optimized buffer rendering
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature bullet "Optimized buffer rendering" looks inaccurate for this driver: show() always writes the full framebuffer (self.write_data(self.buffer)), with no partial/dirty-rectangle updates. Consider rewording this bullet to avoid implying incremental rendering, or document what is actually optimized here (if anything).

Suggested change
* Optimized buffer rendering
* Framebuffer-based rendering API

Copilot uses AI. Check for mistakes.
Comment thread lib/ssd1327/README.md Outdated
Comment on lines +63 to +72
The driver internally uses `framebuf.FrameBuffer`, meaning **all standard drawing methods are available**.

This allows you to use:

* `fill()`
* `pixel()`
* `line()`
* `rect()`
* `text()`
* `scroll()`
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FrameBuffer integration section claims "all standard drawing methods are available" and lists rect(), but the driver only exposes a small wrapper set (fill, pixel, line, scroll, text). Other FrameBuffer methods (e.g., rect, fill_rect) are only available via display.framebuf.* in the current implementation. Please update the documentation to match the actual API (or add forwarding methods).

Copilot uses AI. Check for mistakes.
Comment thread lib/ssd1327/README.md Outdated
Comment on lines +136 to +148
| framebuf_lines.py | Draw a line |
| framebuf_pixel.py | Draw a pixel |
| framebuf_rect.py | Draw a rectangle |
| framebuf_scroll.py | Scroll a text |
| framebuf_text.py | Display a text |
| hello_world.py | Display "Hello World" |
| illusion.py | Display an optic illusion |
| invert.py | invert greyscale lookup table |
| lookup_table.py | Display gradiant |
| micropython_logo.py | Display micropython logo |
| random_pixel.py | Display random pixels |
| rotating_3D_cube.py | Display a rotating 3D cube |
| rotation.py | Rotate the 3D logo |
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several example filenames in the table don't match the actual files in lib/ssd1327/examples/ (e.g., framebuf_pixels.py, framebuf_rects.py, random_pixels.py, rotating_3d_cube.py). Please update the table so each row links to/mentions the correct filename, otherwise users will get "file not found" when trying to run them.

Copilot uses AI. Check for mistakes.
Comment thread lib/ssd1327/README.md Outdated
| hello_world.py | Display "Hello World" |
| illusion.py | Display an optic illusion |
| invert.py | invert greyscale lookup table |
| lookup_table.py | Display gradiant |
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the examples table description: "gradiant" should be "gradient".

Suggested change
| lookup_table.py | Display gradiant |
| lookup_table.py | Display gradient |

Copilot uses AI. Check for mistakes.
Comment thread lib/ssd1327/README.md
Comment on lines +97 to +100
```python
SSD1327_SPI(width, height, spi, dc, res, cs)
WS_OLED_128X128_SPI(spi, dc, res, cs)
```
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README documents SSD1327_SPI(...), but SSD1327_SPI is not exported by ssd1327/__init__.py (only WS_OLED_128X128_SPI is). As written, from ssd1327 import SSD1327_SPI / ssd1327.SSD1327_SPI won’t work. Either export SSD1327_SPI as part of the public API or adjust the docs to reference the correct import path / supported public classes.

Copilot uses AI. Check for mistakes.
@nedseb
Copy link
Copy Markdown
Contributor

nedseb commented Mar 23, 2026

J'ai réécrit le README pour traiter tous les commentaires (revue + Copilot) en 6ac947c :

Corrections de la revue :

  1. Noms de fichiers exemples — Les 4 erreurs corrigées (framebuf_pixels.py, framebuf_rects.py, random_pixels.py, rotating_3d_cube.py)
  2. Descriptions d'exemples — Remplacées par des descriptions concrètes au lieu de répéter le nom
  3. lookup(data) — Non documenté car c'est un stub (pass) dans le driver, inutile à exposer
  4. reset() — Documenté dans une section "SPI-only"
  5. write_cmd()/write_data() — Retirés de l'API Reference (méthodes internes)
  6. Section I²C Address — Intégrée dans le tableau des specs
  7. Section Notes — Simplifiée en une phrase inline dans FrameBuffer Integration
  8. Section "Supported Display" — Ajoutée avec tableau des specs
  9. Source — Lien inline dans l'intro, section Source supprimée

Corrections Copilot :

  1. "Optimized buffer rendering" — Remplacé par "FrameBuffer-based rendering API"
  2. rect() non disponible directement — Précisé que seuls fill/pixel/line/text/scroll sont exposés, les autres via display.framebuf
  3. SSD1327_SPI non exporté — Note ajoutée avec le chemin d'import alternatif
  4. "gradiant" → "gradient" — Corrigé
  5. Noms de fichiers — Déjà traité au point 1

La PR est prête à merger.

@nedseb nedseb merged commit c6eb001 into main Mar 23, 2026
3 checks passed
@nedseb nedseb deleted the ssd1327-expend-readme branch March 23, 2026 15:50
@semantic-release-updater
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Expand README for ssd1327 driver.

3 participants