Valetudo 2022.03.0 #1429
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
-
2022.03.0
Ordered segment cleanups via the UI, MQTT deduplication and a lot of internal refactoring
Ordered segment cleanup
The UI now tracks the order in which segments were selected, meaning that if your robots' firmware supports it, they will be cleaned in the order you've specified.
If supported, the order will be displayed as a roman numeral above the segment label triangle.
MQTT
The MQTT connectivity feature now reports a state to the UI. Furthermore, it also collects some statistics.
By watching those stats, you will notice that this release also causes less traffic, as most outgoing messages are deduplicated.
Initially, I didn't want to do that as the solution proposed was to just store every payload in memory and then compare on each mqtt publish.
That would work, however it comes with a hefty ram overhead as you now have to constantly keep 300+ somewhat long string payloads in memory.
With each character taking up 2 byte, this approach isn't feasible with the ram budget we have (32 Mbyte or less).
To reduce the amount of ram required, we could use a hash function such as md5, however that would still be too much.
As they'd be saved as hex strings, that would mean 32 characters each with each character taking up 2 bytes, resulting in each pair of topic and payload using 128 byte or more.
Thus, instead we're now using 32-bit CRC32. With object keys being strings, I'd think that these pairs should use around 20 byte each.
The downside of CRC32 is that the risk of collisions is much higher. However, I highly doubt that that could actually happen in this application.
To save CPU time, which is also quite limited on our robots, the (in comparison) huge map data is not being deduplicated.
Misc
Autogenerated changelog
Features
Bug Fixes
This discussion was created from the release Valetudo 2022.03.0.
Beta Was this translation helpful? Give feedback.
All reactions