forked from Archive/PX4-Autopilot
sdlog2: Fix compile warning on OS X
This commit is contained in:
parent
941c898113
commit
8f14850aa2
|
@ -173,7 +173,7 @@ PARAM_DEFINE_INT32(SDLOG_GPSTIME, 1);
|
|||
log_msgs_skipped++; \
|
||||
}
|
||||
|
||||
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
||||
#define SDLOG_MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
||||
|
||||
static bool main_thread_should_exit = false; /**< Deamon exit flag */
|
||||
static bool thread_running = false; /**< Deamon status flag */
|
||||
|
@ -1402,7 +1402,7 @@ int sdlog2_thread_main(int argc, char *argv[])
|
|||
if (copy_if_updated(ORB_ID(satellite_info), &subs.sat_info_sub, &buf.sat_info)) {
|
||||
|
||||
/* log the SNR of each satellite for a detailed view of signal quality */
|
||||
unsigned sat_info_count = MIN(buf.sat_info.count, sizeof(buf.sat_info.snr) / sizeof(buf.sat_info.snr[0]));
|
||||
unsigned sat_info_count = SDLOG_MIN(buf.sat_info.count, sizeof(buf.sat_info.snr) / sizeof(buf.sat_info.snr[0]));
|
||||
unsigned log_max_snr = sizeof(log_msg.body.log_GS0A.satellite_snr) / sizeof(log_msg.body.log_GS0A.satellite_snr[0]);
|
||||
|
||||
log_msg.msg_type = LOG_GS0A_MSG;
|
||||
|
|
Loading…
Reference in New Issue