mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 09:07:44 +00:00
Move packet timestamping into baseband.
Now reads the RTC peripheral at the end of each received packet. TODO: Improve resolution to milliseconds or better. TODO: Work back from end of packet to compute timestamp for beginning of packet. TODO: Reuse ChibiOS RTC code, which isn't used now because ChibiOS on M0 core is responsible for RTC configuration, and including ChibiOS RTC API on M4 will also try to initialize/manage the peripheral.
This commit is contained in:
@@ -128,8 +128,8 @@ bool Packet::is_valid() const {
|
||||
return length_valid() && crc_ok();
|
||||
}
|
||||
|
||||
rtc::RTC Packet::received_at() const {
|
||||
return received_at_;
|
||||
Timestamp Packet::received_at() const {
|
||||
return packet_.timestamp();
|
||||
}
|
||||
|
||||
uint32_t Packet::message_id() const {
|
||||
|
Reference in New Issue
Block a user