Skip to content
Snippets Groups Projects
Commit 99cdc691 authored by rmackay9's avatar rmackay9
Browse files

AP_OpticalFlow - small bug fix to ensure init attempts to read the product id...

AP_OpticalFlow - small bug fix to ensure init attempts to read the product id 3 times before giving up
parent ab16a333
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ AP_OpticalFlow_ADNS3080::init(bool initCommAPI) ...@@ -75,7 +75,7 @@ AP_OpticalFlow_ADNS3080::init(bool initCommAPI)
} }
// check the sensor is functioning // check the sensor is functioning
if( retry < 3 ) { while( retry < 3 ) {
if( read_register(ADNS3080_PRODUCT_ID) == 0x17 ) if( read_register(ADNS3080_PRODUCT_ID) == 0x17 )
return true; return true;
retry++; retry++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment