aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/dsm.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-11-29 10:18:21 -0800
committerpx4dev <px4@purgatory.org>2012-11-29 10:18:21 -0800
commit9c8101d4f189837fdf9b54e6b529ff3962f56c1c (patch)
tree1520235a968d56f9e7af2dad26fa20089548a1fd /apps/px4io/dsm.c
parentd0efd1a419497ec2fadb7b516cd2f9cc5a09ca5d (diff)
downloadpx4-firmware-9c8101d4f189837fdf9b54e6b529ff3962f56c1c.tar.gz
px4-firmware-9c8101d4f189837fdf9b54e6b529ff3962f56c1c.tar.bz2
px4-firmware-9c8101d4f189837fdf9b54e6b529ff3962f56c1c.zip
Add some more information to comments.
Diffstat (limited to 'apps/px4io/dsm.c')
-rw-r--r--apps/px4io/dsm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/px4io/dsm.c b/apps/px4io/dsm.c
index 4384ab523..0e9fd25f1 100644
--- a/apps/px4io/dsm.c
+++ b/apps/px4io/dsm.c
@@ -199,6 +199,13 @@ dsm_guess_format(bool reset)
/*
* Iterate the set of sensible sniffed channel sets and see whether
* decoding in 10 or 11-bit mode has yielded anything we recognise.
+ *
+ * XXX Note that due to what seem to be bugs in the DSM2 high-resolution
+ * stream, we may want to sniff for longer in some cases when we think we
+ * are talking to a DSM2 receiver in high-resolution mode (so that we can
+ * reject it, ideally).
+ * See e.g. http://git.openpilot.org/cru/OPReview-116 for a discussion
+ * of this issue.
*/
static uint32_t masks[] = {
0x3f, /* 6 channels (DX6) */
@@ -255,14 +262,8 @@ dsm_decode(hrt_abstime frame_time)
}
/*
- * The encoding of the first byte is uncertain, so we're going
- * to ignore it for now.
- *
- * The second byte may tell us about the protocol, but it's not
- * actually very interesting since what we really want to know
- * is how the channel data is formatted, and there doesn't seem
- * to be a reliable way to determine this from the protocol ID
- * alone.
+ * The encoding of the first two bytes is uncertain, so we're
+ * going to ignore them for now.
*
* Each channel is a 16-bit unsigned value containing either a 10-
* or 11-bit channel value and a 4-bit channel number, shifted