Gathiyo / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

stability patch defect #303

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Arducopter/motors_hexa.pde, line 72 (version 2.1)
instead of break; there should be continue;
because this way for loop will never reach channel 7 and 8

Code snippet:
    // Tridge's stability patch
    for (int i = CH_1; i<=CH_8; i++) {
        if(i == CH_5 || i == CH_6)
            break;              // <<<<< should be continue;
        if (motor_out[i] > out_max) {
            // note that i^1 is the opposite motor
            motor_out[i^1] -= motor_out[i] - out_max;
            motor_out[i] = out_max;
        }
    }

Original issue reported on code.google.com by borna.se...@gmail.com on 18 Dec 2011 at 5:36

GoogleCodeExporter commented 8 years ago
updated thanks!

Original comment by jasonshort on 19 Dec 2011 at 12:41