fix:树莓派检测

This commit is contained in:
grabbit 2025-04-05 23:45:56 +08:00
parent f57506023f
commit 6faba28542

View File

@ -10,12 +10,11 @@ use std::time;
use serialport::DataBits::Eight;
use tokio::sync::broadcast;
// Import GPIO only on Linux
#[cfg(target_os = "linux")]
#[cfg(feature = "gpio")]
use rppal::gpio::{Gpio, InputPin, Trigger};
// Import rand for non-Linux platforms for simulating data
#[cfg(not(target_os = "linux"))]
#[cfg(not(feature = "gpio"))]
use rand::Rng;
use crate::gps::nmea::{parse_nmea_sentence, NmeaPosition};