OpticalFlow: init _last_update_ms member

This resolves a defect found with coverity
This commit is contained in:
Randy Mackay 2015-06-08 12:01:36 +09:00
parent ca482cf44a
commit 7bbaeac55f

View File

@ -43,12 +43,13 @@ const AP_Param::GroupInfo OpticalFlow::var_info[] PROGMEM = {
// default constructor // default constructor
OpticalFlow::OpticalFlow(void) : OpticalFlow::OpticalFlow(void) :
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 #if CONFIG_HAL_BOARD == HAL_BOARD_PX4
backend(new AP_OpticalFlow_PX4(*this)) backend(new AP_OpticalFlow_PX4(*this)),
#elif CONFIG_HAL_BOARD == HAL_BOARD_SITL #elif CONFIG_HAL_BOARD == HAL_BOARD_SITL
backend(new AP_OpticalFlow_HIL(*this)) backend(new AP_OpticalFlow_HIL(*this)),
#else #else
backend(NULL) backend(NULL),
#endif #endif
_last_update_ms(0)
{ {
AP_Param::setup_object_defaults(this, var_info); AP_Param::setup_object_defaults(this, var_info);