Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1777 from BenoitDuffez/rssis_calc_from_rssic
Browse files Browse the repository at this point in the history
fix rssi computation from rssic if SNR < 0
  • Loading branch information
Vagabond authored Aug 17, 2022
2 parents eea2f37 + f0392bd commit 7f47fbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/miner_lora.erl
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,11 @@ packet_rssi(Packet, UseRSSIS) ->
false ->
%% Just use RSSIC.
fun (Obj) ->
maps:get(<<"rssic">>, Obj, undefined)
SNR = maps:get(<<"lsnr">>, Obj, 0),
case SNR < 0 of
true -> SNR + maps:get(<<"rssic">>, Obj, undefined);
_ -> maps:get(<<"rssic">>, Obj, undefined)
end
end
end,
BestRSSISelector =
Expand Down

0 comments on commit 7f47fbb

Please sign in to comment.