Missing rotate option in valetudo-mapper breaks calibration point generation
maximweb opened this issue · 1 comments
maximweb commented
Describe the bug
As discussed https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/435#discussioncomment-3399005, the valetudo-mapper appears to return nan/null values for the calibration point vacuum coordinates when rotate
option is unset.
How to Reproduce
Remove rotate
option from config.
Possible Fix
Can't test right now, but I believe the rotate
option has no default value but if omitted remains unset. Yet, during calibration point calculation it is used without checking.
[https://github.com/rand256/valetudo-mapper/blob/master/lib/Tools.js#L351-L369](This part) may be the issue. Maybe something like
if(parseInt(settings.rotate) {
alpha = ...
} else {
alpha = 0
}
Could fix the issue.
rand256 commented
Should be fixed now.