Skip to content

Commit

Permalink
Update pinpoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ofirgalcon committed Feb 23, 2024
1 parent e03e21b commit 124feee
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pinpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ if [[ "${use_optim}" == "True" ]] || [[ "${use_optim}" == "true" ]] ; then
NewResult="$(echo $gl_ssids | awk '{print substr($0, 1, 22)}' | sort -t '$' -k2,2rn | head -1)" || NewResult=""
NewAP="$(echo "$NewResult" | cut -f1 -d '$')" || NewAP=""
NewSignal="$(echo "$NewResult" | cut -f2 -d '$')" || NewSignal="0"
if [[ "${NewAP}" == "" ]]; then
DebugLog "blank AP - problem, quitting"
exit 1
fi
defaults write "$resultslocation" TopAP "$NewAP"
defaults write "$resultslocation" Signal "$NewSignal"
let SignalChange=OldSignal-NewSignal
Expand All @@ -230,11 +234,6 @@ if [[ "${use_optim}" == "True" ]] || [[ "${use_optim}" == "true" ]] ; then
moved=0
DebugLog "no significant signal change"
fi

if [[ "${NewAP}" == "" ]]; then
DebugLog "blank AP - problem, quitting"
exit 1
fi

[ $OldAP ] && [ $NewAP ] && APdiff=$(levenshtein "$OldAP" "$NewAP") || APdiff=17

Expand Down

0 comments on commit 124feee

Please sign in to comment.