Add drone telemetry Lua decoder examples and test data generator

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-12 21:28:04 +08:00
parent 367800a426
commit 227a459712
4 changed files with 154 additions and 0 deletions

16
examples/drone_plot.lua Normal file
View File

@@ -0,0 +1,16 @@
return {
decode = function(frame)
if #frame == 0 then return nil end
local gyro_str = frame:match("Gyro:([%d%.%-]+),([%d%.%-]+),([%d%.%-]+)")
if not gyro_str then return nil end
local gz, gy, gx = frame:match("Gyro:([%d%.%-]+),([%d%.%-]+),([%d%.%-]+)")
return {
kind = "plot",
channels = { { tonumber(gz) }, { tonumber(gy) }, { tonumber(gx) } },
sample_type = "F64",
format = "Block",
}
end,
}