ArduCopter: performance monitoring - changed loop counters to uint16_t.
Removed an unused items from dataflash logging of Performance.
This commit is contained in:
parent
71f8166818
commit
810da878e7
@ -665,19 +665,18 @@ static void Log_Read_Iterm()
|
||||
}
|
||||
|
||||
|
||||
// Write a performance monitoring packet. Total length : 9 bytes
|
||||
// Write a performance monitoring packet. Total length : 11 bytes
|
||||
static void Log_Write_Performance()
|
||||
{
|
||||
DataFlash.WriteByte(HEAD_BYTE1);
|
||||
DataFlash.WriteByte(HEAD_BYTE2);
|
||||
DataFlash.WriteByte(LOG_PERFORMANCE_MSG);
|
||||
DataFlash.WriteByte(0); //1
|
||||
DataFlash.WriteByte(ahrs.renorm_range_count); //2
|
||||
DataFlash.WriteByte(ahrs.renorm_blowup_count); //3
|
||||
DataFlash.WriteByte(gps_fix_count); //4
|
||||
DataFlash.WriteInt(perf_info_get_num_long_running()); //5 - number of long running loops
|
||||
DataFlash.WriteLong(perf_info_get_num_loops()); //6 - total number of loops
|
||||
DataFlash.WriteLong(perf_info_get_max_time()); //7 - time of longest running loop
|
||||
DataFlash.WriteByte(ahrs.renorm_range_count); //1
|
||||
DataFlash.WriteByte(ahrs.renorm_blowup_count); //2
|
||||
DataFlash.WriteByte(gps_fix_count); //3
|
||||
DataFlash.WriteInt(perf_info_get_num_long_running()); //4 - number of long running loops
|
||||
DataFlash.WriteInt(perf_info_get_num_loops()); //5 - total number of loops
|
||||
DataFlash.WriteLong(perf_info_get_max_time()); //6 - time of longest running loop
|
||||
DataFlash.WriteByte(END_BYTE);
|
||||
}
|
||||
|
||||
@ -687,20 +686,18 @@ static void Log_Read_Performance()
|
||||
int8_t temp1 = DataFlash.ReadByte();
|
||||
int8_t temp2 = DataFlash.ReadByte();
|
||||
int8_t temp3 = DataFlash.ReadByte();
|
||||
int8_t temp4 = DataFlash.ReadByte();
|
||||
uint16_t temp4 = DataFlash.ReadInt();
|
||||
uint16_t temp5 = DataFlash.ReadInt();
|
||||
uint32_t temp6 = DataFlash.ReadLong();
|
||||
uint32_t temp7 = DataFlash.ReadLong();
|
||||
uint32_t temp6 = DataFlash.ReadLong();
|
||||
|
||||
// 1 2 3 4 5 6 7
|
||||
Serial.printf_P(PSTR("PM, %d, %d, %d, %d, %u, %lu, %lu\n"),
|
||||
// 1 2 3 4 5 6
|
||||
Serial.printf_P(PSTR("PM, %d, %d, %d, %u, %u, %lu\n"),
|
||||
(int)temp1,
|
||||
(int)temp2,
|
||||
(int)temp3,
|
||||
(int)temp4,
|
||||
temp5,
|
||||
temp6,
|
||||
temp7);
|
||||
(unsigned int)temp4,
|
||||
(unsigned int)temp5,
|
||||
(unsigned long)temp6);
|
||||
}
|
||||
|
||||
// Write a command processing packet. Total length : 21 bytes
|
||||
|
@ -32,7 +32,7 @@ void perf_info_check_loop_time(uint32_t time_in_micros)
|
||||
}
|
||||
|
||||
// perf_info_get_long_running_percentage - get number of long running loops as a percentage of the total number of loops
|
||||
uint32_t perf_info_get_num_loops()
|
||||
uint16_t perf_info_get_num_loops()
|
||||
{
|
||||
return perf_info_loop_count;
|
||||
}
|
||||
@ -44,7 +44,7 @@ uint32_t perf_info_get_max_time()
|
||||
}
|
||||
|
||||
// perf_info_get_num_long_running - get number of long running loops
|
||||
uint32_t perf_info_get_num_long_running()
|
||||
uint16_t perf_info_get_num_long_running()
|
||||
{
|
||||
return perf_info_long_running;
|
||||
}
|
Loading…
Reference in New Issue
Block a user