Skip to content

Commit

Permalink
Don't hunt if geofenced
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragnt committed Aug 5, 2024
1 parent 2acd606 commit 1643e88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2627,9 +2627,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if oxide.config.autohunt
&& !target_chans.values().any(|value| value.is_empty())
&& hop_cycle >= autohunt_success_hop + 3
&& inside_geo
// if we are autohunting
// and target_chans has targets
// and we have been hopping for 3 cycles after we found a target
// and geofence is good
{
// We are done auto-hunting.
oxide.status_log.add_message(StatusMessage::new(
Expand Down
4 changes: 3 additions & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ fn create_status_bar(
let channel = format!(
"Frequency: {} {}",
oxide.if_hardware.interface.frequency.clone().print(),
if oxide.config.autohunt {
if oxide.ui_state.geofenced {
"(GeoFenced)"
} else if oxide.config.autohunt {
"(Hunting)"
} else if oxide.if_hardware.locked {
"(Locked)"
Expand Down

0 comments on commit 1643e88

Please sign in to comment.