diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-22 11:30:37 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-22 11:30:37 +0200 |
commit | ebd16975d01b3a2200e94e164199b88527a27e3c (patch) | |
tree | e2c001925f21428563ceadf05c9483ad248151cc | |
parent | cd8854e622793b3f3e7104d29f06e614d4dfac42 (diff) | |
download | px4-firmware-ebd16975d01b3a2200e94e164199b88527a27e3c.tar.gz px4-firmware-ebd16975d01b3a2200e94e164199b88527a27e3c.tar.bz2 px4-firmware-ebd16975d01b3a2200e94e164199b88527a27e3c.zip |
An even number of bytes is when modulo 2 is zero, not modulo 1 is one.
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index f9fb9eea9..aca411b1e 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1509,7 +1509,7 @@ PX4IO::mixer_send(const char *buf, unsigned buflen, unsigned retries) * even. */ unsigned total_len = sizeof(px4io_mixdata) + count; - if (total_len % 1) { + if (total_len % 2) { msg->text[count] = '\0'; total_len++; } |