diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/mavlink/mavlink_main.cpp | 2 | ||||
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 6 | ||||
-rw-r--r-- | src/modules/systemlib/mixer/mixer_multirotor.cpp | 4 | ||||
-rwxr-xr-x | src/modules/systemlib/mixer/multi_tables.py | 8 |
4 files changed, 17 insertions, 3 deletions
diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 6bd0c7bce..899a0d4a6 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -392,7 +392,7 @@ Mavlink::forward_message(const mavlink_message_t *msg, Mavlink *self) /* if not in normal mode, we are an onboard link * onboard links should only pass on messages from the same system ID */ - if (!(self->_mode != MAVLINK_MODE_NORMAL && msg->sysid != mavlink_system.sysid)) { + if ( self->_mode != MAVLINK_MODE_ONBOARD || msg->sysid == mavlink_system.sysid ) { inst->pass_message(msg); } } diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 4d7b35f03..06153fdac 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -44,7 +44,6 @@ #include <nuttx/config.h> #include <unistd.h> #include <pthread.h> -#include <stdio.h> #include <math.h> #include <stdbool.h> #include <fcntl.h> @@ -1459,6 +1458,11 @@ MavlinkReceiver::receive_thread(void *arg) /* if read failed, this loop won't execute */ for (ssize_t i = 0; i < nread; i++) { if (mavlink_parse_char(_mavlink->get_channel(), buf[i], &msg, &status)) { + + printf("\n"); + printf("HANDLE MESSAGE\n"); + printf("MSGID:%i\n",msg.msgid); + /* handle generic messages and commands */ handle_message(&msg); diff --git a/src/modules/systemlib/mixer/mixer_multirotor.cpp b/src/modules/systemlib/mixer/mixer_multirotor.cpp index 2ab5b5e8e..b354eb518 100644 --- a/src/modules/systemlib/mixer/mixer_multirotor.cpp +++ b/src/modules/systemlib/mixer/mixer_multirotor.cpp @@ -177,6 +177,10 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl } else if (!strcmp(geomname, "2-")) { geometry = MultirotorGeometry::TWIN_ENGINE; + + } else if (!strcmp(geomname, "3y")) { + geometry = MultirotorGeometry::TRI_Y; + } else { debug("unrecognised geometry '%s'", geomname); return nullptr; diff --git a/src/modules/systemlib/mixer/multi_tables.py b/src/modules/systemlib/mixer/multi_tables.py index ba59e0536..e01fcaf8f 100755 --- a/src/modules/systemlib/mixer/multi_tables.py +++ b/src/modules/systemlib/mixer/multi_tables.py @@ -155,8 +155,14 @@ twin_engine = [ [-90, 0.0], ] +tri_y = [ + [ 60, 0.0], + [ -60, 0.0], + [ 180, 0.0], +] + -tables = [quad_x, quad_plus, quad_v, quad_wide, quad_deadcat, hex_x, hex_plus, hex_cox, octa_x, octa_plus, octa_cox, twin_engine] +tables = [quad_x, quad_plus, quad_v, quad_wide, quad_deadcat, hex_x, hex_plus, hex_cox, octa_x, octa_plus, octa_cox, twin_engine, tri_y] def variableName(variable): for variableName, value in list(globals().items()): |