mirror of https://github.com/ArduPilot/ardupilot
AP_Scripting: add units and multipliers to logging example
This commit is contained in:
parent
a09e15137e
commit
5cbbe656ba
|
@ -27,9 +27,13 @@ local function write_to_dataflash()
|
|||
|
||||
-- care must be taken when selecting a name, must be less than four characters and not clash with an existing log type
|
||||
-- format characters specify the type of variable to be logged, see AP_Logger/README.md
|
||||
-- https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_Logger
|
||||
-- not all format types are supported by scripting only: i, L, e, f, n, M, B, I, E, and N
|
||||
-- lua automatically adds a timestamp in micro seconds
|
||||
logger.write('SCR','roll(deg),pitch(deg),yaw(deg)','fff',interesting_data[roll],interesting_data[pitch],interesting_data[yaw])
|
||||
logger.write('SCR1','roll(deg),pitch(deg),yaw(deg)','fff',interesting_data[roll],interesting_data[pitch],interesting_data[yaw])
|
||||
|
||||
-- it is also possible to give units and multipliers
|
||||
logger.write('SCR2','roll,pitch,yaw','fff','ddd','---',interesting_data[roll],interesting_data[pitch],interesting_data[yaw])
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue