General protocol description: [[en/SerialProtocol]]
<
><
>
The structs used below are defined in [[http://mikrokopter.de/mikrosvn/FlightCtrl/tags/V0.84a/uart.h|uart.h]]. For implementation details, see [[http://mikrokopter.de/mikrosvn/FlightCtrl/tags/V0.84a/uart.c|uart.c]].
Addresses are defined as follows:
<
> Here you find some of the structs and defines used for serial commands: <>
<
><
>
----
Address used for communication:
{{{#!cplusplus
#define FC_ADDRESS 1 //(b)
#define NC_ADDRESS 2 //(c)
#define MK3MAG_ADDRESS 3 //(d)
#define BL_CTRL_ADDRESS 5 //(f)
}}}
== Common Commands ==
|| ||||||<#cccccc style="text-align:center; ">'''''Received '''''''' ''' ||||||<#cccccc style="text-align:center; ">'''''Sent '''''''' ''' ||
||<#cccccc>'''''Description''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''remark''''' ||
||Labels of the analog values in the Debug Data Struct (see 'd') ||'a' ||!AnyAddr ||u8 Index of Analog Channel ||'A' ||!SlaveAddr ||u8 Index, char[16] label text ||
||ExternControl ||'b' ||!AnyAddr ||ExternControl Struct ||'B' ||!SlaveAddr ||unsigned char, echo of !ExternalControl.Frame as confirmation || Strcture changed since 2.13 ||
||Request display ||'h' ||!AnyAddr ||u8 ~!RemoteKey, u8 !AutoSendInterval ||'H' ||!SlaveAddr ||char[80] !DisplayText ||
||Request display ||'l' ||!AnyAddr ||u8 !MenuItem ||'L' ||!SlaveAddr ||u8 !MenuItem, u8 !MaxMenuItem, char[80] Display Text ||
||Version Request ||'v' ||!AnyAddr ||none ||'V' ||!SlaveAddr ||[[en/SerialCommands/VersionStruct|VersionStruct]] ||
||Debug Request ||'d' ||!AnyAddr ||u8 !AutoSendInterval<
> Value is multiplied by 10 in receiver and then used as milliseconds. Subsciption needs to be renewed every 4s. <
>These values can be display in MK-Tool as values or graphs. ||'D' ||!SlaveAddr ||[[en/SerialCommands/DebugOutStruct|DebugOutStruct]] ||
||Serial Poti ||'y' ||FC-Addr ||s8 Poti[12] ||- ||- ||- ||since 2.13 accepted by NC||
||Get External Control ||'g' ||!AnyAddr ||none ||'G' ||!SlaveAddr ||!ExternControl Struct ||since 2.13 accepted by NC||
||Read PPM Channels ||'p' ||FC-Addr ||none ||'P' ||FC-Addr ||s16 PPM-Array[11] ||since 2.13 accepted by NC||
||Reset ||'R' ||!AnyAddr ||none ||- ||- ||- ||
== Flight-Ctrl ==
|| ||||||<#cccccc style="text-align:center; ">'''''Received by FC '''''''' ''' ||||||<#cccccc style="text-align:center; ">'''''Sent by FC '''''''' ''' ||<#cccccc> ||
||<#cccccc>'''''Description''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''since FC Firmware''''' ||
||Compass Heading ||'K' ||FC-Addr ||s16 Compass Value ||'k' ||MK3MAG-Addr ||Nick Roll Attitude ... ||0.71f ||
||Engine Test ||'t' ||FC-Addr ||u8[16] values for the engines ||'T' ||FC-Addr ||- ||0.71f ||
||Settings Request ||'q' ||FC-Addr ||u8 Settings Index ( 1..5 READ or 0xff for actual setting) <
> u8 Settings Index (11..15 RESET setting to default (channel mapping will not be changed))<
> u8 Settings Index (21..25 RESET setting to default (complete reset including channel settings)) ||'Q' ||FC-Addr ||u8 Settings Index, u8 Settings Version, [[en/SerialCommands/ParamsetStruct|ParamsetStruct]] ||0.71f ||
||Write Settings ||'s' ||FC-Addr ||u8 Settings Index, u8 Settings Version, [[en/SerialCommands/ParamsetStruct|ParamsetStruct]] ||'S' ||FC-Addr ||u8 Settings Index (1 ..5, 0=Error) ||0.71f ||
||Read PPM Channels ||'p' ||FC-Addr ||none ||'P' ||FC-Addr ||s16 PPM-Array[11] ||0.71f ||
||get External Control ||'g' ||FC-Addr ||none ||'G' ||FC-Addr ||ExternControl Struct ||0.71f ||
||Set 3D-Data Interval ||'c' ||!AnyAddr ||u8 Interval ||'C' ||FC-Addr ||struct Data3D ||0.72p ||
||Mixer Request ||'n' ||FC-Addr ||none ||'N' ||FC-Addr ||u8 !MixerRevision, u8 Name[12], u8 MixerTable[16][4] ||0.73 ||
||Mixer Write ||'m' ||FC-Addr ||u8 !MixerRevision, u8 Name[12], u8 MixerTable[16][4] ||'M' ||FC-Addr ||u8 ack (1 = okay, 0 = error) ||0.73 ||
||Change setting ||'f' ||FC-Addr ||u8 Number of new Setting ||'F' ||FC-Addr ||u8 Number ||0.77 ||
||Serial Poti ||'y' ||FC-Addr ||s8 Poti[12] ||- ||- ||- ||0.77 ||
||BL parameter request ||'u' ||FC-Addr ||u8 BL_Addr ||'U' ||FC-Addr ||u8 Status1, u8 Status2, u8 BL_Addr, BLConfig Struct ||0.80 ||
||BL parameter write ||'w' ||FC-Addr ||u8 BL_Addr, BLConfig Struct ||'W' ||FC-Addr ||u8Status1, u8 Status2 ||0.80 ||
== Navi-Ctrl ==
|| ||||||<#cccccc style="text-align:center; ">'''''Received by NC '''''''' ''' ||||||<#cccccc style="text-align:center; ">'''''Sent by NC '''''''' ''' ||<#cccccc> ||
||<#cccccc>'''''Description''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''ID''''' ||<#cccccc>'''''Address''''' ||<#cccccc>'''''Data''''' ||<#cccccc>'''''since NC Firmware''''' ||
||