Rover: fixed PM message
This commit is contained in:
parent
8775593402
commit
36b52b65e1
@ -526,10 +526,6 @@ static int32_t perf_mon_timer;
|
||||
static uint32_t G_Dt_max;
|
||||
// The number of gps fixes recorded in the current performance monitoring interval
|
||||
static uint8_t gps_fix_count = 0;
|
||||
// A variable used by developers to track performanc metrics.
|
||||
// Currently used to record the number of GCS heartbeat messages received
|
||||
static int16_t pmTest1 = 0;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// System Timers
|
||||
@ -768,9 +764,9 @@ static void one_second_loop(void)
|
||||
if (scheduler.debug() != 0) {
|
||||
hal.console->printf_P(PSTR("G_Dt_max=%lu\n"), (unsigned long)G_Dt_max);
|
||||
}
|
||||
G_Dt_max = 0;
|
||||
if (g.log_bitmask & MASK_LOG_PM)
|
||||
Log_Write_Performance();
|
||||
G_Dt_max = 0;
|
||||
resetPerfData();
|
||||
}
|
||||
|
||||
|
@ -1755,7 +1755,6 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
||||
if(msg->sysid != g.sysid_my_gcs) break;
|
||||
last_heartbeat_ms = failsafe.rc_override_timer = millis();
|
||||
failsafe_trigger(FAILSAFE_EVENT_GCS, false);
|
||||
pmTest1++;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -165,14 +165,13 @@ struct PACKED log_Performance {
|
||||
LOG_PACKET_HEADER;
|
||||
uint32_t loop_time;
|
||||
uint16_t main_loop_count;
|
||||
int32_t g_dt_max;
|
||||
uint32_t g_dt_max;
|
||||
uint8_t renorm_count;
|
||||
uint8_t renorm_blowup;
|
||||
uint8_t gps_fix_count;
|
||||
int16_t gyro_drift_x;
|
||||
int16_t gyro_drift_y;
|
||||
int16_t gyro_drift_z;
|
||||
int16_t pm_test;
|
||||
uint8_t i2c_lockup_count;
|
||||
};
|
||||
|
||||
@ -190,7 +189,6 @@ static void Log_Write_Performance()
|
||||
gyro_drift_x : (int16_t)(ahrs.get_gyro_drift().x * 1000),
|
||||
gyro_drift_y : (int16_t)(ahrs.get_gyro_drift().y * 1000),
|
||||
gyro_drift_z : (int16_t)(ahrs.get_gyro_drift().z * 1000),
|
||||
pm_test : pmTest1,
|
||||
i2c_lockup_count: hal.i2c->lockup_count()
|
||||
};
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
@ -456,7 +454,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
|
||||
{ LOG_ATTITUDE_MSG, sizeof(log_Attitude),
|
||||
"ATT", "ccC", "Roll,Pitch,Yaw" },
|
||||
{ LOG_PERFORMANCE_MSG, sizeof(log_Performance),
|
||||
"PM", "IHIBBBhhhhB", "LTime,MLC,gDt,RNCnt,RNBl,GPScnt,GDx,GDy,GDz,PMT,I2CErr" },
|
||||
"PM", "IHIBBBhhhB", "LTime,MLC,gDt,RNCnt,RNBl,GPScnt,GDx,GDy,GDz,I2CErr" },
|
||||
{ LOG_CMD_MSG, sizeof(log_Cmd),
|
||||
"CMD", "BBBBBeLL", "CTot,CNum,CId,COpt,Prm1,Alt,Lat,Lng" },
|
||||
{ LOG_CAMERA_MSG, sizeof(log_Camera),
|
||||
|
@ -370,7 +370,6 @@ static void resetPerfData(void) {
|
||||
ahrs.renorm_range_count = 0;
|
||||
ahrs.renorm_blowup_count = 0;
|
||||
gps_fix_count = 0;
|
||||
pmTest1 = 0;
|
||||
perf_mon_timer = millis();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user