AP_OpticalFlow: params always use set method

This commit is contained in:
Iampete1 2022-07-20 10:42:35 +01:00 committed by Peter Hall
parent 2b69e69f7e
commit 1a3391ebef
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ void AP_OpticalFlow_SITL::update(void)
// cope with updates to the delay control // cope with updates to the delay control
if (_sitl->flow_delay > 0 && if (_sitl->flow_delay > 0 &&
(uint8_t)(_sitl->flow_delay) > ARRAY_SIZE(optflow_data)) { (uint8_t)(_sitl->flow_delay) > ARRAY_SIZE(optflow_data)) {
_sitl->flow_delay = ARRAY_SIZE(optflow_data); _sitl->flow_delay.set(ARRAY_SIZE(optflow_data));
} }
optflow_delay = _sitl->flow_delay; optflow_delay = _sitl->flow_delay;
for (uint8_t i=0; i<optflow_delay; i++) { for (uint8_t i=0; i<optflow_delay; i++) {