fix(vendor.dreame): Hide obstacles of type 200

This commit is contained in:
Sören Beye 2024-12-08 16:39:53 +01:00
parent ce2a902a05
commit 88c0af5c8b

View File

@ -272,6 +272,10 @@ class DreameMapParser {
const confidence = `${Math.round(parseFloat(obstacle[3])*100)}%`;
const image = obstacle[5] !== undefined ? obstacle[5] : undefined;
if (HIDDEN_OBSTACLE_TYPES.includes(obstacle[2])) {
return;
}
entities.push(new mapEntities.PointMapEntity({
points: [
coords.x,
@ -689,6 +693,7 @@ DreameMapParser.CONVERT_ANGLE_TO_VALETUDO = function(angle) {
return ((angle < 180 ? 180 - angle : 360 - angle + 180) + 270) % 360;
};
const HIDDEN_OBSTACLE_TYPES = ["200"];
const OBSTACLE_ID_NAMESPACE = "f90e13dc-3728-4267-bd90-43caa3f460e5";
module.exports = DreameMapParser;