Public Member Functions | Private Attributes | List of all members
I2CSonar Class Reference

#include <mb1242.h>

Public Member Functions

void cb_finished_read (uint8_t result)
void cb_start_read (uint8_t result)
 I2CSonar ()
void init (I2C *_i2c)
bool is_initialized ()
bool present ()
float read ()
void update ()

Private Attributes

uint8_t buffer_ [2]
uint32_t last_callback_ms_
uint32_t last_update_ms_
bool new_data_
bool ready_to_ping_
bool sensor_initialized_ {false}
bool sensor_present_ {false}
float value_

Detailed Description

Definition at line 56 of file mb1242.h.

Constructor & Destructor Documentation

I2CSonar::I2CSonar ( )

Definition at line 48 of file mb1242.cpp.

Member Function Documentation

void I2CSonar::cb_finished_read ( uint8_t  result)

Definition at line 131 of file mb1242.cpp.

void I2CSonar::cb_start_read ( uint8_t  result)

Definition at line 120 of file mb1242.cpp.

void I2CSonar::init ( I2C _i2c)

Definition at line 53 of file mb1242.cpp.

bool I2CSonar::is_initialized ( )

Definition at line 77 of file mb1242.h.

bool I2CSonar::present ( )

Definition at line 73 of file mb1242.cpp.

float I2CSonar::read ( )

Definition at line 103 of file mb1242.cpp.

void I2CSonar::update ( )

Definition at line 85 of file mb1242.cpp.

Member Data Documentation

uint8_t I2CSonar::buffer_[2]

Definition at line 65 of file mb1242.h.

I2C* I2CSonar::i2c_

Definition at line 63 of file mb1242.h.

uint32_t I2CSonar::last_callback_ms_

Definition at line 60 of file mb1242.h.

uint32_t I2CSonar::last_update_ms_

Definition at line 59 of file mb1242.h.

bool I2CSonar::new_data_

Definition at line 62 of file mb1242.h.

bool I2CSonar::ready_to_ping_

Definition at line 64 of file mb1242.h.

bool I2CSonar::sensor_initialized_ {false}

Definition at line 67 of file mb1242.h.

bool I2CSonar::sensor_present_ {false}

Definition at line 66 of file mb1242.h.

float I2CSonar::value_

Definition at line 61 of file mb1242.h.

The documentation for this class was generated from the following files:

Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:58