Skip to content

Commit fb8f4f8

Browse files
EShamaevOXINARF
authored andcommitted
AP_UAVCAN: ESC numbering correction
1 parent a96772e commit fb8f4f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/AP_UAVCAN/AP_UAVCAN.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void AP_UAVCAN::do_cyclic(void)
460460
// find out how many esc we have enabled and if they are active at all
461461
for (uint8_t i = 0; i < UAVCAN_RCO_NUMBER; i++) {
462462
if ((((uint32_t) 1) << i) & _esc_bm) {
463-
max_esc_num = i;
463+
max_esc_num = i + 1;
464464
if (_rco_conf[i].active) {
465465
active_esc_num++;
466466
}

0 commit comments

Comments
 (0)