Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Drones-Controlador controladoatitude_cteste Drone_Controlador_Atitude optical_test
Revision 15:e07de535b86f, committed 2018-10-17
- Comitter:
- fbob
- Date:
- Wed Oct 17 13:26:29 2018 +0000
- Parent:
- 14:e4d638ac83af
- Commit message:
- Changed range and optical flow parameters names
Changed in this revision
--- a/PMW3901/PMW3901.cpp Thu Sep 27 17:57:28 2018 +0000
+++ b/PMW3901/PMW3901.cpp Wed Oct 17 13:26:29 2018 +0000
@@ -176,11 +176,11 @@
spi.write(DELTA_Y_H & 0b01111111); data[3] = spi.write(0x00);
// Reassemble the data (two 8 bit data into one 16 bit data)
- int16_t x_raw = (data[1] << 8 ) | data[0];
- int16_t y_raw = (data[3] << 8 ) | data[2];
+ int16_t px_raw = (data[1] << 8 ) | data[0];
+ int16_t py_raw = (data[3] << 8 ) | data[2];
// Convert to SI units [px]
- x = -y_raw * 1.0f;
- y = -x_raw * 1.0f;
+ px = -py_raw * 1.0f;
+ py = -px_raw * 1.0f;
// Deselect the device by seting chip select high
cs = 1;
--- a/PMW3901/PMW3901.h Thu Sep 27 17:57:28 2018 +0000
+++ b/PMW3901/PMW3901.h Wed Oct 17 13:26:29 2018 +0000
@@ -49,9 +49,9 @@
void read();
/** Optical flow data in x-axis (px) **/
- float x;
+ float px;
/** Optical flow data in y-axis (px) **/
- float y;
+ float py;
private:
/** SPI bus */
SPI spi;
--- a/VL53L0X/VL53L0X.cpp Thu Sep 27 17:57:28 2018 +0000
+++ b/VL53L0X/VL53L0X.cpp Wed Oct 17 13:26:29 2018 +0000
@@ -1041,6 +1041,6 @@
void VL53L0X::read()
{
- z = readRangeContinuousMillimeters()/1000.0f;
+ d = readRangeContinuousMillimeters()/1000.0f;
}
--- a/VL53L0X/VL53L0X.h Thu Sep 27 17:57:28 2018 +0000
+++ b/VL53L0X/VL53L0X.h Wed Oct 17 13:26:29 2018 +0000
@@ -153,7 +153,7 @@
void read();
/** Range data [m] */
- float z;
+ float d;
private:
// TCC: Target CentreCheck