Skip to content

Commit

Permalink
fix(vendor.dreame): Hide obstacles of type 200
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Dec 8, 2024
1 parent ce2a902 commit 88c0af5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/lib/robots/dreame/DreameMapParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

0 comments on commit 88c0af5

Please sign in to comment.