Subversion Repositories FlightCtrl

Rev

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

Rev 2075 Rev 2079
Line 94... Line 94...
94
  if (testOscPrescaler == 488) {
94
  if (testOscPrescaler == 488) {
95
          testOscPrescaler = 0;
95
          testOscPrescaler = 0;
96
          testOscTimer++;
96
          testOscTimer++;
97
          if (testOscTimer == staticParams.heightControlTestOscPeriod) {
97
          if (testOscTimer == staticParams.heightControlTestOscPeriod) {
98
                  testOscTimer = 0;
98
                  testOscTimer = 0;
-
 
99
                  if (staticParams.heightControlTestOscAmplitude)
99
                  iHeight = 0;
100
                          iHeight = 0;
100
          } else if (testOscTimer == staticParams.heightControlTestOscPeriod/2) {
101
          } else if (testOscTimer == staticParams.heightControlTestOscPeriod/2) {
-
 
102
                  if (staticParams.heightControlTestOscAmplitude)
101
                  iHeight = 0;
103
                          iHeight = 0;
102
          }
104
          }
103
  }
105
  }
Line 104... Line 106...
104
 
106
 
105
  if (testOscTimer < staticParams.heightControlTestOscPeriod/2)
107
  if (testOscTimer < staticParams.heightControlTestOscPeriod/2)
106
          targetHeight = setHeight;
108
          targetHeight = setHeight;
107
  else
109
  else
Line 108... Line -...
108
          targetHeight = setHeight + (uint16_t)staticParams.heightControlTestOscAmplitude * 25L;
-
 
109
 
-
 
110
  debugOut.analog[31] = targetHeight/100L;
110
          targetHeight = setHeight + (uint16_t)staticParams.heightControlTestOscAmplitude * 25L;
111
 
111
 
112
  //if (staticParams.)
112
  //if (staticParams.)
113
  // height, in meters (so the division factor is: 100)
113
  // height, in meters (so the division factor is: 100)
114
  // debugOut.analog[24] = (117100 - filteredAirPressure) / 100;
114
  // debugOut.analog[24] = (117100 - filteredAirPressure) / 100;