Rewrite README in Chinese and English, add drone examples

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:56:20 +08:00
parent a2c7c0fa71
commit fd680858f6
6 changed files with 866 additions and 306 deletions

33
examples/drone_text.lua Normal file
View File

@@ -0,0 +1,33 @@
local LABELS = {
AHRS = "Quaternion",
YPR = "Yaw/Pitch/Roll",
Gyro = "Gyro (deg/s)",
RC = "RC Channels",
M = "Motors",
L = "L",
F = "F",
C = "C",
}
return {
decode = function(frame)
if #frame == 0 then return nil end
local lines = {}
for segment in frame:gmatch("[^|]+") do
local colon = segment:find(":")
if colon then
local key = segment:sub(1, colon - 1)
local val = segment:sub(colon + 1)
local label = LABELS[key] or key
lines[#lines + 1] = string.format("%-18s %s", label .. ":", val)
end
end
lines[#lines + 1] = string.rep("-", 40)
return {
kind = "text",
data = table.concat(lines, "\n"),
}
end,
}