mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-01 14:28:56 -07:00
replacing numbered options in config with rust enum implementation, unique commit to make easier to debug or rollback
This commit is contained in:
committed by
Will Greenberg
parent
0b91a6e5d3
commit
fee082cde4
+2
-1
@@ -1,3 +1,4 @@
|
||||
use crate::config::GpsMode;
|
||||
use crate::gps::{GpsRecord, load_gps_records};
|
||||
use crate::server::ServerState;
|
||||
|
||||
@@ -95,7 +96,7 @@ pub(crate) async fn load_gps_records_for_entry(
|
||||
// not the current config, so old fixed-mode sessions still get coordinates even
|
||||
// if the mode has since been changed. Use the configured fixed coords directly
|
||||
// rather than gps_state, which can be overwritten by API calls or be None.
|
||||
if entry_gps_mode == Some(1) {
|
||||
if entry_gps_mode == Some(GpsMode::Fixed) {
|
||||
if let (Some(lat), Some(lon)) = (
|
||||
state.config.gps_fixed_latitude,
|
||||
state.config.gps_fixed_longitude,
|
||||
|
||||
Reference in New Issue
Block a user