diff --git a/src/html/index.html b/src/html/index.html
index f5e10b5..e953acc 100644
--- a/src/html/index.html
+++ b/src/html/index.html
@@ -12,7 +12,7 @@
{{info.service.name}} - {{info.service.version}} -
{{info.service.sha.substring(0, 7)}} - {{info.service.build_date.substring(0, 10)}}
By: {{formatAuthors(info.service.authors)}}
- Check the mavlink path for the data
+ Check the mavlink path for the data
You can also check nested paths:
mavlink/vehicles/{system_id}/components/{component_id}/messages/HEARTBEAT/message/mavtype/type a[b], jsonData)
+
+ jsonData = path.reduce((a, b)=> a[b], jsonData)
+ if ('header' in jsonData && 'message' in jsonData) {
+ this.setMessage(jsonData.message)
+ } else {
+ this.setMessage(jsonData)
}
this.time = new Date()
- delete jsonData.header
- this.setMessage(jsonData.message)
};
this.socket.onclose = (event) => {