From 8bd2915a9a24eaf72425ee3c6e08f26cac5463b2 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Fri, 22 Jul 2016 09:56:57 +1000
Subject: [PATCH] common.xml: added BUTTON_CHANGE message

done as MAVLink2 only
---
 message_definitions/v1.0/common.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml
index 83bd8bfa..9b702178 100644
--- a/message_definitions/v1.0/common.xml
+++ b/message_definitions/v1.0/common.xml
@@ -3561,6 +3561,7 @@
                <field type="float" name="value">DEBUG value</field>
           </message>
 
+          <!-- messages with ID 256 and above are only available in MAVLink2 -->
           <message id="256" name="SETUP_SIGNING">
                <description>Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing</description>
                <field type="uint8_t" name="target_system">system id of the target</field>
@@ -3568,5 +3569,13 @@
                <field type="uint8_t[32]" name="secret_key">signing key</field>
                <field type="uint64_t" name="initial_timestamp">initial timestamp</field>
           </message>
+
+	  <message id="257" name="BUTTON_CHANGE">
+            <description>Report button state change</description>
+            <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
+            <field name="last_change_ms" type="uint32_t">Time of last change of button state</field>
+            <field name="state" type="uint8_t">Bitmap state of buttons</field>
+          </message>
+
         </messages>
 </mavlink>
-- 
GitLab