Subversion Repositories FlightCtrl

Rev

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

Rev 1986 Rev 2017
Line 140... Line 140...
140
}
140
}
Line 141... Line 141...
141
 
141
 
142
void updateControlAndMeasureControlActivity(uint8_t index, int16_t newValue) {
142
void updateControlAndMeasureControlActivity(uint8_t index, int16_t newValue) {
143
  int16_t tmp = controls[index];
143
  int16_t tmp = controls[index];
-
 
144
  controls[index] = newValue;
144
  controls[index] = newValue;
145
 
145
  tmp -= newValue;
146
  tmp -= newValue;
146
  tmp /= 2;
147
  tmp /= 2;
147
  tmp = tmp * tmp;
148
  tmp = tmp * tmp;
148
  // tmp += (newValue >= 0) ? newValue : -newValue;
149
  // tmp += (newValue >= 0) ? newValue : -newValue;