From 0a9da7a1d3f6a6b55ca996924a762af78bfb3712 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 11 Nov 2015 11:56:50 -0800 Subject: [PATCH] Store tuned frequency and modulation characteristics in TPMS log. --- firmware/application/ui_receiver.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/application/ui_receiver.cpp b/firmware/application/ui_receiver.cpp index 83a7f0dc..a4d85698 100644 --- a/firmware/application/ui_receiver.cpp +++ b/firmware/application/ui_receiver.cpp @@ -575,7 +575,11 @@ void ReceiverView::on_packet_tpms(const TPMSPacketMessage& message) { to_string_dec_uint(datetime.minute(), 2, '0') + to_string_dec_uint(datetime.second(), 2, '0'); - std::string log = timestamp + " " + hex_data + "/" + hex_error + "\r\n"; + const auto tuning_frequency = receiver_model.tuning_frequency(); + // TODO: function doesn't take uint64_t, so when >= 1<<32, weirdness will ensue! + const auto tuning_frequency_str = to_string_dec_uint(tuning_frequency, 10); + + std::string log = timestamp + " " + tuning_frequency_str + " FSK 38.4 19.2 " + hex_data + "/" + hex_error + "\r\n"; f_puts(log.c_str(), &fil_tpms); f_sync(&fil_tpms); }