Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 409 → Rev 410

/C-OSD/trunk/main.c
569,14 → 569,16
//write_number_s(8, 5, RxDataLen);
//write_number_s(16, 5, setsReceived++);
 
// remember statistics
if (naviData.Altimeter > max_Altimeter) max_Altimeter = naviData.Altimeter;
if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed;
if (naviData.HomePositionDeviation.Distance > max_Distance) {
max_Distance = naviData.HomePositionDeviation.Distance;
}
if (naviData.UBat < min_UBat) min_UBat = naviData.UBat;
if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime;
// remember statistics (only when engines running)
if (naviData.MKFlags & FLAG_MOTOR_RUN) {
if (naviData.Altimeter > max_Altimeter) max_Altimeter = naviData.Altimeter;
if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed;
if (naviData.HomePositionDeviation.Distance > max_Distance) {
max_Distance = naviData.HomePositionDeviation.Distance;
}
if (naviData.UBat < min_UBat) min_UBat = naviData.UBat;
if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime;
}
 
old_MKFlags = naviData.MKFlags;
seconds_since_last_data = 0;