Extract LogFile, add (dumb) logging to ERT, AIS apps.

This commit is contained in:
Jared Boone
2015-12-01 22:39:27 -08:00
parent 29f2d0e50a
commit 57aed55cc7
9 changed files with 128 additions and 31 deletions
+7
View File
@@ -33,6 +33,8 @@ ERTModel::ERTModel() {
.decimation_factor = 1,
});
receiver_model.set_baseband_bandwidth(1750000);
log_file.open_for_append("ert.txt");
}
std::string ERTModel::on_packet(const ERTPacketMessage& message) {
@@ -53,6 +55,11 @@ std::string ERTModel::on_packet(const ERTPacketMessage& message) {
s += hex_formatted.errors;
s += "\n";
if( log_file.is_ready() ) {
std::string entry = hex_formatted.data + "/" + hex_formatted.errors + "\r\n";
log_file.write(entry);
}
return s;
}