Subversion Repositories FlightCtrl

Rev

Rev 1775 | Rev 1821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1775 Rev 1796
Line 41... Line 41...
41
        uint8_t HeightD;                // Value : 0-250
41
        uint8_t HeightD;                // Value : 0-250
42
        uint8_t MaxHeight;              // Value : 0-32
42
        uint8_t MaxHeight;              // Value : 0-32
43
        uint8_t HeightP;                // Value : 0-32
43
        uint8_t HeightP;                // Value : 0-32
44
        uint8_t Height_Gain;            // Value : 0-50
44
        uint8_t Height_Gain;            // Value : 0-50
45
        uint8_t Height_ACC_Effect;      // Value : 0-250
45
        uint8_t Height_ACC_Effect;      // Value : 0-250
46
 
-
 
47
 */
46
 */
Line 48... Line 47...
48
 
47
 
49
int32_t getHeight(void) {
48
int32_t getHeight(void) {
50
  return groundPressure - filteredAirPressure;
49
  return groundPressure - filteredAirPressure;
Line 97... Line 96...
97
    } else if (rampedTargetHeight - staticParams.Height_Gain >= targetHeight) {
96
    } else if (rampedTargetHeight - staticParams.Height_Gain >= targetHeight) {
98
      rampedTargetHeight -= staticParams.Height_Gain;
97
      rampedTargetHeight -= staticParams.Height_Gain;
99
    }
98
    }
100
  }
99
  }
Line 101... Line 100...
101
 
100
 
102
  //DebugOut.Analog[16] = (int16_t)(height / 10);
101
  // height, in meters (so the division factor is: 100)
103
  //DebugOut.Analog[17] = (int16_t)(rampedTargetHeight / 10);
102
  DebugOut.Analog[30] = height / 100;
Line 104... Line 103...
104
}
103
}
105
 
104
 
106
// ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL
105
// ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL