Skip to content

Commit

Permalink
feat(vendor.dreame): Add iteration count to MapSegmentationCapability
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed May 24, 2021
1 parent a9a94ce commit 05b338f
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DreameMapSegmentationCapability extends MapSegmentationCapability {
const mappedSegments = segments.map(segment => {
return [
parseInt(segment.id),
1, //maybe iterations?
typeof options.iterations === "number" ? options.iterations : 1,
fanSpeed,
waterGrade,
parseInt(segment.id) + 1 //no idea
Expand Down Expand Up @@ -86,6 +86,19 @@ class DreameMapSegmentationCapability extends MapSegmentationCapability {
throw new Error("Error code " + res.code);
}
}

/**
* @returns {import("../../../core/capabilities/MapSegmentationCapability").MapSegmentationCapabilityProperties}
*/
getProperties() {
return {
iterationCount: {
min: 1,
max: 2
},
customOrderSupport: true
};
}
}

module.exports = DreameMapSegmentationCapability;

0 comments on commit 05b338f

Please sign in to comment.