Browse Source

OpticalFlow: make surface_quality uint8_t

master
Andrew Tridgell 12 years ago
parent
commit
6bd361b9cd
  1. 2
      libraries/AP_OpticalFlow/AP_OpticalFlow.h
  2. 2
      libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp

2
libraries/AP_OpticalFlow/AP_OpticalFlow.h

@ -35,7 +35,7 @@ public: @@ -35,7 +35,7 @@ public:
// raw sensor change in x and y position (i.e. unrotated)
int raw_dx, raw_dy;
// image quality (below 15 you really can't trust the x,y values returned)
int surface_quality;
uint8_t surface_quality;
// total x,y position
int x,y;
// rotated change in x and y position

2
libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp

@ -165,7 +165,7 @@ void @@ -165,7 +165,7 @@ void
AP_OpticalFlow_ADNS3080::update(uint32_t now)
{
uint8_t motion_reg;
surface_quality = (uint16_t)read_register(ADNS3080_SQUAL);
surface_quality = read_register(ADNS3080_SQUAL);
hal.scheduler->delay_microseconds(50);
// check for movement, update x,y values

Loading…
Cancel
Save