Browse Source

OpticalFlow: init _last_update_ms member

This resolves a defect found with coverity
mission-4.1.18
Randy Mackay 10 years ago
parent
commit
7bbaeac55f
  1. 7
      libraries/AP_OpticalFlow/OpticalFlow.cpp

7
libraries/AP_OpticalFlow/OpticalFlow.cpp

@ -43,12 +43,13 @@ const AP_Param::GroupInfo OpticalFlow::var_info[] PROGMEM = { @@ -43,12 +43,13 @@ const AP_Param::GroupInfo OpticalFlow::var_info[] PROGMEM = {
// default constructor
OpticalFlow::OpticalFlow(void) :
#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
backend(new AP_OpticalFlow_HIL(*this))
backend(new AP_OpticalFlow_HIL(*this)),
#else
backend(NULL)
backend(NULL),
#endif
_last_update_ms(0)
{
AP_Param::setup_object_defaults(this, var_info);

Loading…
Cancel
Save