this patch add teh posibillity to transmit the AUX channels higher than AUX4.
In the moment it's hardcoded to 8 now it's fit to RC_CHANS
There is a new MSP command.
This give my GUI the number of AUX Channels to prepare the GUI.
Code: Select all
Index: Serial.ino
===================================================================
--- Serial.ino (Revision 1181)
+++ Serial.ino (Arbeitskopie)
@@ -49,6 +49,8 @@
#define MSP_PIDNAMES 117 //out message the PID names
#define MSP_WP 118 //out message get a WP, WP# is in the payload, returns (WP#, lat, lon, alt, flags) WP#0-home, WP#16-poshold
+#define MSP_AUX_COUNT 119 //out message number of AUX channels
+
#define MSP_SET_RAW_RC 200 //in message 8 rc chan
#define MSP_SET_RAW_GPS 201 //in message fix, numsat, lat, lon, alt, speed
#define MSP_SET_PID 202 //in message up to 16 P I D (8 are used)
@@ -316,8 +318,8 @@
}
break;
case MSP_RC:
- headSerialReply(16);
- for(uint8_t i=0;i<8;i++) serialize16(rcData[i]);
+ headSerialReply(RC_CHANS * 2);
+ for(uint8_t i=0;i<RC_CHANS;i++) serialize16(rcData[i]);
break;
#if GPS
case MSP_RAW_GPS:
@@ -417,6 +419,11 @@
}
break;
#endif
+ case MSP_AUX_COUNT:
+ headSerialReply(2);
+ serialize8(RC_CHANS);
+ serialize8(3);
+ break;
case MSP_RESET_CONF:
if(!f.ARMED) LoadDefaults();
headSerialReply(0);
@@ -789,4 +796,4 @@
}
#else
void debugmsg_append_str(const char *str) {};
-#endif
+#endif
My GUI:
https://github.com/cGiesen/multiwii-gui-processing.git
Regards
Carsten