Rename AISView::log to on_packet.

This commit is contained in:
Jared Boone 2015-12-05 14:22:35 -08:00
parent 64b9bfa35f
commit 1c191bcd4f
2 changed files with 3 additions and 3 deletions

View File

@ -336,7 +336,7 @@ void AISView::on_show() {
rtcGetTime(&RTCD1, &datetime); rtcGetTime(&RTCD1, &datetime);
const baseband::ais::Packet packet { datetime, message->packet.payload, message->packet.bits_received }; const baseband::ais::Packet packet { datetime, message->packet.payload, message->packet.bits_received };
if( this->model.on_packet(packet) ) { if( this->model.on_packet(packet) ) {
this->log(packet); this->on_packet(packet);
} }
} }
); );
@ -349,7 +349,7 @@ void AISView::on_hide() {
View::on_hide(); View::on_hide();
} }
void AISView::log(const baseband::ais::Packet& packet) { void AISView::on_packet(const baseband::ais::Packet& packet) {
const auto source_id = packet.source_id(); const auto source_id = packet.source_id();
auto matching_recent = std::find_if(recent.begin(), recent.end(), auto matching_recent = std::find_if(recent.begin(), recent.end(),
[source_id](const AISView::RecentEntry& entry) { return entry.mmsi == source_id; } [source_id](const AISView::RecentEntry& entry) { return entry.mmsi == source_id; }

View File

@ -152,8 +152,8 @@ private:
}; };
std::list<RecentEntry> recent; std::list<RecentEntry> recent;
void on_packet(const baseband::ais::Packet& packet);
void log(const baseband::ais::Packet& packet);
}; };
} /* namespace ui */ } /* namespace ui */