diff --git a/posix-configs/posixtest/init/rc.S b/posix-configs/posixtest/init/rc.S index 93e6c69d01..9a15db2f01 100644 --- a/posix-configs/posixtest/init/rc.S +++ b/posix-configs/posixtest/init/rc.S @@ -5,6 +5,7 @@ barosim start adcsim start accelsim start gyrosim start +tone_alarm start param set CAL_GYRO0_ID 2293760 param set CAL_ACC0_ID 1310720 param set CAL_ACC1_ID 1376256 diff --git a/src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp b/src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp index 37f51ff607..b127128a66 100644 --- a/src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp +++ b/src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp @@ -350,7 +350,7 @@ ToneAlarm::start_note(unsigned note) // Silence warning of unused var do_something(period); - PX4_DEBUG("ToneAlarm::start_note %u", period); + PX4_INFO("ToneAlarm::start_note %u", period); } void @@ -361,6 +361,7 @@ ToneAlarm::stop_note() void ToneAlarm::start_tune(const char *tune) { + PX4_INFO("ToneAlarm::start_tune"); // kill any current playback hrt_cancel(&_note_call); @@ -533,7 +534,7 @@ ToneAlarm::next_note() // tune looks bad (unexpected EOF, bad character, etc.) tune_error: - printf("tune error\n"); + PX4_ERR("tune error\n"); _repeat = false; // don't loop on error // stop (and potentially restart) the tune @@ -605,7 +606,7 @@ ToneAlarm::ioctl(device::file_t *filp, int cmd, unsigned long arg) /* decide whether to increase the alarm level to cmd or leave it alone */ switch (cmd) { case TONE_SET_ALARM: - debug("TONE_SET_ALARM %u", arg); + PX4_INFO("TONE_SET_ALARM %lu", arg); if (arg < TONE_NUMBER_OF_TUNES) { if (arg == TONE_STOP_TUNE) { diff --git a/src/platforms/posix/px4_layer/drv_hrt.c b/src/platforms/posix/px4_layer/drv_hrt.c index 3c1a2323fb..6ef217e218 100644 --- a/src/platforms/posix/px4_layer/drv_hrt.c +++ b/src/platforms/posix/px4_layer/drv_hrt.c @@ -301,9 +301,12 @@ hrt_call_internal(struct hrt_call *entry, hrt_abstime deadline, hrt_abstime inte if (entry->deadline != 0) sq_rem(&entry->link, &callout_queue); +#if 0 + // Use this to debug busy CPU that keeps rescheduling with 0 period time if (interval < HRT_INTERVAL_MIN) { PX4_ERR("hrt_call_internal interval too short: %" PRIu64, interval); } +#endif entry->deadline = deadline; entry->period = interval; entry->callout = callout;