Subversion Repositories Projects

Rev

Rev 440 | Rev 449 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 440 Rev 442
Line 25... Line 25...
25
}
25
}
26
 
26
 
27
/**
27
/**
28
 * test one or more motors
28
 * test one or more motors
29
 */
29
 */
30
void Handler::motor_test(sMotor motor) {
30
void Handler::motor_test(sMotorData motor) {
31
    char tx_data[12];
31
    char tx_data[MAX_MOTORS];
32
    for (int z = 0; z<12; z++)
32
    for (int z = 0; z<MAX_MOTORS; z++)
33
    {
33
    {
34
        tx_data[z] = motor.Speed[z];
34
        tx_data[z] = motor.desired_speed[z];
35
    }
35
    }
36
    com->send_cmd('t', ADDRESS_FC, tx_data, 12, false);
36
    com->send_cmd('t', ADDRESS_FC, tx_data, MAX_MOTORS, false);
37
}
37
}
38
 
38
 
39
void Handler::reset_motor() {
39
void Handler::reset_motor() {
40
    sMotor motor;
-
 
41
    for (int z = 0; z<12; z++)
40
    for (int z = 0; z<MAX_MOTORS; z++)
42
    {
41
    {
43
        motor.Speed[z] = 0;
42
        data->motor.desired_speed[z] = 0;
44
    }
43
    }
45
 
44
 
46
    motor_test(motor);
45
    motor_test(data->motor);
47
}
46
}
48
 
47
 
49
/**
48
/**
50
 * read mixer values from FlightCtrl
49
 * read mixer values from FlightCtrl
51
 */
50
 */