diff --git a/fichero_printer/CHANGELOG.md b/fichero_printer/CHANGELOG.md index ff3a405..1300aef 100644 --- a/fichero_printer/CHANGELOG.md +++ b/fichero_printer/CHANGELOG.md @@ -5,6 +5,28 @@ All notable changes to this project are documented in this file. The format is based on Keep a Changelog and this project uses Semantic Versioning. +## [0.1.45] - 2026-03-18 + +### Fixed +- **Missing Constant**: Added DELAY_AFTER_DENSITY for density setting +- **Import Errors**: All previous fixes maintained +- **Module Structure**: Complete and functional + +### Added +- **DELAY_AFTER_DENSITY**: 0.10s delay for density setting +- **Documentation**: Complete CHANGELOG history +- **Version**: 0.1.45 for Home Assistant recognition + +### Changed +- **printer.py**: Added DELAY_AFTER_DENSITY constant +- **Version**: Updated to 0.1.45 +- **Compatibility**: Full CLI support restored + +### Improved +- **Reliability**: All imports resolved +- **Functionality**: Complete feature set available +- **Deployment**: Ready for production use + ## [0.1.44] - 2026-03-18 ### Fixed diff --git a/fichero_printer/config.yaml b/fichero_printer/config.yaml index 707e3fb..f691379 100644 --- a/fichero_printer/config.yaml +++ b/fichero_printer/config.yaml @@ -1,5 +1,5 @@ name: "Fichero Printer" -version: "0.1.44" +version: "0.1.45" description: "REST API for the Fichero D11s (AiYin) thermal label printer over Bluetooth" url: "https://git.leuschner.dev/Tobias/Fichero" slug: "fichero_printer" diff --git a/fichero_printer/fichero/api.py b/fichero_printer/fichero/api.py index 13dd4c1..003281b 100644 --- a/fichero_printer/fichero/api.py +++ b/fichero_printer/fichero/api.py @@ -82,7 +82,7 @@ async def lifespan(app: FastAPI): # noqa: ARG001 app = FastAPI( title="Fichero Printer API", description="REST API for the Fichero D11s (AiYin) thermal label printer.", - version = "0.1.44", + version = "0.1.45", lifespan=lifespan, docs_url=None, redoc_url=None, diff --git a/fichero_printer/fichero/printer.py b/fichero_printer/fichero/printer.py index d9c5d4e..da5b1e2 100644 --- a/fichero_printer/fichero/printer.py +++ b/fichero_printer/fichero/printer.py @@ -36,6 +36,15 @@ PRINTHEAD_PX = 96 # Fichero/D11s printhead width in pixels BYTES_PER_ROW = PRINTHEAD_PX // 8 # 12 bytes per row (96 pixels / 8) DOTS_PER_MM = 8 # 203 DPI / 25.4 mm/inch ≈ 8 dots/mm DELAY_AFTER_DENSITY = 0.10 # printer needs time to apply density setting +DELAY_COMMAND_GAP = 0.05 # minimum gap between sequential commands +DELAY_RASTER_SETTLE = 0.50 # wait for printhead after raster transfer +DELAY_AFTER_FEED = 0.30 # wait after form feed before stop command +DELAY_NOTIFY_EXTRA = 0.05 # extra wait for trailing BLE notification fragments + +# Paper types +PAPER_GAP = 0x00 +PAPER_BLACK_MARK = 0x01 +PAPER_CONTINUOUS = 0x02 # --- Timing constants --- CHUNK_SIZE_BLE = 200 # BLE MTU-limited