[][src]Struct dataGPS::DataGPS

pub struct DataGPS { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.