Robot team project
Dependencies: QEI Motordriver ros_lib_melodic
Diff: sensor/Sensor.h
- Revision:
- 4:cb50c6fa340b
- Parent:
- 2:c537f1ebad7b
- Child:
- 5:8ef79eebbc97
--- a/sensor/Sensor.h Tue Oct 22 10:09:05 2019 +0000 +++ b/sensor/Sensor.h Tue Oct 22 11:52:32 2019 +0000 @@ -79,7 +79,7 @@ */ Sensor(PinName sda, PinName scl, PinName shdn); - /** Init the sensor + /** Init the sensor and load settings * */ int init(); @@ -87,19 +87,19 @@ /** Make a range reading * */ - int read(); + float read(); /** Change I2C address * */ void changeAddress(char address); - /** Turn off the sensor + /** Turn off the device * */ void turnOff(); - /** Turn on the sensor + /** Turn on the device * */ void turnOn(); @@ -110,7 +110,7 @@ DigitalOut SHDN; void startRange(); void pollRange(); - int readRange(); + float readRange(); void clearInterrupts(); void setRegister(wchar_t reg, char data); void writeByte(wchar_t reg,char data);