Subversion Repositories FlightCtrl

Rev

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

Rev 2104 Rev 2106
Line 66... Line 66...
66
uint8_t calcAirspeedPID(uint8_t pid) {
66
uint8_t calcAirspeedPID(uint8_t pid) {
67
        if (staticParams.bitConfig & CFG_USE_AIRSPEED_PID) {
67
        if (staticParams.bitConfig & CFG_USE_AIRSPEED_PID) {
68
                return pid;
68
                return pid;
69
        }
69
        }
Line 70... Line 70...
70
 
70
 
Line 71... Line 71...
71
        uint16_t result = (pid * 10) / airspeed;
71
        uint16_t result = (pid * 10) / airspeedVelocity;
72
 
72
 
73
        if (result > 240 || airspeed == 0) {
73
        if (result > 240 || airspeedVelocity == 0) {
Line 74... Line 74...
74
                result = 240;
74
                result = 240;
75
        }
75
        }