Closed maximweb closed 1 year ago
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.
rotate
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.
Should be fixed now.
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
Could fix the issue.