diff options
l--------- | Firmware | 1 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/14001_tri_y_yaw+ | 14 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/14002_tri_y_yaw- | 15 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.autostart | 19 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/mixers/tri_y_yaw+.main.mix | 12 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/mixers/tri_y_yaw-.main.mix | 13 | ||||
-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 |
10 files changed, 91 insertions, 3 deletions
diff --git a/Firmware b/Firmware new file mode 120000 index 000000000..8463fb52f --- /dev/null +++ b/Firmware @@ -0,0 +1 @@ +/home/trent/bigdata/Dropbox/Research-cloud/Projects/PX4/Firmware/
\ No newline at end of file diff --git a/ROMFS/px4fmu_common/init.d/14001_tri_y_yaw+ b/ROMFS/px4fmu_common/init.d/14001_tri_y_yaw+ new file mode 100644 index 000000000..257e2f9bb --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/14001_tri_y_yaw+ @@ -0,0 +1,14 @@ +#!nsh +# +# Generic Tricopter Y Geometry +# Yaw Servo +Output ==> +Yaw +# +# Trent Lukaczyk <aerialhedgehog@gmail.com> +# + +sh /etc/init.d/rc.mc_defaults + +set MIXER tri_y_yaw+ + +set PWM_OUT 1234 + diff --git a/ROMFS/px4fmu_common/init.d/14002_tri_y_yaw- b/ROMFS/px4fmu_common/init.d/14002_tri_y_yaw- new file mode 100644 index 000000000..66eb5e967 --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/14002_tri_y_yaw- @@ -0,0 +1,15 @@ +#!nsh +# +# Generic Tricopter Y Geometry +# Yaw Servo +Output ==> -Yaw +# +# Trent Lukaczyk <aerialhedgehog@gmail.com> +# + +sh /etc/init.d/rc.mc_defaults + +set MIXER tri_y_yaw- + +set PWM_OUT 1234 + + diff --git a/ROMFS/px4fmu_common/init.d/rc.autostart b/ROMFS/px4fmu_common/init.d/rc.autostart index 0d6e0564a..097ea5efd 100644 --- a/ROMFS/px4fmu_common/init.d/rc.autostart +++ b/ROMFS/px4fmu_common/init.d/rc.autostart @@ -16,6 +16,7 @@ # 11000 .. 11999 Hexa Cox # 12000 .. 12999 Octo Cox # 13000 .. 13999 VTOL +# 14000 .. 14999 Tri Y # # Simulation @@ -266,3 +267,21 @@ if param compare SYS_AUTOSTART 13002 then sh /etc/init.d/13002_firefly6 fi + +# +# TriCopter Y Yaw+ +# +if param compare SYS_AUTOSTART 14001 +then + sh /etc/init.d/14001_tri_y_yaw+ +fi + +# +# TriCopter Y Yaw- +# +if param compare SYS_AUTOSTART 14002 +then + sh /etc/init.d/14002_tri_y_yaw- +fi + + diff --git a/ROMFS/px4fmu_common/mixers/tri_y_yaw+.main.mix b/ROMFS/px4fmu_common/mixers/tri_y_yaw+.main.mix new file mode 100644 index 000000000..5aaa6c201 --- /dev/null +++ b/ROMFS/px4fmu_common/mixers/tri_y_yaw+.main.mix @@ -0,0 +1,12 @@ + + +# Tricopter Y-Configuration Mixer +# Yaw Servo +Output ==> +Yaw + +# Motors +R: 3y 10000 10000 10000 0 + +# Yaw Servo +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 2 10000 10000 0 -10000 10000 diff --git a/ROMFS/px4fmu_common/mixers/tri_y_yaw-.main.mix b/ROMFS/px4fmu_common/mixers/tri_y_yaw-.main.mix new file mode 100644 index 000000000..b4e2e859c --- /dev/null +++ b/ROMFS/px4fmu_common/mixers/tri_y_yaw-.main.mix @@ -0,0 +1,13 @@ + + +# Tricopter Y-Configuration Mixer +# Yaw Servo +Output ==> -Yaw + +# Motors +R: 3y 10000 10000 10000 0 + +# Yaw Servo +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 2 -10000 -10000 0 -10000 10000 + 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()): |