mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
AP_OpticalFlow: fix warning in SITL compilation
This commit is contained in:
parent
588e59f524
commit
889ec829fc
@ -108,7 +108,8 @@ void AP_OpticalFlow_SITL::update(void)
|
||||
|
||||
if (_sitl->flow_delay != optflow_delay) {
|
||||
// cope with updates to the delay control
|
||||
if (_sitl->flow_delay > ARRAY_SIZE(optflow_data)) {
|
||||
if (_sitl->flow_delay > 0 &&
|
||||
(uint8_t)(_sitl->flow_delay) > ARRAY_SIZE(optflow_data)) {
|
||||
_sitl->flow_delay = ARRAY_SIZE(optflow_data);
|
||||
}
|
||||
optflow_delay = _sitl->flow_delay;
|
||||
|
Loading…
Reference in New Issue
Block a user