fix:树莓派检测

This commit is contained in:
grabbit 2025-04-05 23:52:32 +08:00
parent ecc90b6fd6
commit b45f2d198f

View File

@ -54,7 +54,7 @@ pub struct GpsController {
#[cfg(feature = "gpio")]
pps_pin: Option<InputPin>,
/// Placeholder for non-Linux platforms
#[cfg(not(target_os = "linux"))]
#[cfg(not(feature = "gpio"))]
pps_pin: Option<()>,
/// Last known position
position: Arc<Mutex<GeoPosition>>,
@ -93,7 +93,6 @@ impl GpsController {
Ok(Self {
config: gps_config,
port: None,
#[cfg(feature = "gpio")]
pps_pin: None,
position: Arc::new(Mutex::new(initial_position)),
sync_status: Arc::new(Mutex::new(SyncStatus::NoSync)),