docs: translate docs/analysis to English
- API.md, workflow.md and usb-layout.md translated - usb-layout.md: describe the formatting that OpenPU actually performs on Linux (UDisks2) and Haiku (one transaction per step) - API.md: restore the = / & escaping example lost earlier Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
1 parent
962343f220
commit
9a24c2eb61
5 files changed
+166
-159
No files matched your search
+38
-38
@@ -1,56 +1,56 @@
|
||||
# Déroulé fonctionnel de « Peugeot Update »
|
||||
# Functional workflow of "Peugeot Update"
|
||||
|
||||
## Écrans (Angular)
|
||||
1. **Bienvenue** (`welcome`), qu'on peut masquer (`hideWelcome`).
|
||||
2. **Véhicules** (`vehicles`, `vehicle-editor`) : liste, ajout (VIN + nom), suppression,
|
||||
lien vers le guide PDF (`wave` → clé i18n → URL PDF localisée).
|
||||
3. **Mises à jour** (`available-updates`) : firmware et/ou cartographie, cases à cocher.
|
||||
4. **Dossier de téléchargement** (`path-selector`) : refusé s'il est sur une clé USB,
|
||||
ou si l'espace libre est inférieur à (taille restante × 1.1).
|
||||
5. **Téléchargement** (`download-file`) : barre de progression, pause/reprise/annulation, temps estimé.
|
||||
6. **Clé USB** (`usb-selector`) : seuls les disques USB montés de taille > besoin sont listés ;
|
||||
confirmation du formatage.
|
||||
7. **Copie** (`copy-progress`) puis **Fin**, avec les instructions d'installation dans le véhicule.
|
||||
## Screens (Angular)
|
||||
1. **Welcome** (`welcome`), can be hidden (`hideWelcome`).
|
||||
2. **Vehicles** (`vehicles`, `vehicle-editor`): list, add (VIN + name), delete, link to the PDF guide
|
||||
(`wave` → i18n key → localised PDF URL).
|
||||
3. **Updates** (`available-updates`): firmware and/or map, check boxes.
|
||||
4. **Download folder** (`path-selector`): refused when it is on a USB stick, or when the free space
|
||||
is below (remaining size × 1.1).
|
||||
5. **Download** (`download-file`): progress bar, pause/resume/cancel, estimated time.
|
||||
6. **USB stick** (`usb-selector`): only mounted USB drives larger than needed are listed;
|
||||
formatting must be confirmed.
|
||||
7. **Copy** (`copy-progress`), then **Finish**, with installation instructions for the vehicle.
|
||||
|
||||
## Machine à états (download-manager)
|
||||
## State machine (download-manager)
|
||||
|
||||
```
|
||||
SelectUpdates
|
||||
└─ résolution séquentielle des noms : fw → licence (si fw) → carto
|
||||
→ lastDownload = {state: download, vin, fw/cartoUpdateSelected, versions, noms}
|
||||
└─ names resolved sequentially: fw → license (if fw) → map
|
||||
→ lastDownload = {state: download, vin, fw/cartoUpdateSelected, versions, names}
|
||||
ChooseFolder
|
||||
└─ vérifications : dossier pas sur USB, espace libre > besoin×1.1
|
||||
└─ checks: folder not on USB, free space > needed × 1.1
|
||||
Download
|
||||
├─ si fw : licence (simple) → firmware (Range)
|
||||
└─ puis carto (Range)
|
||||
├─ if fw: license (simple) → firmware (Range)
|
||||
└─ then map (Range)
|
||||
→ lastDownload.state = usb
|
||||
PrepareUsb
|
||||
├─ taille = Σ(tailles fw + licence + carto) × 1.1 ; taille USB min = 2 Go × 2^n ≥ besoin (base 10^9)
|
||||
├─ confirmation → formatage FAT32 (label = label actuel de la clé assaini, défaut NEW)
|
||||
├─ si fw : copie licence → <usb>/license/<nomLicence>
|
||||
├─ extraction du tar fw → <usb>/ (en ignorant tout fichier nommé UpdateInfo.xml)
|
||||
├─ extraction du tar carto → <usb>/
|
||||
├─ suppression des fichiers téléchargés ; lastDownload remis à zéro
|
||||
└─ éjection (Windows)
|
||||
├─ size = Σ(fw + license + map sizes) × 1.1; minimum stick = 2 GB × 2^n ≥ needed (base 10^9)
|
||||
├─ confirmation → FAT32 formatting (label = the stick's current label, sanitised, default NEW)
|
||||
├─ if fw: copy license → <usb>/license/<licenseName>
|
||||
├─ extract the fw tar → <usb>/ (skipping any file named UpdateInfo.xml)
|
||||
├─ extract the map tar → <usb>/
|
||||
├─ delete the downloaded files; lastDownload reset
|
||||
└─ eject (Windows)
|
||||
Finish
|
||||
```
|
||||
|
||||
En cas de tar invalide (`Invalid tar header` / `unsupported type`), le tar est supprimé et
|
||||
l'utilisateur revient à la liste des véhicules (il faut retélécharger).
|
||||
On an invalid tar (`Invalid tar header` / `unsupported type`), the tar is deleted and the user goes
|
||||
back to the vehicle list (the file has to be downloaded again).
|
||||
|
||||
## Persistance (`%APPDATA%\Peugeot Update`)
|
||||
- `config.json` : `language`, `hideWelcome`, `downloadPath`,
|
||||
## Persistence (`%APPDATA%\Peugeot Update`)
|
||||
- `config.json`: `language`, `hideWelcome`, `downloadPath`,
|
||||
`lastDownload{state(0=none,…), vin, fwUpdateSelected, cartoUpdateSelected, fwLastVersion,
|
||||
cartoLastVersion, fwFileName, cartoFileName, licenseFileName}`
|
||||
- `vehicles.json` : `{ "<VIN>": {name, type, wave, undeletedFiles?{fw,carto,license}} }`
|
||||
- `vehicles.json`: `{ "<VIN>": {name, type, wave, undeletedFiles?{fw,carto,license}} }`
|
||||
- `downloadPath.txt`, `log.log` (electron-log)
|
||||
|
||||
Au démarrage, si `lastDownload.state != none`, l'app propose de reprendre le téléchargement
|
||||
ou de supprimer les fichiers.
|
||||
At startup, when `lastDownload.state != none`, the application offers to resume the download or
|
||||
to delete the files.
|
||||
|
||||
## Particularités et défauts observés (à ne pas reproduire)
|
||||
- `wmic` est utilisé pour lire le label de la clé, mais il a été retiré de Windows 11.
|
||||
- `xcopy` échoue vers la racine du lecteur, avec repli sur `robocopy`.
|
||||
- Une licence au nom déjà vu, puis supprimée, est réutilisée : ENOENT jusqu'au redémarrage de l'app.
|
||||
- Le dossier temporaire `toUsbContent` n'est pas toujours supprimé (ENOTEMPTY).
|
||||
- Le tri des mises à jour par date est sans effet (voir API.md).
|
||||
## Quirks and defects observed (not to reproduce)
|
||||
- `wmic` is used to read the stick label, but it was removed from Windows 11.
|
||||
- `xcopy` fails when the target is a drive root; it falls back to `robocopy`.
|
||||
- A license name seen before and then deleted is reused: ENOENT until the application restarts.
|
||||
- The temporary `toUsbContent` folder is not always deleted (ENOTEMPTY).
|
||||
- Sorting updates by date has no effect (see API.md).
|
||||
Reference in new issue
Block a user