aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/mixer.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-02-20 12:19:03 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-02-20 12:19:03 +0100
commitbe408451779dc53220ec94499a7acbe5ff3b8e7f (patch)
tree824685b84618eff061493a1f0e80adbc2431b2d5 /apps/px4io/mixer.cpp
parent16b0fa7fd4f01600ba8b05d5bb4b3cfc1931efd0 (diff)
downloadpx4-firmware-be408451779dc53220ec94499a7acbe5ff3b8e7f.tar.gz
px4-firmware-be408451779dc53220ec94499a7acbe5ff3b8e7f.tar.bz2
px4-firmware-be408451779dc53220ec94499a7acbe5ff3b8e7f.zip
Switched to debug statement which is more efficient regarding stack usage, only printing at debug level 2 or higher.
Diffstat (limited to 'apps/px4io/mixer.cpp')
-rw-r--r--apps/px4io/mixer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/px4io/mixer.cpp b/apps/px4io/mixer.cpp
index 93bd4470f..3ae2a3115 100644
--- a/apps/px4io/mixer.cpp
+++ b/apps/px4io/mixer.cpp
@@ -301,7 +301,7 @@ mixer_handle_text(const void *buffer, size_t length)
px4io_mixdata *msg = (px4io_mixdata *)buffer;
- debug("mixer text %u", length);
+ isr_debug(2, "mixer text %u", length);
if (length < sizeof(px4io_mixdata))
return;
@@ -310,14 +310,14 @@ mixer_handle_text(const void *buffer, size_t length)
switch (msg->action) {
case F2I_MIXER_ACTION_RESET:
- debug("reset");
+ isr_debug(2, "reset");
mixer_group.reset();
mixer_text_length = 0;
r_status_flags &= ~PX4IO_P_STATUS_FLAGS_MIXER_OK;
/* FALLTHROUGH */
case F2I_MIXER_ACTION_APPEND:
- debug("append %d", length);
+ isr_debug(2, "append %d", length);
/* check for overflow - this is really fatal */
/* XXX could add just what will fit & try to parse, then repeat... */
@@ -330,7 +330,7 @@ mixer_handle_text(const void *buffer, size_t length)
memcpy(&mixer_text[mixer_text_length], msg->text, text_length);
mixer_text_length += text_length;
mixer_text[mixer_text_length] = '\0';
- debug("buflen %u", mixer_text_length);
+ isr_debug(2, "buflen %u", mixer_text_length);
/* process the text buffer, adding new mixers as their descriptions can be parsed */
unsigned resid = mixer_text_length;
@@ -342,7 +342,7 @@ mixer_handle_text(const void *buffer, size_t length)
/* ideally, this should test resid == 0 ? */
r_status_flags |= PX4IO_P_STATUS_FLAGS_MIXER_OK;
- debug("used %u", mixer_text_length - resid);
+ isr_debug(2, "used %u", mixer_text_length - resid);
/* copy any leftover text to the base of the buffer for re-use */
if (resid > 0)