Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2b5bd0e
adding const.py and update types.py to separate const and types
sca075 Oct 23, 2025
c6ab4ee
last files for 12 isort / ruff and lint
sca075 Nov 4, 2025
e6b006c
remove duplicate import of const
sca075 Dec 19, 2025
a5ca571
const was not properly imported
sca075 Dec 20, 2025
0d4f63c
minor changes in rand256_handler.py, shared.py removed snapshot at in…
sca075 Dec 20, 2025
c412fd7
updated __init__.py
sca075 Dec 21, 2025
11c09e2
updated __init__.py all
sca075 Dec 21, 2025
cb056f4
updated __init__.py all
sca075 Dec 21, 2025
4e21656
update shared.py to load floor data from the config if present else u…
sca075 Dec 24, 2025
0505a8c
update TrimsCropData to use the floors when init, else default values.
sca075 Jan 8, 2026
9426afb
Merge branch 'main' into dev_main
sca075 Jan 8, 2026
3b9d5b2
feat: Add carpet zone detection and rendering support
sca075 Jan 11, 2026
3bea98e
feat: Add carpet zone detection and rendering support
sca075 Jan 11, 2026
de0effa
fix: Add missing CARPET to element_color_mapping
sca075 Jan 11, 2026
644b81e
Dead code removed. The _draw_carpets method was leftover from the ini…
sca075 Jan 11, 2026
f3af432
Merge branch 'main' into dev_main
sca075 Jan 11, 2026
a67cd56
Materials implementation and configuration
sca075 Jan 13, 2026
317511d
removed test and unused code _update_material_colors()
sca075 Jan 13, 2026
dbe642f
improved material.py drawings with mcvrender
sca075 Jan 13, 2026
9ac664b
isort and ruffed code and added configurable colours for material.py
sca075 Jan 16, 2026
a7ce494
Merge branch 'main' into dev_main
sca075 Jan 16, 2026
64c4743
updated types.py isort and ruff
sca075 Jan 16, 2026
7536d8f
updated drawable_elements.py with correct colors name for material
sca075 Jan 16, 2026
b009533
double import correction in colors.py and indexing
sca075 Jan 16, 2026
f30bafd
use MaterialColor instead of direct access.
sca075 Jan 16, 2026
43287e4
feat: Add mop mode path width adjustment for Hypfer vacuums
sca075 Jan 21, 2026
22daf1a
refactor: remove unused apply_overlay_on_region method from MaterialT…
sca075 Jan 21, 2026
d48fd44
Merge branch 'main' into dev_main
sca075 Jan 21, 2026
9b81c74
refactor: Replace hardcoded color indices with named ColorIndex enum
sca075 Jan 21, 2026
9564f58
Release v0.2.0 - Major Color System Refactoring and Code Quality Impr…
sca075 Jan 21, 2026
e3469b7
chore: bump version to 0.2.1 with mvcrender 0.0.8 dependency update
sca075 Jan 25, 2026
8ce61df
Merge branch 'main' into dev_main
sca075 Jan 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SCR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Valetudo map parser.
Version: 0.1.14"""
Version: 0.2.1"""
2 changes: 1 addition & 1 deletion SCR/valetudo_map_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Valetudo map parser.
Version: 0.2.0"""
Version: 0.2.1"""

from pathlib import Path

Expand Down
7 changes: 5 additions & 2 deletions SCR/valetudo_map_parser/config/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def to_dict(self) -> dict:
@classmethod
def from_list(cls, crop_area: List[int], floor: Optional[str] = None):
"""
Initialize TrimsData from a list [trim_up, trim_left, trim_down, trim_right]
Initialize TrimsData from a list [left, up, right, down] (mvcrender crop_area format).
NOTE: This matches the current implementation but needs investigation - mvcrender
documentation states crop_area is [left, up, right, down] but the mapping here
assigns crop_area[0] to trim_up and crop_area[1] to trim_left which seems reversed.
"""
return cls(
trim_up=crop_area[0],
Expand All @@ -339,7 +342,7 @@ def from_list(cls, crop_area: List[int], floor: Optional[str] = None):

def clear(self) -> dict:
"""Clear all the trims."""
self.floor = ""
self.floor = "floor_0"
self.trim_up = 0
self.trim_left = 0
self.trim_down = 0
Expand Down
2 changes: 2 additions & 0 deletions SCR/valetudo_map_parser/hypfer_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ async def async_get_image_from_json(
int(self.shared.image_rotate),
self.zooming,
)
# Update shared trims with calculated crop values
self.update_trims()
# If the image is None return None and log the error.
if img_np_array is None:
LOGGER.warning("%s: Image array is None.", self.file_name)
Expand Down
2 changes: 2 additions & 0 deletions SCR/valetudo_map_parser/rand256_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ async def _draw_map_elements(
zoom=self.zooming,
rand256=True,
)
# Update shared trims with calculated crop values
self.update_trims()
return img_np_array

async def _finalize_image(self, pil_img):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "valetudo-map-parser"
version = "0.2.0"
version = "0.2.1"
description = "A Python library to parse Valetudo map data returning a PIL Image object."
authors = ["Sandro Cantarella <gsca075@gmail.com>"]
license = "Apache-2.0"
Expand All @@ -18,7 +18,7 @@ python = ">=3.13"
numpy = ">=1.26.4"
Pillow = ">=10.3.0"
scipy = ">=1.12.0"
mvcrender = "==0.0.7"
mvcrender = "==0.0.8"

[tool.poetry.group.dev.dependencies]
ruff = "*"
Expand Down