Valetudo 2021.12.1 #1267
Hypfer
announced in
Release Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
2021.12.1
Map data format changes, quality of life improvements and bugfixes.
Changes in 2021.12.1
As expected, something would go wrong with the map data format change.
This is a bugfix release, so 98% of the previous changelog still apply.
In 2021.12.0, if you have rooms that aren't rectangular, it might happen that the triangle to select it vanishes, leading to you being unable to trigger a segment cleanup using the UI.
This happened because in those cases, the UI calculates the median pixel coordinates to properly place the triangle.
This value isn't calculated by the backend, because it is an expensive operation, and we're both RAM and CPU-limited there.
To calculate the median, the UI needs the decompressed pixel coordinate format.
This works exactly once during the initial render, because of the MapLayerRenderer doing the pixel decompression on the map passed by reference to it.
As soon as the WebWorker is available however, this doesn't happen anymore, as the worker only receives a copy of the data.
This means that there are now 0 pixels as far as the SegmentLabel is concerned, leading it to be placed at coordinates
[NaN,NaN]
.Since testing is done locally without constant map updates, everything seemed fine during development.
Another thing discovered due to this bug was that the GithubValetudoUpdateProvider did not filter out pre-releases or drafts.
Not a big issue though as it just requires you to update twice in a row.
Anyways, on with the 2021.12.0 changelog:
Map data format changes
This release features the first version increment of the ValetudoMap data format.
Initially, in version 1, pixel data such as walls or floor were stored as a huge array of coordinate pairs:
[x0, y0, x1, y1, ...]
. This was not a very efficient way of storing that data as most of it is redundant.This resulted in map files that were over 1 MiB in size being pushed to your browser every 3 seconds.
To combat this, some thought was put into how the data is stored.
If you have a row of pixels, all of them will have the same y-coordinate, meaning that you only have to store that once.
People already figured that out in the 60s.
With Map V2, pixels are stored as
[xStart0, y0, count0, xStart1, y1, count1, ...]
where[xStart, y]
is the starting point andcount
represents additional pixels with the same y-coordinate to the right.This resulted in V2 map files using between 5% and 15% of the size of the equivalent V1 map.
The huge testfile map for example was compressed from 847 kB to 75 kB.
While this is a breaking change, the breakage actually isn't that big of a change as V2 can easily be converted back to V1.
In fact, running
JSON.parse()
on a V2 map and then converting it to a V1 one in memory is more than twice as fast as runningJSON.parse()
on a V1 map.Since this change drastically reduces the traffic caused by live maps, I expect to see general usability and reliability
improvements in situations where the Wi-Fi reception isn't that great.
LogViewer
The LogViewer has been greatly improved and now features a structured and color-coded view of your log.
You can use the text filter at the top to either filter for the loglevel or the message contents.
Just start typing.
UI Help
Both consumables and timers now feature a help button, which shall explain how to use these features.
Misc
Autogenerated changelog
Features
Bug Fixes
This discussion was created from the release Valetudo 2021.12.1.
Beta Was this translation helpful? Give feedback.
All reactions