Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement page checksums in packet 27/0
CRC is calculated for every header packet in PacketMag::GetPacket and compared to a stored value. If the checksum has changed (e.g. at midnight), or the page has been updated, the rest of the page (X/1-25) are also checksummed ready for transmission in packet X/27/0 Packet::Header() and Packet::HeaderText() are combined into a single function and header template substitutions moved here from Packet::tx(). Version string substitution is moved to Packet::SetRow so that it gets included in page checksum. The remaining substitutions (temperature, offset time, etc) are problematic because they are dynamic (meaning a mechanism is needed to cause the checksum to be recalculated if they change), and need to be processed *before* the packet X/27/0 is broadcast, i.e. before they get generated from the ttxline which would mean significant changes to the line/packet storage architecture. This commit also adds a new variable _subpage to PacketMag which holds a pointer to the the actual subpage currently being transmitted to remove the repeated `if _page->IsCarousel _page->GetCarouselPage->foo() else _page->foo()` pattern
- Loading branch information