[−][src]Struct dataGPS::DataGPS
Struct of DataGPS for latitude, longitude, altitude, time and uart
Implementations
impl DataGPS
[src]
Implementation of functions for DataGPS
pub fn new(baud: Bauds) -> Self
[src]
Create a new Uart connections and the object DataGPS
pub fn read_all_data(&mut self)
[src]
Read the data from the GPS module and put in the values of the struct with a println
pub fn get_altitude(&mut self) -> String
[src]
Return altitude if it is present
pub fn get_latitude(&mut self) -> String
[src]
Examples of get_altitude
let x = DataGPS::new(Bauds::Baud9600); x.read_all_data(); println!("Altitude: {:?}",x.get_altitude());
Return latitude if it is present
pub fn get_time(&mut self) -> String
[src]
Return time if it is present
pub fn get_longitude(&mut self) -> String
[src]
Return longitude if it is present
pub fn get_baud_rate(&self) -> u32
[src]
Return baud rate
pub fn set_baud_rate(&mut self, baud_rate: &Bauds)
[src]
Set baud rate of UART connection
Auto Trait Implementations
impl !RefUnwindSafe for DataGPS
impl Send for DataGPS
impl Sync for DataGPS
impl Unpin for DataGPS
impl !UnwindSafe for DataGPS
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,