valetudo-map-parser 0.1.9a3__py3-none-any.whl → 0.1.9a4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- valetudo_map_parser/config/auto_crop.py +27 -16
- {valetudo_map_parser-0.1.9a3.dist-info → valetudo_map_parser-0.1.9a4.dist-info}/METADATA +1 -1
- {valetudo_map_parser-0.1.9a3.dist-info → valetudo_map_parser-0.1.9a4.dist-info}/RECORD +6 -6
- {valetudo_map_parser-0.1.9a3.dist-info → valetudo_map_parser-0.1.9a4.dist-info}/LICENSE +0 -0
- {valetudo_map_parser-0.1.9a3.dist-info → valetudo_map_parser-0.1.9a4.dist-info}/NOTICE.txt +0 -0
- {valetudo_map_parser-0.1.9a3.dist-info → valetudo_map_parser-0.1.9a4.dist-info}/WHEEL +0 -0
@@ -186,22 +186,33 @@ class AutoCrop:
|
|
186
186
|
try:
|
187
187
|
# For Hypfer vacuums, check room_propriety first, then rooms_pos
|
188
188
|
if hasattr(self.handler, 'room_propriety') and self.handler.room_propriety:
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
189
|
+
# Handle different room_propriety formats
|
190
|
+
room_data_dict = None
|
191
|
+
|
192
|
+
if isinstance(self.handler.room_propriety, dict):
|
193
|
+
# Hypfer handler: room_propriety is a dictionary
|
194
|
+
room_data_dict = self.handler.room_propriety
|
195
|
+
elif isinstance(self.handler.room_propriety, tuple) and len(self.handler.room_propriety) >= 1:
|
196
|
+
# Rand256 handler: room_propriety is a tuple (room_properties, zone_properties, point_properties)
|
197
|
+
room_data_dict = self.handler.room_propriety[0]
|
198
|
+
|
199
|
+
if room_data_dict and isinstance(room_data_dict, dict):
|
200
|
+
for room_id, room_data in room_data_dict.items():
|
201
|
+
if room_data.get('name') == room_name:
|
202
|
+
outline = room_data.get('outline', [])
|
203
|
+
if outline:
|
204
|
+
xs, ys = zip(*outline)
|
205
|
+
left, right = min(xs), max(xs)
|
206
|
+
up, down = min(ys), max(ys)
|
207
|
+
|
208
|
+
if rand256:
|
209
|
+
# Apply scaling for rand256 vacuums
|
210
|
+
left = round(left / 10)
|
211
|
+
right = round(right / 10)
|
212
|
+
up = round(up / 10)
|
213
|
+
down = round(down / 10)
|
214
|
+
|
215
|
+
return left, right, up, down
|
205
216
|
|
206
217
|
# Fallback: check rooms_pos (used by both Hypfer and Rand256)
|
207
218
|
if hasattr(self.handler, 'rooms_pos') and self.handler.rooms_pos:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
valetudo_map_parser/__init__.py,sha256=Fz-gtKf_OlZcDQqVfGlBwIWi5DJAiRucMbBMdQ2tX_U,1060
|
2
2
|
valetudo_map_parser/config/__init__.py,sha256=DQ9plV3ZF_K25Dp5ZQHPDoG-40dQoJNdNi-dfNeR3Zc,48
|
3
|
-
valetudo_map_parser/config/auto_crop.py,sha256=
|
3
|
+
valetudo_map_parser/config/auto_crop.py,sha256=m3D1EtsxiBpp4DUwymLVlLYOEX0-Lk7j8t0rxQNFpjQ,18757
|
4
4
|
valetudo_map_parser/config/color_utils.py,sha256=nXD6WeNmdFdoMxPDW-JFpjnxJSaZR1jX-ouNfrx6zvE,4502
|
5
5
|
valetudo_map_parser/config/colors.py,sha256=DG-oPQoN5gsnwDbEsuFr8a0hRCxmbFHObWa4_5pr-70,29910
|
6
6
|
valetudo_map_parser/config/drawable.py,sha256=2MeVHXqZuVuJk3eerMJYGwo25rVetHx3xB_vxecEFOQ,34168
|
@@ -20,8 +20,8 @@ valetudo_map_parser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
20
20
|
valetudo_map_parser/rand25_handler.py,sha256=_NIBQeg3yrVtJJRuMQ0lOViMro3Nc0Fi2geNycikQK4,23855
|
21
21
|
valetudo_map_parser/reimg_draw.py,sha256=1q8LkNTPHEA9Tsapc_JnVw51kpPYNhaBU-KmHkefCQY,12507
|
22
22
|
valetudo_map_parser/rooms_handler.py,sha256=YP8OLotBH-RXluv398l7TTT2zIBHJp91b8THWxl3NdI,17794
|
23
|
-
valetudo_map_parser-0.1.
|
24
|
-
valetudo_map_parser-0.1.
|
25
|
-
valetudo_map_parser-0.1.
|
26
|
-
valetudo_map_parser-0.1.
|
27
|
-
valetudo_map_parser-0.1.
|
23
|
+
valetudo_map_parser-0.1.9a4.dist-info/LICENSE,sha256=Lh-qBbuRV0-jiCIBhfV7NgdwFxQFOXH3BKOzK865hRs,10480
|
24
|
+
valetudo_map_parser-0.1.9a4.dist-info/METADATA,sha256=KKfprQZhhXXzr8YwaksMCofjz-tTdocuXFivMCV8Q-o,3320
|
25
|
+
valetudo_map_parser-0.1.9a4.dist-info/NOTICE.txt,sha256=5lTOuWiU9aiEnJ2go8sc7lTJ7ntMBx0g0GFnNrswCY4,2533
|
26
|
+
valetudo_map_parser-0.1.9a4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
27
|
+
valetudo_map_parser-0.1.9a4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|