Skip to content

Commit

Permalink
we need keypairs from pw at some point
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Aug 9, 2023
1 parent beb030b commit cfd6578
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/WBTxRx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,16 @@ void WBTxRx::on_new_packet(const uint8_t wlan_idx, const pcap_pkthdr &hdr,
m_console->debug("{}",all_rssi_to_string(parsedPacket->allAntennaValues));
}
// assumes driver gives 1st and 2nd antenna as 2nd and 3rd value
// 1st value is ignored
if(parsedPacket->allAntennaValues.size()>=1){
const auto rssi=parsedPacket->allAntennaValues[0].rssi;
auto opt_minmaxavg= this_wifi_card_calc.card_rssi.add_and_recalculate_if_needed(rssi);
if(opt_minmaxavg.has_value()){
this_wifi_card_stats.antenna1_dbm=opt_minmaxavg.value().avg;
if(m_options.debug_rssi){
m_console->debug("Card{}:{}",wlan_idx, min_max_avg_as_string(opt_minmaxavg.value(), false));
}
}
}
if(parsedPacket->allAntennaValues.size()>=2){
const auto rssi=parsedPacket->allAntennaValues[1].rssi;
auto opt_minmaxavg= this_wifi_card_calc.antenna1_rssi.add_and_recalculate_if_needed(rssi);
Expand Down

0 comments on commit cfd6578

Please sign in to comment.