mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-20 14:39:01 +00:00
Extract LogFile, add (dumb) logging to ERT, AIS apps.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user