Push packet timestamping earlier in packet handling.

Ideally, it'd get pushed back into baseband, and baseband would correct for the length of the packet (based on preamble/access code match timestamp minus preamble/access code duration) to give the exact time the packet started.
This commit is contained in:
Jared Boone 2015-12-03 14:04:20 -08:00
parent 0909cdb31e
commit bb3cb6f080
6 changed files with 35 additions and 8 deletions

View file

@ -53,9 +53,7 @@ bool LogFile::is_ready() {
return !f_error(&f);
}
bool LogFile::write_entry(const std::string entry) {
rtc::RTC datetime;
rtcGetTime(&RTCD1, &datetime);
bool LogFile::write_entry(const rtc::RTC& datetime, const std::string entry) {
std::string timestamp =
to_string_dec_uint(datetime.year(), 4, '0') +
to_string_dec_uint(datetime.month(), 2, '0') +