Struct thermal_camera::grideye::GridEye[][src]

pub struct GridEye<I2C> { /* fields omitted */ }

Implementations

impl<I2C> GridEye<I2C> where
    I2C: Transactional
[src]

pub fn new(bus: I2C, address: Address) -> Self[src]

pub fn power_mode(&mut self) -> Result<PowerControlValue, I2C::Error>[src]

Retrieve the current power mode the sensor is in. See PowerControlValue for a description of the different modes.

pub fn set_power_mode(
    &mut self,
    value: PowerControlValue
) -> Result<(), I2C::Error>
[src]

Set the sensor’s power mode. See PowerControlValue for a description of the different settings as well as the process for waking up from PowerControlValue::Sleep.

pub fn reset_flags(&mut self) -> Result<(), I2C::Error>[src]

Reset status flags and the interrupt table.

pub fn reset_initial(&mut self) -> Result<(), I2C::Error>[src]

Perform a soft-reset, clearing status flags, the interrupt table, and re-read calibration data. This should only be used when moving from PowerControlValue::Sleep to PowerControlValue::Normal.

pub fn frame_rate(&mut self) -> Result<FrameRateValue, I2C::Error>[src]

Get the current camera frame rate.

pub fn set_frame_rate(
    &mut self,
    value: FrameRateValue
) -> Result<(), I2C::Error>
[src]

Set the camera frame rate.

pub fn interrupts_enabled(&mut self) -> Result<bool, I2C::Error>[src]

Check if external interrupts are being generated.

pub fn enable_interrupts(&mut self) -> Result<(), I2C::Error>[src]

Enable external interrupts.

pub fn disable_interrupts(&mut self) -> Result<(), I2C::Error>[src]

Disable external interrupts.

pub fn interrupt_mode(&mut self) -> Result<InterruptControlMode, I2C::Error>[src]

Get the current interrupt mode. Interrupts are either generated when a pixel’s value exceeds the interrupt levels (absolute mode), or if the change in temperature exceeds the interrupt levels (difference mode).

pub fn set_interrupt_mode(
    &mut self,
    mode: InterruptControlMode
) -> Result<(), I2C::Error>
[src]

Set the interrupt mode.

pub fn flags(&mut self) -> Result<StatusValue, I2C::Error>[src]

Get the current status flags.

pub fn overflow_flag(&mut self) -> Result<bool, I2C::Error>[src]

Check if the temperature overflow flag has been set.

pub fn interrupt_flag(&mut self) -> Result<bool, I2C::Error>[src]

Check if the interrupt flag has been set.

pub fn clear_all_flags(&mut self) -> Result<(), I2C::Error>[src]

Clear both status flags.

pub fn clear_overflow_flag(&mut self) -> Result<(), I2C::Error>[src]

Clear the temperature overflow flag.

pub fn clear_interrupt_flag(&mut self) -> Result<(), I2C::Error>[src]

Clear the interrupt flag.

pub fn moving_average_enabled(&mut self) -> Result<bool, I2C::Error>[src]

Check if moving average mode is enabled.

pub fn enable_moving_average(&mut self) -> Result<(), I2C::Error>[src]

Enable moving average mode. There’re references to it averaging the values of the last 10 frames of a pixel (twice?), but it isn’t clear how this interacts with the frame rate setting.

pub fn disable_moving_average(&mut self) -> Result<(), I2C::Error>[src]

Disable moving average mode.

pub fn upper_interrupt_level(&mut self) -> Result<f32, I2C::Error>[src]

Get the current upper interrupt temperature limit in degrees Celsius.

pub fn lower_interrupt_level(&mut self) -> Result<f32, I2C::Error>[src]

Get the current lower interrupt temperature limit in degrees Celsius.

pub fn hysteresis_interrupt_level(&mut self) -> Result<f32, I2C::Error>[src]

Get the current interrupt hysteresis level.

pub fn set_upper_interrupt_level(
    &mut self,
    value: &f32
) -> Result<(), I2C::Error>
[src]

Set the upper interrupt temperature limit in degrees Celsius.

pub fn set_lower_interrupt_level(
    &mut self,
    value: &f32
) -> Result<(), I2C::Error>
[src]

Set the lower interrupt temperature limit in degrees Celsius.

pub fn set_hysteresis_interrupt_level(
    &mut self,
    value: &f32
) -> Result<(), I2C::Error>
[src]

Set the interrupt hysteresis level. The format is the same as the upper and lower levels, but the datasheet isn’t clear how it interacts with the interrupt generation.

pub fn thermistor(&mut self) -> Result<f32, I2C::Error>[src]

Get the temperature of the sensor itself using the built-in thermistor. It has a range of -20° to 80° with a resolution of 0.0625° (all units in Celsius).

Trait Implementations

impl<I2C> ThermalCamera for GridEye<I2C> where
    I2C: Transactional
[src]

type Error = I2C::Error

fn temperature(&mut self) -> Option<f32>[src]

Get the temperature of the camera. Read more

fn image(&mut self) -> Result<Array2<f32>, Self::Error>[src]

Return a two-dimensional array representing an image from the thermal camera. Currently the order of the pixels in the image is camera-dependent, but that’s probably going to change at some point. Read more

Auto Trait Implementations

impl<I2C> RefUnwindSafe for GridEye<I2C> where
    I2C: RefUnwindSafe

impl<I2C> Send for GridEye<I2C> where
    I2C: Send

impl<I2C> Sync for GridEye<I2C> where
    I2C: Sync

impl<I2C> Unpin for GridEye<I2C> where
    I2C: Unpin

impl<I2C> UnwindSafe for GridEye<I2C> where
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.