OpticalFlow: make surface_quality uint8_t

This commit is contained in:
Andrew Tridgell 2013-01-13 17:53:54 +11:00
parent 78fd5bb23f
commit 6bd361b9cd
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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