replacing numbered options in config with rust enum implementation, unique commit to make easier to debug or rollback

This commit is contained in:
Carlos Guerra
2026-04-08 19:29:45 +02:00
committed by Will Greenberg
parent 0b91a6e5d3
commit fee082cde4
15 changed files with 87 additions and 50 deletions
+2 -1
View File
@@ -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,