diff --git a/ASLUAV/ASLUAV.h b/ASLUAV/ASLUAV.h index 91c812824..d7bfb0369 100644 --- a/ASLUAV/ASLUAV.h +++ b/ASLUAV/ASLUAV.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_ASLUAV.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_ASLUAV_XML_HASH -1898758920024760608 +#define MAVLINK_ASLUAV_XML_HASH -111656713744610597 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {223, 119, 47, 47, 3, 42, 43}, {224, 102, 45, 45, 3, 42, 43}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {440, 66, 35, 35, 0, 0, 0}, {8002, 218, 16, 16, 0, 0, 0}, {8003, 231, 41, 41, 0, 0, 0}, {8004, 172, 98, 98, 0, 0, 0}, {8005, 251, 38, 38, 0, 0, 0}, {8006, 97, 14, 14, 0, 0, 0}, {8007, 64, 32, 32, 0, 0, 0}, {8008, 234, 33, 33, 0, 0, 0}, {8009, 144, 16, 16, 0, 0, 0}, {8010, 155, 41, 41, 0, 0, 0}, {8011, 20, 102, 102, 0, 0, 0}, {8012, 54, 16, 16, 0, 0, 0}, {8013, 222, 46, 46, 0, 0, 0}, {8014, 200, 14, 14, 0, 0, 0}, {8015, 23, 24, 24, 0, 0, 0}, {8016, 149, 18, 18, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {223, 119, 47, 47, 3, 42, 43}, {224, 102, 45, 45, 3, 42, 43}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {8002, 218, 16, 16, 0, 0, 0}, {8003, 231, 41, 41, 0, 0, 0}, {8004, 172, 98, 98, 0, 0, 0}, {8005, 251, 38, 38, 0, 0, 0}, {8006, 97, 14, 14, 0, 0, 0}, {8007, 64, 32, 32, 0, 0, 0}, {8008, 234, 33, 33, 0, 0, 0}, {8009, 144, 16, 16, 0, 0, 0}, {8010, 155, 41, 41, 0, 0, 0}, {8011, 20, 102, 102, 0, 0, 0}, {8012, 54, 16, 16, 0, 0, 0}, {8013, 222, 46, 46, 0, 0, 0}, {8014, 200, 14, 14, 0, 0, 0}, {8015, 23, 24, 24, 0, 0, 0}, {8016, 149, 18, 18, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}} #endif #include "../protocol.h" @@ -33,274 +33,6 @@ extern "C" { // ENUM DEFINITIONS -/** @brief Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries */ -#ifndef HAVE_ENUM_MAV_CMD -#define HAVE_ENUM_MAV_CMD -typedef enum MAV_CMD -{ - MAV_CMD_NAV_WAYPOINT=16, /* Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION). |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ - MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */ - MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ - MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ - MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ - MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ - MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ - MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ - MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ - MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ - MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ - MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ - MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ - MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ - MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ - MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ - MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ - MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - |Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area. - |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area. - |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined. - |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ - MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_RESET_MPPT=40001, /* Mission command to reset Maximum Power Point Tracker (MPPT) |MPPT number| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PAYLOAD_CONTROL=40002, /* Mission command to perform a power cycle on payload |Complete power cycle| VISensor power cycle| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ - MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_ENUM_END=43004, /* | */ -} MAV_CMD; -#endif - /** @brief */ #ifndef HAVE_ENUM_GSM_LINK_TYPE #define HAVE_ENUM_GSM_LINK_TYPE @@ -361,8 +93,8 @@ typedef enum GSM_MODEM_TYPE #if MAVLINK_ASLUAV_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED, MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_SENS_POWER, MAVLINK_MESSAGE_INFO_SENS_MPPT, MAVLINK_MESSAGE_INFO_ASLCTRL_DATA, MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG, MAVLINK_MESSAGE_INFO_ASLUAV_STATUS, MAVLINK_MESSAGE_INFO_EKF_EXT, MAVLINK_MESSAGE_INFO_ASL_OBCTRL, MAVLINK_MESSAGE_INFO_SENS_ATMOS, MAVLINK_MESSAGE_INFO_SENS_BATMON, MAVLINK_MESSAGE_INFO_FW_SOARING_DATA, MAVLINK_MESSAGE_INFO_SENSORPOD_STATUS, MAVLINK_MESSAGE_INFO_SENS_POWER_BOARD, MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SATCOM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SENSOR_AIRFLOW_ANGLES, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ASLCTRL_DATA", 8004 }, { "ASLCTRL_DEBUG", 8005 }, { "ASLUAV_STATUS", 8006 }, { "ASL_OBCTRL", 8008 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_INT_STAMPED", 223 }, { "COMMAND_LONG", 76 }, { "COMMAND_LONG_STAMPED", 224 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_EXT", 8007 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FW_SOARING_DATA", 8011 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "GSM_LINK_STATUS", 8014 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SATCOM_LINK_STATUS", 8015 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSORPOD_STATUS", 8012 }, { "SENSOR_AIRFLOW_ANGLES", 8016 }, { "SENS_ATMOS", 8009 }, { "SENS_BATMON", 8010 }, { "SENS_MPPT", 8003 }, { "SENS_POWER", 8002 }, { "SENS_POWER_BOARD", 8013 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED, MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_SENS_POWER, MAVLINK_MESSAGE_INFO_SENS_MPPT, MAVLINK_MESSAGE_INFO_ASLCTRL_DATA, MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG, MAVLINK_MESSAGE_INFO_ASLUAV_STATUS, MAVLINK_MESSAGE_INFO_EKF_EXT, MAVLINK_MESSAGE_INFO_ASL_OBCTRL, MAVLINK_MESSAGE_INFO_SENS_ATMOS, MAVLINK_MESSAGE_INFO_SENS_BATMON, MAVLINK_MESSAGE_INFO_FW_SOARING_DATA, MAVLINK_MESSAGE_INFO_SENSORPOD_STATUS, MAVLINK_MESSAGE_INFO_SENS_POWER_BOARD, MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SATCOM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SENSOR_AIRFLOW_ANGLES, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ASLCTRL_DATA", 8004 }, { "ASLCTRL_DEBUG", 8005 }, { "ASLUAV_STATUS", 8006 }, { "ASL_OBCTRL", 8008 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_INT_STAMPED", 223 }, { "COMMAND_LONG", 76 }, { "COMMAND_LONG_STAMPED", 224 }, { "CONTROL_SYSTEM_STATE", 146 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_EXT", 8007 }, { "ENCAPSULATED_DATA", 131 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FW_SOARING_DATA", 8011 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "GSM_LINK_STATUS", 8014 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SATCOM_LINK_STATUS", 8015 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSORPOD_STATUS", 8012 }, { "SENSOR_AIRFLOW_ANGLES", 8016 }, { "SENS_ATMOS", 8009 }, { "SENS_BATMON", 8010 }, { "SENS_MPPT", 8003 }, { "SENS_POWER", 8002 }, { "SENS_POWER_BOARD", 8013 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/ASLUAV/mavlink.h b/ASLUAV/mavlink.h index 61b06dedf..27126a51f 100644 --- a/ASLUAV/mavlink.h +++ b/ASLUAV/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH -1898758920024760608 +#define MAVLINK_PRIMARY_XML_HASH -111656713744610597 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/ASLUAV/version.h b/ASLUAV/version.h index 67c7c23bb..7a4990a40 100644 --- a/ASLUAV/version.h +++ b/ASLUAV/version.h @@ -7,7 +7,7 @@ #ifndef MAVLINK_VERSION_H #define MAVLINK_VERSION_H -#define MAVLINK_BUILD_DATE "Wed Jul 24 2024" +#define MAVLINK_BUILD_DATE "Wed Nov 26 2025" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 diff --git a/AVSSUAS/AVSSUAS.h b/AVSSUAS/AVSSUAS.h index 885d6d898..d2e6e464d 100644 --- a/AVSSUAS/AVSSUAS.h +++ b/AVSSUAS/AVSSUAS.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_AVSSUAS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_AVSSUAS_XML_HASH 2928461872083787137 +#define MAVLINK_AVSSUAS_XML_HASH 7593266280491628450 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {440, 66, 35, 35, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {60050, 220, 14, 14, 0, 0, 0}, {60051, 245, 24, 24, 0, 0, 0}, {60052, 101, 44, 44, 0, 0, 0}, {60053, 45, 6, 6, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {60050, 220, 14, 14, 0, 0, 0}, {60051, 245, 24, 24, 0, 0, 0}, {60052, 101, 44, 44, 0, 0, 0}, {60053, 45, 6, 6, 0, 0, 0}} #endif #include "../protocol.h" @@ -104,8 +104,8 @@ typedef enum AVSS_HORSEFLY_OPERATION_MODE #if MAVLINK_AVSSUAS_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_AVSS_PRS_SYS_STATUS, MAVLINK_MESSAGE_INFO_AVSS_DRONE_POSITION, MAVLINK_MESSAGE_INFO_AVSS_DRONE_IMU, MAVLINK_MESSAGE_INFO_AVSS_DRONE_OPERATION_MODE} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AVSS_DRONE_IMU", 60052 }, { "AVSS_DRONE_OPERATION_MODE", 60053 }, { "AVSS_DRONE_POSITION", 60051 }, { "AVSS_PRS_SYS_STATUS", 60050 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_AVSS_PRS_SYS_STATUS, MAVLINK_MESSAGE_INFO_AVSS_DRONE_POSITION, MAVLINK_MESSAGE_INFO_AVSS_DRONE_IMU, MAVLINK_MESSAGE_INFO_AVSS_DRONE_OPERATION_MODE} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AVSS_DRONE_IMU", 60052 }, { "AVSS_DRONE_OPERATION_MODE", 60053 }, { "AVSS_DRONE_POSITION", 60051 }, { "AVSS_PRS_SYS_STATUS", 60050 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "CONTROL_SYSTEM_STATE", 146 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/AVSSUAS/mavlink.h b/AVSSUAS/mavlink.h index 9bdaa35aa..9b5b35a6a 100644 --- a/AVSSUAS/mavlink.h +++ b/AVSSUAS/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH 2928461872083787137 +#define MAVLINK_PRIMARY_XML_HASH 7593266280491628450 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/AVSSUAS/version.h b/AVSSUAS/version.h index e2f910012..5072a867e 100644 --- a/AVSSUAS/version.h +++ b/AVSSUAS/version.h @@ -7,7 +7,7 @@ #ifndef MAVLINK_VERSION_H #define MAVLINK_VERSION_H -#define MAVLINK_BUILD_DATE "Wed Jul 24 2024" +#define MAVLINK_BUILD_DATE "Wed Nov 26 2025" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 diff --git a/all/all.h b/all/all.h index 348898cbc..5fda696e5 100644 --- a/all/all.h +++ b/all/all.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_ALL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_ALL_XML_HASH 4653585239917000590 +#define MAVLINK_ALL_XML_HASH 1432272306095383336 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {19, 137, 24, 24, 3, 4, 5}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {220, 34, 32, 32, 0, 0, 0}, {221, 71, 42, 42, 0, 0, 0}, {222, 15, 3, 3, 0, 0, 0}, {223, 119, 47, 47, 3, 42, 43}, {224, 102, 45, 45, 3, 42, 43}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {295, 234, 12, 12, 0, 0, 0}, {298, 237, 37, 37, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {354, 210, 14, 14, 3, 12, 13}, {355, 6, 12, 12, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {361, 93, 33, 33, 0, 0, 0}, {369, 151, 24, 24, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {371, 10, 26, 26, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {414, 109, 16, 16, 0, 0, 0}, {415, 161, 16, 16, 0, 0, 0}, {420, 20, 9, 73, 3, 6, 7}, {435, 134, 46, 46, 0, 0, 0}, {436, 193, 9, 9, 0, 0, 0}, {437, 30, 1, 1, 0, 0, 0}, {440, 66, 35, 35, 0, 0, 0}, {441, 169, 17, 17, 0, 0, 0}, {510, 245, 106, 106, 0, 0, 0}, {511, 28, 71, 71, 0, 0, 0}, {8002, 218, 16, 16, 0, 0, 0}, {8003, 231, 41, 41, 0, 0, 0}, {8004, 172, 98, 98, 0, 0, 0}, {8005, 251, 38, 38, 0, 0, 0}, {8006, 97, 14, 14, 0, 0, 0}, {8007, 64, 32, 32, 0, 0, 0}, {8008, 234, 33, 33, 0, 0, 0}, {8009, 144, 16, 16, 0, 0, 0}, {8010, 155, 41, 41, 0, 0, 0}, {8011, 20, 102, 102, 0, 0, 0}, {8012, 54, 16, 16, 0, 0, 0}, {8013, 222, 46, 46, 0, 0, 0}, {8014, 200, 14, 14, 0, 0, 0}, {8015, 23, 24, 24, 0, 0, 0}, {8016, 149, 18, 18, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {17000, 103, 179, 179, 0, 0, 0}, {17150, 26, 33, 33, 0, 0, 0}, {17151, 72, 16, 16, 0, 0, 0}, {17153, 19, 17, 17, 0, 0, 0}, {17154, 89, 17, 17, 0, 0, 0}, {17155, 27, 10, 10, 0, 0, 0}, {17156, 14, 91, 91, 0, 0, 0}, {17157, 187, 84, 84, 0, 0, 0}, {17158, 106, 24, 24, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {52002, 24, 1, 1, 0, 0, 0}, {52003, 166, 26, 26, 0, 0, 0}, {52004, 39, 1, 1, 0, 0, 0}, {52005, 145, 1, 1, 0, 0, 0}, {60010, 208, 33, 33, 0, 0, 0}, {60011, 183, 7, 7, 0, 0, 0}, {60012, 99, 36, 36, 3, 32, 33}, {60013, 129, 24, 24, 3, 20, 21}, {60014, 134, 8, 8, 3, 4, 5}, {60020, 202, 4, 4, 0, 0, 0}, {60040, 156, 245, 245, 0, 0, 0}, {60041, 191, 255, 255, 0, 0, 0}, {60050, 220, 14, 14, 0, 0, 0}, {60051, 245, 24, 24, 0, 0, 0}, {60052, 101, 44, 44, 0, 0, 0}, {60053, 45, 6, 6, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {53, 3, 5, 5, 0, 0, 0}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {220, 34, 32, 32, 0, 0, 0}, {221, 71, 42, 42, 0, 0, 0}, {222, 15, 3, 3, 0, 0, 0}, {223, 119, 47, 47, 3, 42, 43}, {224, 102, 45, 45, 3, 42, 43}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {295, 234, 12, 12, 0, 0, 0}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {420, 20, 9, 73, 3, 6, 7}, {8002, 218, 16, 16, 0, 0, 0}, {8003, 231, 41, 41, 0, 0, 0}, {8004, 172, 98, 98, 0, 0, 0}, {8005, 251, 38, 38, 0, 0, 0}, {8006, 97, 14, 14, 0, 0, 0}, {8007, 64, 32, 32, 0, 0, 0}, {8008, 234, 33, 33, 0, 0, 0}, {8009, 144, 16, 16, 0, 0, 0}, {8010, 155, 41, 41, 0, 0, 0}, {8011, 20, 102, 102, 0, 0, 0}, {8012, 54, 16, 16, 0, 0, 0}, {8013, 222, 46, 46, 0, 0, 0}, {8014, 200, 14, 14, 0, 0, 0}, {8015, 23, 24, 24, 0, 0, 0}, {8016, 149, 18, 18, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {10004, 133, 9, 9, 0, 0, 0}, {10005, 103, 9, 9, 0, 0, 0}, {10006, 193, 4, 4, 0, 0, 0}, {10007, 71, 17, 17, 0, 0, 0}, {10008, 240, 14, 14, 0, 0, 0}, {10151, 195, 85, 85, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11004, 11, 232, 232, 3, 8, 9}, {11005, 93, 230, 230, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {11040, 132, 44, 44, 0, 0, 0}, {11041, 208, 44, 44, 0, 0, 0}, {11042, 201, 44, 44, 0, 0, 0}, {11043, 193, 44, 44, 0, 0, 0}, {11044, 189, 44, 44, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {17000, 103, 179, 179, 0, 0, 0}, {17150, 26, 33, 33, 0, 0, 0}, {17151, 72, 16, 16, 0, 0, 0}, {17153, 19, 17, 17, 0, 0, 0}, {17154, 89, 17, 17, 0, 0, 0}, {17155, 27, 10, 10, 0, 0, 0}, {17156, 14, 91, 91, 0, 0, 0}, {17157, 187, 84, 84, 0, 0, 0}, {17158, 106, 24, 24, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {60001, 186, 42, 42, 3, 40, 41}, {60002, 69, 32, 32, 3, 30, 31}, {60010, 208, 33, 33, 0, 0, 0}, {60011, 183, 7, 7, 0, 0, 0}, {60012, 99, 36, 36, 3, 32, 33}, {60013, 129, 24, 24, 3, 20, 21}, {60014, 134, 8, 8, 3, 4, 5}, {60015, 78, 22, 22, 3, 0, 1}, {60020, 202, 4, 4, 0, 0, 0}, {60025, 20, 10, 10, 3, 8, 9}, {60050, 220, 14, 14, 0, 0, 0}, {60051, 245, 24, 24, 0, 0, 0}, {60052, 101, 44, 44, 0, 0, 0}, {60053, 45, 6, 6, 0, 0, 0}, {70000, 238, 195, 195, 3, 40, 41}} #endif #include "../protocol.h" @@ -60,15 +60,17 @@ extern "C" { #include "../test/test.h" #include "../ualberta/ualberta.h" #include "../uAvionix/uAvionix.h" +#include "../loweheiser/loweheiser.h" #include "../storm32/storm32.h" #include "../AVSSUAS/AVSSUAS.h" #include "../cubepilot/cubepilot.h" #include "../csAirLink/csAirLink.h" +#include "../suind/suind.h" #if MAVLINK_ALL_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_ACK_TRANSACTION, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_NAV_FILTER_BIAS, MAVLINK_MESSAGE_INFO_RADIO_CALIBRATION, MAVLINK_MESSAGE_INFO_UALBERTA_SYS_STATUS, MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED, MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_AIRSPEED, MAVLINK_MESSAGE_INFO_WIFI_NETWORK_INFO, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SET_VELOCITY_LIMITS, MAVLINK_MESSAGE_INFO_VELOCITY_LIMITS, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_FIGURE_EIGHT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_STATUS_V2, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_FUEL_STATUS, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_GROUP_START, MAVLINK_MESSAGE_INFO_GROUP_END, MAVLINK_MESSAGE_INFO_RADIO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_AVAILABLE_MODES, MAVLINK_MESSAGE_INFO_CURRENT_MODE, MAVLINK_MESSAGE_INFO_AVAILABLE_MODES_MONITOR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_GNSS_INTEGRITY, MAVLINK_MESSAGE_INFO_TARGET_ABSOLUTE, MAVLINK_MESSAGE_INFO_TARGET_RELATIVE, MAVLINK_MESSAGE_INFO_SENS_POWER, MAVLINK_MESSAGE_INFO_SENS_MPPT, MAVLINK_MESSAGE_INFO_ASLCTRL_DATA, MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG, MAVLINK_MESSAGE_INFO_ASLUAV_STATUS, MAVLINK_MESSAGE_INFO_EKF_EXT, MAVLINK_MESSAGE_INFO_ASL_OBCTRL, MAVLINK_MESSAGE_INFO_SENS_ATMOS, MAVLINK_MESSAGE_INFO_SENS_BATMON, MAVLINK_MESSAGE_INFO_FW_SOARING_DATA, MAVLINK_MESSAGE_INFO_SENSORPOD_STATUS, MAVLINK_MESSAGE_INFO_SENS_POWER_BOARD, MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SATCOM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SENSOR_AIRFLOW_ANGLES, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_TEST_TYPES, MAVLINK_MESSAGE_INFO_ARRAY_TEST_0, MAVLINK_MESSAGE_INFO_ARRAY_TEST_1, MAVLINK_MESSAGE_INFO_ARRAY_TEST_3, MAVLINK_MESSAGE_INFO_ARRAY_TEST_4, MAVLINK_MESSAGE_INFO_ARRAY_TEST_5, MAVLINK_MESSAGE_INFO_ARRAY_TEST_6, MAVLINK_MESSAGE_INFO_ARRAY_TEST_7, MAVLINK_MESSAGE_INFO_ARRAY_TEST_8, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_HP, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_TURN_INIT, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CORRECT_ROLL, MAVLINK_MESSAGE_INFO_QSHOT_STATUS, MAVLINK_MESSAGE_INFO_FRSKY_PASSTHROUGH_ARRAY, MAVLINK_MESSAGE_INFO_PARAM_VALUE_ARRAY, MAVLINK_MESSAGE_INFO_AVSS_PRS_SYS_STATUS, MAVLINK_MESSAGE_INFO_AVSS_DRONE_POSITION, MAVLINK_MESSAGE_INFO_AVSS_DRONE_IMU, MAVLINK_MESSAGE_INFO_AVSS_DRONE_OPERATION_MODE} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRLINK_EYE_GS_HOLE_PUSH_REQUEST", 52002 }, { "AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE", 52003 }, { "AIRLINK_EYE_HP", 52004 }, { "AIRLINK_EYE_TURN_INIT", 52005 }, { "AIRSPEED", 295 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ARRAY_TEST_0", 17150 }, { "ARRAY_TEST_1", 17151 }, { "ARRAY_TEST_3", 17153 }, { "ARRAY_TEST_4", 17154 }, { "ARRAY_TEST_5", 17155 }, { "ARRAY_TEST_6", 17156 }, { "ARRAY_TEST_7", 17157 }, { "ARRAY_TEST_8", 17158 }, { "ASLCTRL_DATA", 8004 }, { "ASLCTRL_DEBUG", 8005 }, { "ASLUAV_STATUS", 8006 }, { "ASL_OBCTRL", 8008 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "AVAILABLE_MODES", 435 }, { "AVAILABLE_MODES_MONITOR", 437 }, { "AVSS_DRONE_IMU", 60052 }, { "AVSS_DRONE_OPERATION_MODE", 60053 }, { "AVSS_DRONE_POSITION", 60051 }, { "AVSS_PRS_SYS_STATUS", 60050 }, { "BATTERY2", 181 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BATTERY_STATUS_V2", 369 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_INT_STAMPED", 223 }, { "COMMAND_LONG", 76 }, { "COMMAND_LONG_STAMPED", 224 }, { "COMPASSMOT_STATUS", 177 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "CURRENT_MODE", 436 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_EXT", 8007 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FIGURE_EIGHT_EXECUTION_STATUS", 361 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FRSKY_PASSTHROUGH_ARRAY", 60040 }, { "FUEL_STATUS", 371 }, { "FW_SOARING_DATA", 8011 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GNSS_INTEGRITY", 441 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "GROUP_END", 415 }, { "GROUP_START", 414 }, { "GSM_LINK_STATUS", 8014 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "NAV_FILTER_BIAS", 220 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_ACK_TRANSACTION", 19 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PARAM_VALUE_ARRAY", 60041 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "QSHOT_STATUS", 60020 }, { "RADIO", 166 }, { "RADIO_CALIBRATION", 221 }, { "RADIO_RC_CHANNELS", 420 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SATCOM_LINK_STATUS", 8015 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSORPOD_STATUS", 8012 }, { "SENSOR_AIRFLOW_ANGLES", 8016 }, { "SENSOR_OFFSETS", 150 }, { "SENS_ATMOS", 8009 }, { "SENS_BATMON", 8010 }, { "SENS_MPPT", 8003 }, { "SENS_POWER", 8002 }, { "SENS_POWER_BOARD", 8013 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SET_VELOCITY_LIMITS", 354 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "STORM32_GIMBAL_MANAGER_CONTROL", 60012 }, { "STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW", 60013 }, { "STORM32_GIMBAL_MANAGER_CORRECT_ROLL", 60014 }, { "STORM32_GIMBAL_MANAGER_INFORMATION", 60010 }, { "STORM32_GIMBAL_MANAGER_STATUS", 60011 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TARGET_ABSOLUTE", 510 }, { "TARGET_RELATIVE", 511 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TEST_TYPES", 17000 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UALBERTA_SYS_STATUS", 222 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VELOCITY_LIMITS", 355 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WIFI_NETWORK_INFO", 298 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_MISSION_CHECKSUM, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_NAV_FILTER_BIAS, MAVLINK_MESSAGE_INFO_RADIO_CALIBRATION, MAVLINK_MESSAGE_INFO_UALBERTA_SYS_STATUS, MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED, MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_AIRSPEED, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_RADIO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_SENS_POWER, MAVLINK_MESSAGE_INFO_SENS_MPPT, MAVLINK_MESSAGE_INFO_ASLCTRL_DATA, MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG, MAVLINK_MESSAGE_INFO_ASLUAV_STATUS, MAVLINK_MESSAGE_INFO_EKF_EXT, MAVLINK_MESSAGE_INFO_ASL_OBCTRL, MAVLINK_MESSAGE_INFO_SENS_ATMOS, MAVLINK_MESSAGE_INFO_SENS_BATMON, MAVLINK_MESSAGE_INFO_FW_SOARING_DATA, MAVLINK_MESSAGE_INFO_SENSORPOD_STATUS, MAVLINK_MESSAGE_INFO_SENS_POWER_BOARD, MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SATCOM_LINK_STATUS, MAVLINK_MESSAGE_INFO_SENSOR_AIRFLOW_ANGLES, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_GET, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CONTROL, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_STATUS, MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_SECURE_COMMAND, MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_TEST_TYPES, MAVLINK_MESSAGE_INFO_ARRAY_TEST_0, MAVLINK_MESSAGE_INFO_ARRAY_TEST_1, MAVLINK_MESSAGE_INFO_ARRAY_TEST_3, MAVLINK_MESSAGE_INFO_ARRAY_TEST_4, MAVLINK_MESSAGE_INFO_ARRAY_TEST_5, MAVLINK_MESSAGE_INFO_ARRAY_TEST_6, MAVLINK_MESSAGE_INFO_ARRAY_TEST_7, MAVLINK_MESSAGE_INFO_ARRAY_TEST_8, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CORRECT_ROLL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_PROFILE, MAVLINK_MESSAGE_INFO_QSHOT_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_PREARM_STATUS, MAVLINK_MESSAGE_INFO_AVSS_PRS_SYS_STATUS, MAVLINK_MESSAGE_INFO_AVSS_DRONE_POSITION, MAVLINK_MESSAGE_INFO_AVSS_DRONE_IMU, MAVLINK_MESSAGE_INFO_AVSS_DRONE_OPERATION_MODE, MAVLINK_MESSAGE_INFO_SUIND_MISSION_DATA} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRSPEED", 295 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ARRAY_TEST_0", 17150 }, { "ARRAY_TEST_1", 17151 }, { "ARRAY_TEST_3", 17153 }, { "ARRAY_TEST_4", 17154 }, { "ARRAY_TEST_5", 17155 }, { "ARRAY_TEST_6", 17156 }, { "ARRAY_TEST_7", 17157 }, { "ARRAY_TEST_8", 17158 }, { "ASLCTRL_DATA", 8004 }, { "ASLCTRL_DEBUG", 8005 }, { "ASLUAV_STATUS", 8006 }, { "ASL_OBCTRL", 8008 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "AVSS_DRONE_IMU", 60052 }, { "AVSS_DRONE_OPERATION_MODE", 60053 }, { "AVSS_DRONE_POSITION", 60051 }, { "AVSS_PRS_SYS_STATUS", 60050 }, { "BATTERY2", 181 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_INT_STAMPED", 223 }, { "COMMAND_LONG", 76 }, { "COMMAND_LONG_STAMPED", 224 }, { "COMPASSMOT_STATUS", 177 }, { "COMPONENT_PREARM_STATUS", 60025 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_EXT", 8007 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_TELEMETRY_13_TO_16", 11040 }, { "ESC_TELEMETRY_17_TO_20", 11041 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_21_TO_24", 11042 }, { "ESC_TELEMETRY_25_TO_28", 11043 }, { "ESC_TELEMETRY_29_TO_32", 11044 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FW_SOARING_DATA", 8011 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "GSM_LINK_STATUS", 8014 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "LOWEHEISER_GOV_EFI", 10151 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CHECKSUM", 53 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "NAV_FILTER_BIAS", 220 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "QSHOT_STATUS", 60020 }, { "RADIO", 166 }, { "RADIO_CALIBRATION", 221 }, { "RADIO_RC_CHANNELS", 420 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SATCOM_LINK_STATUS", 8015 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SECURE_COMMAND", 11004 }, { "SECURE_COMMAND_REPLY", 11005 }, { "SENSORPOD_STATUS", 8012 }, { "SENSOR_AIRFLOW_ANGLES", 8016 }, { "SENSOR_OFFSETS", 150 }, { "SENS_ATMOS", 8009 }, { "SENS_BATMON", 8010 }, { "SENS_MPPT", 8003 }, { "SENS_POWER", 8002 }, { "SENS_POWER_BOARD", 8013 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "STORM32_GIMBAL_DEVICE_CONTROL", 60002 }, { "STORM32_GIMBAL_DEVICE_STATUS", 60001 }, { "STORM32_GIMBAL_MANAGER_CONTROL", 60012 }, { "STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW", 60013 }, { "STORM32_GIMBAL_MANAGER_CORRECT_ROLL", 60014 }, { "STORM32_GIMBAL_MANAGER_INFORMATION", 60010 }, { "STORM32_GIMBAL_MANAGER_PROFILE", 60015 }, { "STORM32_GIMBAL_MANAGER_STATUS", 60011 }, { "SUIND_MISSION_DATA", 70000 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TEST_TYPES", 17000 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UALBERTA_SYS_STATUS", 222 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_GET", 10006 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_CFG_FLIGHTID", 10005 }, { "UAVIONIX_ADSB_OUT_CFG_REGISTRATION", 10004 }, { "UAVIONIX_ADSB_OUT_CONTROL", 10007 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_OUT_STATUS", 10008 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/all/mavlink.h b/all/mavlink.h index 70fe8775e..523d518be 100644 --- a/all/mavlink.h +++ b/all/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH 4653585239917000590 +#define MAVLINK_PRIMARY_XML_HASH 1432272306095383336 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/all/testsuite.h b/all/testsuite.h index d3e9f980a..15fdd7945 100644 --- a/all/testsuite.h +++ b/all/testsuite.h @@ -23,10 +23,12 @@ static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg) static void mavlink_test_test(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_ualberta(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_uAvionix(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_loweheiser(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_storm32(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_AVSSUAS(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_cubepilot(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_csAirLink(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_suind(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_all(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) @@ -42,10 +44,12 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me mavlink_test_test(system_id, component_id, last_msg); mavlink_test_ualberta(system_id, component_id, last_msg); mavlink_test_uAvionix(system_id, component_id, last_msg); + mavlink_test_loweheiser(system_id, component_id, last_msg); mavlink_test_storm32(system_id, component_id, last_msg); mavlink_test_AVSSUAS(system_id, component_id, last_msg); mavlink_test_cubepilot(system_id, component_id, last_msg); mavlink_test_csAirLink(system_id, component_id, last_msg); + mavlink_test_suind(system_id, component_id, last_msg); mavlink_test_all(system_id, component_id, last_msg); } #endif @@ -61,10 +65,12 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me #include "../test/testsuite.h" #include "../ualberta/testsuite.h" #include "../uAvionix/testsuite.h" +#include "../loweheiser/testsuite.h" #include "../storm32/testsuite.h" #include "../AVSSUAS/testsuite.h" #include "../cubepilot/testsuite.h" #include "../csAirLink/testsuite.h" +#include "../suind/testsuite.h" diff --git a/all/version.h b/all/version.h index be68a69ae..bef0a95e9 100644 --- a/all/version.h +++ b/all/version.h @@ -7,7 +7,7 @@ #ifndef MAVLINK_VERSION_H #define MAVLINK_VERSION_H -#define MAVLINK_BUILD_DATE "Wed Jul 24 2024" +#define MAVLINK_BUILD_DATE "Wed Nov 26 2025" #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 diff --git a/ardupilotmega/ardupilotmega.h b/ardupilotmega/ardupilotmega.h index 615ee4c53..fc0850d23 100644 --- a/ardupilotmega/ardupilotmega.h +++ b/ardupilotmega/ardupilotmega.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_ARDUPILOTMEGA.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_ARDUPILOTMEGA_XML_HASH -5390551567149308485 +#define MAVLINK_ARDUPILOTMEGA_XML_HASH 4554940878128159379 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {440, 66, 35, 35, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {52002, 24, 1, 1, 0, 0, 0}, {52003, 166, 26, 26, 0, 0, 0}, {52004, 39, 1, 1, 0, 0, 0}, {52005, 145, 1, 1, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {10004, 133, 9, 9, 0, 0, 0}, {10005, 103, 9, 9, 0, 0, 0}, {10006, 193, 4, 4, 0, 0, 0}, {10007, 71, 17, 17, 0, 0, 0}, {10008, 240, 14, 14, 0, 0, 0}, {10151, 195, 85, 85, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11004, 11, 232, 232, 3, 8, 9}, {11005, 93, 230, 230, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {11040, 132, 44, 44, 0, 0, 0}, {11041, 208, 44, 44, 0, 0, 0}, {11042, 201, 44, 44, 0, 0, 0}, {11043, 193, 44, 44, 0, 0, 0}, {11044, 189, 44, 44, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {70000, 238, 195, 195, 3, 40, 41}} #endif #include "../protocol.h" @@ -66,10 +66,10 @@ typedef enum HEADING_TYPE #define HAVE_ENUM_MAV_CMD typedef enum MAV_CMD { - MAV_CMD_NAV_WAYPOINT=16, /* Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION). |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_WAYPOINT=16, /* Navigate to waypoint. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Empty| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Forward moving aircraft this sets exit xtrack location: 0 for center of loiter wp, 1 for exit location. Else, this is desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_LOITER_TIME=19, /* Loiter around this waypoint for X seconds |Loiter time.| Empty| Radius around waypoint. If positive loiter clockwise, else counter-clockwise.| Forward moving aircraft this sets exit xtrack location: 0 for center of loiter wp, 1 for exit location. Else, this is desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ @@ -77,16 +77,15 @@ typedef enum MAV_CMD MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ + MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Heading Required (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Forward moving aircraft this sets exit xtrack location: 0 for center of loiter wp, 1 for exit location| Latitude| Longitude| Altitude| */ MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ MAV_CMD_NAV_ALTITUDE_WAIT=83, /* Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowing the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up. |Altitude.| Descent speed.| How long to wiggle the control surfaces to prevent them seizing up.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ + MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |See NAV_VTOL_LAND_OPTIONS enum| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level)| */ MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ @@ -98,70 +97,41 @@ typedef enum MAV_CMD MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ + MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| 0: absolute, 1: relative| Empty| Empty| Empty| */ + MAV_CMD_DO_SET_HOME=179, /* Changes the home location either to the current location or a specified location. |Use current (1=use current location, 0=use specified location)| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ + MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Empty| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ + MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Empty| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ + MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. |System ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ + MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ + MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty| */ + MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch (WIP: DEPRECATED: or lat in degrees) depending on mount mode.| roll (WIP: DEPRECATED: or lon in degrees) depending on mount mode.| yaw (WIP: DEPRECATED: or alt in meters) depending on mount mode.| WIP: alt in meters depending on mount mode.| WIP: latitude in degrees * 1E7, set if appropriate mount mode.| WIP: longitude in degrees * 1E7, set if appropriate mount mode.| Mount mode.| */ MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_FENCE_ENABLE=207, /* Mission command to enable the geofence |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ + MAV_CMD_DO_MOTOR_TEST=209, /* Mission command to perform motor test. |Motor instance number. (from 1 to max number of motors on the vehicle)| Throttle type.| Throttle.| Timeout.| Motor count. (number of motors to test to test in sequence, waiting for the timeout above between them; 0=1 motor, 1=1 motor, 2=2 motors...)| Motor test order.| Empty| */ MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ + MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axes are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_SET_RESUME_REPEAT_DIST=215, /* Set the distance to be repeated on mission resume |Distance.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ @@ -171,62 +141,34 @@ typedef enum MAV_CMD MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| A bitmask of options for engine control| Empty| Empty| Empty| */ + MAV_CMD_DO_SET_MISSION_CURRENT=224, /* Set the mission item with sequence number seq as current item. This means that the MAV will continue to this mission item on the shortest path (not following the mission items in-between). |Mission sequence value to set| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ + MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM, 2: Reset to defaults| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ + MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| WIP: 0: Do nothing for camera, 1: Reboot onboard camera, 2: Shutdown onboard camera, 3: Reboot onboard camera and keep it in the bootloader until upgraded| WIP: 0: Do nothing for mount (e.g. gimbal), 1: Reboot mount, 2: Shutdown mount, 3: Reboot mount and keep it in the bootloader until upgraded| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs system to run pre-arm checks. This command should return MAV_RESULT_TEMPORARILY_REJECTED in the case the system is armed, otherwse MAV_RESULT_ACCEPTED. Note that the return value from executing this command does not indicate whether the vehicle is armable or not, just whether the system has successfully run/is currently running the checks. The result of the checks is reflected in the SYS_STATUS message. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ + MAV_CMD_GET_MESSAGE_INTERVAL=510, /* Request the interval between messages for a particular MAVLink message ID. The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. Set to -1 to disable and 0 to request default rate.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| 0: No action 1: Format storage| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ + MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Reserved (Set to 0)| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). @@ -237,6 +179,11 @@ typedef enum MAV_CMD MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_DO_SET_SYS_CMP_ID=610, /* + Set system and component id. + This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id. + Recipients must reject command addressed to broadcast system ID. + |New system ID for target component(s). 0: ignore and reject command (broadcast system ID not allowed).| New component ID for target component(s). 0: ignore (component IDs don't change).| Reboot components after ID change. Any non-zero value triggers the reboot.| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. @@ -252,7 +199,7 @@ typedef enum MAV_CMD If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ + |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */ MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. @@ -267,32 +214,28 @@ typedef enum MAV_CMD If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is image left, 1 is image right).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ + MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */ + MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */ MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ + MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| */ MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. + MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. Only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. If approved the progress of command_ack message should be set with period of time that this authorization is valid in seconds or in case it was denied it should be set with one of the reasons in ARM_AUTH_DENIED_REASON. |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ @@ -307,7 +250,8 @@ typedef enum MAV_CMD MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ + MAV_CMD_LOWEHEISER_SET_STATE=10151, /* Set Loweheiser desired states |EFI Index| Desired Engine/EFI State (0: Power Off, 1:Running)| Desired Governor State (0:manual throttle, 1:Governed throttle)| Manual throttle level, 0% - 100%| Electronic Start up (0:Off, 1:On)| Empty| Empty| */ + MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude. Note, if used in MISSION_ITEM (deprecated) the units are degrees (unscaled)| Longitude. Note, if used in MISSION_ITEM (deprecated) the units are degrees (unscaled)| Altitude (MSL)| */ MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ @@ -324,7 +268,9 @@ typedef enum MAV_CMD MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ + MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this interface. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ + MAV_CMD_RESET_MPPT=40001, /* Mission command to reset Maximum Power Point Tracker (MPPT) |MPPT number| Empty| Empty| Empty| Empty| Empty| Empty| */ + MAV_CMD_PAYLOAD_CONTROL=40002, /* Mission command to perform a power cycle on payload |Complete power cycle| VISensor power cycle| Empty| Empty| Empty| Empty| Empty| */ MAV_CMD_POWER_OFF_INITIATED=42000, /* A system wide power-off event has been initiated. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_SOLO_BTN_FLY_CLICK=42001, /* FLY button has been clicked. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_SOLO_BTN_FLY_HOLD=42002, /* FLY button has been held for 1.5 seconds. |Takeoff altitude.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ @@ -344,18 +290,29 @@ typedef enum MAV_CMD MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS=42502, /* Reports progress and success or failure of gimbal axis calibration procedure. |Gimbal axis we're reporting calibration progress for.| Current calibration progress for this axis.| Status of the calibration.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION=42503, /* Starts commutation calibration on the gimbal. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_GIMBAL_FULL_RESET=42505, /* Erases gimbal application and parameters. |Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ + MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of cable to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ MAV_CMD_FLASH_BOOTLOADER=42650, /* Update the bootloader |Empty| Empty| Empty| Empty| Magic number - set to 290876 to actually flash| Empty| Empty| */ MAV_CMD_BATTERY_RESET=42651, /* Reset battery capacity for batteries that accumulate consumed battery via integration. |Bitmask of batteries to reset. Least significant bit is for the first battery.| Battery percentage remaining to set.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ MAV_CMD_DEBUG_TRAP=42700, /* Issue a trap signal to the autopilot process, presumably to enter the debugger. |Magic number - set to 32451 to actually trap.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ MAV_CMD_SCRIPTING=42701, /* Control onboard scripting. |Scripting command to execute| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_NAV_SCRIPT_TIME=42702, /* Scripting command as NAV command with wait for completion. |integer command number (0 to 255)| timeout for operation in seconds. Zero means no timeout (0 to 255)| argument1.| argument2.| Empty| Empty| Empty| */ + MAV_CMD_NAV_SCRIPT_TIME=42702, /* Scripting command as NAV command with wait for completion. |integer command number (0 to 255)| timeout for operation in seconds. Zero means no timeout (0 to 255)| argument1.| argument2.| argument3.| argument4.| Empty| */ MAV_CMD_NAV_ATTITUDE_TIME=42703, /* Maintain an attitude for a specified time. |Time to maintain specified attitude and climb rate| Roll angle in degrees (positive is lean right, negative is lean left)| Pitch angle in degrees (positive is lean back, negative is lean forward)| Yaw angle| Climb rate| Empty| Empty| */ MAV_CMD_GUIDED_CHANGE_SPEED=43000, /* Change flight speed at a given rate. This slews the vehicle at a controllable rate between it's previous speed and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |Airspeed or groundspeed.| Target Speed| Acceleration rate, 0 to take effect instantly| Empty| Empty| Empty| Empty| */ MAV_CMD_GUIDED_CHANGE_ALTITUDE=43001, /* Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |Empty| Empty| Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt.| Empty| Empty| Empty| Target Altitude| */ MAV_CMD_GUIDED_CHANGE_HEADING=43002, /* Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |course-over-ground or raw vehicle heading.| Target heading.| Maximum centripetal accelearation, ie rate of change, toward new heading.| Empty| Empty| Empty| Empty| */ MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_ENUM_END=43004, /* | */ + MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW=60002, /* Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. A gimbal device is never to react to this command. |Pitch/tilt angle (positive: tilt up, NaN to be ignored).| Yaw/pan angle (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).| Pitch/tilt rate (positive: tilt up, NaN to be ignored).| Yaw/pan rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).| Gimbal device flags.| Gimbal manager flags.| Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). The client is copied into bits 8-15.| */ + MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP=60010, /* Command to configure a gimbal manager. A gimbal device is never to react to this command. The selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message. |Gimbal manager profile (0 = default).| Gimbal manager setup flags (0 = none).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.| */ + MAV_CMD_STORM32_DO_GIMBAL_ACTION=60011, /* Command to initiate gimbal actions. Usually performed by the gimbal device, but some can also be done by the gimbal manager. It is hence best to broadcast this command. |Gimbal action to initiate (0 = none).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Gimbal ID of the gimbal to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.| */ + MAV_CMD_QSHOT_DO_CONFIGURE=60020, /* Command to set the shot manager mode. |Set shot mode.| Set shot state or command. The allowed values are specific to the selected shot mode.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ + MAV_CMD_PRS_SET_ARM=60050, /* AVSS defined command. Set PRS arm statuses. |PRS arm statuses| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_GET_ARM=60051, /* AVSS defined command. Gets PRS arm statuses |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_GET_BATTERY=60052, /* AVSS defined command. Get the PRS battery voltage in millivolts |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_GET_ERR=60053, /* AVSS defined command. Get the PRS error statuses. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_SET_ARM_ALTI=60070, /* AVSS defined command. Set the ATS arming altitude in meters. |ATS arming altitude| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_GET_ARM_ALTI=60071, /* AVSS defined command. Get the ATS arming altitude in meters. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_PRS_SHUTDOWN=60072, /* AVSS defined command. Shuts down the PRS system. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ + MAV_CMD_ENUM_END=60073, /* | */ } MAV_CMD; #endif @@ -372,6 +329,23 @@ typedef enum SCRIPTING_CMD } SCRIPTING_CMD; #endif +/** @brief */ +#ifndef HAVE_ENUM_SECURE_COMMAND_OP +#define HAVE_ENUM_SECURE_COMMAND_OP +typedef enum SECURE_COMMAND_OP +{ + SECURE_COMMAND_GET_SESSION_KEY=0, /* Get an 8 byte session key which is used for remote secure updates which operate on flight controller data such as bootloader public keys. Return data will be 8 bytes on success. The session key remains valid until either the flight controller reboots or another SECURE_COMMAND_GET_SESSION_KEY is run. | */ + SECURE_COMMAND_GET_REMOTEID_SESSION_KEY=1, /* Get an 8 byte session key which is used for remote secure updates which operate on RemoteID module data. Return data will be 8 bytes on success. The session key remains valid until either the remote ID module reboots or another SECURE_COMMAND_GET_REMOTEID_SESSION_KEY is run. | */ + SECURE_COMMAND_REMOVE_PUBLIC_KEYS=2, /* Remove range of public keys from the bootloader. Command data consists of two bytes, first byte if index of first public key to remove. Second byte is the number of keys to remove. If all keys are removed then secure boot is disabled and insecure firmware can be loaded. | */ + SECURE_COMMAND_GET_PUBLIC_KEYS=3, /* Get current public keys from the bootloader. Command data consists of two bytes, first byte is index of first public key to fetch, 2nd byte is number of keys to fetch. Total data needs to fit in data portion of reply (max 6 keys for 32 byte keys). Reply data has the index of the first key in the first byte, followed by the keys. Returned keys may be less than the number of keys requested if there are less keys installed than requested. | */ + SECURE_COMMAND_SET_PUBLIC_KEYS=4, /* Set current public keys in the bootloader. Data consists of a one byte public key index followed by the public keys. With 32 byte keys this allows for up to 6 keys to be set in one request. Keys outside of the range that is being set will remain unchanged. | */ + SECURE_COMMAND_GET_REMOTEID_CONFIG=5, /* Get config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details. | */ + SECURE_COMMAND_SET_REMOTEID_CONFIG=6, /* Set config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details. | */ + SECURE_COMMAND_FLASH_BOOTLOADER=7, /* Flash bootloader from local storage. Data is the filename to use for the bootloader. This is intended to be used with MAVFtp to upload a new bootloader to a microSD before flashing. | */ + SECURE_COMMAND_OP_ENUM_END=8, /* | */ +} SECURE_COMMAND_OP; +#endif + /** @brief */ #ifndef HAVE_ENUM_LIMITS_STATE #define HAVE_ENUM_LIMITS_STATE @@ -406,7 +380,9 @@ typedef enum RALLY_FLAGS { FAVORABLE_WIND=1, /* Flag set when requiring favorable winds for landing. | */ LAND_IMMEDIATELY=2, /* Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. | */ - RALLY_FLAGS_ENUM_END=3, /* | */ + ALT_FRAME_VALID=4, /* True if the following altitude frame value is valid. | */ + ALT_FRAME=24, /* 2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain | */ + RALLY_FLAGS_ENUM_END=25, /* | */ } RALLY_FLAGS; #endif @@ -1099,6 +1075,8 @@ typedef enum OSD_PARAM_CONFIG_ERROR #include "./mavlink_msg_device_op_read_reply.h" #include "./mavlink_msg_device_op_write.h" #include "./mavlink_msg_device_op_write_reply.h" +#include "./mavlink_msg_secure_command.h" +#include "./mavlink_msg_secure_command_reply.h" #include "./mavlink_msg_adap_tuning.h" #include "./mavlink_msg_vision_position_delta.h" #include "./mavlink_msg_aoa_ssa.h" @@ -1112,18 +1090,25 @@ typedef enum OSD_PARAM_CONFIG_ERROR #include "./mavlink_msg_obstacle_distance_3d.h" #include "./mavlink_msg_water_depth.h" #include "./mavlink_msg_mcu_status.h" +#include "./mavlink_msg_esc_telemetry_13_to_16.h" +#include "./mavlink_msg_esc_telemetry_17_to_20.h" +#include "./mavlink_msg_esc_telemetry_21_to_24.h" +#include "./mavlink_msg_esc_telemetry_25_to_28.h" +#include "./mavlink_msg_esc_telemetry_29_to_32.h" // base include #include "../common/common.h" #include "../uAvionix/uAvionix.h" #include "../icarous/icarous.h" +#include "../loweheiser/loweheiser.h" #include "../cubepilot/cubepilot.h" #include "../csAirLink/csAirLink.h" +#include "../suind/suind.h" #if MAVLINK_ARDUPILOTMEGA_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_HP, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_TURN_INIT} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRLINK_EYE_GS_HOLE_PUSH_REQUEST", 52002 }, { "AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE", 52003 }, { "AIRLINK_EYE_HP", 52004 }, { "AIRLINK_EYE_TURN_INIT", 52005 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "BATTERY2", 181 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPASSMOT_STATUS", 177 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO", 166 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSOR_OFFSETS", 150 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_GET, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CONTROL, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_STATUS, MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_SECURE_COMMAND, MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_SUIND_MISSION_DATA} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "BATTERY2", 181 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPASSMOT_STATUS", 177 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_TELEMETRY_13_TO_16", 11040 }, { "ESC_TELEMETRY_17_TO_20", 11041 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_21_TO_24", 11042 }, { "ESC_TELEMETRY_25_TO_28", 11043 }, { "ESC_TELEMETRY_29_TO_32", 11044 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "LOWEHEISER_GOV_EFI", 10151 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO", 166 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SECURE_COMMAND", 11004 }, { "SECURE_COMMAND_REPLY", 11005 }, { "SENSOR_OFFSETS", 150 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUIND_MISSION_DATA", 70000 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_GET", 10006 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_CFG_FLIGHTID", 10005 }, { "UAVIONIX_ADSB_OUT_CFG_REGISTRATION", 10004 }, { "UAVIONIX_ADSB_OUT_CONTROL", 10007 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_OUT_STATUS", 10008 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/ardupilotmega/mavlink.h b/ardupilotmega/mavlink.h index 2d97fb351..c7c52580d 100644 --- a/ardupilotmega/mavlink.h +++ b/ardupilotmega/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH -5390551567149308485 +#define MAVLINK_PRIMARY_XML_HASH 4554940878128159379 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/ardupilotmega/mavlink_msg_esc_telemetry_13_to_16.h b/ardupilotmega/mavlink_msg_esc_telemetry_13_to_16.h new file mode 100644 index 000000000..a4d158417 --- /dev/null +++ b/ardupilotmega/mavlink_msg_esc_telemetry_13_to_16.h @@ -0,0 +1,405 @@ +#pragma once +// MESSAGE ESC_TELEMETRY_13_TO_16 PACKING + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16 11040 + + +typedef struct __mavlink_esc_telemetry_13_to_16_t { + uint16_t voltage[4]; /*< [cV] Voltage.*/ + uint16_t current[4]; /*< [cA] Current.*/ + uint16_t totalcurrent[4]; /*< [mAh] Total current.*/ + uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/ + uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/ + uint8_t temperature[4]; /*< [degC] Temperature.*/ +} mavlink_esc_telemetry_13_to_16_t; + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN 44 +#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN 44 +#define MAVLINK_MSG_ID_11040_LEN 44 +#define MAVLINK_MSG_ID_11040_MIN_LEN 44 + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC 132 +#define MAVLINK_MSG_ID_11040_CRC 132 + +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_VOLTAGE_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_CURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_TOTALCURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_RPM_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_COUNT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_13_TO_16_FIELD_TEMPERATURE_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16 { \ + 11040, \ + "ESC_TELEMETRY_13_TO_16", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_13_to_16_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_13_to_16_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_13_to_16_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_13_to_16_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_13_to_16_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_13_to_16_t, count) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16 { \ + "ESC_TELEMETRY_13_TO_16", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_13_to_16_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_13_to_16_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_13_to_16_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_13_to_16_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_13_to_16_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_13_to_16_t, count) }, \ + } \ +} +#endif + +/** + * @brief Pack a esc_telemetry_13_to_16 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#else + mavlink_esc_telemetry_13_to_16_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +} + +/** + * @brief Pack a esc_telemetry_13_to_16 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#else + mavlink_esc_telemetry_13_to_16_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#endif +} + +/** + * @brief Pack a esc_telemetry_13_to_16 message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#else + mavlink_esc_telemetry_13_to_16_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +} + +/** + * @brief Encode a esc_telemetry_13_to_16 struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_13_to_16 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16) +{ + return mavlink_msg_esc_telemetry_13_to_16_pack(system_id, component_id, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count); +} + +/** + * @brief Encode a esc_telemetry_13_to_16 struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_13_to_16 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16) +{ + return mavlink_msg_esc_telemetry_13_to_16_pack_chan(system_id, component_id, chan, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count); +} + +/** + * @brief Encode a esc_telemetry_13_to_16 struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_13_to_16 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16) +{ + return mavlink_msg_esc_telemetry_13_to_16_pack_status(system_id, component_id, _status, msg, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count); +} + +/** + * @brief Send a esc_telemetry_13_to_16 message + * @param chan MAVLink channel to send the message + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_esc_telemetry_13_to_16_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#else + mavlink_esc_telemetry_13_to_16_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#endif +} + +/** + * @brief Send a esc_telemetry_13_to_16 message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_esc_telemetry_13_to_16_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_13_to_16_send(chan, esc_telemetry_13_to_16->temperature, esc_telemetry_13_to_16->voltage, esc_telemetry_13_to_16->current, esc_telemetry_13_to_16->totalcurrent, esc_telemetry_13_to_16->rpm, esc_telemetry_13_to_16->count); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)esc_telemetry_13_to_16, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#endif +} + +#if MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_esc_telemetry_13_to_16_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#else + mavlink_esc_telemetry_13_to_16_t *packet = (mavlink_esc_telemetry_13_to_16_t *)msgbuf; + + mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_CRC); +#endif +} +#endif + +#endif + +// MESSAGE ESC_TELEMETRY_13_TO_16 UNPACKING + + +/** + * @brief Get field temperature from esc_telemetry_13_to_16 message + * + * @return [degC] Temperature. + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_temperature(const mavlink_message_t* msg, uint8_t *temperature) +{ + return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40); +} + +/** + * @brief Get field voltage from esc_telemetry_13_to_16 message + * + * @return [cV] Voltage. + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_voltage(const mavlink_message_t* msg, uint16_t *voltage) +{ + return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0); +} + +/** + * @brief Get field current from esc_telemetry_13_to_16 message + * + * @return [cA] Current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_current(const mavlink_message_t* msg, uint16_t *current) +{ + return _MAV_RETURN_uint16_t_array(msg, current, 4, 8); +} + +/** + * @brief Get field totalcurrent from esc_telemetry_13_to_16 message + * + * @return [mAh] Total current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent) +{ + return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16); +} + +/** + * @brief Get field rpm from esc_telemetry_13_to_16 message + * + * @return [rpm] RPM (eRPM). + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_rpm(const mavlink_message_t* msg, uint16_t *rpm) +{ + return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24); +} + +/** + * @brief Get field count from esc_telemetry_13_to_16 message + * + * @return count of telemetry packets received (wraps at 65535). + */ +static inline uint16_t mavlink_msg_esc_telemetry_13_to_16_get_count(const mavlink_message_t* msg, uint16_t *count) +{ + return _MAV_RETURN_uint16_t_array(msg, count, 4, 32); +} + +/** + * @brief Decode a esc_telemetry_13_to_16 message into a struct + * + * @param msg The message to decode + * @param esc_telemetry_13_to_16 C-struct to decode the message contents into + */ +static inline void mavlink_msg_esc_telemetry_13_to_16_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_13_to_16_t* esc_telemetry_13_to_16) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_13_to_16_get_voltage(msg, esc_telemetry_13_to_16->voltage); + mavlink_msg_esc_telemetry_13_to_16_get_current(msg, esc_telemetry_13_to_16->current); + mavlink_msg_esc_telemetry_13_to_16_get_totalcurrent(msg, esc_telemetry_13_to_16->totalcurrent); + mavlink_msg_esc_telemetry_13_to_16_get_rpm(msg, esc_telemetry_13_to_16->rpm); + mavlink_msg_esc_telemetry_13_to_16_get_count(msg, esc_telemetry_13_to_16->count); + mavlink_msg_esc_telemetry_13_to_16_get_temperature(msg, esc_telemetry_13_to_16->temperature); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN; + memset(esc_telemetry_13_to_16, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_LEN); + memcpy(esc_telemetry_13_to_16, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_esc_telemetry_17_to_20.h b/ardupilotmega/mavlink_msg_esc_telemetry_17_to_20.h new file mode 100644 index 000000000..b94c79100 --- /dev/null +++ b/ardupilotmega/mavlink_msg_esc_telemetry_17_to_20.h @@ -0,0 +1,405 @@ +#pragma once +// MESSAGE ESC_TELEMETRY_17_TO_20 PACKING + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20 11041 + + +typedef struct __mavlink_esc_telemetry_17_to_20_t { + uint16_t voltage[4]; /*< [cV] Voltage.*/ + uint16_t current[4]; /*< [cA] Current.*/ + uint16_t totalcurrent[4]; /*< [mAh] Total current.*/ + uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/ + uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/ + uint8_t temperature[4]; /*< [degC] Temperature.*/ +} mavlink_esc_telemetry_17_to_20_t; + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN 44 +#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN 44 +#define MAVLINK_MSG_ID_11041_LEN 44 +#define MAVLINK_MSG_ID_11041_MIN_LEN 44 + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC 208 +#define MAVLINK_MSG_ID_11041_CRC 208 + +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_VOLTAGE_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_CURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_TOTALCURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_RPM_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_COUNT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_17_TO_20_FIELD_TEMPERATURE_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20 { \ + 11041, \ + "ESC_TELEMETRY_17_TO_20", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_17_to_20_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_17_to_20_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_17_to_20_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_17_to_20_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_17_to_20_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_17_to_20_t, count) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20 { \ + "ESC_TELEMETRY_17_TO_20", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_17_to_20_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_17_to_20_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_17_to_20_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_17_to_20_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_17_to_20_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_17_to_20_t, count) }, \ + } \ +} +#endif + +/** + * @brief Pack a esc_telemetry_17_to_20 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#else + mavlink_esc_telemetry_17_to_20_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +} + +/** + * @brief Pack a esc_telemetry_17_to_20 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#else + mavlink_esc_telemetry_17_to_20_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#endif +} + +/** + * @brief Pack a esc_telemetry_17_to_20 message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#else + mavlink_esc_telemetry_17_to_20_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +} + +/** + * @brief Encode a esc_telemetry_17_to_20 struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_17_to_20 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20) +{ + return mavlink_msg_esc_telemetry_17_to_20_pack(system_id, component_id, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count); +} + +/** + * @brief Encode a esc_telemetry_17_to_20 struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_17_to_20 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20) +{ + return mavlink_msg_esc_telemetry_17_to_20_pack_chan(system_id, component_id, chan, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count); +} + +/** + * @brief Encode a esc_telemetry_17_to_20 struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_17_to_20 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20) +{ + return mavlink_msg_esc_telemetry_17_to_20_pack_status(system_id, component_id, _status, msg, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count); +} + +/** + * @brief Send a esc_telemetry_17_to_20 message + * @param chan MAVLink channel to send the message + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_esc_telemetry_17_to_20_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#else + mavlink_esc_telemetry_17_to_20_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#endif +} + +/** + * @brief Send a esc_telemetry_17_to_20 message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_esc_telemetry_17_to_20_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_17_to_20_send(chan, esc_telemetry_17_to_20->temperature, esc_telemetry_17_to_20->voltage, esc_telemetry_17_to_20->current, esc_telemetry_17_to_20->totalcurrent, esc_telemetry_17_to_20->rpm, esc_telemetry_17_to_20->count); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)esc_telemetry_17_to_20, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#endif +} + +#if MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_esc_telemetry_17_to_20_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#else + mavlink_esc_telemetry_17_to_20_t *packet = (mavlink_esc_telemetry_17_to_20_t *)msgbuf; + + mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_CRC); +#endif +} +#endif + +#endif + +// MESSAGE ESC_TELEMETRY_17_TO_20 UNPACKING + + +/** + * @brief Get field temperature from esc_telemetry_17_to_20 message + * + * @return [degC] Temperature. + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_temperature(const mavlink_message_t* msg, uint8_t *temperature) +{ + return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40); +} + +/** + * @brief Get field voltage from esc_telemetry_17_to_20 message + * + * @return [cV] Voltage. + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_voltage(const mavlink_message_t* msg, uint16_t *voltage) +{ + return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0); +} + +/** + * @brief Get field current from esc_telemetry_17_to_20 message + * + * @return [cA] Current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_current(const mavlink_message_t* msg, uint16_t *current) +{ + return _MAV_RETURN_uint16_t_array(msg, current, 4, 8); +} + +/** + * @brief Get field totalcurrent from esc_telemetry_17_to_20 message + * + * @return [mAh] Total current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent) +{ + return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16); +} + +/** + * @brief Get field rpm from esc_telemetry_17_to_20 message + * + * @return [rpm] RPM (eRPM). + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_rpm(const mavlink_message_t* msg, uint16_t *rpm) +{ + return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24); +} + +/** + * @brief Get field count from esc_telemetry_17_to_20 message + * + * @return count of telemetry packets received (wraps at 65535). + */ +static inline uint16_t mavlink_msg_esc_telemetry_17_to_20_get_count(const mavlink_message_t* msg, uint16_t *count) +{ + return _MAV_RETURN_uint16_t_array(msg, count, 4, 32); +} + +/** + * @brief Decode a esc_telemetry_17_to_20 message into a struct + * + * @param msg The message to decode + * @param esc_telemetry_17_to_20 C-struct to decode the message contents into + */ +static inline void mavlink_msg_esc_telemetry_17_to_20_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_17_to_20_t* esc_telemetry_17_to_20) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_17_to_20_get_voltage(msg, esc_telemetry_17_to_20->voltage); + mavlink_msg_esc_telemetry_17_to_20_get_current(msg, esc_telemetry_17_to_20->current); + mavlink_msg_esc_telemetry_17_to_20_get_totalcurrent(msg, esc_telemetry_17_to_20->totalcurrent); + mavlink_msg_esc_telemetry_17_to_20_get_rpm(msg, esc_telemetry_17_to_20->rpm); + mavlink_msg_esc_telemetry_17_to_20_get_count(msg, esc_telemetry_17_to_20->count); + mavlink_msg_esc_telemetry_17_to_20_get_temperature(msg, esc_telemetry_17_to_20->temperature); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN; + memset(esc_telemetry_17_to_20, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_LEN); + memcpy(esc_telemetry_17_to_20, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_esc_telemetry_21_to_24.h b/ardupilotmega/mavlink_msg_esc_telemetry_21_to_24.h new file mode 100644 index 000000000..14efcaf51 --- /dev/null +++ b/ardupilotmega/mavlink_msg_esc_telemetry_21_to_24.h @@ -0,0 +1,405 @@ +#pragma once +// MESSAGE ESC_TELEMETRY_21_TO_24 PACKING + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24 11042 + + +typedef struct __mavlink_esc_telemetry_21_to_24_t { + uint16_t voltage[4]; /*< [cV] Voltage.*/ + uint16_t current[4]; /*< [cA] Current.*/ + uint16_t totalcurrent[4]; /*< [mAh] Total current.*/ + uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/ + uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/ + uint8_t temperature[4]; /*< [degC] Temperature.*/ +} mavlink_esc_telemetry_21_to_24_t; + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN 44 +#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN 44 +#define MAVLINK_MSG_ID_11042_LEN 44 +#define MAVLINK_MSG_ID_11042_MIN_LEN 44 + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC 201 +#define MAVLINK_MSG_ID_11042_CRC 201 + +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_VOLTAGE_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_CURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_TOTALCURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_RPM_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_COUNT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_21_TO_24_FIELD_TEMPERATURE_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24 { \ + 11042, \ + "ESC_TELEMETRY_21_TO_24", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_21_to_24_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_21_to_24_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_21_to_24_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_21_to_24_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_21_to_24_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_21_to_24_t, count) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24 { \ + "ESC_TELEMETRY_21_TO_24", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_21_to_24_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_21_to_24_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_21_to_24_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_21_to_24_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_21_to_24_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_21_to_24_t, count) }, \ + } \ +} +#endif + +/** + * @brief Pack a esc_telemetry_21_to_24 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#else + mavlink_esc_telemetry_21_to_24_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +} + +/** + * @brief Pack a esc_telemetry_21_to_24 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#else + mavlink_esc_telemetry_21_to_24_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#endif +} + +/** + * @brief Pack a esc_telemetry_21_to_24 message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#else + mavlink_esc_telemetry_21_to_24_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +} + +/** + * @brief Encode a esc_telemetry_21_to_24 struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_21_to_24 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24) +{ + return mavlink_msg_esc_telemetry_21_to_24_pack(system_id, component_id, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count); +} + +/** + * @brief Encode a esc_telemetry_21_to_24 struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_21_to_24 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24) +{ + return mavlink_msg_esc_telemetry_21_to_24_pack_chan(system_id, component_id, chan, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count); +} + +/** + * @brief Encode a esc_telemetry_21_to_24 struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_21_to_24 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24) +{ + return mavlink_msg_esc_telemetry_21_to_24_pack_status(system_id, component_id, _status, msg, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count); +} + +/** + * @brief Send a esc_telemetry_21_to_24 message + * @param chan MAVLink channel to send the message + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_esc_telemetry_21_to_24_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#else + mavlink_esc_telemetry_21_to_24_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#endif +} + +/** + * @brief Send a esc_telemetry_21_to_24 message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_esc_telemetry_21_to_24_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_21_to_24_send(chan, esc_telemetry_21_to_24->temperature, esc_telemetry_21_to_24->voltage, esc_telemetry_21_to_24->current, esc_telemetry_21_to_24->totalcurrent, esc_telemetry_21_to_24->rpm, esc_telemetry_21_to_24->count); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)esc_telemetry_21_to_24, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#endif +} + +#if MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_esc_telemetry_21_to_24_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#else + mavlink_esc_telemetry_21_to_24_t *packet = (mavlink_esc_telemetry_21_to_24_t *)msgbuf; + + mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_CRC); +#endif +} +#endif + +#endif + +// MESSAGE ESC_TELEMETRY_21_TO_24 UNPACKING + + +/** + * @brief Get field temperature from esc_telemetry_21_to_24 message + * + * @return [degC] Temperature. + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_temperature(const mavlink_message_t* msg, uint8_t *temperature) +{ + return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40); +} + +/** + * @brief Get field voltage from esc_telemetry_21_to_24 message + * + * @return [cV] Voltage. + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_voltage(const mavlink_message_t* msg, uint16_t *voltage) +{ + return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0); +} + +/** + * @brief Get field current from esc_telemetry_21_to_24 message + * + * @return [cA] Current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_current(const mavlink_message_t* msg, uint16_t *current) +{ + return _MAV_RETURN_uint16_t_array(msg, current, 4, 8); +} + +/** + * @brief Get field totalcurrent from esc_telemetry_21_to_24 message + * + * @return [mAh] Total current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent) +{ + return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16); +} + +/** + * @brief Get field rpm from esc_telemetry_21_to_24 message + * + * @return [rpm] RPM (eRPM). + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_rpm(const mavlink_message_t* msg, uint16_t *rpm) +{ + return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24); +} + +/** + * @brief Get field count from esc_telemetry_21_to_24 message + * + * @return count of telemetry packets received (wraps at 65535). + */ +static inline uint16_t mavlink_msg_esc_telemetry_21_to_24_get_count(const mavlink_message_t* msg, uint16_t *count) +{ + return _MAV_RETURN_uint16_t_array(msg, count, 4, 32); +} + +/** + * @brief Decode a esc_telemetry_21_to_24 message into a struct + * + * @param msg The message to decode + * @param esc_telemetry_21_to_24 C-struct to decode the message contents into + */ +static inline void mavlink_msg_esc_telemetry_21_to_24_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_21_to_24_t* esc_telemetry_21_to_24) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_21_to_24_get_voltage(msg, esc_telemetry_21_to_24->voltage); + mavlink_msg_esc_telemetry_21_to_24_get_current(msg, esc_telemetry_21_to_24->current); + mavlink_msg_esc_telemetry_21_to_24_get_totalcurrent(msg, esc_telemetry_21_to_24->totalcurrent); + mavlink_msg_esc_telemetry_21_to_24_get_rpm(msg, esc_telemetry_21_to_24->rpm); + mavlink_msg_esc_telemetry_21_to_24_get_count(msg, esc_telemetry_21_to_24->count); + mavlink_msg_esc_telemetry_21_to_24_get_temperature(msg, esc_telemetry_21_to_24->temperature); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN; + memset(esc_telemetry_21_to_24, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_LEN); + memcpy(esc_telemetry_21_to_24, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_esc_telemetry_25_to_28.h b/ardupilotmega/mavlink_msg_esc_telemetry_25_to_28.h new file mode 100644 index 000000000..23d62fbb8 --- /dev/null +++ b/ardupilotmega/mavlink_msg_esc_telemetry_25_to_28.h @@ -0,0 +1,405 @@ +#pragma once +// MESSAGE ESC_TELEMETRY_25_TO_28 PACKING + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28 11043 + + +typedef struct __mavlink_esc_telemetry_25_to_28_t { + uint16_t voltage[4]; /*< [cV] Voltage.*/ + uint16_t current[4]; /*< [cA] Current.*/ + uint16_t totalcurrent[4]; /*< [mAh] Total current.*/ + uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/ + uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/ + uint8_t temperature[4]; /*< [degC] Temperature.*/ +} mavlink_esc_telemetry_25_to_28_t; + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN 44 +#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN 44 +#define MAVLINK_MSG_ID_11043_LEN 44 +#define MAVLINK_MSG_ID_11043_MIN_LEN 44 + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC 193 +#define MAVLINK_MSG_ID_11043_CRC 193 + +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_VOLTAGE_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_CURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_TOTALCURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_RPM_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_COUNT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_25_TO_28_FIELD_TEMPERATURE_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28 { \ + 11043, \ + "ESC_TELEMETRY_25_TO_28", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_25_to_28_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_25_to_28_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_25_to_28_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_25_to_28_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_25_to_28_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_25_to_28_t, count) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28 { \ + "ESC_TELEMETRY_25_TO_28", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_25_to_28_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_25_to_28_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_25_to_28_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_25_to_28_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_25_to_28_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_25_to_28_t, count) }, \ + } \ +} +#endif + +/** + * @brief Pack a esc_telemetry_25_to_28 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#else + mavlink_esc_telemetry_25_to_28_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +} + +/** + * @brief Pack a esc_telemetry_25_to_28 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#else + mavlink_esc_telemetry_25_to_28_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#endif +} + +/** + * @brief Pack a esc_telemetry_25_to_28 message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#else + mavlink_esc_telemetry_25_to_28_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +} + +/** + * @brief Encode a esc_telemetry_25_to_28 struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_25_to_28 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28) +{ + return mavlink_msg_esc_telemetry_25_to_28_pack(system_id, component_id, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count); +} + +/** + * @brief Encode a esc_telemetry_25_to_28 struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_25_to_28 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28) +{ + return mavlink_msg_esc_telemetry_25_to_28_pack_chan(system_id, component_id, chan, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count); +} + +/** + * @brief Encode a esc_telemetry_25_to_28 struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_25_to_28 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28) +{ + return mavlink_msg_esc_telemetry_25_to_28_pack_status(system_id, component_id, _status, msg, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count); +} + +/** + * @brief Send a esc_telemetry_25_to_28 message + * @param chan MAVLink channel to send the message + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_esc_telemetry_25_to_28_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#else + mavlink_esc_telemetry_25_to_28_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#endif +} + +/** + * @brief Send a esc_telemetry_25_to_28 message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_esc_telemetry_25_to_28_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_25_to_28_send(chan, esc_telemetry_25_to_28->temperature, esc_telemetry_25_to_28->voltage, esc_telemetry_25_to_28->current, esc_telemetry_25_to_28->totalcurrent, esc_telemetry_25_to_28->rpm, esc_telemetry_25_to_28->count); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)esc_telemetry_25_to_28, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#endif +} + +#if MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_esc_telemetry_25_to_28_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#else + mavlink_esc_telemetry_25_to_28_t *packet = (mavlink_esc_telemetry_25_to_28_t *)msgbuf; + + mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_CRC); +#endif +} +#endif + +#endif + +// MESSAGE ESC_TELEMETRY_25_TO_28 UNPACKING + + +/** + * @brief Get field temperature from esc_telemetry_25_to_28 message + * + * @return [degC] Temperature. + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_temperature(const mavlink_message_t* msg, uint8_t *temperature) +{ + return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40); +} + +/** + * @brief Get field voltage from esc_telemetry_25_to_28 message + * + * @return [cV] Voltage. + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_voltage(const mavlink_message_t* msg, uint16_t *voltage) +{ + return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0); +} + +/** + * @brief Get field current from esc_telemetry_25_to_28 message + * + * @return [cA] Current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_current(const mavlink_message_t* msg, uint16_t *current) +{ + return _MAV_RETURN_uint16_t_array(msg, current, 4, 8); +} + +/** + * @brief Get field totalcurrent from esc_telemetry_25_to_28 message + * + * @return [mAh] Total current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent) +{ + return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16); +} + +/** + * @brief Get field rpm from esc_telemetry_25_to_28 message + * + * @return [rpm] RPM (eRPM). + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_rpm(const mavlink_message_t* msg, uint16_t *rpm) +{ + return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24); +} + +/** + * @brief Get field count from esc_telemetry_25_to_28 message + * + * @return count of telemetry packets received (wraps at 65535). + */ +static inline uint16_t mavlink_msg_esc_telemetry_25_to_28_get_count(const mavlink_message_t* msg, uint16_t *count) +{ + return _MAV_RETURN_uint16_t_array(msg, count, 4, 32); +} + +/** + * @brief Decode a esc_telemetry_25_to_28 message into a struct + * + * @param msg The message to decode + * @param esc_telemetry_25_to_28 C-struct to decode the message contents into + */ +static inline void mavlink_msg_esc_telemetry_25_to_28_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_25_to_28_t* esc_telemetry_25_to_28) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_25_to_28_get_voltage(msg, esc_telemetry_25_to_28->voltage); + mavlink_msg_esc_telemetry_25_to_28_get_current(msg, esc_telemetry_25_to_28->current); + mavlink_msg_esc_telemetry_25_to_28_get_totalcurrent(msg, esc_telemetry_25_to_28->totalcurrent); + mavlink_msg_esc_telemetry_25_to_28_get_rpm(msg, esc_telemetry_25_to_28->rpm); + mavlink_msg_esc_telemetry_25_to_28_get_count(msg, esc_telemetry_25_to_28->count); + mavlink_msg_esc_telemetry_25_to_28_get_temperature(msg, esc_telemetry_25_to_28->temperature); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN; + memset(esc_telemetry_25_to_28, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_LEN); + memcpy(esc_telemetry_25_to_28, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_esc_telemetry_29_to_32.h b/ardupilotmega/mavlink_msg_esc_telemetry_29_to_32.h new file mode 100644 index 000000000..3b9acf539 --- /dev/null +++ b/ardupilotmega/mavlink_msg_esc_telemetry_29_to_32.h @@ -0,0 +1,405 @@ +#pragma once +// MESSAGE ESC_TELEMETRY_29_TO_32 PACKING + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32 11044 + + +typedef struct __mavlink_esc_telemetry_29_to_32_t { + uint16_t voltage[4]; /*< [cV] Voltage.*/ + uint16_t current[4]; /*< [cA] Current.*/ + uint16_t totalcurrent[4]; /*< [mAh] Total current.*/ + uint16_t rpm[4]; /*< [rpm] RPM (eRPM).*/ + uint16_t count[4]; /*< count of telemetry packets received (wraps at 65535).*/ + uint8_t temperature[4]; /*< [degC] Temperature.*/ +} mavlink_esc_telemetry_29_to_32_t; + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN 44 +#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN 44 +#define MAVLINK_MSG_ID_11044_LEN 44 +#define MAVLINK_MSG_ID_11044_MIN_LEN 44 + +#define MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC 189 +#define MAVLINK_MSG_ID_11044_CRC 189 + +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_VOLTAGE_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_CURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_TOTALCURRENT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_RPM_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_COUNT_LEN 4 +#define MAVLINK_MSG_ESC_TELEMETRY_29_TO_32_FIELD_TEMPERATURE_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32 { \ + 11044, \ + "ESC_TELEMETRY_29_TO_32", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_29_to_32_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_29_to_32_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_29_to_32_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_29_to_32_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_29_to_32_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_29_to_32_t, count) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32 { \ + "ESC_TELEMETRY_29_TO_32", \ + 6, \ + { { "temperature", NULL, MAVLINK_TYPE_UINT8_T, 4, 40, offsetof(mavlink_esc_telemetry_29_to_32_t, temperature) }, \ + { "voltage", NULL, MAVLINK_TYPE_UINT16_T, 4, 0, offsetof(mavlink_esc_telemetry_29_to_32_t, voltage) }, \ + { "current", NULL, MAVLINK_TYPE_UINT16_T, 4, 8, offsetof(mavlink_esc_telemetry_29_to_32_t, current) }, \ + { "totalcurrent", NULL, MAVLINK_TYPE_UINT16_T, 4, 16, offsetof(mavlink_esc_telemetry_29_to_32_t, totalcurrent) }, \ + { "rpm", NULL, MAVLINK_TYPE_UINT16_T, 4, 24, offsetof(mavlink_esc_telemetry_29_to_32_t, rpm) }, \ + { "count", NULL, MAVLINK_TYPE_UINT16_T, 4, 32, offsetof(mavlink_esc_telemetry_29_to_32_t, count) }, \ + } \ +} +#endif + +/** + * @brief Pack a esc_telemetry_29_to_32 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#else + mavlink_esc_telemetry_29_to_32_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +} + +/** + * @brief Pack a esc_telemetry_29_to_32 message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#else + mavlink_esc_telemetry_29_to_32_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#endif +} + +/** + * @brief Pack a esc_telemetry_29_to_32 message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const uint8_t *temperature,const uint16_t *voltage,const uint16_t *current,const uint16_t *totalcurrent,const uint16_t *rpm,const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#else + mavlink_esc_telemetry_29_to_32_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +} + +/** + * @brief Encode a esc_telemetry_29_to_32 struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_29_to_32 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32) +{ + return mavlink_msg_esc_telemetry_29_to_32_pack(system_id, component_id, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count); +} + +/** + * @brief Encode a esc_telemetry_29_to_32 struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_29_to_32 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32) +{ + return mavlink_msg_esc_telemetry_29_to_32_pack_chan(system_id, component_id, chan, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count); +} + +/** + * @brief Encode a esc_telemetry_29_to_32 struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param esc_telemetry_29_to_32 C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32) +{ + return mavlink_msg_esc_telemetry_29_to_32_pack_status(system_id, component_id, _status, msg, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count); +} + +/** + * @brief Send a esc_telemetry_29_to_32 message + * @param chan MAVLink channel to send the message + * + * @param temperature [degC] Temperature. + * @param voltage [cV] Voltage. + * @param current [cA] Current. + * @param totalcurrent [mAh] Total current. + * @param rpm [rpm] RPM (eRPM). + * @param count count of telemetry packets received (wraps at 65535). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_esc_telemetry_29_to_32_send(mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN]; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#else + mavlink_esc_telemetry_29_to_32_t packet; + + mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)&packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#endif +} + +/** + * @brief Send a esc_telemetry_29_to_32 message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_esc_telemetry_29_to_32_send_struct(mavlink_channel_t chan, const mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_29_to_32_send(chan, esc_telemetry_29_to_32->temperature, esc_telemetry_29_to_32->voltage, esc_telemetry_29_to_32->current, esc_telemetry_29_to_32->totalcurrent, esc_telemetry_29_to_32->rpm, esc_telemetry_29_to_32->count); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)esc_telemetry_29_to_32, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#endif +} + +#if MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_esc_telemetry_29_to_32_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_uint16_t_array(buf, 0, voltage, 4); + _mav_put_uint16_t_array(buf, 8, current, 4); + _mav_put_uint16_t_array(buf, 16, totalcurrent, 4); + _mav_put_uint16_t_array(buf, 24, rpm, 4); + _mav_put_uint16_t_array(buf, 32, count, 4); + _mav_put_uint8_t_array(buf, 40, temperature, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, buf, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#else + mavlink_esc_telemetry_29_to_32_t *packet = (mavlink_esc_telemetry_29_to_32_t *)msgbuf; + + mav_array_memcpy(packet->voltage, voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet->current, current, sizeof(uint16_t)*4); + mav_array_memcpy(packet->totalcurrent, totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet->rpm, rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet->count, count, sizeof(uint16_t)*4); + mav_array_memcpy(packet->temperature, temperature, sizeof(uint8_t)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32, (const char *)packet, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_CRC); +#endif +} +#endif + +#endif + +// MESSAGE ESC_TELEMETRY_29_TO_32 UNPACKING + + +/** + * @brief Get field temperature from esc_telemetry_29_to_32 message + * + * @return [degC] Temperature. + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_temperature(const mavlink_message_t* msg, uint8_t *temperature) +{ + return _MAV_RETURN_uint8_t_array(msg, temperature, 4, 40); +} + +/** + * @brief Get field voltage from esc_telemetry_29_to_32 message + * + * @return [cV] Voltage. + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_voltage(const mavlink_message_t* msg, uint16_t *voltage) +{ + return _MAV_RETURN_uint16_t_array(msg, voltage, 4, 0); +} + +/** + * @brief Get field current from esc_telemetry_29_to_32 message + * + * @return [cA] Current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_current(const mavlink_message_t* msg, uint16_t *current) +{ + return _MAV_RETURN_uint16_t_array(msg, current, 4, 8); +} + +/** + * @brief Get field totalcurrent from esc_telemetry_29_to_32 message + * + * @return [mAh] Total current. + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_totalcurrent(const mavlink_message_t* msg, uint16_t *totalcurrent) +{ + return _MAV_RETURN_uint16_t_array(msg, totalcurrent, 4, 16); +} + +/** + * @brief Get field rpm from esc_telemetry_29_to_32 message + * + * @return [rpm] RPM (eRPM). + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_rpm(const mavlink_message_t* msg, uint16_t *rpm) +{ + return _MAV_RETURN_uint16_t_array(msg, rpm, 4, 24); +} + +/** + * @brief Get field count from esc_telemetry_29_to_32 message + * + * @return count of telemetry packets received (wraps at 65535). + */ +static inline uint16_t mavlink_msg_esc_telemetry_29_to_32_get_count(const mavlink_message_t* msg, uint16_t *count) +{ + return _MAV_RETURN_uint16_t_array(msg, count, 4, 32); +} + +/** + * @brief Decode a esc_telemetry_29_to_32 message into a struct + * + * @param msg The message to decode + * @param esc_telemetry_29_to_32 C-struct to decode the message contents into + */ +static inline void mavlink_msg_esc_telemetry_29_to_32_decode(const mavlink_message_t* msg, mavlink_esc_telemetry_29_to_32_t* esc_telemetry_29_to_32) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_esc_telemetry_29_to_32_get_voltage(msg, esc_telemetry_29_to_32->voltage); + mavlink_msg_esc_telemetry_29_to_32_get_current(msg, esc_telemetry_29_to_32->current); + mavlink_msg_esc_telemetry_29_to_32_get_totalcurrent(msg, esc_telemetry_29_to_32->totalcurrent); + mavlink_msg_esc_telemetry_29_to_32_get_rpm(msg, esc_telemetry_29_to_32->rpm); + mavlink_msg_esc_telemetry_29_to_32_get_count(msg, esc_telemetry_29_to_32->count); + mavlink_msg_esc_telemetry_29_to_32_get_temperature(msg, esc_telemetry_29_to_32->temperature); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN? msg->len : MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN; + memset(esc_telemetry_29_to_32, 0, MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_LEN); + memcpy(esc_telemetry_29_to_32, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_secure_command.h b/ardupilotmega/mavlink_msg_secure_command.h new file mode 100644 index 000000000..c8c6ae650 --- /dev/null +++ b/ardupilotmega/mavlink_msg_secure_command.h @@ -0,0 +1,418 @@ +#pragma once +// MESSAGE SECURE_COMMAND PACKING + +#define MAVLINK_MSG_ID_SECURE_COMMAND 11004 + + +typedef struct __mavlink_secure_command_t { + uint32_t sequence; /*< Sequence ID for tagging reply.*/ + uint32_t operation; /*< Operation being requested.*/ + uint8_t target_system; /*< System ID.*/ + uint8_t target_component; /*< Component ID.*/ + uint8_t data_length; /*< Data length.*/ + uint8_t sig_length; /*< Signature length.*/ + uint8_t data[220]; /*< Signed data.*/ +} mavlink_secure_command_t; + +#define MAVLINK_MSG_ID_SECURE_COMMAND_LEN 232 +#define MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN 232 +#define MAVLINK_MSG_ID_11004_LEN 232 +#define MAVLINK_MSG_ID_11004_MIN_LEN 232 + +#define MAVLINK_MSG_ID_SECURE_COMMAND_CRC 11 +#define MAVLINK_MSG_ID_11004_CRC 11 + +#define MAVLINK_MSG_SECURE_COMMAND_FIELD_DATA_LEN 220 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND { \ + 11004, \ + "SECURE_COMMAND", \ + 7, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_t, target_component) }, \ + { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_t, sequence) }, \ + { "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_t, operation) }, \ + { "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_secure_command_t, data_length) }, \ + { "sig_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_secure_command_t, sig_length) }, \ + { "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 12, offsetof(mavlink_secure_command_t, data) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND { \ + "SECURE_COMMAND", \ + 7, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_t, target_component) }, \ + { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_t, sequence) }, \ + { "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_t, operation) }, \ + { "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_secure_command_t, data_length) }, \ + { "sig_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_secure_command_t, sig_length) }, \ + { "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 12, offsetof(mavlink_secure_command_t, data) }, \ + } \ +} +#endif + +/** + * @brief Pack a secure_command message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID. + * @param target_component Component ID. + * @param sequence Sequence ID for tagging reply. + * @param operation Operation being requested. + * @param data_length Data length. + * @param sig_length Signature length. + * @param data Signed data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + _mav_put_uint8_t(buf, 10, data_length); + _mav_put_uint8_t(buf, 11, sig_length); + _mav_put_uint8_t_array(buf, 12, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#else + mavlink_secure_command_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.target_system = target_system; + packet.target_component = target_component; + packet.data_length = data_length; + packet.sig_length = sig_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +} + +/** + * @brief Pack a secure_command message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID. + * @param target_component Component ID. + * @param sequence Sequence ID for tagging reply. + * @param operation Operation being requested. + * @param data_length Data length. + * @param sig_length Signature length. + * @param data Signed data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + _mav_put_uint8_t(buf, 10, data_length); + _mav_put_uint8_t(buf, 11, sig_length); + _mav_put_uint8_t_array(buf, 12, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#else + mavlink_secure_command_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.target_system = target_system; + packet.target_component = target_component; + packet.data_length = data_length; + packet.sig_length = sig_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#endif +} + +/** + * @brief Pack a secure_command message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID. + * @param target_component Component ID. + * @param sequence Sequence ID for tagging reply. + * @param operation Operation being requested. + * @param data_length Data length. + * @param sig_length Signature length. + * @param data Signed data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint32_t sequence,uint32_t operation,uint8_t data_length,uint8_t sig_length,const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + _mav_put_uint8_t(buf, 10, data_length); + _mav_put_uint8_t(buf, 11, sig_length); + _mav_put_uint8_t_array(buf, 12, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#else + mavlink_secure_command_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.target_system = target_system; + packet.target_component = target_component; + packet.data_length = data_length; + packet.sig_length = sig_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +} + +/** + * @brief Encode a secure_command struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param secure_command C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command) +{ + return mavlink_msg_secure_command_pack(system_id, component_id, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data); +} + +/** + * @brief Encode a secure_command struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param secure_command C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command) +{ + return mavlink_msg_secure_command_pack_chan(system_id, component_id, chan, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data); +} + +/** + * @brief Encode a secure_command struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param secure_command C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_secure_command_t* secure_command) +{ + return mavlink_msg_secure_command_pack_status(system_id, component_id, _status, msg, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data); +} + +/** + * @brief Send a secure_command message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID. + * @param target_component Component ID. + * @param sequence Sequence ID for tagging reply. + * @param operation Operation being requested. + * @param data_length Data length. + * @param sig_length Signature length. + * @param data Signed data. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_secure_command_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + _mav_put_uint8_t(buf, 10, data_length); + _mav_put_uint8_t(buf, 11, sig_length); + _mav_put_uint8_t_array(buf, 12, data, 220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, buf, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#else + mavlink_secure_command_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.target_system = target_system; + packet.target_component = target_component; + packet.data_length = data_length; + packet.sig_length = sig_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)&packet, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#endif +} + +/** + * @brief Send a secure_command message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_secure_command_send_struct(mavlink_channel_t chan, const mavlink_secure_command_t* secure_command) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_secure_command_send(chan, secure_command->target_system, secure_command->target_component, secure_command->sequence, secure_command->operation, secure_command->data_length, secure_command->sig_length, secure_command->data); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)secure_command, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#endif +} + +#if MAVLINK_MSG_ID_SECURE_COMMAND_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_secure_command_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t sequence, uint32_t operation, uint8_t data_length, uint8_t sig_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + _mav_put_uint8_t(buf, 10, data_length); + _mav_put_uint8_t(buf, 11, sig_length); + _mav_put_uint8_t_array(buf, 12, data, 220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, buf, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#else + mavlink_secure_command_t *packet = (mavlink_secure_command_t *)msgbuf; + packet->sequence = sequence; + packet->operation = operation; + packet->target_system = target_system; + packet->target_component = target_component; + packet->data_length = data_length; + packet->sig_length = sig_length; + mav_array_memcpy(packet->data, data, sizeof(uint8_t)*220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND, (const char *)packet, MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_CRC); +#endif +} +#endif + +#endif + +// MESSAGE SECURE_COMMAND UNPACKING + + +/** + * @brief Get field target_system from secure_command message + * + * @return System ID. + */ +static inline uint8_t mavlink_msg_secure_command_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 8); +} + +/** + * @brief Get field target_component from secure_command message + * + * @return Component ID. + */ +static inline uint8_t mavlink_msg_secure_command_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 9); +} + +/** + * @brief Get field sequence from secure_command message + * + * @return Sequence ID for tagging reply. + */ +static inline uint32_t mavlink_msg_secure_command_get_sequence(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field operation from secure_command message + * + * @return Operation being requested. + */ +static inline uint32_t mavlink_msg_secure_command_get_operation(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 4); +} + +/** + * @brief Get field data_length from secure_command message + * + * @return Data length. + */ +static inline uint8_t mavlink_msg_secure_command_get_data_length(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 10); +} + +/** + * @brief Get field sig_length from secure_command message + * + * @return Signature length. + */ +static inline uint8_t mavlink_msg_secure_command_get_sig_length(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 11); +} + +/** + * @brief Get field data from secure_command message + * + * @return Signed data. + */ +static inline uint16_t mavlink_msg_secure_command_get_data(const mavlink_message_t* msg, uint8_t *data) +{ + return _MAV_RETURN_uint8_t_array(msg, data, 220, 12); +} + +/** + * @brief Decode a secure_command message into a struct + * + * @param msg The message to decode + * @param secure_command C-struct to decode the message contents into + */ +static inline void mavlink_msg_secure_command_decode(const mavlink_message_t* msg, mavlink_secure_command_t* secure_command) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + secure_command->sequence = mavlink_msg_secure_command_get_sequence(msg); + secure_command->operation = mavlink_msg_secure_command_get_operation(msg); + secure_command->target_system = mavlink_msg_secure_command_get_target_system(msg); + secure_command->target_component = mavlink_msg_secure_command_get_target_component(msg); + secure_command->data_length = mavlink_msg_secure_command_get_data_length(msg); + secure_command->sig_length = mavlink_msg_secure_command_get_sig_length(msg); + mavlink_msg_secure_command_get_data(msg, secure_command->data); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_SECURE_COMMAND_LEN? msg->len : MAVLINK_MSG_ID_SECURE_COMMAND_LEN; + memset(secure_command, 0, MAVLINK_MSG_ID_SECURE_COMMAND_LEN); + memcpy(secure_command, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/mavlink_msg_secure_command_reply.h b/ardupilotmega/mavlink_msg_secure_command_reply.h new file mode 100644 index 000000000..4aabf6342 --- /dev/null +++ b/ardupilotmega/mavlink_msg_secure_command_reply.h @@ -0,0 +1,362 @@ +#pragma once +// MESSAGE SECURE_COMMAND_REPLY PACKING + +#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY 11005 + + +typedef struct __mavlink_secure_command_reply_t { + uint32_t sequence; /*< Sequence ID from request.*/ + uint32_t operation; /*< Operation that was requested.*/ + uint8_t result; /*< Result of command.*/ + uint8_t data_length; /*< Data length.*/ + uint8_t data[220]; /*< Reply data.*/ +} mavlink_secure_command_reply_t; + +#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN 230 +#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN 230 +#define MAVLINK_MSG_ID_11005_LEN 230 +#define MAVLINK_MSG_ID_11005_MIN_LEN 230 + +#define MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC 93 +#define MAVLINK_MSG_ID_11005_CRC 93 + +#define MAVLINK_MSG_SECURE_COMMAND_REPLY_FIELD_DATA_LEN 220 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY { \ + 11005, \ + "SECURE_COMMAND_REPLY", \ + 5, \ + { { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_reply_t, sequence) }, \ + { "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_reply_t, operation) }, \ + { "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_reply_t, result) }, \ + { "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_reply_t, data_length) }, \ + { "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 10, offsetof(mavlink_secure_command_reply_t, data) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY { \ + "SECURE_COMMAND_REPLY", \ + 5, \ + { { "sequence", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_secure_command_reply_t, sequence) }, \ + { "operation", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_secure_command_reply_t, operation) }, \ + { "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_secure_command_reply_t, result) }, \ + { "data_length", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_secure_command_reply_t, data_length) }, \ + { "data", NULL, MAVLINK_TYPE_UINT8_T, 220, 10, offsetof(mavlink_secure_command_reply_t, data) }, \ + } \ +} +#endif + +/** + * @brief Pack a secure_command_reply message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param sequence Sequence ID from request. + * @param operation Operation that was requested. + * @param result Result of command. + * @param data_length Data length. + * @param data Reply data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_reply_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, result); + _mav_put_uint8_t(buf, 9, data_length); + _mav_put_uint8_t_array(buf, 10, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#else + mavlink_secure_command_reply_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.result = result; + packet.data_length = data_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +} + +/** + * @brief Pack a secure_command_reply message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param sequence Sequence ID from request. + * @param operation Operation that was requested. + * @param result Result of command. + * @param data_length Data length. + * @param data Reply data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, result); + _mav_put_uint8_t(buf, 9, data_length); + _mav_put_uint8_t_array(buf, 10, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#else + mavlink_secure_command_reply_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.result = result; + packet.data_length = data_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#endif +} + +/** + * @brief Pack a secure_command_reply message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param sequence Sequence ID from request. + * @param operation Operation that was requested. + * @param result Result of command. + * @param data_length Data length. + * @param data Reply data. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_secure_command_reply_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint32_t sequence,uint32_t operation,uint8_t result,uint8_t data_length,const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, result); + _mav_put_uint8_t(buf, 9, data_length); + _mav_put_uint8_t_array(buf, 10, data, 220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#else + mavlink_secure_command_reply_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.result = result; + packet.data_length = data_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SECURE_COMMAND_REPLY; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +} + +/** + * @brief Encode a secure_command_reply struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param secure_command_reply C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_reply_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply) +{ + return mavlink_msg_secure_command_reply_pack(system_id, component_id, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data); +} + +/** + * @brief Encode a secure_command_reply struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param secure_command_reply C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_reply_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply) +{ + return mavlink_msg_secure_command_reply_pack_chan(system_id, component_id, chan, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data); +} + +/** + * @brief Encode a secure_command_reply struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param secure_command_reply C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_secure_command_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_secure_command_reply_t* secure_command_reply) +{ + return mavlink_msg_secure_command_reply_pack_status(system_id, component_id, _status, msg, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data); +} + +/** + * @brief Send a secure_command_reply message + * @param chan MAVLink channel to send the message + * + * @param sequence Sequence ID from request. + * @param operation Operation that was requested. + * @param result Result of command. + * @param data_length Data length. + * @param data Reply data. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_secure_command_reply_send(mavlink_channel_t chan, uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN]; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, result); + _mav_put_uint8_t(buf, 9, data_length); + _mav_put_uint8_t_array(buf, 10, data, 220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#else + mavlink_secure_command_reply_t packet; + packet.sequence = sequence; + packet.operation = operation; + packet.result = result; + packet.data_length = data_length; + mav_array_memcpy(packet.data, data, sizeof(uint8_t)*220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)&packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#endif +} + +/** + * @brief Send a secure_command_reply message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_secure_command_reply_send_struct(mavlink_channel_t chan, const mavlink_secure_command_reply_t* secure_command_reply) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_secure_command_reply_send(chan, secure_command_reply->sequence, secure_command_reply->operation, secure_command_reply->result, secure_command_reply->data_length, secure_command_reply->data); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)secure_command_reply, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#endif +} + +#if MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_secure_command_reply_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t sequence, uint32_t operation, uint8_t result, uint8_t data_length, const uint8_t *data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, sequence); + _mav_put_uint32_t(buf, 4, operation); + _mav_put_uint8_t(buf, 8, result); + _mav_put_uint8_t(buf, 9, data_length); + _mav_put_uint8_t_array(buf, 10, data, 220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, buf, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#else + mavlink_secure_command_reply_t *packet = (mavlink_secure_command_reply_t *)msgbuf; + packet->sequence = sequence; + packet->operation = operation; + packet->result = result; + packet->data_length = data_length; + mav_array_memcpy(packet->data, data, sizeof(uint8_t)*220); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY, (const char *)packet, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_CRC); +#endif +} +#endif + +#endif + +// MESSAGE SECURE_COMMAND_REPLY UNPACKING + + +/** + * @brief Get field sequence from secure_command_reply message + * + * @return Sequence ID from request. + */ +static inline uint32_t mavlink_msg_secure_command_reply_get_sequence(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field operation from secure_command_reply message + * + * @return Operation that was requested. + */ +static inline uint32_t mavlink_msg_secure_command_reply_get_operation(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 4); +} + +/** + * @brief Get field result from secure_command_reply message + * + * @return Result of command. + */ +static inline uint8_t mavlink_msg_secure_command_reply_get_result(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 8); +} + +/** + * @brief Get field data_length from secure_command_reply message + * + * @return Data length. + */ +static inline uint8_t mavlink_msg_secure_command_reply_get_data_length(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 9); +} + +/** + * @brief Get field data from secure_command_reply message + * + * @return Reply data. + */ +static inline uint16_t mavlink_msg_secure_command_reply_get_data(const mavlink_message_t* msg, uint8_t *data) +{ + return _MAV_RETURN_uint8_t_array(msg, data, 220, 10); +} + +/** + * @brief Decode a secure_command_reply message into a struct + * + * @param msg The message to decode + * @param secure_command_reply C-struct to decode the message contents into + */ +static inline void mavlink_msg_secure_command_reply_decode(const mavlink_message_t* msg, mavlink_secure_command_reply_t* secure_command_reply) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + secure_command_reply->sequence = mavlink_msg_secure_command_reply_get_sequence(msg); + secure_command_reply->operation = mavlink_msg_secure_command_reply_get_operation(msg); + secure_command_reply->result = mavlink_msg_secure_command_reply_get_result(msg); + secure_command_reply->data_length = mavlink_msg_secure_command_reply_get_data_length(msg); + mavlink_msg_secure_command_reply_get_data(msg, secure_command_reply->data); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN? msg->len : MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN; + memset(secure_command_reply, 0, MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_LEN); + memcpy(secure_command_reply, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/ardupilotmega/testsuite.h b/ardupilotmega/testsuite.h index 486fee369..21cd64c42 100644 --- a/ardupilotmega/testsuite.h +++ b/ardupilotmega/testsuite.h @@ -15,8 +15,10 @@ extern "C" { static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_uAvionix(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_icarous(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_loweheiser(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_cubepilot(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_csAirLink(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_suind(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_ardupilotmega(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) @@ -24,8 +26,10 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me mavlink_test_common(system_id, component_id, last_msg); mavlink_test_uAvionix(system_id, component_id, last_msg); mavlink_test_icarous(system_id, component_id, last_msg); + mavlink_test_loweheiser(system_id, component_id, last_msg); mavlink_test_cubepilot(system_id, component_id, last_msg); mavlink_test_csAirLink(system_id, component_id, last_msg); + mavlink_test_suind(system_id, component_id, last_msg); mavlink_test_ardupilotmega(system_id, component_id, last_msg); } #endif @@ -33,8 +37,10 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me #include "../common/testsuite.h" #include "../uAvionix/testsuite.h" #include "../icarous/testsuite.h" +#include "../loweheiser/testsuite.h" #include "../cubepilot/testsuite.h" #include "../csAirLink/testsuite.h" +#include "../suind/testsuite.h" static void mavlink_test_sensor_offsets(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) @@ -3371,6 +3377,134 @@ static void mavlink_test_device_op_write_reply(uint8_t system_id, uint8_t compon #endif } +static void mavlink_test_secure_command(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SECURE_COMMAND >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_secure_command_t packet_in = { + 963497464,963497672,29,96,163,230,{ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4 } + }; + mavlink_secure_command_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.sequence = packet_in.sequence; + packet1.operation = packet_in.operation; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + packet1.data_length = packet_in.data_length; + packet1.sig_length = packet_in.sig_length; + + mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*220); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SECURE_COMMAND_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_secure_command_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.operation , packet1.data_length , packet1.sig_length , packet1.data ); + mavlink_msg_secure_command_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.operation , packet1.data_length , packet1.sig_length , packet1.data ); + mavlink_msg_secure_command_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SECURE_COMMAND_REPLY >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_secure_command_reply_t packet_in = { + 963497464,963497672,29,96,{ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126 } + }; + mavlink_secure_command_reply_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.sequence = packet_in.sequence; + packet1.operation = packet_in.operation; + packet1.result = packet_in.result; + packet1.data_length = packet_in.data_length; + + mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*220); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SECURE_COMMAND_REPLY_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_reply_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_secure_command_reply_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_reply_pack(system_id, component_id, &msg , packet1.sequence , packet1.operation , packet1.result , packet1.data_length , packet1.data ); + mavlink_msg_secure_command_reply_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_secure_command_reply_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sequence , packet1.operation , packet1.result , packet1.data_length , packet1.data ); + mavlink_msg_secure_command_reply_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16 >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_esc_telemetry_13_to_16_t packet_in = { + { 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 } + }; + mavlink_esc_telemetry_13_to_16_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_13_TO_16_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_13_to_16_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_esc_telemetry_13_to_16_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_13_to_16_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_13_to_16_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_13_to_16_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_13_to_16_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20 >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_esc_telemetry_17_to_20_t packet_in = { + { 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 } + }; + mavlink_esc_telemetry_17_to_20_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_17_TO_20_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_17_to_20_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_esc_telemetry_17_to_20_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_17_to_20_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_17_to_20_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_17_to_20_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_17_to_20_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24 >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_esc_telemetry_21_to_24_t packet_in = { + { 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 } + }; + mavlink_esc_telemetry_21_to_24_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_21_TO_24_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_21_to_24_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_esc_telemetry_21_to_24_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_21_to_24_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_21_to_24_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_21_to_24_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_21_to_24_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28 >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_esc_telemetry_25_to_28_t packet_in = { + { 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 } + }; + mavlink_esc_telemetry_25_to_28_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_25_TO_28_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_25_to_28_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_esc_telemetry_25_to_28_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_25_to_28_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_25_to_28_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_25_to_28_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_25_to_28_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32 >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_esc_telemetry_29_to_32_t packet_in = { + { 17235, 17236, 17237, 17238 },{ 17651, 17652, 17653, 17654 },{ 18067, 18068, 18069, 18070 },{ 18483, 18484, 18485, 18486 },{ 18899, 18900, 18901, 18902 },{ 125, 126, 127, 128 } + }; + mavlink_esc_telemetry_29_to_32_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.current, packet_in.current, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.totalcurrent, packet_in.totalcurrent, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.count, packet_in.count, sizeof(uint16_t)*4); + mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(uint8_t)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_TELEMETRY_29_TO_32_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_29_to_32_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_esc_telemetry_29_to_32_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_29_to_32_pack(system_id, component_id, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_29_to_32_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_esc_telemetry_29_to_32_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.temperature , packet1.voltage , packet1.current , packet1.totalcurrent , packet1.rpm , packet1.count ); + mavlink_msg_esc_telemetry_29_to_32_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; i 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ - MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */ - MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ - MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ - MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ - MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ - MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ - MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ - MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ - MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ - MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ - MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ - MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ - MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ - MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ - MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ - MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ - MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - |Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area. - |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area. - |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined. - |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ - MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ - MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_ENUM_END=43004, /* | */ -} MAV_CMD; -#endif - /** @brief A data stream is not a fixed set of messages, but rather a recommendation to the autopilot software. Individual autopilots may or may not obey the recommended messages. */ @@ -980,7 +504,7 @@ typedef enum MAV_DATA_STREAM MAV_DATA_STREAM_EXTENDED_STATUS=2, /* Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS | */ MAV_DATA_STREAM_RC_CHANNELS=3, /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */ MAV_DATA_STREAM_RAW_CONTROLLER=4, /* Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. | */ - MAV_DATA_STREAM_POSITION=6, /* Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages. | */ + MAV_DATA_STREAM_POSITION=6, /* Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages. | */ MAV_DATA_STREAM_EXTRA1=10, /* Dependent on the autopilot | */ MAV_DATA_STREAM_EXTRA2=11, /* Dependent on the autopilot | */ MAV_DATA_STREAM_EXTRA3=12, /* Dependent on the autopilot | */ @@ -1053,12 +577,10 @@ typedef enum MAV_RESULT MAV_RESULT_DENIED=2, /* Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work. | */ MAV_RESULT_UNSUPPORTED=3, /* Command is not supported (unknown). | */ MAV_RESULT_FAILED=4, /* Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc. | */ - MAV_RESULT_IN_PROGRESS=5, /* Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation. | */ - MAV_RESULT_CANCELLED=6, /* Command has been cancelled (as a result of receiving a COMMAND_CANCEL message). | */ + MAV_RESULT_IN_PROGRESS=5, /* Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation. There is no need for the sender to retry the command, but if done during execution, the component will return MAV_RESULT_IN_PROGRESS with an updated progress. | */ MAV_RESULT_COMMAND_LONG_ONLY=7, /* Command is only accepted when sent as a COMMAND_LONG. | */ MAV_RESULT_COMMAND_INT_ONLY=8, /* Command is only accepted when sent as a COMMAND_INT. | */ - MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME=9, /* Command is invalid because a frame is required and the specified frame is not supported. | */ - MAV_RESULT_ENUM_END=10, /* | */ + MAV_RESULT_ENUM_END=9, /* | */ } MAV_RESULT; #endif @@ -1227,33 +749,24 @@ typedef enum MAV_SENSOR_ORIENTATION #define HAVE_ENUM_MAV_PROTOCOL_CAPABILITY typedef enum MAV_PROTOCOL_CAPABILITY { - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT=1, /* Autopilot supports the MISSION_ITEM float message type. - Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead. - | */ + MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT=1, /* Autopilot supports MISSION float message type. | */ MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT=2, /* Autopilot supports the new param float message type. | */ - MAV_PROTOCOL_CAPABILITY_MISSION_INT=4, /* Autopilot supports MISSION_ITEM_INT scaled integer message type. - Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated). - | */ + MAV_PROTOCOL_CAPABILITY_MISSION_INT=4, /* Autopilot supports MISSION_ITEM_INT scaled integer message type. | */ MAV_PROTOCOL_CAPABILITY_COMMAND_INT=8, /* Autopilot supports COMMAND_INT scaled integer message type. | */ - MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE=16, /* Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. - Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported. - | */ + MAV_PROTOCOL_CAPABILITY_PARAM_UNION=16, /* Autopilot supports the new param union message type. | */ MAV_PROTOCOL_CAPABILITY_FTP=32, /* Autopilot supports the File Transfer Protocol v1: https://mavlink.io/en/services/ftp.html. | */ MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET=64, /* Autopilot supports commanding attitude offboard. | */ MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED=128, /* Autopilot supports commanding position and velocity targets in local NED frame. | */ MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT=256, /* Autopilot supports commanding position and velocity targets in global scaled integers. | */ MAV_PROTOCOL_CAPABILITY_TERRAIN=512, /* Autopilot supports terrain protocol / data handling. | */ - MAV_PROTOCOL_CAPABILITY_RESERVED3=1024, /* Reserved for future use. | */ + MAV_PROTOCOL_CAPABILITY_SET_ACTUATOR_TARGET=1024, /* Autopilot supports direct actuator control. | */ MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION=2048, /* Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination). | */ MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION=4096, /* Autopilot supports onboard compass calibration. | */ MAV_PROTOCOL_CAPABILITY_MAVLINK2=8192, /* Autopilot supports MAVLink version 2. | */ MAV_PROTOCOL_CAPABILITY_MISSION_FENCE=16384, /* Autopilot supports mission fence protocol. | */ MAV_PROTOCOL_CAPABILITY_MISSION_RALLY=32768, /* Autopilot supports mission rally point protocol. | */ - MAV_PROTOCOL_CAPABILITY_RESERVED2=65536, /* Reserved for future use. | */ - MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST=131072, /* Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. - Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported. - | */ - MAV_PROTOCOL_CAPABILITY_ENUM_END=131073, /* | */ + MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION=65536, /* Autopilot supports the flight information protocol. | */ + MAV_PROTOCOL_CAPABILITY_ENUM_END=65537, /* | */ } MAV_PROTOCOL_CAPABILITY; #endif @@ -1311,7 +824,7 @@ typedef enum MAV_BATTERY_FUNCTION MAV_BATTERY_FUNCTION_ALL=1, /* Battery supports all flight systems | */ MAV_BATTERY_FUNCTION_PROPULSION=2, /* Battery for the propulsion system | */ MAV_BATTERY_FUNCTION_AVIONICS=3, /* Avionics battery | */ - MAV_BATTERY_FUNCTION_PAYLOAD=4, /* Payload battery | */ + MAV_BATTERY_TYPE_PAYLOAD=4, /* Payload battery | */ MAV_BATTERY_FUNCTION_ENUM_END=5, /* | */ } MAV_BATTERY_FUNCTION; #endif @@ -1703,23 +1216,11 @@ typedef enum VIDEO_STREAM_TYPE VIDEO_STREAM_TYPE_RTSP=0, /* Stream is RTSP | */ VIDEO_STREAM_TYPE_RTPUDP=1, /* Stream is RTP UDP (URI gives the port number) | */ VIDEO_STREAM_TYPE_TCP_MPEG=2, /* Stream is MPEG on TCP | */ - VIDEO_STREAM_TYPE_MPEG_TS=3, /* Stream is MPEG TS (URI gives the port number) | */ + VIDEO_STREAM_TYPE_MPEG_TS_H264=3, /* Stream is h.264 on MPEG TS (URI gives the port number) | */ VIDEO_STREAM_TYPE_ENUM_END=4, /* | */ } VIDEO_STREAM_TYPE; #endif -/** @brief Video stream encodings */ -#ifndef HAVE_ENUM_VIDEO_STREAM_ENCODING -#define HAVE_ENUM_VIDEO_STREAM_ENCODING -typedef enum VIDEO_STREAM_ENCODING -{ - VIDEO_STREAM_ENCODING_UNKNOWN=0, /* Stream encoding is unknown | */ - VIDEO_STREAM_ENCODING_H264=1, /* Stream encoding is H.264 | */ - VIDEO_STREAM_ENCODING_H265=2, /* Stream encoding is H.265 | */ - VIDEO_STREAM_ENCODING_ENUM_END=3, /* | */ -} VIDEO_STREAM_ENCODING; -#endif - /** @brief Camera tracking status flags */ #ifndef HAVE_ENUM_CAMERA_TRACKING_STATUS_FLAGS #define HAVE_ENUM_CAMERA_TRACKING_STATUS_FLAGS @@ -1766,8 +1267,7 @@ typedef enum CAMERA_ZOOM_TYPE ZOOM_TYPE_CONTINUOUS=1, /* Continuous zoom up/down until stopped (-1 for wide, 1 for tele, 0 to stop zooming) | */ ZOOM_TYPE_RANGE=2, /* Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0) | */ ZOOM_TYPE_FOCAL_LENGTH=3, /* Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera) | */ - ZOOM_TYPE_HORIZONTAL_FOV=4, /* Zoom value as horizontal field of view in degrees. | */ - CAMERA_ZOOM_TYPE_ENUM_END=5, /* | */ + CAMERA_ZOOM_TYPE_ENUM_END=4, /* | */ } CAMERA_ZOOM_TYPE; #endif @@ -1808,7 +1308,7 @@ typedef enum PARAM_ACK PARAM_ACK_ACCEPTED=0, /* Parameter value ACCEPTED and SET | */ PARAM_ACK_VALUE_UNSUPPORTED=1, /* Parameter value UNKNOWN/UNSUPPORTED | */ PARAM_ACK_FAILED=2, /* Parameter failed to set | */ - PARAM_ACK_IN_PROGRESS=3, /* Parameter value received but not yet set/accepted. A subsequent PARAM_ACK_TRANSACTION or PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent. | */ + PARAM_ACK_IN_PROGRESS=3, /* Parameter value received but not yet set/accepted. A subsequent PARAM_ACK_TRANSACTION or PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating taht the the parameter was recieved and does not need to be resent. | */ PARAM_ACK_ENUM_END=4, /* | */ } PARAM_ACK; #endif @@ -1851,6 +1351,16 @@ typedef enum RC_TYPE } RC_TYPE; #endif +/** @brief Engine control options */ +#ifndef HAVE_ENUM_ENGINE_CONTROL_OPTIONS +#define HAVE_ENUM_ENGINE_CONTROL_OPTIONS +typedef enum ENGINE_CONTROL_OPTIONS +{ + ENGINE_CONTROL_OPTIONS_ALLOW_START_WHILE_DISARMED=1, /* Allow starting the engine once while disarmed | */ + ENGINE_CONTROL_OPTIONS_ENUM_END=2, /* | */ +} ENGINE_CONTROL_OPTIONS; +#endif + /** @brief Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration. */ #ifndef HAVE_ENUM_POSITION_TARGET_TYPEMASK #define HAVE_ENUM_POSITION_TARGET_TYPEMASK @@ -1880,7 +1390,6 @@ typedef enum ATTITUDE_TARGET_TYPEMASK ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE=1, /* Ignore body roll rate | */ ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE=2, /* Ignore body pitch rate | */ ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE=4, /* Ignore body yaw rate | */ - ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET=32, /* Use 3D body thrust setpoint instead of throttle | */ ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE=64, /* Ignore throttle | */ ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE=128, /* Ignore attitude | */ ATTITUDE_TARGET_TYPEMASK_ENUM_END=129, /* | */ @@ -1918,55 +1427,6 @@ typedef enum UTM_DATA_AVAIL_FLAGS } UTM_DATA_AVAIL_FLAGS; #endif -/** @brief These flags encode the cellular network status */ -#ifndef HAVE_ENUM_CELLULAR_STATUS_FLAG -#define HAVE_ENUM_CELLULAR_STATUS_FLAG -typedef enum CELLULAR_STATUS_FLAG -{ - CELLULAR_STATUS_FLAG_UNKNOWN=0, /* State unknown or not reportable. | */ - CELLULAR_STATUS_FLAG_FAILED=1, /* Modem is unusable | */ - CELLULAR_STATUS_FLAG_INITIALIZING=2, /* Modem is being initialized | */ - CELLULAR_STATUS_FLAG_LOCKED=3, /* Modem is locked | */ - CELLULAR_STATUS_FLAG_DISABLED=4, /* Modem is not enabled and is powered down | */ - CELLULAR_STATUS_FLAG_DISABLING=5, /* Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state | */ - CELLULAR_STATUS_FLAG_ENABLING=6, /* Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state | */ - CELLULAR_STATUS_FLAG_ENABLED=7, /* Modem is enabled and powered on but not registered with a network provider and not available for data connections | */ - CELLULAR_STATUS_FLAG_SEARCHING=8, /* Modem is searching for a network provider to register | */ - CELLULAR_STATUS_FLAG_REGISTERED=9, /* Modem is registered with a network provider, and data connections and messaging may be available for use | */ - CELLULAR_STATUS_FLAG_DISCONNECTING=10, /* Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated | */ - CELLULAR_STATUS_FLAG_CONNECTING=11, /* Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered | */ - CELLULAR_STATUS_FLAG_CONNECTED=12, /* One or more packet data bearers is active and connected | */ - CELLULAR_STATUS_FLAG_ENUM_END=13, /* | */ -} CELLULAR_STATUS_FLAG; -#endif - -/** @brief These flags are used to diagnose the failure state of CELLULAR_STATUS */ -#ifndef HAVE_ENUM_CELLULAR_NETWORK_FAILED_REASON -#define HAVE_ENUM_CELLULAR_NETWORK_FAILED_REASON -typedef enum CELLULAR_NETWORK_FAILED_REASON -{ - CELLULAR_NETWORK_FAILED_REASON_NONE=0, /* No error | */ - CELLULAR_NETWORK_FAILED_REASON_UNKNOWN=1, /* Error state is unknown | */ - CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING=2, /* SIM is required for the modem but missing | */ - CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR=3, /* SIM is available, but not usable for connection | */ - CELLULAR_NETWORK_FAILED_REASON_ENUM_END=4, /* | */ -} CELLULAR_NETWORK_FAILED_REASON; -#endif - -/** @brief Cellular network radio type */ -#ifndef HAVE_ENUM_CELLULAR_NETWORK_RADIO_TYPE -#define HAVE_ENUM_CELLULAR_NETWORK_RADIO_TYPE -typedef enum CELLULAR_NETWORK_RADIO_TYPE -{ - CELLULAR_NETWORK_RADIO_TYPE_NONE=0, /* | */ - CELLULAR_NETWORK_RADIO_TYPE_GSM=1, /* | */ - CELLULAR_NETWORK_RADIO_TYPE_CDMA=2, /* | */ - CELLULAR_NETWORK_RADIO_TYPE_WCDMA=3, /* | */ - CELLULAR_NETWORK_RADIO_TYPE_LTE=4, /* | */ - CELLULAR_NETWORK_RADIO_TYPE_ENUM_END=5, /* | */ -} CELLULAR_NETWORK_RADIO_TYPE; -#endif - /** @brief Precision land modes (used in MAV_CMD_NAV_LAND). */ #ifndef HAVE_ENUM_PRECISION_LAND_MODE #define HAVE_ENUM_PRECISION_LAND_MODE @@ -2172,7 +1632,7 @@ typedef enum MAV_ODID_AUTH_TYPE #define HAVE_ENUM_MAV_ODID_DESC_TYPE typedef enum MAV_ODID_DESC_TYPE { - MAV_ODID_DESC_TYPE_TEXT=0, /* Optional free-form text description of the purpose of the flight. | */ + MAV_ODID_DESC_TYPE_TEXT=0, /* Free-form text description of the purpose of the flight. | */ MAV_ODID_DESC_TYPE_EMERGENCY=1, /* Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY. | */ MAV_ODID_DESC_TYPE_EXTENDED_STATUS=2, /* Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY. | */ MAV_ODID_DESC_TYPE_ENUM_END=3, /* | */ @@ -2184,9 +1644,9 @@ typedef enum MAV_ODID_DESC_TYPE #define HAVE_ENUM_MAV_ODID_OPERATOR_LOCATION_TYPE typedef enum MAV_ODID_OPERATOR_LOCATION_TYPE { - MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF=0, /* The location/altitude of the operator is the same as the take-off location. | */ - MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS=1, /* The location/altitude of the operator is dynamic. E.g. based on live GNSS data. | */ - MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED=2, /* The location/altitude of the operator are fixed values. | */ + MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF=0, /* The location of the operator is the same as the take-off location. | */ + MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS=1, /* The location of the operator is based on live GNSS data. | */ + MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED=2, /* The location of the operator is a fixed location. | */ MAV_ODID_OPERATOR_LOCATION_TYPE_ENUM_END=3, /* | */ } MAV_ODID_OPERATOR_LOCATION_TYPE; #endif @@ -2253,17 +1713,6 @@ typedef enum MAV_ODID_ARM_STATUS } MAV_ODID_ARM_STATUS; #endif -/** @brief Tune formats (used for vehicle buzzer/tone generation). */ -#ifndef HAVE_ENUM_TUNE_FORMAT -#define HAVE_ENUM_TUNE_FORMAT -typedef enum TUNE_FORMAT -{ - TUNE_FORMAT_QBASIC1_1=1, /* Format is QBasic 1.1 Play: https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm. | */ - TUNE_FORMAT_MML_MODERN=2, /* Format is Modern Music Markup Language (MML): https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML. | */ - TUNE_FORMAT_ENUM_END=3, /* | */ -} TUNE_FORMAT; -#endif - /** @brief Type of AIS vessel, enum duplicated from AIS standard, https://gpsd.gitlab.io/gpsd/AIVDM.html */ #ifndef HAVE_ENUM_AIS_TYPE #define HAVE_ENUM_AIS_TYPE @@ -2332,12 +1781,12 @@ typedef enum AIS_TYPE AIS_TYPE_PASSENGER=60, /* | */ AIS_TYPE_PASSENGER_HAZARDOUS_A=61, /* | */ AIS_TYPE_PASSENGER_HAZARDOUS_B=62, /* | */ - AIS_TYPE_PASSENGER_HAZARDOUS_C=63, /* | */ + AIS_TYPE_AIS_TYPE_PASSENGER_HAZARDOUS_C=63, /* | */ AIS_TYPE_PASSENGER_HAZARDOUS_D=64, /* | */ AIS_TYPE_PASSENGER_RESERVED_1=65, /* | */ AIS_TYPE_PASSENGER_RESERVED_2=66, /* | */ AIS_TYPE_PASSENGER_RESERVED_3=67, /* | */ - AIS_TYPE_PASSENGER_RESERVED_4=68, /* | */ + AIS_TYPE_AIS_TYPE_PASSENGER_RESERVED_4=68, /* | */ AIS_TYPE_PASSENGER_UNKNOWN=69, /* | */ AIS_TYPE_CARGO=70, /* | */ AIS_TYPE_CARGO_HAZARDOUS_A=71, /* | */ @@ -2420,81 +1869,16 @@ typedef enum AIS_FLAGS } AIS_FLAGS; #endif -/** @brief List of possible units where failures can be injected. */ -#ifndef HAVE_ENUM_FAILURE_UNIT -#define HAVE_ENUM_FAILURE_UNIT -typedef enum FAILURE_UNIT -{ - FAILURE_UNIT_SENSOR_GYRO=0, /* | */ - FAILURE_UNIT_SENSOR_ACCEL=1, /* | */ - FAILURE_UNIT_SENSOR_MAG=2, /* | */ - FAILURE_UNIT_SENSOR_BARO=3, /* | */ - FAILURE_UNIT_SENSOR_GPS=4, /* | */ - FAILURE_UNIT_SENSOR_OPTICAL_FLOW=5, /* | */ - FAILURE_UNIT_SENSOR_VIO=6, /* | */ - FAILURE_UNIT_SENSOR_DISTANCE_SENSOR=7, /* | */ - FAILURE_UNIT_SENSOR_AIRSPEED=8, /* | */ - FAILURE_UNIT_SYSTEM_BATTERY=100, /* | */ - FAILURE_UNIT_SYSTEM_MOTOR=101, /* | */ - FAILURE_UNIT_SYSTEM_SERVO=102, /* | */ - FAILURE_UNIT_SYSTEM_AVOIDANCE=103, /* | */ - FAILURE_UNIT_SYSTEM_RC_SIGNAL=104, /* | */ - FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL=105, /* | */ - FAILURE_UNIT_ENUM_END=106, /* | */ -} FAILURE_UNIT; -#endif - -/** @brief List of possible failure type to inject. */ -#ifndef HAVE_ENUM_FAILURE_TYPE -#define HAVE_ENUM_FAILURE_TYPE -typedef enum FAILURE_TYPE -{ - FAILURE_TYPE_OK=0, /* No failure injected, used to reset a previous failure. | */ - FAILURE_TYPE_OFF=1, /* Sets unit off, so completely non-responsive. | */ - FAILURE_TYPE_STUCK=2, /* Unit is stuck e.g. keeps reporting the same value. | */ - FAILURE_TYPE_GARBAGE=3, /* Unit is reporting complete garbage. | */ - FAILURE_TYPE_WRONG=4, /* Unit is consistently wrong. | */ - FAILURE_TYPE_SLOW=5, /* Unit is slow, so e.g. reporting at slower than expected rate. | */ - FAILURE_TYPE_DELAYED=6, /* Data of unit is delayed in time. | */ - FAILURE_TYPE_INTERMITTENT=7, /* Unit is sometimes working, sometimes not. | */ - FAILURE_TYPE_ENUM_END=8, /* | */ -} FAILURE_TYPE; -#endif - -/** @brief */ -#ifndef HAVE_ENUM_NAV_VTOL_LAND_OPTIONS -#define HAVE_ENUM_NAV_VTOL_LAND_OPTIONS -typedef enum NAV_VTOL_LAND_OPTIONS -{ - NAV_VTOL_LAND_OPTIONS_DEFAULT=0, /* Default autopilot landing behaviour. | */ - NAV_VTOL_LAND_OPTIONS_FW_DESCENT=1, /* Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground. - The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.). - | */ - NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT=2, /* Land in multicopter mode on reaching the landing coordinates (the whole landing is by "hover descent"). | */ - NAV_VTOL_LAND_OPTIONS_ENUM_END=3, /* | */ -} NAV_VTOL_LAND_OPTIONS; -#endif - /** @brief Winch status flags used in WINCH_STATUS */ #ifndef HAVE_ENUM_MAV_WINCH_STATUS_FLAG #define HAVE_ENUM_MAV_WINCH_STATUS_FLAG typedef enum MAV_WINCH_STATUS_FLAG { MAV_WINCH_STATUS_HEALTHY=1, /* Winch is healthy | */ - MAV_WINCH_STATUS_FULLY_RETRACTED=2, /* Winch line is fully retracted | */ + MAV_WINCH_STATUS_FULLY_RETRACTED=2, /* Winch thread is fully retracted | */ MAV_WINCH_STATUS_MOVING=4, /* Winch motor is moving | */ - MAV_WINCH_STATUS_CLUTCH_ENGAGED=8, /* Winch clutch is engaged allowing motor to move freely. | */ - MAV_WINCH_STATUS_LOCKED=16, /* Winch is locked by locking mechanism. | */ - MAV_WINCH_STATUS_DROPPING=32, /* Winch is gravity dropping payload. | */ - MAV_WINCH_STATUS_ARRESTING=64, /* Winch is arresting payload descent. | */ - MAV_WINCH_STATUS_GROUND_SENSE=128, /* Winch is using torque measurements to sense the ground. | */ - MAV_WINCH_STATUS_RETRACTING=256, /* Winch is returning to the fully retracted position. | */ - MAV_WINCH_STATUS_REDELIVER=512, /* Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING. | */ - MAV_WINCH_STATUS_ABANDON_LINE=1024, /* Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold. | */ - MAV_WINCH_STATUS_LOCKING=2048, /* Winch is engaging the locking mechanism. | */ - MAV_WINCH_STATUS_LOAD_LINE=4096, /* Winch is spooling on line. | */ - MAV_WINCH_STATUS_LOAD_PAYLOAD=8192, /* Winch is loading a payload. | */ - MAV_WINCH_STATUS_FLAG_ENUM_END=8193, /* | */ + MAV_WINCH_STATUS_CLUTCH_ENGAGED=8, /* Winch clutch is engaged allowing motor to move freely | */ + MAV_WINCH_STATUS_FLAG_ENUM_END=9, /* | */ } MAV_WINCH_STATUS_FLAG; #endif @@ -2515,74 +1899,6 @@ typedef enum MAG_CAL_STATUS } MAG_CAL_STATUS; #endif -/** @brief Reason for an event error response. */ -#ifndef HAVE_ENUM_MAV_EVENT_ERROR_REASON -#define HAVE_ENUM_MAV_EVENT_ERROR_REASON -typedef enum MAV_EVENT_ERROR_REASON -{ - MAV_EVENT_ERROR_REASON_UNAVAILABLE=0, /* The requested event is not available (anymore). | */ - MAV_EVENT_ERROR_REASON_ENUM_END=1, /* | */ -} MAV_EVENT_ERROR_REASON; -#endif - -/** @brief Flags for CURRENT_EVENT_SEQUENCE. */ -#ifndef HAVE_ENUM_MAV_EVENT_CURRENT_SEQUENCE_FLAGS -#define HAVE_ENUM_MAV_EVENT_CURRENT_SEQUENCE_FLAGS -typedef enum MAV_EVENT_CURRENT_SEQUENCE_FLAGS -{ - MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET=1, /* A sequence reset has happened (e.g. vehicle reboot). | */ - MAV_EVENT_CURRENT_SEQUENCE_FLAGS_ENUM_END=2, /* | */ -} MAV_EVENT_CURRENT_SEQUENCE_FLAGS; -#endif - -/** @brief Flags in the HIL_SENSOR message indicate which fields have updated since the last message */ -#ifndef HAVE_ENUM_HIL_SENSOR_UPDATED_FLAGS -#define HAVE_ENUM_HIL_SENSOR_UPDATED_FLAGS -typedef enum HIL_SENSOR_UPDATED_FLAGS -{ - HIL_SENSOR_UPDATED_NONE=0, /* None of the fields in HIL_SENSOR have been updated | */ - HIL_SENSOR_UPDATED_XACC=1, /* The value in the xacc field has been updated | */ - HIL_SENSOR_UPDATED_YACC=2, /* The value in the yacc field has been updated | */ - HIL_SENSOR_UPDATED_ZACC=4, /* The value in the zacc field has been updated | */ - HIL_SENSOR_UPDATED_XGYRO=8, /* The value in the xgyro field has been updated | */ - HIL_SENSOR_UPDATED_YGYRO=16, /* The value in the ygyro field has been updated | */ - HIL_SENSOR_UPDATED_ZGYRO=32, /* The value in the zgyro field has been updated | */ - HIL_SENSOR_UPDATED_XMAG=64, /* The value in the xmag field has been updated | */ - HIL_SENSOR_UPDATED_YMAG=128, /* The value in the ymag field has been updated | */ - HIL_SENSOR_UPDATED_ZMAG=256, /* The value in the zmag field has been updated | */ - HIL_SENSOR_UPDATED_ABS_PRESSURE=512, /* The value in the abs_pressure field has been updated | */ - HIL_SENSOR_UPDATED_DIFF_PRESSURE=1024, /* The value in the diff_pressure field has been updated | */ - HIL_SENSOR_UPDATED_PRESSURE_ALT=2048, /* The value in the pressure_alt field has been updated | */ - HIL_SENSOR_UPDATED_TEMPERATURE=4096, /* The value in the temperature field has been updated | */ - HIL_SENSOR_UPDATED_RESET=2147483648, /* Full reset of attitude/position/velocities/etc was performed in sim (Bit 31). | */ - HIL_SENSOR_UPDATED_FLAGS_ENUM_END=2147483649, /* | */ -} HIL_SENSOR_UPDATED_FLAGS; -#endif - -/** @brief Flags in the HIGHRES_IMU message indicate which fields have updated since the last message */ -#ifndef HAVE_ENUM_HIGHRES_IMU_UPDATED_FLAGS -#define HAVE_ENUM_HIGHRES_IMU_UPDATED_FLAGS -typedef enum HIGHRES_IMU_UPDATED_FLAGS -{ - HIGHRES_IMU_UPDATED_NONE=0, /* None of the fields in HIGHRES_IMU have been updated | */ - HIGHRES_IMU_UPDATED_XACC=1, /* The value in the xacc field has been updated | */ - HIGHRES_IMU_UPDATED_YACC=2, /* The value in the yacc field has been updated | */ - HIGHRES_IMU_UPDATED_ZACC=4, /* The value in the zacc field has been updated since | */ - HIGHRES_IMU_UPDATED_XGYRO=8, /* The value in the xgyro field has been updated | */ - HIGHRES_IMU_UPDATED_YGYRO=16, /* The value in the ygyro field has been updated | */ - HIGHRES_IMU_UPDATED_ZGYRO=32, /* The value in the zgyro field has been updated | */ - HIGHRES_IMU_UPDATED_XMAG=64, /* The value in the xmag field has been updated | */ - HIGHRES_IMU_UPDATED_YMAG=128, /* The value in the ymag field has been updated | */ - HIGHRES_IMU_UPDATED_ZMAG=256, /* The value in the zmag field has been updated | */ - HIGHRES_IMU_UPDATED_ABS_PRESSURE=512, /* The value in the abs_pressure field has been updated | */ - HIGHRES_IMU_UPDATED_DIFF_PRESSURE=1024, /* The value in the diff_pressure field has been updated | */ - HIGHRES_IMU_UPDATED_PRESSURE_ALT=2048, /* The value in the pressure_alt field has been updated | */ - HIGHRES_IMU_UPDATED_TEMPERATURE=4096, /* The value in the temperature field has been updated | */ - HIGHRES_IMU_UPDATED_ALL=65535, /* All fields in HIGHRES_IMU have been updated. | */ - HIGHRES_IMU_UPDATED_FLAGS_ENUM_END=65536, /* | */ -} HIGHRES_IMU_UPDATED_FLAGS; -#endif - /** @brief */ #ifndef HAVE_ENUM_CAN_FILTER_OP #define HAVE_ENUM_CAN_FILTER_OP @@ -2595,52 +1911,16 @@ typedef enum CAN_FILTER_OP } CAN_FILTER_OP; #endif -/** @brief MAV FTP error codes (https://mavlink.io/en/services/ftp.html) */ -#ifndef HAVE_ENUM_MAV_FTP_ERR -#define HAVE_ENUM_MAV_FTP_ERR -typedef enum MAV_FTP_ERR -{ - MAV_FTP_ERR_NONE=0, /* None: No error | */ - MAV_FTP_ERR_FAIL=1, /* Fail: Unknown failure | */ - MAV_FTP_ERR_FAILERRNO=2, /* FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. - This is a file-system error number understood by the server operating system. | */ - MAV_FTP_ERR_INVALIDDATASIZE=3, /* InvalidDataSize: Payload size is invalid | */ - MAV_FTP_ERR_INVALIDSESSION=4, /* InvalidSession: Session is not currently open | */ - MAV_FTP_ERR_NOSESSIONSAVAILABLE=5, /* NoSessionsAvailable: All available sessions are already in use | */ - MAV_FTP_ERR_EOF=6, /* EOF: Offset past end of file for ListDirectory and ReadFile commands | */ - MAV_FTP_ERR_UNKNOWNCOMMAND=7, /* UnknownCommand: Unknown command / opcode | */ - MAV_FTP_ERR_FILEEXISTS=8, /* FileExists: File/directory already exists | */ - MAV_FTP_ERR_FILEPROTECTED=9, /* FileProtected: File/directory is write protected | */ - MAV_FTP_ERR_FILENOTFOUND=10, /* FileNotFound: File/directory not found | */ - MAV_FTP_ERR_ENUM_END=11, /* | */ -} MAV_FTP_ERR; -#endif - -/** @brief MAV FTP opcodes: https://mavlink.io/en/services/ftp.html */ -#ifndef HAVE_ENUM_MAV_FTP_OPCODE -#define HAVE_ENUM_MAV_FTP_OPCODE -typedef enum MAV_FTP_OPCODE -{ - MAV_FTP_OPCODE_NONE=0, /* None. Ignored, always ACKed | */ - MAV_FTP_OPCODE_TERMINATESESSION=1, /* TerminateSession: Terminates open Read session | */ - MAV_FTP_OPCODE_RESETSESSION=2, /* ResetSessions: Terminates all open read sessions | */ - MAV_FTP_OPCODE_LISTDIRECTORY=3, /* ListDirectory. List files and directories in path from offset | */ - MAV_FTP_OPCODE_OPENFILERO=4, /* OpenFileRO: Opens file at path for reading, returns session | */ - MAV_FTP_OPCODE_READFILE=5, /* ReadFile: Reads size bytes from offset in session | */ - MAV_FTP_OPCODE_CREATEFILE=6, /* CreateFile: Creates file at path for writing, returns session | */ - MAV_FTP_OPCODE_WRITEFILE=7, /* WriteFile: Writes size bytes to offset in session | */ - MAV_FTP_OPCODE_REMOVEFILE=8, /* RemoveFile: Remove file at path | */ - MAV_FTP_OPCODE_CREATEDIRECTORY=9, /* CreateDirectory: Creates directory at path | */ - MAV_FTP_OPCODE_REMOVEDIRECTORY=10, /* RemoveDirectory: Removes directory at path. The directory must be empty. | */ - MAV_FTP_OPCODE_OPENFILEWO=11, /* OpenFileWO: Opens file at path for writing, returns session | */ - MAV_FTP_OPCODE_TRUNCATEFILE=12, /* TruncateFile: Truncate file at path to offset length | */ - MAV_FTP_OPCODE_RENAME=13, /* Rename: Rename path1 to path2 | */ - MAV_FTP_OPCODE_CALCFILECRC=14, /* CalcFileCRC32: Calculate CRC32 for file at path | */ - MAV_FTP_OPCODE_BURSTREADFILE=15, /* BurstReadFile: Burst download session file | */ - MAV_FTP_OPCODE_ACK=128, /* ACK: ACK response | */ - MAV_FTP_OPCODE_NAK=129, /* NAK: NAK response | */ - MAV_FTP_OPCODE_ENUM_END=130, /* | */ -} MAV_FTP_OPCODE; +/** @brief */ +#ifndef HAVE_ENUM_NAV_VTOL_LAND_OPTIONS +#define HAVE_ENUM_NAV_VTOL_LAND_OPTIONS +typedef enum NAV_VTOL_LAND_OPTIONS +{ + NAV_VTOL_LAND_OPTIONS_DEFAULT=0, /* Default autopilot landing behaviour. | */ + NAV_VTOL_LAND_OPTIONS_FW_SPIRAL_APPROACH=1, /* Use a fixed wing spiral desent approach before landing. | */ + NAV_VTOL_LAND_OPTIONS_FW_APPROACH=2, /* Use a fixed wing approach before detransitioning and landing vertically. | */ + NAV_VTOL_LAND_OPTIONS_ENUM_END=3, /* | */ +} NAV_VTOL_LAND_OPTIONS; #endif /** @brief @@ -2675,30 +1955,6 @@ typedef enum SAFETY_SWITCH_STATE } SAFETY_SWITCH_STATE; #endif -/** @brief Modes of illuminator */ -#ifndef HAVE_ENUM_ILLUMINATOR_MODE -#define HAVE_ENUM_ILLUMINATOR_MODE -typedef enum ILLUMINATOR_MODE -{ - ILLUMINATOR_MODE_UNKNOWN=0, /* Illuminator mode is not specified/unknown | */ - ILLUMINATOR_MODE_INTERNAL_CONTROL=1, /* Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings | */ - ILLUMINATOR_MODE_EXTERNAL_SYNC=2, /* Illuminator behavior is controlled by external factors: e.g. an external hardware signal | */ - ILLUMINATOR_MODE_ENUM_END=3, /* | */ -} ILLUMINATOR_MODE; -#endif - -/** @brief Illuminator module error flags (bitmap, 0 means no error) */ -#ifndef HAVE_ENUM_ILLUMINATOR_ERROR_FLAGS -#define HAVE_ENUM_ILLUMINATOR_ERROR_FLAGS -typedef enum ILLUMINATOR_ERROR_FLAGS -{ - ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING=1, /* Illuminator thermal throttling error. | */ - ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN=2, /* Illuminator over temperature shutdown error. | */ - ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE=4, /* Illuminator thermistor failure. | */ - ILLUMINATOR_ERROR_FLAGS_ENUM_END=5, /* | */ -} ILLUMINATOR_ERROR_FLAGS; -#endif - // MAVLINK VERSION #ifndef MAVLINK_VERSION @@ -2717,7 +1973,6 @@ typedef enum ILLUMINATOR_ERROR_FLAGS #include "./mavlink_msg_change_operator_control.h" #include "./mavlink_msg_change_operator_control_ack.h" #include "./mavlink_msg_auth_key.h" -#include "./mavlink_msg_link_node_status.h" #include "./mavlink_msg_set_mode.h" #include "./mavlink_msg_param_request_read.h" #include "./mavlink_msg_param_request_list.h" @@ -2767,7 +2022,6 @@ typedef enum ILLUMINATOR_ERROR_FLAGS #include "./mavlink_msg_command_int.h" #include "./mavlink_msg_command_long.h" #include "./mavlink_msg_command_ack.h" -#include "./mavlink_msg_command_cancel.h" #include "./mavlink_msg_manual_setpoint.h" #include "./mavlink_msg_set_attitude_target.h" #include "./mavlink_msg_attitude_target.h" @@ -2879,8 +2133,6 @@ typedef enum ILLUMINATOR_ERROR_FLAGS #include "./mavlink_msg_autopilot_state_for_gimbal_device.h" #include "./mavlink_msg_gimbal_manager_set_pitchyaw.h" #include "./mavlink_msg_gimbal_manager_set_manual_control.h" -#include "./mavlink_msg_esc_info.h" -#include "./mavlink_msg_esc_status.h" #include "./mavlink_msg_wifi_config_ap.h" #include "./mavlink_msg_ais_vessel.h" #include "./mavlink_msg_uavcan_node_status.h" @@ -2892,32 +2144,16 @@ typedef enum ILLUMINATOR_ERROR_FLAGS #include "./mavlink_msg_param_ext_ack.h" #include "./mavlink_msg_obstacle_distance.h" #include "./mavlink_msg_odometry.h" -#include "./mavlink_msg_trajectory_representation_waypoints.h" -#include "./mavlink_msg_trajectory_representation_bezier.h" -#include "./mavlink_msg_cellular_status.h" #include "./mavlink_msg_isbd_link_status.h" -#include "./mavlink_msg_cellular_config.h" #include "./mavlink_msg_raw_rpm.h" #include "./mavlink_msg_utm_global_position.h" #include "./mavlink_msg_debug_float_array.h" -#include "./mavlink_msg_orbit_execution_status.h" -#include "./mavlink_msg_battery_info.h" +#include "./mavlink_msg_smart_battery_info.h" #include "./mavlink_msg_generator_status.h" #include "./mavlink_msg_actuator_output_status.h" -#include "./mavlink_msg_time_estimate_to_target.h" +#include "./mavlink_msg_relay_status.h" #include "./mavlink_msg_tunnel.h" #include "./mavlink_msg_can_frame.h" -#include "./mavlink_msg_onboard_computer_status.h" -#include "./mavlink_msg_component_information.h" -#include "./mavlink_msg_component_information_basic.h" -#include "./mavlink_msg_component_metadata.h" -#include "./mavlink_msg_play_tune_v2.h" -#include "./mavlink_msg_supported_tunes.h" -#include "./mavlink_msg_event.h" -#include "./mavlink_msg_current_event_sequence.h" -#include "./mavlink_msg_request_event.h" -#include "./mavlink_msg_response_event_error.h" -#include "./mavlink_msg_illuminator_status.h" #include "./mavlink_msg_canfd_frame.h" #include "./mavlink_msg_can_filter_modify.h" #include "./mavlink_msg_wheel_distance.h" @@ -2928,18 +2164,18 @@ typedef enum ILLUMINATOR_ERROR_FLAGS #include "./mavlink_msg_open_drone_id_self_id.h" #include "./mavlink_msg_open_drone_id_system.h" #include "./mavlink_msg_open_drone_id_operator_id.h" -#include "./mavlink_msg_open_drone_id_message_pack.h" #include "./mavlink_msg_open_drone_id_arm_status.h" +#include "./mavlink_msg_open_drone_id_message_pack.h" #include "./mavlink_msg_open_drone_id_system_update.h" #include "./mavlink_msg_hygrometer_sensor.h" // base include -#include "../standard/standard.h" +#include "../minimal/minimal.h" #if MAVLINK_COMMON_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "CONTROL_SYSTEM_STATE", 146 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/common/mavlink.h b/common/mavlink.h index 9481c2fe9..7764bc557 100644 --- a/common/mavlink.h +++ b/common/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH -6353233921526536836 +#define MAVLINK_PRIMARY_XML_HASH 8829945402876961441 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/common/mavlink_msg_adsb_vehicle.h b/common/mavlink_msg_adsb_vehicle.h index d5178e2a7..a97bb6f44 100644 --- a/common/mavlink_msg_adsb_vehicle.h +++ b/common/mavlink_msg_adsb_vehicle.h @@ -13,7 +13,7 @@ typedef struct __mavlink_adsb_vehicle_t { uint16_t hor_velocity; /*< [cm/s] The horizontal velocity*/ int16_t ver_velocity; /*< [cm/s] The vertical velocity. Positive is up*/ uint16_t flags; /*< Bitmap to indicate various statuses including valid data fields*/ - uint16_t squawk; /*< Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000*/ + uint16_t squawk; /*< Squawk code*/ uint8_t altitude_type; /*< ADSB altitude type.*/ char callsign[9]; /*< The callsign, 8+null*/ uint8_t emitter_type; /*< ADSB emitter type.*/ @@ -89,7 +89,7 @@ typedef struct __mavlink_adsb_vehicle_t { * @param emitter_type ADSB emitter type. * @param tslc [s] Time since last communication in seconds * @param flags Bitmap to indicate various statuses including valid data fields - * @param squawk Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 + * @param squawk Squawk code * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -152,7 +152,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint8_t system_id, uint8_t * @param emitter_type ADSB emitter type. * @param tslc [s] Time since last communication in seconds * @param flags Bitmap to indicate various statuses including valid data fields - * @param squawk Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 + * @param squawk Squawk code * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_adsb_vehicle_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -218,7 +218,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_pack_status(uint8_t system_id, u * @param emitter_type ADSB emitter type. * @param tslc [s] Time since last communication in seconds * @param flags Bitmap to indicate various statuses including valid data fields - * @param squawk Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 + * @param squawk Squawk code * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -320,7 +320,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_encode_status(uint8_t system_id, * @param emitter_type ADSB emitter type. * @param tslc [s] Time since last communication in seconds * @param flags Bitmap to indicate various statuses including valid data fields - * @param squawk Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 + * @param squawk Squawk code */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -549,7 +549,7 @@ static inline uint16_t mavlink_msg_adsb_vehicle_get_flags(const mavlink_message_ /** * @brief Get field squawk from adsb_vehicle message * - * @return Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 + * @return Squawk code */ static inline uint16_t mavlink_msg_adsb_vehicle_get_squawk(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_autopilot_version.h b/common/mavlink_msg_autopilot_version.h index b406ff277..7bbc3f4b6 100644 --- a/common/mavlink_msg_autopilot_version.h +++ b/common/mavlink_msg_autopilot_version.h @@ -10,7 +10,7 @@ typedef struct __mavlink_autopilot_version_t { uint32_t flight_sw_version; /*< Firmware version number*/ uint32_t middleware_sw_version; /*< Middleware version number*/ uint32_t os_sw_version; /*< Operating system version number*/ - uint32_t board_version; /*< HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt*/ + uint32_t board_version; /*< HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt*/ uint16_t vendor_id; /*< ID of the board vendor*/ uint16_t product_id; /*< ID of the product*/ uint8_t flight_custom_version[8]; /*< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.*/ @@ -81,7 +81,7 @@ typedef struct __mavlink_autopilot_version_t { * @param flight_sw_version Firmware version number * @param middleware_sw_version Middleware version number * @param os_sw_version Operating system version number - * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt + * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt * @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. @@ -141,7 +141,7 @@ static inline uint16_t mavlink_msg_autopilot_version_pack(uint8_t system_id, uin * @param flight_sw_version Firmware version number * @param middleware_sw_version Middleware version number * @param os_sw_version Operating system version number - * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt + * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt * @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. @@ -204,7 +204,7 @@ static inline uint16_t mavlink_msg_autopilot_version_pack_status(uint8_t system_ * @param flight_sw_version Firmware version number * @param middleware_sw_version Middleware version number * @param os_sw_version Operating system version number - * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt + * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt * @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. @@ -303,7 +303,7 @@ static inline uint16_t mavlink_msg_autopilot_version_encode_status(uint8_t syste * @param flight_sw_version Firmware version number * @param middleware_sw_version Middleware version number * @param os_sw_version Operating system version number - * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt + * @param board_version HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt * @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. * @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. @@ -455,7 +455,7 @@ static inline uint32_t mavlink_msg_autopilot_version_get_os_sw_version(const mav /** * @brief Get field board_version from autopilot_version message * - * @return HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt + * @return HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/ardupilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt */ static inline uint32_t mavlink_msg_autopilot_version_get_board_version(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_battery_info.h b/common/mavlink_msg_battery_info.h deleted file mode 100644 index 10817f5c5..000000000 --- a/common/mavlink_msg_battery_info.h +++ /dev/null @@ -1,784 +0,0 @@ -#pragma once -// MESSAGE BATTERY_INFO PACKING - -#define MAVLINK_MSG_ID_BATTERY_INFO 370 - - -typedef struct __mavlink_battery_info_t { - float discharge_minimum_voltage; /*< [V] Minimum per-cell voltage when discharging. 0: field not provided.*/ - float charging_minimum_voltage; /*< [V] Minimum per-cell voltage when charging. 0: field not provided.*/ - float resting_minimum_voltage; /*< [V] Minimum per-cell voltage when resting. 0: field not provided.*/ - float charging_maximum_voltage; /*< [V] Maximum per-cell voltage when charged. 0: field not provided.*/ - float charging_maximum_current; /*< [A] Maximum pack continuous charge current. 0: field not provided.*/ - float nominal_voltage; /*< [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided.*/ - float discharge_maximum_current; /*< [A] Maximum pack discharge current. 0: field not provided.*/ - float discharge_maximum_burst_current; /*< [A] Maximum pack discharge burst current. 0: field not provided.*/ - float design_capacity; /*< [Ah] Fully charged design capacity. 0: field not provided.*/ - float full_charge_capacity; /*< [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided.*/ - uint16_t cycle_count; /*< Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided.*/ - uint16_t weight; /*< [g] Battery weight. 0: field not provided.*/ - uint8_t id; /*< Battery ID*/ - uint8_t battery_function; /*< Function of the battery.*/ - uint8_t type; /*< Type (chemistry) of the battery.*/ - uint8_t state_of_health; /*< [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided.*/ - uint8_t cells_in_series; /*< Number of battery cells in series. 0: field not provided.*/ - char manufacture_date[9]; /*< Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided.*/ - char serial_number[32]; /*< Serial number in ASCII characters, 0 terminated. All 0: field not provided.*/ - char name[50]; /*< Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided.*/ -} mavlink_battery_info_t; - -#define MAVLINK_MSG_ID_BATTERY_INFO_LEN 140 -#define MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN 140 -#define MAVLINK_MSG_ID_370_LEN 140 -#define MAVLINK_MSG_ID_370_MIN_LEN 140 - -#define MAVLINK_MSG_ID_BATTERY_INFO_CRC 26 -#define MAVLINK_MSG_ID_370_CRC 26 - -#define MAVLINK_MSG_BATTERY_INFO_FIELD_MANUFACTURE_DATE_LEN 9 -#define MAVLINK_MSG_BATTERY_INFO_FIELD_SERIAL_NUMBER_LEN 32 -#define MAVLINK_MSG_BATTERY_INFO_FIELD_NAME_LEN 50 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_BATTERY_INFO { \ - 370, \ - "BATTERY_INFO", \ - 20, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_battery_info_t, id) }, \ - { "battery_function", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_battery_info_t, battery_function) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_battery_info_t, type) }, \ - { "state_of_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_battery_info_t, state_of_health) }, \ - { "cells_in_series", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_battery_info_t, cells_in_series) }, \ - { "cycle_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_battery_info_t, cycle_count) }, \ - { "weight", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_battery_info_t, weight) }, \ - { "discharge_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_battery_info_t, discharge_minimum_voltage) }, \ - { "charging_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_battery_info_t, charging_minimum_voltage) }, \ - { "resting_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_battery_info_t, resting_minimum_voltage) }, \ - { "charging_maximum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_battery_info_t, charging_maximum_voltage) }, \ - { "charging_maximum_current", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_battery_info_t, charging_maximum_current) }, \ - { "nominal_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_battery_info_t, nominal_voltage) }, \ - { "discharge_maximum_current", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_battery_info_t, discharge_maximum_current) }, \ - { "discharge_maximum_burst_current", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_battery_info_t, discharge_maximum_burst_current) }, \ - { "design_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_battery_info_t, design_capacity) }, \ - { "full_charge_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_battery_info_t, full_charge_capacity) }, \ - { "manufacture_date", NULL, MAVLINK_TYPE_CHAR, 9, 49, offsetof(mavlink_battery_info_t, manufacture_date) }, \ - { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32, 58, offsetof(mavlink_battery_info_t, serial_number) }, \ - { "name", NULL, MAVLINK_TYPE_CHAR, 50, 90, offsetof(mavlink_battery_info_t, name) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_BATTERY_INFO { \ - "BATTERY_INFO", \ - 20, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_battery_info_t, id) }, \ - { "battery_function", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_battery_info_t, battery_function) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_battery_info_t, type) }, \ - { "state_of_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_battery_info_t, state_of_health) }, \ - { "cells_in_series", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_battery_info_t, cells_in_series) }, \ - { "cycle_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_battery_info_t, cycle_count) }, \ - { "weight", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_battery_info_t, weight) }, \ - { "discharge_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_battery_info_t, discharge_minimum_voltage) }, \ - { "charging_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_battery_info_t, charging_minimum_voltage) }, \ - { "resting_minimum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_battery_info_t, resting_minimum_voltage) }, \ - { "charging_maximum_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_battery_info_t, charging_maximum_voltage) }, \ - { "charging_maximum_current", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_battery_info_t, charging_maximum_current) }, \ - { "nominal_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_battery_info_t, nominal_voltage) }, \ - { "discharge_maximum_current", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_battery_info_t, discharge_maximum_current) }, \ - { "discharge_maximum_burst_current", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_battery_info_t, discharge_maximum_burst_current) }, \ - { "design_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_battery_info_t, design_capacity) }, \ - { "full_charge_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_battery_info_t, full_charge_capacity) }, \ - { "manufacture_date", NULL, MAVLINK_TYPE_CHAR, 9, 49, offsetof(mavlink_battery_info_t, manufacture_date) }, \ - { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32, 58, offsetof(mavlink_battery_info_t, serial_number) }, \ - { "name", NULL, MAVLINK_TYPE_CHAR, 50, 90, offsetof(mavlink_battery_info_t, name) }, \ - } \ -} -#endif - -/** - * @brief Pack a battery_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param id Battery ID - * @param battery_function Function of the battery. - * @param type Type (chemistry) of the battery. - * @param state_of_health [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - * @param cells_in_series Number of battery cells in series. 0: field not provided. - * @param cycle_count Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - * @param weight [g] Battery weight. 0: field not provided. - * @param discharge_minimum_voltage [V] Minimum per-cell voltage when discharging. 0: field not provided. - * @param charging_minimum_voltage [V] Minimum per-cell voltage when charging. 0: field not provided. - * @param resting_minimum_voltage [V] Minimum per-cell voltage when resting. 0: field not provided. - * @param charging_maximum_voltage [V] Maximum per-cell voltage when charged. 0: field not provided. - * @param charging_maximum_current [A] Maximum pack continuous charge current. 0: field not provided. - * @param nominal_voltage [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - * @param discharge_maximum_current [A] Maximum pack discharge current. 0: field not provided. - * @param discharge_maximum_burst_current [A] Maximum pack discharge burst current. 0: field not provided. - * @param design_capacity [Ah] Fully charged design capacity. 0: field not provided. - * @param full_charge_capacity [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - * @param manufacture_date Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. - * @param name Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t id, uint8_t battery_function, uint8_t type, uint8_t state_of_health, uint8_t cells_in_series, uint16_t cycle_count, uint16_t weight, float discharge_minimum_voltage, float charging_minimum_voltage, float resting_minimum_voltage, float charging_maximum_voltage, float charging_maximum_current, float nominal_voltage, float discharge_maximum_current, float discharge_maximum_burst_current, float design_capacity, float full_charge_capacity, const char *manufacture_date, const char *serial_number, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_INFO_LEN]; - _mav_put_float(buf, 0, discharge_minimum_voltage); - _mav_put_float(buf, 4, charging_minimum_voltage); - _mav_put_float(buf, 8, resting_minimum_voltage); - _mav_put_float(buf, 12, charging_maximum_voltage); - _mav_put_float(buf, 16, charging_maximum_current); - _mav_put_float(buf, 20, nominal_voltage); - _mav_put_float(buf, 24, discharge_maximum_current); - _mav_put_float(buf, 28, discharge_maximum_burst_current); - _mav_put_float(buf, 32, design_capacity); - _mav_put_float(buf, 36, full_charge_capacity); - _mav_put_uint16_t(buf, 40, cycle_count); - _mav_put_uint16_t(buf, 42, weight); - _mav_put_uint8_t(buf, 44, id); - _mav_put_uint8_t(buf, 45, battery_function); - _mav_put_uint8_t(buf, 46, type); - _mav_put_uint8_t(buf, 47, state_of_health); - _mav_put_uint8_t(buf, 48, cells_in_series); - _mav_put_char_array(buf, 49, manufacture_date, 9); - _mav_put_char_array(buf, 58, serial_number, 32); - _mav_put_char_array(buf, 90, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#else - mavlink_battery_info_t packet; - packet.discharge_minimum_voltage = discharge_minimum_voltage; - packet.charging_minimum_voltage = charging_minimum_voltage; - packet.resting_minimum_voltage = resting_minimum_voltage; - packet.charging_maximum_voltage = charging_maximum_voltage; - packet.charging_maximum_current = charging_maximum_current; - packet.nominal_voltage = nominal_voltage; - packet.discharge_maximum_current = discharge_maximum_current; - packet.discharge_maximum_burst_current = discharge_maximum_burst_current; - packet.design_capacity = design_capacity; - packet.full_charge_capacity = full_charge_capacity; - packet.cycle_count = cycle_count; - packet.weight = weight; - packet.id = id; - packet.battery_function = battery_function; - packet.type = type; - packet.state_of_health = state_of_health; - packet.cells_in_series = cells_in_series; - mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_INFO; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -} - -/** - * @brief Pack a battery_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param id Battery ID - * @param battery_function Function of the battery. - * @param type Type (chemistry) of the battery. - * @param state_of_health [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - * @param cells_in_series Number of battery cells in series. 0: field not provided. - * @param cycle_count Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - * @param weight [g] Battery weight. 0: field not provided. - * @param discharge_minimum_voltage [V] Minimum per-cell voltage when discharging. 0: field not provided. - * @param charging_minimum_voltage [V] Minimum per-cell voltage when charging. 0: field not provided. - * @param resting_minimum_voltage [V] Minimum per-cell voltage when resting. 0: field not provided. - * @param charging_maximum_voltage [V] Maximum per-cell voltage when charged. 0: field not provided. - * @param charging_maximum_current [A] Maximum pack continuous charge current. 0: field not provided. - * @param nominal_voltage [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - * @param discharge_maximum_current [A] Maximum pack discharge current. 0: field not provided. - * @param discharge_maximum_burst_current [A] Maximum pack discharge burst current. 0: field not provided. - * @param design_capacity [Ah] Fully charged design capacity. 0: field not provided. - * @param full_charge_capacity [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - * @param manufacture_date Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. - * @param name Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t id, uint8_t battery_function, uint8_t type, uint8_t state_of_health, uint8_t cells_in_series, uint16_t cycle_count, uint16_t weight, float discharge_minimum_voltage, float charging_minimum_voltage, float resting_minimum_voltage, float charging_maximum_voltage, float charging_maximum_current, float nominal_voltage, float discharge_maximum_current, float discharge_maximum_burst_current, float design_capacity, float full_charge_capacity, const char *manufacture_date, const char *serial_number, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_INFO_LEN]; - _mav_put_float(buf, 0, discharge_minimum_voltage); - _mav_put_float(buf, 4, charging_minimum_voltage); - _mav_put_float(buf, 8, resting_minimum_voltage); - _mav_put_float(buf, 12, charging_maximum_voltage); - _mav_put_float(buf, 16, charging_maximum_current); - _mav_put_float(buf, 20, nominal_voltage); - _mav_put_float(buf, 24, discharge_maximum_current); - _mav_put_float(buf, 28, discharge_maximum_burst_current); - _mav_put_float(buf, 32, design_capacity); - _mav_put_float(buf, 36, full_charge_capacity); - _mav_put_uint16_t(buf, 40, cycle_count); - _mav_put_uint16_t(buf, 42, weight); - _mav_put_uint8_t(buf, 44, id); - _mav_put_uint8_t(buf, 45, battery_function); - _mav_put_uint8_t(buf, 46, type); - _mav_put_uint8_t(buf, 47, state_of_health); - _mav_put_uint8_t(buf, 48, cells_in_series); - _mav_put_char_array(buf, 49, manufacture_date, 9); - _mav_put_char_array(buf, 58, serial_number, 32); - _mav_put_char_array(buf, 90, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#else - mavlink_battery_info_t packet; - packet.discharge_minimum_voltage = discharge_minimum_voltage; - packet.charging_minimum_voltage = charging_minimum_voltage; - packet.resting_minimum_voltage = resting_minimum_voltage; - packet.charging_maximum_voltage = charging_maximum_voltage; - packet.charging_maximum_current = charging_maximum_current; - packet.nominal_voltage = nominal_voltage; - packet.discharge_maximum_current = discharge_maximum_current; - packet.discharge_maximum_burst_current = discharge_maximum_burst_current; - packet.design_capacity = design_capacity; - packet.full_charge_capacity = full_charge_capacity; - packet.cycle_count = cycle_count; - packet.weight = weight; - packet.id = id; - packet.battery_function = battery_function; - packet.type = type; - packet.state_of_health = state_of_health; - packet.cells_in_series = cells_in_series; - mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_INFO; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#endif -} - -/** - * @brief Pack a battery_info message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param id Battery ID - * @param battery_function Function of the battery. - * @param type Type (chemistry) of the battery. - * @param state_of_health [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - * @param cells_in_series Number of battery cells in series. 0: field not provided. - * @param cycle_count Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - * @param weight [g] Battery weight. 0: field not provided. - * @param discharge_minimum_voltage [V] Minimum per-cell voltage when discharging. 0: field not provided. - * @param charging_minimum_voltage [V] Minimum per-cell voltage when charging. 0: field not provided. - * @param resting_minimum_voltage [V] Minimum per-cell voltage when resting. 0: field not provided. - * @param charging_maximum_voltage [V] Maximum per-cell voltage when charged. 0: field not provided. - * @param charging_maximum_current [A] Maximum pack continuous charge current. 0: field not provided. - * @param nominal_voltage [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - * @param discharge_maximum_current [A] Maximum pack discharge current. 0: field not provided. - * @param discharge_maximum_burst_current [A] Maximum pack discharge burst current. 0: field not provided. - * @param design_capacity [Ah] Fully charged design capacity. 0: field not provided. - * @param full_charge_capacity [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - * @param manufacture_date Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. - * @param name Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t id,uint8_t battery_function,uint8_t type,uint8_t state_of_health,uint8_t cells_in_series,uint16_t cycle_count,uint16_t weight,float discharge_minimum_voltage,float charging_minimum_voltage,float resting_minimum_voltage,float charging_maximum_voltage,float charging_maximum_current,float nominal_voltage,float discharge_maximum_current,float discharge_maximum_burst_current,float design_capacity,float full_charge_capacity,const char *manufacture_date,const char *serial_number,const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_INFO_LEN]; - _mav_put_float(buf, 0, discharge_minimum_voltage); - _mav_put_float(buf, 4, charging_minimum_voltage); - _mav_put_float(buf, 8, resting_minimum_voltage); - _mav_put_float(buf, 12, charging_maximum_voltage); - _mav_put_float(buf, 16, charging_maximum_current); - _mav_put_float(buf, 20, nominal_voltage); - _mav_put_float(buf, 24, discharge_maximum_current); - _mav_put_float(buf, 28, discharge_maximum_burst_current); - _mav_put_float(buf, 32, design_capacity); - _mav_put_float(buf, 36, full_charge_capacity); - _mav_put_uint16_t(buf, 40, cycle_count); - _mav_put_uint16_t(buf, 42, weight); - _mav_put_uint8_t(buf, 44, id); - _mav_put_uint8_t(buf, 45, battery_function); - _mav_put_uint8_t(buf, 46, type); - _mav_put_uint8_t(buf, 47, state_of_health); - _mav_put_uint8_t(buf, 48, cells_in_series); - _mav_put_char_array(buf, 49, manufacture_date, 9); - _mav_put_char_array(buf, 58, serial_number, 32); - _mav_put_char_array(buf, 90, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#else - mavlink_battery_info_t packet; - packet.discharge_minimum_voltage = discharge_minimum_voltage; - packet.charging_minimum_voltage = charging_minimum_voltage; - packet.resting_minimum_voltage = resting_minimum_voltage; - packet.charging_maximum_voltage = charging_maximum_voltage; - packet.charging_maximum_current = charging_maximum_current; - packet.nominal_voltage = nominal_voltage; - packet.discharge_maximum_current = discharge_maximum_current; - packet.discharge_maximum_burst_current = discharge_maximum_burst_current; - packet.design_capacity = design_capacity; - packet.full_charge_capacity = full_charge_capacity; - packet.cycle_count = cycle_count; - packet.weight = weight; - packet.id = id; - packet.battery_function = battery_function; - packet.type = type; - packet.state_of_health = state_of_health; - packet.cells_in_series = cells_in_series; - mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_INFO; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -} - -/** - * @brief Encode a battery_info struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param battery_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_battery_info_t* battery_info) -{ - return mavlink_msg_battery_info_pack(system_id, component_id, msg, battery_info->id, battery_info->battery_function, battery_info->type, battery_info->state_of_health, battery_info->cells_in_series, battery_info->cycle_count, battery_info->weight, battery_info->discharge_minimum_voltage, battery_info->charging_minimum_voltage, battery_info->resting_minimum_voltage, battery_info->charging_maximum_voltage, battery_info->charging_maximum_current, battery_info->nominal_voltage, battery_info->discharge_maximum_current, battery_info->discharge_maximum_burst_current, battery_info->design_capacity, battery_info->full_charge_capacity, battery_info->manufacture_date, battery_info->serial_number, battery_info->name); -} - -/** - * @brief Encode a battery_info struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param battery_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_battery_info_t* battery_info) -{ - return mavlink_msg_battery_info_pack_chan(system_id, component_id, chan, msg, battery_info->id, battery_info->battery_function, battery_info->type, battery_info->state_of_health, battery_info->cells_in_series, battery_info->cycle_count, battery_info->weight, battery_info->discharge_minimum_voltage, battery_info->charging_minimum_voltage, battery_info->resting_minimum_voltage, battery_info->charging_maximum_voltage, battery_info->charging_maximum_current, battery_info->nominal_voltage, battery_info->discharge_maximum_current, battery_info->discharge_maximum_burst_current, battery_info->design_capacity, battery_info->full_charge_capacity, battery_info->manufacture_date, battery_info->serial_number, battery_info->name); -} - -/** - * @brief Encode a battery_info struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param battery_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_battery_info_t* battery_info) -{ - return mavlink_msg_battery_info_pack_status(system_id, component_id, _status, msg, battery_info->id, battery_info->battery_function, battery_info->type, battery_info->state_of_health, battery_info->cells_in_series, battery_info->cycle_count, battery_info->weight, battery_info->discharge_minimum_voltage, battery_info->charging_minimum_voltage, battery_info->resting_minimum_voltage, battery_info->charging_maximum_voltage, battery_info->charging_maximum_current, battery_info->nominal_voltage, battery_info->discharge_maximum_current, battery_info->discharge_maximum_burst_current, battery_info->design_capacity, battery_info->full_charge_capacity, battery_info->manufacture_date, battery_info->serial_number, battery_info->name); -} - -/** - * @brief Send a battery_info message - * @param chan MAVLink channel to send the message - * - * @param id Battery ID - * @param battery_function Function of the battery. - * @param type Type (chemistry) of the battery. - * @param state_of_health [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - * @param cells_in_series Number of battery cells in series. 0: field not provided. - * @param cycle_count Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - * @param weight [g] Battery weight. 0: field not provided. - * @param discharge_minimum_voltage [V] Minimum per-cell voltage when discharging. 0: field not provided. - * @param charging_minimum_voltage [V] Minimum per-cell voltage when charging. 0: field not provided. - * @param resting_minimum_voltage [V] Minimum per-cell voltage when resting. 0: field not provided. - * @param charging_maximum_voltage [V] Maximum per-cell voltage when charged. 0: field not provided. - * @param charging_maximum_current [A] Maximum pack continuous charge current. 0: field not provided. - * @param nominal_voltage [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - * @param discharge_maximum_current [A] Maximum pack discharge current. 0: field not provided. - * @param discharge_maximum_burst_current [A] Maximum pack discharge burst current. 0: field not provided. - * @param design_capacity [Ah] Fully charged design capacity. 0: field not provided. - * @param full_charge_capacity [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - * @param manufacture_date Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. - * @param name Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_battery_info_send(mavlink_channel_t chan, uint8_t id, uint8_t battery_function, uint8_t type, uint8_t state_of_health, uint8_t cells_in_series, uint16_t cycle_count, uint16_t weight, float discharge_minimum_voltage, float charging_minimum_voltage, float resting_minimum_voltage, float charging_maximum_voltage, float charging_maximum_current, float nominal_voltage, float discharge_maximum_current, float discharge_maximum_burst_current, float design_capacity, float full_charge_capacity, const char *manufacture_date, const char *serial_number, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_INFO_LEN]; - _mav_put_float(buf, 0, discharge_minimum_voltage); - _mav_put_float(buf, 4, charging_minimum_voltage); - _mav_put_float(buf, 8, resting_minimum_voltage); - _mav_put_float(buf, 12, charging_maximum_voltage); - _mav_put_float(buf, 16, charging_maximum_current); - _mav_put_float(buf, 20, nominal_voltage); - _mav_put_float(buf, 24, discharge_maximum_current); - _mav_put_float(buf, 28, discharge_maximum_burst_current); - _mav_put_float(buf, 32, design_capacity); - _mav_put_float(buf, 36, full_charge_capacity); - _mav_put_uint16_t(buf, 40, cycle_count); - _mav_put_uint16_t(buf, 42, weight); - _mav_put_uint8_t(buf, 44, id); - _mav_put_uint8_t(buf, 45, battery_function); - _mav_put_uint8_t(buf, 46, type); - _mav_put_uint8_t(buf, 47, state_of_health); - _mav_put_uint8_t(buf, 48, cells_in_series); - _mav_put_char_array(buf, 49, manufacture_date, 9); - _mav_put_char_array(buf, 58, serial_number, 32); - _mav_put_char_array(buf, 90, name, 50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_INFO, buf, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#else - mavlink_battery_info_t packet; - packet.discharge_minimum_voltage = discharge_minimum_voltage; - packet.charging_minimum_voltage = charging_minimum_voltage; - packet.resting_minimum_voltage = resting_minimum_voltage; - packet.charging_maximum_voltage = charging_maximum_voltage; - packet.charging_maximum_current = charging_maximum_current; - packet.nominal_voltage = nominal_voltage; - packet.discharge_maximum_current = discharge_maximum_current; - packet.discharge_maximum_burst_current = discharge_maximum_burst_current; - packet.design_capacity = design_capacity; - packet.full_charge_capacity = full_charge_capacity; - packet.cycle_count = cycle_count; - packet.weight = weight; - packet.id = id; - packet.battery_function = battery_function; - packet.type = type; - packet.state_of_health = state_of_health; - packet.cells_in_series = cells_in_series; - mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - mav_array_memcpy(packet.name, name, sizeof(char)*50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_INFO, (const char *)&packet, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#endif -} - -/** - * @brief Send a battery_info message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_battery_info_send_struct(mavlink_channel_t chan, const mavlink_battery_info_t* battery_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_battery_info_send(chan, battery_info->id, battery_info->battery_function, battery_info->type, battery_info->state_of_health, battery_info->cells_in_series, battery_info->cycle_count, battery_info->weight, battery_info->discharge_minimum_voltage, battery_info->charging_minimum_voltage, battery_info->resting_minimum_voltage, battery_info->charging_maximum_voltage, battery_info->charging_maximum_current, battery_info->nominal_voltage, battery_info->discharge_maximum_current, battery_info->discharge_maximum_burst_current, battery_info->design_capacity, battery_info->full_charge_capacity, battery_info->manufacture_date, battery_info->serial_number, battery_info->name); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_INFO, (const char *)battery_info, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#endif -} - -#if MAVLINK_MSG_ID_BATTERY_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_battery_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, uint8_t battery_function, uint8_t type, uint8_t state_of_health, uint8_t cells_in_series, uint16_t cycle_count, uint16_t weight, float discharge_minimum_voltage, float charging_minimum_voltage, float resting_minimum_voltage, float charging_maximum_voltage, float charging_maximum_current, float nominal_voltage, float discharge_maximum_current, float discharge_maximum_burst_current, float design_capacity, float full_charge_capacity, const char *manufacture_date, const char *serial_number, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, discharge_minimum_voltage); - _mav_put_float(buf, 4, charging_minimum_voltage); - _mav_put_float(buf, 8, resting_minimum_voltage); - _mav_put_float(buf, 12, charging_maximum_voltage); - _mav_put_float(buf, 16, charging_maximum_current); - _mav_put_float(buf, 20, nominal_voltage); - _mav_put_float(buf, 24, discharge_maximum_current); - _mav_put_float(buf, 28, discharge_maximum_burst_current); - _mav_put_float(buf, 32, design_capacity); - _mav_put_float(buf, 36, full_charge_capacity); - _mav_put_uint16_t(buf, 40, cycle_count); - _mav_put_uint16_t(buf, 42, weight); - _mav_put_uint8_t(buf, 44, id); - _mav_put_uint8_t(buf, 45, battery_function); - _mav_put_uint8_t(buf, 46, type); - _mav_put_uint8_t(buf, 47, state_of_health); - _mav_put_uint8_t(buf, 48, cells_in_series); - _mav_put_char_array(buf, 49, manufacture_date, 9); - _mav_put_char_array(buf, 58, serial_number, 32); - _mav_put_char_array(buf, 90, name, 50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_INFO, buf, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#else - mavlink_battery_info_t *packet = (mavlink_battery_info_t *)msgbuf; - packet->discharge_minimum_voltage = discharge_minimum_voltage; - packet->charging_minimum_voltage = charging_minimum_voltage; - packet->resting_minimum_voltage = resting_minimum_voltage; - packet->charging_maximum_voltage = charging_maximum_voltage; - packet->charging_maximum_current = charging_maximum_current; - packet->nominal_voltage = nominal_voltage; - packet->discharge_maximum_current = discharge_maximum_current; - packet->discharge_maximum_burst_current = discharge_maximum_burst_current; - packet->design_capacity = design_capacity; - packet->full_charge_capacity = full_charge_capacity; - packet->cycle_count = cycle_count; - packet->weight = weight; - packet->id = id; - packet->battery_function = battery_function; - packet->type = type; - packet->state_of_health = state_of_health; - packet->cells_in_series = cells_in_series; - mav_array_memcpy(packet->manufacture_date, manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet->serial_number, serial_number, sizeof(char)*32); - mav_array_memcpy(packet->name, name, sizeof(char)*50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_INFO, (const char *)packet, MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_BATTERY_INFO_LEN, MAVLINK_MSG_ID_BATTERY_INFO_CRC); -#endif -} -#endif - -#endif - -// MESSAGE BATTERY_INFO UNPACKING - - -/** - * @brief Get field id from battery_info message - * - * @return Battery ID - */ -static inline uint8_t mavlink_msg_battery_info_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 44); -} - -/** - * @brief Get field battery_function from battery_info message - * - * @return Function of the battery. - */ -static inline uint8_t mavlink_msg_battery_info_get_battery_function(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 45); -} - -/** - * @brief Get field type from battery_info message - * - * @return Type (chemistry) of the battery. - */ -static inline uint8_t mavlink_msg_battery_info_get_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 46); -} - -/** - * @brief Get field state_of_health from battery_info message - * - * @return [%] State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - */ -static inline uint8_t mavlink_msg_battery_info_get_state_of_health(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 47); -} - -/** - * @brief Get field cells_in_series from battery_info message - * - * @return Number of battery cells in series. 0: field not provided. - */ -static inline uint8_t mavlink_msg_battery_info_get_cells_in_series(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 48); -} - -/** - * @brief Get field cycle_count from battery_info message - * - * @return Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - */ -static inline uint16_t mavlink_msg_battery_info_get_cycle_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 40); -} - -/** - * @brief Get field weight from battery_info message - * - * @return [g] Battery weight. 0: field not provided. - */ -static inline uint16_t mavlink_msg_battery_info_get_weight(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 42); -} - -/** - * @brief Get field discharge_minimum_voltage from battery_info message - * - * @return [V] Minimum per-cell voltage when discharging. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_discharge_minimum_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field charging_minimum_voltage from battery_info message - * - * @return [V] Minimum per-cell voltage when charging. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_charging_minimum_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field resting_minimum_voltage from battery_info message - * - * @return [V] Minimum per-cell voltage when resting. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_resting_minimum_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field charging_maximum_voltage from battery_info message - * - * @return [V] Maximum per-cell voltage when charged. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_charging_maximum_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field charging_maximum_current from battery_info message - * - * @return [A] Maximum pack continuous charge current. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_charging_maximum_current(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field nominal_voltage from battery_info message - * - * @return [V] Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_nominal_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 20); -} - -/** - * @brief Get field discharge_maximum_current from battery_info message - * - * @return [A] Maximum pack discharge current. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_discharge_maximum_current(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 24); -} - -/** - * @brief Get field discharge_maximum_burst_current from battery_info message - * - * @return [A] Maximum pack discharge burst current. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_discharge_maximum_burst_current(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 28); -} - -/** - * @brief Get field design_capacity from battery_info message - * - * @return [Ah] Fully charged design capacity. 0: field not provided. - */ -static inline float mavlink_msg_battery_info_get_design_capacity(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 32); -} - -/** - * @brief Get field full_charge_capacity from battery_info message - * - * @return [Ah] Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - */ -static inline float mavlink_msg_battery_info_get_full_charge_capacity(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 36); -} - -/** - * @brief Get field manufacture_date from battery_info message - * - * @return Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - */ -static inline uint16_t mavlink_msg_battery_info_get_manufacture_date(const mavlink_message_t* msg, char *manufacture_date) -{ - return _MAV_RETURN_char_array(msg, manufacture_date, 9, 49); -} - -/** - * @brief Get field serial_number from battery_info message - * - * @return Serial number in ASCII characters, 0 terminated. All 0: field not provided. - */ -static inline uint16_t mavlink_msg_battery_info_get_serial_number(const mavlink_message_t* msg, char *serial_number) -{ - return _MAV_RETURN_char_array(msg, serial_number, 32, 58); -} - -/** - * @brief Get field name from battery_info message - * - * @return Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - */ -static inline uint16_t mavlink_msg_battery_info_get_name(const mavlink_message_t* msg, char *name) -{ - return _MAV_RETURN_char_array(msg, name, 50, 90); -} - -/** - * @brief Decode a battery_info message into a struct - * - * @param msg The message to decode - * @param battery_info C-struct to decode the message contents into - */ -static inline void mavlink_msg_battery_info_decode(const mavlink_message_t* msg, mavlink_battery_info_t* battery_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - battery_info->discharge_minimum_voltage = mavlink_msg_battery_info_get_discharge_minimum_voltage(msg); - battery_info->charging_minimum_voltage = mavlink_msg_battery_info_get_charging_minimum_voltage(msg); - battery_info->resting_minimum_voltage = mavlink_msg_battery_info_get_resting_minimum_voltage(msg); - battery_info->charging_maximum_voltage = mavlink_msg_battery_info_get_charging_maximum_voltage(msg); - battery_info->charging_maximum_current = mavlink_msg_battery_info_get_charging_maximum_current(msg); - battery_info->nominal_voltage = mavlink_msg_battery_info_get_nominal_voltage(msg); - battery_info->discharge_maximum_current = mavlink_msg_battery_info_get_discharge_maximum_current(msg); - battery_info->discharge_maximum_burst_current = mavlink_msg_battery_info_get_discharge_maximum_burst_current(msg); - battery_info->design_capacity = mavlink_msg_battery_info_get_design_capacity(msg); - battery_info->full_charge_capacity = mavlink_msg_battery_info_get_full_charge_capacity(msg); - battery_info->cycle_count = mavlink_msg_battery_info_get_cycle_count(msg); - battery_info->weight = mavlink_msg_battery_info_get_weight(msg); - battery_info->id = mavlink_msg_battery_info_get_id(msg); - battery_info->battery_function = mavlink_msg_battery_info_get_battery_function(msg); - battery_info->type = mavlink_msg_battery_info_get_type(msg); - battery_info->state_of_health = mavlink_msg_battery_info_get_state_of_health(msg); - battery_info->cells_in_series = mavlink_msg_battery_info_get_cells_in_series(msg); - mavlink_msg_battery_info_get_manufacture_date(msg, battery_info->manufacture_date); - mavlink_msg_battery_info_get_serial_number(msg, battery_info->serial_number); - mavlink_msg_battery_info_get_name(msg, battery_info->name); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_BATTERY_INFO_LEN? msg->len : MAVLINK_MSG_ID_BATTERY_INFO_LEN; - memset(battery_info, 0, MAVLINK_MSG_ID_BATTERY_INFO_LEN); - memcpy(battery_info, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_camera_capture_status.h b/common/mavlink_msg_camera_capture_status.h index 95cf41adc..7dd21f308 100644 --- a/common/mavlink_msg_camera_capture_status.h +++ b/common/mavlink_msg_camera_capture_status.h @@ -7,7 +7,7 @@ MAVPACKED( typedef struct __mavlink_camera_capture_status_t { uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ float image_interval; /*< [s] Image capture interval*/ - uint32_t recording_time_ms; /*< [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy.*/ + uint32_t recording_time_ms; /*< [ms] Time since recording started*/ float available_capacity; /*< [MiB] Available storage capacity.*/ uint8_t image_status; /*< Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)*/ uint8_t video_status; /*< Current status of video capturing (0: idle, 1: capture in progress)*/ @@ -63,7 +63,7 @@ typedef struct __mavlink_camera_capture_status_t { * @param image_status Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress) * @param video_status Current status of video capturing (0: idle, 1: capture in progress) * @param image_interval [s] Image capture interval - * @param recording_time_ms [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. + * @param recording_time_ms [ms] Time since recording started * @param available_capacity [MiB] Available storage capacity. * @param image_count Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT). * @return length of the message in bytes (excluding serial stream start sign) @@ -110,7 +110,7 @@ static inline uint16_t mavlink_msg_camera_capture_status_pack(uint8_t system_id, * @param image_status Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress) * @param video_status Current status of video capturing (0: idle, 1: capture in progress) * @param image_interval [s] Image capture interval - * @param recording_time_ms [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. + * @param recording_time_ms [ms] Time since recording started * @param available_capacity [MiB] Available storage capacity. * @param image_count Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT). * @return length of the message in bytes (excluding serial stream start sign) @@ -160,7 +160,7 @@ static inline uint16_t mavlink_msg_camera_capture_status_pack_status(uint8_t sys * @param image_status Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress) * @param video_status Current status of video capturing (0: idle, 1: capture in progress) * @param image_interval [s] Image capture interval - * @param recording_time_ms [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. + * @param recording_time_ms [ms] Time since recording started * @param available_capacity [MiB] Available storage capacity. * @param image_count Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT). * @return length of the message in bytes (excluding serial stream start sign) @@ -246,7 +246,7 @@ static inline uint16_t mavlink_msg_camera_capture_status_encode_status(uint8_t s * @param image_status Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress) * @param video_status Current status of video capturing (0: idle, 1: capture in progress) * @param image_interval [s] Image capture interval - * @param recording_time_ms [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. + * @param recording_time_ms [ms] Time since recording started * @param available_capacity [MiB] Available storage capacity. * @param image_count Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT). */ @@ -377,7 +377,7 @@ static inline float mavlink_msg_camera_capture_status_get_image_interval(const m /** * @brief Get field recording_time_ms from camera_capture_status message * - * @return [ms] Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. + * @return [ms] Time since recording started */ static inline uint32_t mavlink_msg_camera_capture_status_get_recording_time_ms(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_camera_information.h b/common/mavlink_msg_camera_information.h index 130696280..769521e3d 100644 --- a/common/mavlink_msg_camera_information.h +++ b/common/mavlink_msg_camera_information.h @@ -19,12 +19,11 @@ typedef struct __mavlink_camera_information_t { uint8_t lens_id; /*< Reserved for a lens ID. Use 0 if not known.*/ char cam_definition_uri[140]; /*< Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known.*/ uint8_t gimbal_device_id; /*< Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera.*/ - uint8_t camera_device_id; /*< Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera).*/ } mavlink_camera_information_t; -#define MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN 237 +#define MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN 236 #define MAVLINK_MSG_ID_CAMERA_INFORMATION_MIN_LEN 235 -#define MAVLINK_MSG_ID_259_LEN 237 +#define MAVLINK_MSG_ID_259_LEN 236 #define MAVLINK_MSG_ID_259_MIN_LEN 235 #define MAVLINK_MSG_ID_CAMERA_INFORMATION_CRC 92 @@ -38,7 +37,7 @@ typedef struct __mavlink_camera_information_t { #define MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION { \ 259, \ "CAMERA_INFORMATION", \ - 15, \ + 14, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_information_t, time_boot_ms) }, \ { "vendor_name", NULL, MAVLINK_TYPE_UINT8_T, 32, 30, offsetof(mavlink_camera_information_t, vendor_name) }, \ { "model_name", NULL, MAVLINK_TYPE_UINT8_T, 32, 62, offsetof(mavlink_camera_information_t, model_name) }, \ @@ -53,13 +52,12 @@ typedef struct __mavlink_camera_information_t { { "cam_definition_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_camera_information_t, cam_definition_version) }, \ { "cam_definition_uri", NULL, MAVLINK_TYPE_CHAR, 140, 95, offsetof(mavlink_camera_information_t, cam_definition_uri) }, \ { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 235, offsetof(mavlink_camera_information_t, gimbal_device_id) }, \ - { "camera_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 236, offsetof(mavlink_camera_information_t, camera_device_id) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION { \ "CAMERA_INFORMATION", \ - 15, \ + 14, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_camera_information_t, time_boot_ms) }, \ { "vendor_name", NULL, MAVLINK_TYPE_UINT8_T, 32, 30, offsetof(mavlink_camera_information_t, vendor_name) }, \ { "model_name", NULL, MAVLINK_TYPE_UINT8_T, 32, 62, offsetof(mavlink_camera_information_t, model_name) }, \ @@ -74,7 +72,6 @@ typedef struct __mavlink_camera_information_t { { "cam_definition_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_camera_information_t, cam_definition_version) }, \ { "cam_definition_uri", NULL, MAVLINK_TYPE_CHAR, 140, 95, offsetof(mavlink_camera_information_t, cam_definition_uri) }, \ { "gimbal_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 235, offsetof(mavlink_camera_information_t, gimbal_device_id) }, \ - { "camera_device_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 236, offsetof(mavlink_camera_information_t, camera_device_id) }, \ } \ } #endif @@ -99,11 +96,10 @@ typedef struct __mavlink_camera_information_t { * @param cam_definition_version Camera definition version (iteration). Use 0 if not known. * @param cam_definition_uri Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known. * @param gimbal_device_id Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera. - * @param camera_device_id Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_camera_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id, uint8_t camera_device_id) + uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN]; @@ -118,7 +114,6 @@ static inline uint16_t mavlink_msg_camera_information_pack(uint8_t system_id, ui _mav_put_uint16_t(buf, 28, cam_definition_version); _mav_put_uint8_t(buf, 94, lens_id); _mav_put_uint8_t(buf, 235, gimbal_device_id); - _mav_put_uint8_t(buf, 236, camera_device_id); _mav_put_uint8_t_array(buf, 30, vendor_name, 32); _mav_put_uint8_t_array(buf, 62, model_name, 32); _mav_put_char_array(buf, 95, cam_definition_uri, 140); @@ -136,7 +131,6 @@ static inline uint16_t mavlink_msg_camera_information_pack(uint8_t system_id, ui packet.cam_definition_version = cam_definition_version; packet.lens_id = lens_id; packet.gimbal_device_id = gimbal_device_id; - packet.camera_device_id = camera_device_id; mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.model_name, model_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.cam_definition_uri, cam_definition_uri, sizeof(char)*140); @@ -168,11 +162,10 @@ static inline uint16_t mavlink_msg_camera_information_pack(uint8_t system_id, ui * @param cam_definition_version Camera definition version (iteration). Use 0 if not known. * @param cam_definition_uri Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known. * @param gimbal_device_id Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera. - * @param camera_device_id Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_camera_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id, uint8_t camera_device_id) + uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN]; @@ -187,7 +180,6 @@ static inline uint16_t mavlink_msg_camera_information_pack_status(uint8_t system _mav_put_uint16_t(buf, 28, cam_definition_version); _mav_put_uint8_t(buf, 94, lens_id); _mav_put_uint8_t(buf, 235, gimbal_device_id); - _mav_put_uint8_t(buf, 236, camera_device_id); _mav_put_uint8_t_array(buf, 30, vendor_name, 32); _mav_put_uint8_t_array(buf, 62, model_name, 32); _mav_put_char_array(buf, 95, cam_definition_uri, 140); @@ -205,7 +197,6 @@ static inline uint16_t mavlink_msg_camera_information_pack_status(uint8_t system packet.cam_definition_version = cam_definition_version; packet.lens_id = lens_id; packet.gimbal_device_id = gimbal_device_id; - packet.camera_device_id = camera_device_id; mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.model_name, model_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.cam_definition_uri, cam_definition_uri, sizeof(char)*140); @@ -240,12 +231,11 @@ static inline uint16_t mavlink_msg_camera_information_pack_status(uint8_t system * @param cam_definition_version Camera definition version (iteration). Use 0 if not known. * @param cam_definition_uri Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known. * @param gimbal_device_id Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera. - * @param camera_device_id Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_camera_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t time_boot_ms,const uint8_t *vendor_name,const uint8_t *model_name,uint32_t firmware_version,float focal_length,float sensor_size_h,float sensor_size_v,uint16_t resolution_h,uint16_t resolution_v,uint8_t lens_id,uint32_t flags,uint16_t cam_definition_version,const char *cam_definition_uri,uint8_t gimbal_device_id,uint8_t camera_device_id) + uint32_t time_boot_ms,const uint8_t *vendor_name,const uint8_t *model_name,uint32_t firmware_version,float focal_length,float sensor_size_h,float sensor_size_v,uint16_t resolution_h,uint16_t resolution_v,uint8_t lens_id,uint32_t flags,uint16_t cam_definition_version,const char *cam_definition_uri,uint8_t gimbal_device_id) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN]; @@ -260,7 +250,6 @@ static inline uint16_t mavlink_msg_camera_information_pack_chan(uint8_t system_i _mav_put_uint16_t(buf, 28, cam_definition_version); _mav_put_uint8_t(buf, 94, lens_id); _mav_put_uint8_t(buf, 235, gimbal_device_id); - _mav_put_uint8_t(buf, 236, camera_device_id); _mav_put_uint8_t_array(buf, 30, vendor_name, 32); _mav_put_uint8_t_array(buf, 62, model_name, 32); _mav_put_char_array(buf, 95, cam_definition_uri, 140); @@ -278,7 +267,6 @@ static inline uint16_t mavlink_msg_camera_information_pack_chan(uint8_t system_i packet.cam_definition_version = cam_definition_version; packet.lens_id = lens_id; packet.gimbal_device_id = gimbal_device_id; - packet.camera_device_id = camera_device_id; mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.model_name, model_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.cam_definition_uri, cam_definition_uri, sizeof(char)*140); @@ -299,7 +287,7 @@ static inline uint16_t mavlink_msg_camera_information_pack_chan(uint8_t system_i */ static inline uint16_t mavlink_msg_camera_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_information_t* camera_information) { - return mavlink_msg_camera_information_pack(system_id, component_id, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id, camera_information->camera_device_id); + return mavlink_msg_camera_information_pack(system_id, component_id, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id); } /** @@ -313,7 +301,7 @@ static inline uint16_t mavlink_msg_camera_information_encode(uint8_t system_id, */ static inline uint16_t mavlink_msg_camera_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_information_t* camera_information) { - return mavlink_msg_camera_information_pack_chan(system_id, component_id, chan, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id, camera_information->camera_device_id); + return mavlink_msg_camera_information_pack_chan(system_id, component_id, chan, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id); } /** @@ -327,7 +315,7 @@ static inline uint16_t mavlink_msg_camera_information_encode_chan(uint8_t system */ static inline uint16_t mavlink_msg_camera_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_camera_information_t* camera_information) { - return mavlink_msg_camera_information_pack_status(system_id, component_id, _status, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id, camera_information->camera_device_id); + return mavlink_msg_camera_information_pack_status(system_id, component_id, _status, msg, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id); } /** @@ -348,11 +336,10 @@ static inline uint16_t mavlink_msg_camera_information_encode_status(uint8_t syst * @param cam_definition_version Camera definition version (iteration). Use 0 if not known. * @param cam_definition_uri Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known. * @param gimbal_device_id Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera. - * @param camera_device_id Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_camera_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id, uint8_t camera_device_id) +static inline void mavlink_msg_camera_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN]; @@ -367,7 +354,6 @@ static inline void mavlink_msg_camera_information_send(mavlink_channel_t chan, u _mav_put_uint16_t(buf, 28, cam_definition_version); _mav_put_uint8_t(buf, 94, lens_id); _mav_put_uint8_t(buf, 235, gimbal_device_id); - _mav_put_uint8_t(buf, 236, camera_device_id); _mav_put_uint8_t_array(buf, 30, vendor_name, 32); _mav_put_uint8_t_array(buf, 62, model_name, 32); _mav_put_char_array(buf, 95, cam_definition_uri, 140); @@ -385,7 +371,6 @@ static inline void mavlink_msg_camera_information_send(mavlink_channel_t chan, u packet.cam_definition_version = cam_definition_version; packet.lens_id = lens_id; packet.gimbal_device_id = gimbal_device_id; - packet.camera_device_id = camera_device_id; mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.model_name, model_name, sizeof(uint8_t)*32); mav_array_memcpy(packet.cam_definition_uri, cam_definition_uri, sizeof(char)*140); @@ -401,7 +386,7 @@ static inline void mavlink_msg_camera_information_send(mavlink_channel_t chan, u static inline void mavlink_msg_camera_information_send_struct(mavlink_channel_t chan, const mavlink_camera_information_t* camera_information) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_camera_information_send(chan, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id, camera_information->camera_device_id); + mavlink_msg_camera_information_send(chan, camera_information->time_boot_ms, camera_information->vendor_name, camera_information->model_name, camera_information->firmware_version, camera_information->focal_length, camera_information->sensor_size_h, camera_information->sensor_size_v, camera_information->resolution_h, camera_information->resolution_v, camera_information->lens_id, camera_information->flags, camera_information->cam_definition_version, camera_information->cam_definition_uri, camera_information->gimbal_device_id); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_INFORMATION, (const char *)camera_information, MAVLINK_MSG_ID_CAMERA_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN, MAVLINK_MSG_ID_CAMERA_INFORMATION_CRC); #endif @@ -415,7 +400,7 @@ static inline void mavlink_msg_camera_information_send_struct(mavlink_channel_t is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_camera_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id, uint8_t camera_device_id) +static inline void mavlink_msg_camera_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, const uint8_t *vendor_name, const uint8_t *model_name, uint32_t firmware_version, float focal_length, float sensor_size_h, float sensor_size_v, uint16_t resolution_h, uint16_t resolution_v, uint8_t lens_id, uint32_t flags, uint16_t cam_definition_version, const char *cam_definition_uri, uint8_t gimbal_device_id) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -430,7 +415,6 @@ static inline void mavlink_msg_camera_information_send_buf(mavlink_message_t *ms _mav_put_uint16_t(buf, 28, cam_definition_version); _mav_put_uint8_t(buf, 94, lens_id); _mav_put_uint8_t(buf, 235, gimbal_device_id); - _mav_put_uint8_t(buf, 236, camera_device_id); _mav_put_uint8_t_array(buf, 30, vendor_name, 32); _mav_put_uint8_t_array(buf, 62, model_name, 32); _mav_put_char_array(buf, 95, cam_definition_uri, 140); @@ -448,7 +432,6 @@ static inline void mavlink_msg_camera_information_send_buf(mavlink_message_t *ms packet->cam_definition_version = cam_definition_version; packet->lens_id = lens_id; packet->gimbal_device_id = gimbal_device_id; - packet->camera_device_id = camera_device_id; mav_array_memcpy(packet->vendor_name, vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet->model_name, model_name, sizeof(uint8_t)*32); mav_array_memcpy(packet->cam_definition_uri, cam_definition_uri, sizeof(char)*140); @@ -602,16 +585,6 @@ static inline uint8_t mavlink_msg_camera_information_get_gimbal_device_id(const return _MAV_RETURN_uint8_t(msg, 235); } -/** - * @brief Get field camera_device_id from camera_information message - * - * @return Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). - */ -static inline uint8_t mavlink_msg_camera_information_get_camera_device_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 236); -} - /** * @brief Decode a camera_information message into a struct * @@ -635,7 +608,6 @@ static inline void mavlink_msg_camera_information_decode(const mavlink_message_t camera_information->lens_id = mavlink_msg_camera_information_get_lens_id(msg); mavlink_msg_camera_information_get_cam_definition_uri(msg, camera_information->cam_definition_uri); camera_information->gimbal_device_id = mavlink_msg_camera_information_get_gimbal_device_id(msg); - camera_information->camera_device_id = mavlink_msg_camera_information_get_camera_device_id(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN; memset(camera_information, 0, MAVLINK_MSG_ID_CAMERA_INFORMATION_LEN); diff --git a/common/mavlink_msg_can_frame.h b/common/mavlink_msg_can_frame.h index 80777d0bc..6a1f0ec14 100644 --- a/common/mavlink_msg_can_frame.h +++ b/common/mavlink_msg_can_frame.h @@ -8,7 +8,7 @@ typedef struct __mavlink_can_frame_t { uint32_t id; /*< Frame ID*/ uint8_t target_system; /*< System ID.*/ uint8_t target_component; /*< Component ID.*/ - uint8_t bus; /*< Bus number*/ + uint8_t bus; /*< bus number*/ uint8_t len; /*< Frame length*/ uint8_t data[8]; /*< Frame data*/ } mavlink_can_frame_t; @@ -58,7 +58,7 @@ typedef struct __mavlink_can_frame_t { * * @param target_system System ID. * @param target_component Component ID. - * @param bus Bus number + * @param bus bus number * @param len Frame length * @param id Frame ID * @param data Frame data @@ -100,7 +100,7 @@ static inline uint16_t mavlink_msg_can_frame_pack(uint8_t system_id, uint8_t com * * @param target_system System ID. * @param target_component Component ID. - * @param bus Bus number + * @param bus bus number * @param len Frame length * @param id Frame ID * @param data Frame data @@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_can_frame_pack_status(uint8_t system_id, uint * @param msg The MAVLink message to compress the data into * @param target_system System ID. * @param target_component Component ID. - * @param bus Bus number + * @param bus bus number * @param len Frame length * @param id Frame ID * @param data Frame data @@ -226,7 +226,7 @@ static inline uint16_t mavlink_msg_can_frame_encode_status(uint8_t system_id, ui * * @param target_system System ID. * @param target_component Component ID. - * @param bus Bus number + * @param bus bus number * @param len Frame length * @param id Frame ID * @param data Frame data @@ -330,7 +330,7 @@ static inline uint8_t mavlink_msg_can_frame_get_target_component(const mavlink_m /** * @brief Get field bus from can_frame message * - * @return Bus number + * @return bus number */ static inline uint8_t mavlink_msg_can_frame_get_bus(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_cellular_config.h b/common/mavlink_msg_cellular_config.h deleted file mode 100644 index 5fb2c2ed3..000000000 --- a/common/mavlink_msg_cellular_config.h +++ /dev/null @@ -1,449 +0,0 @@ -#pragma once -// MESSAGE CELLULAR_CONFIG PACKING - -#define MAVLINK_MSG_ID_CELLULAR_CONFIG 336 - - -typedef struct __mavlink_cellular_config_t { - uint8_t enable_lte; /*< Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/ - uint8_t enable_pin; /*< Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/ - char pin[16]; /*< PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.*/ - char new_pin[16]; /*< New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.*/ - char apn[32]; /*< Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.*/ - char puk[16]; /*< Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.*/ - uint8_t roaming; /*< Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/ - uint8_t response; /*< Message acceptance response (sent back to GS).*/ -} mavlink_cellular_config_t; - -#define MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN 84 -#define MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN 84 -#define MAVLINK_MSG_ID_336_LEN 84 -#define MAVLINK_MSG_ID_336_MIN_LEN 84 - -#define MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC 245 -#define MAVLINK_MSG_ID_336_CRC 245 - -#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PIN_LEN 16 -#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_NEW_PIN_LEN 16 -#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_APN_LEN 32 -#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PUK_LEN 16 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \ - 336, \ - "CELLULAR_CONFIG", \ - 8, \ - { { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \ - { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \ - { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \ - { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \ - { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \ - { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \ - { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \ - { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \ - "CELLULAR_CONFIG", \ - 8, \ - { { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \ - { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \ - { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \ - { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \ - { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \ - { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \ - { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \ - { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \ - } \ -} -#endif - -/** - * @brief Pack a cellular_config message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param enable_pin Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - * @param puk Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param response Message acceptance response (sent back to GS). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_config_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN]; - _mav_put_uint8_t(buf, 0, enable_lte); - _mav_put_uint8_t(buf, 1, enable_pin); - _mav_put_uint8_t(buf, 82, roaming); - _mav_put_uint8_t(buf, 83, response); - _mav_put_char_array(buf, 2, pin, 16); - _mav_put_char_array(buf, 18, new_pin, 16); - _mav_put_char_array(buf, 34, apn, 32); - _mav_put_char_array(buf, 66, puk, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#else - mavlink_cellular_config_t packet; - packet.enable_lte = enable_lte; - packet.enable_pin = enable_pin; - packet.roaming = roaming; - packet.response = response; - mav_array_memcpy(packet.pin, pin, sizeof(char)*16); - mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16); - mav_array_memcpy(packet.apn, apn, sizeof(char)*32); - mav_array_memcpy(packet.puk, puk, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_CONFIG; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -} - -/** - * @brief Pack a cellular_config message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param enable_pin Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - * @param puk Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param response Message acceptance response (sent back to GS). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_config_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN]; - _mav_put_uint8_t(buf, 0, enable_lte); - _mav_put_uint8_t(buf, 1, enable_pin); - _mav_put_uint8_t(buf, 82, roaming); - _mav_put_uint8_t(buf, 83, response); - _mav_put_char_array(buf, 2, pin, 16); - _mav_put_char_array(buf, 18, new_pin, 16); - _mav_put_char_array(buf, 34, apn, 32); - _mav_put_char_array(buf, 66, puk, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#else - mavlink_cellular_config_t packet; - packet.enable_lte = enable_lte; - packet.enable_pin = enable_pin; - packet.roaming = roaming; - packet.response = response; - mav_array_memcpy(packet.pin, pin, sizeof(char)*16); - mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16); - mav_array_memcpy(packet.apn, apn, sizeof(char)*32); - mav_array_memcpy(packet.puk, puk, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_CONFIG; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#endif -} - -/** - * @brief Pack a cellular_config message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param enable_pin Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - * @param puk Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param response Message acceptance response (sent back to GS). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_config_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t enable_lte,uint8_t enable_pin,const char *pin,const char *new_pin,const char *apn,const char *puk,uint8_t roaming,uint8_t response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN]; - _mav_put_uint8_t(buf, 0, enable_lte); - _mav_put_uint8_t(buf, 1, enable_pin); - _mav_put_uint8_t(buf, 82, roaming); - _mav_put_uint8_t(buf, 83, response); - _mav_put_char_array(buf, 2, pin, 16); - _mav_put_char_array(buf, 18, new_pin, 16); - _mav_put_char_array(buf, 34, apn, 32); - _mav_put_char_array(buf, 66, puk, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#else - mavlink_cellular_config_t packet; - packet.enable_lte = enable_lte; - packet.enable_pin = enable_pin; - packet.roaming = roaming; - packet.response = response; - mav_array_memcpy(packet.pin, pin, sizeof(char)*16); - mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16); - mav_array_memcpy(packet.apn, apn, sizeof(char)*32); - mav_array_memcpy(packet.puk, puk, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_CONFIG; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -} - -/** - * @brief Encode a cellular_config struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param cellular_config C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_config_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cellular_config_t* cellular_config) -{ - return mavlink_msg_cellular_config_pack(system_id, component_id, msg, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response); -} - -/** - * @brief Encode a cellular_config struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param cellular_config C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_config_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cellular_config_t* cellular_config) -{ - return mavlink_msg_cellular_config_pack_chan(system_id, component_id, chan, msg, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response); -} - -/** - * @brief Encode a cellular_config struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param cellular_config C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_config_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_cellular_config_t* cellular_config) -{ - return mavlink_msg_cellular_config_pack_status(system_id, component_id, _status, msg, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response); -} - -/** - * @brief Send a cellular_config message - * @param chan MAVLink channel to send the message - * - * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param enable_pin Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - * @param puk Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - * @param response Message acceptance response (sent back to GS). - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_cellular_config_send(mavlink_channel_t chan, uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN]; - _mav_put_uint8_t(buf, 0, enable_lte); - _mav_put_uint8_t(buf, 1, enable_pin); - _mav_put_uint8_t(buf, 82, roaming); - _mav_put_uint8_t(buf, 83, response); - _mav_put_char_array(buf, 2, pin, 16); - _mav_put_char_array(buf, 18, new_pin, 16); - _mav_put_char_array(buf, 34, apn, 32); - _mav_put_char_array(buf, 66, puk, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#else - mavlink_cellular_config_t packet; - packet.enable_lte = enable_lte; - packet.enable_pin = enable_pin; - packet.roaming = roaming; - packet.response = response; - mav_array_memcpy(packet.pin, pin, sizeof(char)*16); - mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16); - mav_array_memcpy(packet.apn, apn, sizeof(char)*32); - mav_array_memcpy(packet.puk, puk, sizeof(char)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#endif -} - -/** - * @brief Send a cellular_config message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_cellular_config_send_struct(mavlink_channel_t chan, const mavlink_cellular_config_t* cellular_config) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_cellular_config_send(chan, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)cellular_config, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#endif -} - -#if MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_cellular_config_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, enable_lte); - _mav_put_uint8_t(buf, 1, enable_pin); - _mav_put_uint8_t(buf, 82, roaming); - _mav_put_uint8_t(buf, 83, response); - _mav_put_char_array(buf, 2, pin, 16); - _mav_put_char_array(buf, 18, new_pin, 16); - _mav_put_char_array(buf, 34, apn, 32); - _mav_put_char_array(buf, 66, puk, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#else - mavlink_cellular_config_t *packet = (mavlink_cellular_config_t *)msgbuf; - packet->enable_lte = enable_lte; - packet->enable_pin = enable_pin; - packet->roaming = roaming; - packet->response = response; - mav_array_memcpy(packet->pin, pin, sizeof(char)*16); - mav_array_memcpy(packet->new_pin, new_pin, sizeof(char)*16); - mav_array_memcpy(packet->apn, apn, sizeof(char)*32); - mav_array_memcpy(packet->puk, puk, sizeof(char)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC); -#endif -} -#endif - -#endif - -// MESSAGE CELLULAR_CONFIG UNPACKING - - -/** - * @brief Get field enable_lte from cellular_config message - * - * @return Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - */ -static inline uint8_t mavlink_msg_cellular_config_get_enable_lte(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field enable_pin from cellular_config message - * - * @return Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - */ -static inline uint8_t mavlink_msg_cellular_config_get_enable_pin(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Get field pin from cellular_config message - * - * @return PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - */ -static inline uint16_t mavlink_msg_cellular_config_get_pin(const mavlink_message_t* msg, char *pin) -{ - return _MAV_RETURN_char_array(msg, pin, 16, 2); -} - -/** - * @brief Get field new_pin from cellular_config message - * - * @return New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - */ -static inline uint16_t mavlink_msg_cellular_config_get_new_pin(const mavlink_message_t* msg, char *new_pin) -{ - return _MAV_RETURN_char_array(msg, new_pin, 16, 18); -} - -/** - * @brief Get field apn from cellular_config message - * - * @return Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - */ -static inline uint16_t mavlink_msg_cellular_config_get_apn(const mavlink_message_t* msg, char *apn) -{ - return _MAV_RETURN_char_array(msg, apn, 32, 34); -} - -/** - * @brief Get field puk from cellular_config message - * - * @return Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - */ -static inline uint16_t mavlink_msg_cellular_config_get_puk(const mavlink_message_t* msg, char *puk) -{ - return _MAV_RETURN_char_array(msg, puk, 16, 66); -} - -/** - * @brief Get field roaming from cellular_config message - * - * @return Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - */ -static inline uint8_t mavlink_msg_cellular_config_get_roaming(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 82); -} - -/** - * @brief Get field response from cellular_config message - * - * @return Message acceptance response (sent back to GS). - */ -static inline uint8_t mavlink_msg_cellular_config_get_response(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 83); -} - -/** - * @brief Decode a cellular_config message into a struct - * - * @param msg The message to decode - * @param cellular_config C-struct to decode the message contents into - */ -static inline void mavlink_msg_cellular_config_decode(const mavlink_message_t* msg, mavlink_cellular_config_t* cellular_config) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - cellular_config->enable_lte = mavlink_msg_cellular_config_get_enable_lte(msg); - cellular_config->enable_pin = mavlink_msg_cellular_config_get_enable_pin(msg); - mavlink_msg_cellular_config_get_pin(msg, cellular_config->pin); - mavlink_msg_cellular_config_get_new_pin(msg, cellular_config->new_pin); - mavlink_msg_cellular_config_get_apn(msg, cellular_config->apn); - mavlink_msg_cellular_config_get_puk(msg, cellular_config->puk); - cellular_config->roaming = mavlink_msg_cellular_config_get_roaming(msg); - cellular_config->response = mavlink_msg_cellular_config_get_response(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN? msg->len : MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN; - memset(cellular_config, 0, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN); - memcpy(cellular_config, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_cellular_status.h b/common/mavlink_msg_cellular_status.h deleted file mode 100644 index 63ab299f0..000000000 --- a/common/mavlink_msg_cellular_status.h +++ /dev/null @@ -1,428 +0,0 @@ -#pragma once -// MESSAGE CELLULAR_STATUS PACKING - -#define MAVLINK_MSG_ID_CELLULAR_STATUS 334 - - -typedef struct __mavlink_cellular_status_t { - uint16_t mcc; /*< Mobile country code. If unknown, set to UINT16_MAX*/ - uint16_t mnc; /*< Mobile network code. If unknown, set to UINT16_MAX*/ - uint16_t lac; /*< Location area code. If unknown, set to 0*/ - uint8_t status; /*< Cellular modem status*/ - uint8_t failure_reason; /*< Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED*/ - uint8_t type; /*< Cellular network radio type: gsm, cdma, lte...*/ - uint8_t quality; /*< Signal quality in percent. If unknown, set to UINT8_MAX*/ -} mavlink_cellular_status_t; - -#define MAVLINK_MSG_ID_CELLULAR_STATUS_LEN 10 -#define MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN 10 -#define MAVLINK_MSG_ID_334_LEN 10 -#define MAVLINK_MSG_ID_334_MIN_LEN 10 - -#define MAVLINK_MSG_ID_CELLULAR_STATUS_CRC 72 -#define MAVLINK_MSG_ID_334_CRC 72 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_CELLULAR_STATUS { \ - 334, \ - "CELLULAR_STATUS", \ - 7, \ - { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_cellular_status_t, status) }, \ - { "failure_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_cellular_status_t, failure_reason) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_cellular_status_t, type) }, \ - { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_cellular_status_t, quality) }, \ - { "mcc", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cellular_status_t, mcc) }, \ - { "mnc", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_cellular_status_t, mnc) }, \ - { "lac", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_cellular_status_t, lac) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_CELLULAR_STATUS { \ - "CELLULAR_STATUS", \ - 7, \ - { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_cellular_status_t, status) }, \ - { "failure_reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_cellular_status_t, failure_reason) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_cellular_status_t, type) }, \ - { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_cellular_status_t, quality) }, \ - { "mcc", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_cellular_status_t, mcc) }, \ - { "mnc", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_cellular_status_t, mnc) }, \ - { "lac", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_cellular_status_t, lac) }, \ - } \ -} -#endif - -/** - * @brief Pack a cellular_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param status Cellular modem status - * @param failure_reason Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - * @param type Cellular network radio type: gsm, cdma, lte... - * @param quality Signal quality in percent. If unknown, set to UINT8_MAX - * @param mcc Mobile country code. If unknown, set to UINT16_MAX - * @param mnc Mobile network code. If unknown, set to UINT16_MAX - * @param lac Location area code. If unknown, set to 0 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_STATUS_LEN]; - _mav_put_uint16_t(buf, 0, mcc); - _mav_put_uint16_t(buf, 2, mnc); - _mav_put_uint16_t(buf, 4, lac); - _mav_put_uint8_t(buf, 6, status); - _mav_put_uint8_t(buf, 7, failure_reason); - _mav_put_uint8_t(buf, 8, type); - _mav_put_uint8_t(buf, 9, quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#else - mavlink_cellular_status_t packet; - packet.mcc = mcc; - packet.mnc = mnc; - packet.lac = lac; - packet.status = status; - packet.failure_reason = failure_reason; - packet.type = type; - packet.quality = quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -} - -/** - * @brief Pack a cellular_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param status Cellular modem status - * @param failure_reason Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - * @param type Cellular network radio type: gsm, cdma, lte... - * @param quality Signal quality in percent. If unknown, set to UINT8_MAX - * @param mcc Mobile country code. If unknown, set to UINT16_MAX - * @param mnc Mobile network code. If unknown, set to UINT16_MAX - * @param lac Location area code. If unknown, set to 0 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_STATUS_LEN]; - _mav_put_uint16_t(buf, 0, mcc); - _mav_put_uint16_t(buf, 2, mnc); - _mav_put_uint16_t(buf, 4, lac); - _mav_put_uint8_t(buf, 6, status); - _mav_put_uint8_t(buf, 7, failure_reason); - _mav_put_uint8_t(buf, 8, type); - _mav_put_uint8_t(buf, 9, quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#else - mavlink_cellular_status_t packet; - packet.mcc = mcc; - packet.mnc = mnc; - packet.lac = lac; - packet.status = status; - packet.failure_reason = failure_reason; - packet.type = type; - packet.quality = quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#endif -} - -/** - * @brief Pack a cellular_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param status Cellular modem status - * @param failure_reason Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - * @param type Cellular network radio type: gsm, cdma, lte... - * @param quality Signal quality in percent. If unknown, set to UINT8_MAX - * @param mcc Mobile country code. If unknown, set to UINT16_MAX - * @param mnc Mobile network code. If unknown, set to UINT16_MAX - * @param lac Location area code. If unknown, set to 0 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_cellular_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t status,uint8_t failure_reason,uint8_t type,uint8_t quality,uint16_t mcc,uint16_t mnc,uint16_t lac) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_STATUS_LEN]; - _mav_put_uint16_t(buf, 0, mcc); - _mav_put_uint16_t(buf, 2, mnc); - _mav_put_uint16_t(buf, 4, lac); - _mav_put_uint8_t(buf, 6, status); - _mav_put_uint8_t(buf, 7, failure_reason); - _mav_put_uint8_t(buf, 8, type); - _mav_put_uint8_t(buf, 9, quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#else - mavlink_cellular_status_t packet; - packet.mcc = mcc; - packet.mnc = mnc; - packet.lac = lac; - packet.status = status; - packet.failure_reason = failure_reason; - packet.type = type; - packet.quality = quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CELLULAR_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -} - -/** - * @brief Encode a cellular_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param cellular_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cellular_status_t* cellular_status) -{ - return mavlink_msg_cellular_status_pack(system_id, component_id, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac); -} - -/** - * @brief Encode a cellular_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param cellular_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cellular_status_t* cellular_status) -{ - return mavlink_msg_cellular_status_pack_chan(system_id, component_id, chan, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac); -} - -/** - * @brief Encode a cellular_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param cellular_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_cellular_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_cellular_status_t* cellular_status) -{ - return mavlink_msg_cellular_status_pack_status(system_id, component_id, _status, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac); -} - -/** - * @brief Send a cellular_status message - * @param chan MAVLink channel to send the message - * - * @param status Cellular modem status - * @param failure_reason Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - * @param type Cellular network radio type: gsm, cdma, lte... - * @param quality Signal quality in percent. If unknown, set to UINT8_MAX - * @param mcc Mobile country code. If unknown, set to UINT16_MAX - * @param mnc Mobile network code. If unknown, set to UINT16_MAX - * @param lac Location area code. If unknown, set to 0 - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_cellular_status_send(mavlink_channel_t chan, uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CELLULAR_STATUS_LEN]; - _mav_put_uint16_t(buf, 0, mcc); - _mav_put_uint16_t(buf, 2, mnc); - _mav_put_uint16_t(buf, 4, lac); - _mav_put_uint8_t(buf, 6, status); - _mav_put_uint8_t(buf, 7, failure_reason); - _mav_put_uint8_t(buf, 8, type); - _mav_put_uint8_t(buf, 9, quality); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, buf, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#else - mavlink_cellular_status_t packet; - packet.mcc = mcc; - packet.mnc = mnc; - packet.lac = lac; - packet.status = status; - packet.failure_reason = failure_reason; - packet.type = type; - packet.quality = quality; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (const char *)&packet, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#endif -} - -/** - * @brief Send a cellular_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_cellular_status_send_struct(mavlink_channel_t chan, const mavlink_cellular_status_t* cellular_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_cellular_status_send(chan, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (const char *)cellular_status, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_CELLULAR_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_cellular_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, mcc); - _mav_put_uint16_t(buf, 2, mnc); - _mav_put_uint16_t(buf, 4, lac); - _mav_put_uint8_t(buf, 6, status); - _mav_put_uint8_t(buf, 7, failure_reason); - _mav_put_uint8_t(buf, 8, type); - _mav_put_uint8_t(buf, 9, quality); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, buf, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#else - mavlink_cellular_status_t *packet = (mavlink_cellular_status_t *)msgbuf; - packet->mcc = mcc; - packet->mnc = mnc; - packet->lac = lac; - packet->status = status; - packet->failure_reason = failure_reason; - packet->type = type; - packet->quality = quality; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (const char *)packet, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE CELLULAR_STATUS UNPACKING - - -/** - * @brief Get field status from cellular_status message - * - * @return Cellular modem status - */ -static inline uint8_t mavlink_msg_cellular_status_get_status(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Get field failure_reason from cellular_status message - * - * @return Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - */ -static inline uint8_t mavlink_msg_cellular_status_get_failure_reason(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 7); -} - -/** - * @brief Get field type from cellular_status message - * - * @return Cellular network radio type: gsm, cdma, lte... - */ -static inline uint8_t mavlink_msg_cellular_status_get_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field quality from cellular_status message - * - * @return Signal quality in percent. If unknown, set to UINT8_MAX - */ -static inline uint8_t mavlink_msg_cellular_status_get_quality(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 9); -} - -/** - * @brief Get field mcc from cellular_status message - * - * @return Mobile country code. If unknown, set to UINT16_MAX - */ -static inline uint16_t mavlink_msg_cellular_status_get_mcc(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field mnc from cellular_status message - * - * @return Mobile network code. If unknown, set to UINT16_MAX - */ -static inline uint16_t mavlink_msg_cellular_status_get_mnc(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Get field lac from cellular_status message - * - * @return Location area code. If unknown, set to 0 - */ -static inline uint16_t mavlink_msg_cellular_status_get_lac(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 4); -} - -/** - * @brief Decode a cellular_status message into a struct - * - * @param msg The message to decode - * @param cellular_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_cellular_status_decode(const mavlink_message_t* msg, mavlink_cellular_status_t* cellular_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - cellular_status->mcc = mavlink_msg_cellular_status_get_mcc(msg); - cellular_status->mnc = mavlink_msg_cellular_status_get_mnc(msg); - cellular_status->lac = mavlink_msg_cellular_status_get_lac(msg); - cellular_status->status = mavlink_msg_cellular_status_get_status(msg); - cellular_status->failure_reason = mavlink_msg_cellular_status_get_failure_reason(msg); - cellular_status->type = mavlink_msg_cellular_status_get_type(msg); - cellular_status->quality = mavlink_msg_cellular_status_get_quality(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_CELLULAR_STATUS_LEN? msg->len : MAVLINK_MSG_ID_CELLULAR_STATUS_LEN; - memset(cellular_status, 0, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN); - memcpy(cellular_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_command_ack.h b/common/mavlink_msg_command_ack.h index 933bb33de..73db93f3c 100644 --- a/common/mavlink_msg_command_ack.h +++ b/common/mavlink_msg_command_ack.h @@ -7,10 +7,10 @@ typedef struct __mavlink_command_ack_t { uint16_t command; /*< Command ID (of acknowledged command).*/ uint8_t result; /*< Result of command.*/ - uint8_t progress; /*< [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown.*/ - int32_t result_param2; /*< Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown").*/ - uint8_t target_system; /*< System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement.*/ - uint8_t target_component; /*< Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement.*/ + uint8_t progress; /*< Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS.*/ + int32_t result_param2; /*< Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied.*/ + uint8_t target_system; /*< System which requested the command to be executed*/ + uint8_t target_component; /*< Component which requested the command to be executed*/ } mavlink_command_ack_t; #define MAVLINK_MSG_ID_COMMAND_ACK_LEN 10 @@ -58,10 +58,10 @@ typedef struct __mavlink_command_ack_t { * * @param command Command ID (of acknowledged command). * @param result Result of command. - * @param progress [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. - * @param result_param2 Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). - * @param target_system System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - * @param target_component Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @param progress Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS. + * @param result_param2 Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied. + * @param target_system System which requested the command to be executed + * @param target_component Component which requested the command to be executed * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -102,10 +102,10 @@ static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t c * * @param command Command ID (of acknowledged command). * @param result Result of command. - * @param progress [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. - * @param result_param2 Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). - * @param target_system System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - * @param target_component Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @param progress Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS. + * @param result_param2 Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied. + * @param target_system System which requested the command to be executed + * @param target_component Component which requested the command to be executed * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_command_ack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -149,10 +149,10 @@ static inline uint16_t mavlink_msg_command_ack_pack_status(uint8_t system_id, ui * @param msg The MAVLink message to compress the data into * @param command Command ID (of acknowledged command). * @param result Result of command. - * @param progress [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. - * @param result_param2 Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). - * @param target_system System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - * @param target_component Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @param progress Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS. + * @param result_param2 Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied. + * @param target_system System which requested the command to be executed + * @param target_component Component which requested the command to be executed * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -232,10 +232,10 @@ static inline uint16_t mavlink_msg_command_ack_encode_status(uint8_t system_id, * * @param command Command ID (of acknowledged command). * @param result Result of command. - * @param progress [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. - * @param result_param2 Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). - * @param target_system System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - * @param target_component Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @param progress Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS. + * @param result_param2 Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied. + * @param target_system System which requested the command to be executed + * @param target_component Component which requested the command to be executed */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -340,7 +340,7 @@ static inline uint8_t mavlink_msg_command_ack_get_result(const mavlink_message_t /** * @brief Get field progress from command_ack message * - * @return [%] The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. + * @return Also used as result_param1, it can be set with a enum containing the errors reasons of why the command was denied or the progress percentage or 255 if unknown the progress when result is MAV_RESULT_IN_PROGRESS. */ static inline uint8_t mavlink_msg_command_ack_get_progress(const mavlink_message_t* msg) { @@ -350,7 +350,7 @@ static inline uint8_t mavlink_msg_command_ack_get_progress(const mavlink_message /** * @brief Get field result_param2 from command_ack message * - * @return Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). + * @return Additional parameter of the result, example: which parameter of MAV_CMD_NAV_WAYPOINT caused it to be denied. */ static inline int32_t mavlink_msg_command_ack_get_result_param2(const mavlink_message_t* msg) { @@ -360,7 +360,7 @@ static inline int32_t mavlink_msg_command_ack_get_result_param2(const mavlink_me /** * @brief Get field target_system from command_ack message * - * @return System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @return System which requested the command to be executed */ static inline uint8_t mavlink_msg_command_ack_get_target_system(const mavlink_message_t* msg) { @@ -370,7 +370,7 @@ static inline uint8_t mavlink_msg_command_ack_get_target_system(const mavlink_me /** * @brief Get field target_component from command_ack message * - * @return Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. + * @return Component which requested the command to be executed */ static inline uint8_t mavlink_msg_command_ack_get_target_component(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_command_cancel.h b/common/mavlink_msg_command_cancel.h deleted file mode 100644 index 25940b967..000000000 --- a/common/mavlink_msg_command_cancel.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE COMMAND_CANCEL PACKING - -#define MAVLINK_MSG_ID_COMMAND_CANCEL 80 - - -typedef struct __mavlink_command_cancel_t { - uint16_t command; /*< Command ID (of command to cancel).*/ - uint8_t target_system; /*< System executing long running command. Should not be broadcast (0).*/ - uint8_t target_component; /*< Component executing long running command.*/ -} mavlink_command_cancel_t; - -#define MAVLINK_MSG_ID_COMMAND_CANCEL_LEN 4 -#define MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN 4 -#define MAVLINK_MSG_ID_80_LEN 4 -#define MAVLINK_MSG_ID_80_MIN_LEN 4 - -#define MAVLINK_MSG_ID_COMMAND_CANCEL_CRC 14 -#define MAVLINK_MSG_ID_80_CRC 14 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_COMMAND_CANCEL { \ - 80, \ - "COMMAND_CANCEL", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_command_cancel_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_command_cancel_t, target_component) }, \ - { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_command_cancel_t, command) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_COMMAND_CANCEL { \ - "COMMAND_CANCEL", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_command_cancel_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_command_cancel_t, target_component) }, \ - { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_command_cancel_t, command) }, \ - } \ -} -#endif - -/** - * @brief Pack a command_cancel message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System executing long running command. Should not be broadcast (0). - * @param target_component Component executing long running command. - * @param command Command ID (of command to cancel). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_command_cancel_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMMAND_CANCEL_LEN]; - _mav_put_uint16_t(buf, 0, command); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#else - mavlink_command_cancel_t packet; - packet.command = command; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMMAND_CANCEL; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -} - -/** - * @brief Pack a command_cancel message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System executing long running command. Should not be broadcast (0). - * @param target_component Component executing long running command. - * @param command Command ID (of command to cancel). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_command_cancel_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMMAND_CANCEL_LEN]; - _mav_put_uint16_t(buf, 0, command); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#else - mavlink_command_cancel_t packet; - packet.command = command; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMMAND_CANCEL; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#endif -} - -/** - * @brief Pack a command_cancel message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System executing long running command. Should not be broadcast (0). - * @param target_component Component executing long running command. - * @param command Command ID (of command to cancel). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_command_cancel_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMMAND_CANCEL_LEN]; - _mav_put_uint16_t(buf, 0, command); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#else - mavlink_command_cancel_t packet; - packet.command = command; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMMAND_CANCEL; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -} - -/** - * @brief Encode a command_cancel struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param command_cancel C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_command_cancel_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_cancel_t* command_cancel) -{ - return mavlink_msg_command_cancel_pack(system_id, component_id, msg, command_cancel->target_system, command_cancel->target_component, command_cancel->command); -} - -/** - * @brief Encode a command_cancel struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param command_cancel C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_command_cancel_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_command_cancel_t* command_cancel) -{ - return mavlink_msg_command_cancel_pack_chan(system_id, component_id, chan, msg, command_cancel->target_system, command_cancel->target_component, command_cancel->command); -} - -/** - * @brief Encode a command_cancel struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param command_cancel C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_command_cancel_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_command_cancel_t* command_cancel) -{ - return mavlink_msg_command_cancel_pack_status(system_id, component_id, _status, msg, command_cancel->target_system, command_cancel->target_component, command_cancel->command); -} - -/** - * @brief Send a command_cancel message - * @param chan MAVLink channel to send the message - * - * @param target_system System executing long running command. Should not be broadcast (0). - * @param target_component Component executing long running command. - * @param command Command ID (of command to cancel). - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_command_cancel_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMMAND_CANCEL_LEN]; - _mav_put_uint16_t(buf, 0, command); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_CANCEL, buf, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#else - mavlink_command_cancel_t packet; - packet.command = command; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_CANCEL, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#endif -} - -/** - * @brief Send a command_cancel message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_command_cancel_send_struct(mavlink_channel_t chan, const mavlink_command_cancel_t* command_cancel) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_command_cancel_send(chan, command_cancel->target_system, command_cancel->target_component, command_cancel->command); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_CANCEL, (const char *)command_cancel, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#endif -} - -#if MAVLINK_MSG_ID_COMMAND_CANCEL_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_command_cancel_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, command); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_CANCEL, buf, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#else - mavlink_command_cancel_t *packet = (mavlink_command_cancel_t *)msgbuf; - packet->command = command; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_CANCEL, (const char *)packet, MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN, MAVLINK_MSG_ID_COMMAND_CANCEL_CRC); -#endif -} -#endif - -#endif - -// MESSAGE COMMAND_CANCEL UNPACKING - - -/** - * @brief Get field target_system from command_cancel message - * - * @return System executing long running command. Should not be broadcast (0). - */ -static inline uint8_t mavlink_msg_command_cancel_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field target_component from command_cancel message - * - * @return Component executing long running command. - */ -static inline uint8_t mavlink_msg_command_cancel_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field command from command_cancel message - * - * @return Command ID (of command to cancel). - */ -static inline uint16_t mavlink_msg_command_cancel_get_command(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Decode a command_cancel message into a struct - * - * @param msg The message to decode - * @param command_cancel C-struct to decode the message contents into - */ -static inline void mavlink_msg_command_cancel_decode(const mavlink_message_t* msg, mavlink_command_cancel_t* command_cancel) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - command_cancel->command = mavlink_msg_command_cancel_get_command(msg); - command_cancel->target_system = mavlink_msg_command_cancel_get_target_system(msg); - command_cancel->target_component = mavlink_msg_command_cancel_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_COMMAND_CANCEL_LEN? msg->len : MAVLINK_MSG_ID_COMMAND_CANCEL_LEN; - memset(command_cancel, 0, MAVLINK_MSG_ID_COMMAND_CANCEL_LEN); - memcpy(command_cancel, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_component_information.h b/common/mavlink_msg_component_information.h deleted file mode 100644 index 7a3f79288..000000000 --- a/common/mavlink_msg_component_information.h +++ /dev/null @@ -1,363 +0,0 @@ -#pragma once -// MESSAGE COMPONENT_INFORMATION PACKING - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION 395 - - -typedef struct __mavlink_component_information_t { - uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - uint32_t general_metadata_file_crc; /*< CRC32 of the general metadata file (general_metadata_uri).*/ - uint32_t peripherals_metadata_file_crc; /*< CRC32 of peripherals metadata file (peripherals_metadata_uri).*/ - char general_metadata_uri[100]; /*< MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated.*/ - char peripherals_metadata_uri[100]; /*< (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated.*/ -} mavlink_component_information_t; - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN 212 -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN 212 -#define MAVLINK_MSG_ID_395_LEN 212 -#define MAVLINK_MSG_ID_395_MIN_LEN 212 - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC 0 -#define MAVLINK_MSG_ID_395_CRC 0 - -#define MAVLINK_MSG_COMPONENT_INFORMATION_FIELD_GENERAL_METADATA_URI_LEN 100 -#define MAVLINK_MSG_COMPONENT_INFORMATION_FIELD_PERIPHERALS_METADATA_URI_LEN 100 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION { \ - 395, \ - "COMPONENT_INFORMATION", \ - 5, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_component_information_t, time_boot_ms) }, \ - { "general_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_component_information_t, general_metadata_file_crc) }, \ - { "general_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100, 12, offsetof(mavlink_component_information_t, general_metadata_uri) }, \ - { "peripherals_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_component_information_t, peripherals_metadata_file_crc) }, \ - { "peripherals_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100, 112, offsetof(mavlink_component_information_t, peripherals_metadata_uri) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION { \ - "COMPONENT_INFORMATION", \ - 5, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_component_information_t, time_boot_ms) }, \ - { "general_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_component_information_t, general_metadata_file_crc) }, \ - { "general_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100, 12, offsetof(mavlink_component_information_t, general_metadata_uri) }, \ - { "peripherals_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_component_information_t, peripherals_metadata_file_crc) }, \ - { "peripherals_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100, 112, offsetof(mavlink_component_information_t, peripherals_metadata_uri) }, \ - } \ -} -#endif - -/** - * @brief Pack a component_information message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param general_metadata_file_crc CRC32 of the general metadata file (general_metadata_uri). - * @param general_metadata_uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @param peripherals_metadata_file_crc CRC32 of peripherals metadata file (peripherals_metadata_uri). - * @param peripherals_metadata_uri (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint32_t general_metadata_file_crc, const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc, const char *peripherals_metadata_uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, general_metadata_file_crc); - _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc); - _mav_put_char_array(buf, 12, general_metadata_uri, 100); - _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#else - mavlink_component_information_t packet; - packet.time_boot_ms = time_boot_ms; - packet.general_metadata_file_crc = general_metadata_file_crc; - packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc; - mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -} - -/** - * @brief Pack a component_information message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param general_metadata_file_crc CRC32 of the general metadata file (general_metadata_uri). - * @param general_metadata_uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @param peripherals_metadata_file_crc CRC32 of peripherals metadata file (peripherals_metadata_uri). - * @param peripherals_metadata_uri (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint32_t general_metadata_file_crc, const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc, const char *peripherals_metadata_uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, general_metadata_file_crc); - _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc); - _mav_put_char_array(buf, 12, general_metadata_uri, 100); - _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#else - mavlink_component_information_t packet; - packet.time_boot_ms = time_boot_ms; - packet.general_metadata_file_crc = general_metadata_file_crc; - packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc; - mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#endif -} - -/** - * @brief Pack a component_information message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param general_metadata_file_crc CRC32 of the general metadata file (general_metadata_uri). - * @param general_metadata_uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @param peripherals_metadata_file_crc CRC32 of peripherals metadata file (peripherals_metadata_uri). - * @param peripherals_metadata_uri (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,uint32_t general_metadata_file_crc,const char *general_metadata_uri,uint32_t peripherals_metadata_file_crc,const char *peripherals_metadata_uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, general_metadata_file_crc); - _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc); - _mav_put_char_array(buf, 12, general_metadata_uri, 100); - _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#else - mavlink_component_information_t packet; - packet.time_boot_ms = time_boot_ms; - packet.general_metadata_file_crc = general_metadata_file_crc; - packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc; - mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -} - -/** - * @brief Encode a component_information struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param component_information C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_component_information_t* component_information) -{ - return mavlink_msg_component_information_pack(system_id, component_id, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri); -} - -/** - * @brief Encode a component_information struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param component_information C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_component_information_t* component_information) -{ - return mavlink_msg_component_information_pack_chan(system_id, component_id, chan, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri); -} - -/** - * @brief Encode a component_information struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param component_information C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_component_information_t* component_information) -{ - return mavlink_msg_component_information_pack_status(system_id, component_id, _status, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri); -} - -/** - * @brief Send a component_information message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param general_metadata_file_crc CRC32 of the general metadata file (general_metadata_uri). - * @param general_metadata_uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @param peripherals_metadata_file_crc CRC32 of peripherals metadata file (peripherals_metadata_uri). - * @param peripherals_metadata_uri (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_component_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t general_metadata_file_crc, const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc, const char *peripherals_metadata_uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, general_metadata_file_crc); - _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc); - _mav_put_char_array(buf, 12, general_metadata_uri, 100); - _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#else - mavlink_component_information_t packet; - packet.time_boot_ms = time_boot_ms; - packet.general_metadata_file_crc = general_metadata_file_crc; - packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc; - mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri, sizeof(char)*100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#endif -} - -/** - * @brief Send a component_information message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_component_information_send_struct(mavlink_channel_t chan, const mavlink_component_information_t* component_information) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_component_information_send(chan, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (const char *)component_information, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#endif -} - -#if MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_component_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t general_metadata_file_crc, const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc, const char *peripherals_metadata_uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, general_metadata_file_crc); - _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc); - _mav_put_char_array(buf, 12, general_metadata_uri, 100); - _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#else - mavlink_component_information_t *packet = (mavlink_component_information_t *)msgbuf; - packet->time_boot_ms = time_boot_ms; - packet->general_metadata_file_crc = general_metadata_file_crc; - packet->peripherals_metadata_file_crc = peripherals_metadata_file_crc; - mav_array_memcpy(packet->general_metadata_uri, general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet->peripherals_metadata_uri, peripherals_metadata_uri, sizeof(char)*100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC); -#endif -} -#endif - -#endif - -// MESSAGE COMPONENT_INFORMATION UNPACKING - - -/** - * @brief Get field time_boot_ms from component_information message - * - * @return [ms] Timestamp (time since system boot). - */ -static inline uint32_t mavlink_msg_component_information_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field general_metadata_file_crc from component_information message - * - * @return CRC32 of the general metadata file (general_metadata_uri). - */ -static inline uint32_t mavlink_msg_component_information_get_general_metadata_file_crc(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field general_metadata_uri from component_information message - * - * @return MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - */ -static inline uint16_t mavlink_msg_component_information_get_general_metadata_uri(const mavlink_message_t* msg, char *general_metadata_uri) -{ - return _MAV_RETURN_char_array(msg, general_metadata_uri, 100, 12); -} - -/** - * @brief Get field peripherals_metadata_file_crc from component_information message - * - * @return CRC32 of peripherals metadata file (peripherals_metadata_uri). - */ -static inline uint32_t mavlink_msg_component_information_get_peripherals_metadata_file_crc(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field peripherals_metadata_uri from component_information message - * - * @return (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - */ -static inline uint16_t mavlink_msg_component_information_get_peripherals_metadata_uri(const mavlink_message_t* msg, char *peripherals_metadata_uri) -{ - return _MAV_RETURN_char_array(msg, peripherals_metadata_uri, 100, 112); -} - -/** - * @brief Decode a component_information message into a struct - * - * @param msg The message to decode - * @param component_information C-struct to decode the message contents into - */ -static inline void mavlink_msg_component_information_decode(const mavlink_message_t* msg, mavlink_component_information_t* component_information) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - component_information->time_boot_ms = mavlink_msg_component_information_get_time_boot_ms(msg); - component_information->general_metadata_file_crc = mavlink_msg_component_information_get_general_metadata_file_crc(msg); - component_information->peripherals_metadata_file_crc = mavlink_msg_component_information_get_peripherals_metadata_file_crc(msg); - mavlink_msg_component_information_get_general_metadata_uri(msg, component_information->general_metadata_uri); - mavlink_msg_component_information_get_peripherals_metadata_uri(msg, component_information->peripherals_metadata_uri); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN; - memset(component_information, 0, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN); - memcpy(component_information, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_component_information_basic.h b/common/mavlink_msg_component_information_basic.h deleted file mode 100644 index f935b4675..000000000 --- a/common/mavlink_msg_component_information_basic.h +++ /dev/null @@ -1,450 +0,0 @@ -#pragma once -// MESSAGE COMPONENT_INFORMATION_BASIC PACKING - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC 396 - - -typedef struct __mavlink_component_information_basic_t { - uint64_t capabilities; /*< Component capability flags*/ - uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - uint32_t time_manufacture_s; /*< [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds.*/ - char vendor_name[32]; /*< Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros.*/ - char model_name[32]; /*< Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros.*/ - char software_version[24]; /*< Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros.*/ - char hardware_version[24]; /*< Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros.*/ - char serial_number[32]; /*< Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros.*/ -} mavlink_component_information_basic_t; - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN 160 -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN 160 -#define MAVLINK_MSG_ID_396_LEN 160 -#define MAVLINK_MSG_ID_396_MIN_LEN 160 - -#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC 50 -#define MAVLINK_MSG_ID_396_CRC 50 - -#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_VENDOR_NAME_LEN 32 -#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_MODEL_NAME_LEN 32 -#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_SOFTWARE_VERSION_LEN 24 -#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_HARDWARE_VERSION_LEN 24 -#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_SERIAL_NUMBER_LEN 32 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC { \ - 396, \ - "COMPONENT_INFORMATION_BASIC", \ - 8, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_component_information_basic_t, time_boot_ms) }, \ - { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_component_information_basic_t, capabilities) }, \ - { "time_manufacture_s", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_component_information_basic_t, time_manufacture_s) }, \ - { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32, 16, offsetof(mavlink_component_information_basic_t, vendor_name) }, \ - { "model_name", NULL, MAVLINK_TYPE_CHAR, 32, 48, offsetof(mavlink_component_information_basic_t, model_name) }, \ - { "software_version", NULL, MAVLINK_TYPE_CHAR, 24, 80, offsetof(mavlink_component_information_basic_t, software_version) }, \ - { "hardware_version", NULL, MAVLINK_TYPE_CHAR, 24, 104, offsetof(mavlink_component_information_basic_t, hardware_version) }, \ - { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32, 128, offsetof(mavlink_component_information_basic_t, serial_number) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC { \ - "COMPONENT_INFORMATION_BASIC", \ - 8, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_component_information_basic_t, time_boot_ms) }, \ - { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_component_information_basic_t, capabilities) }, \ - { "time_manufacture_s", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_component_information_basic_t, time_manufacture_s) }, \ - { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32, 16, offsetof(mavlink_component_information_basic_t, vendor_name) }, \ - { "model_name", NULL, MAVLINK_TYPE_CHAR, 32, 48, offsetof(mavlink_component_information_basic_t, model_name) }, \ - { "software_version", NULL, MAVLINK_TYPE_CHAR, 24, 80, offsetof(mavlink_component_information_basic_t, software_version) }, \ - { "hardware_version", NULL, MAVLINK_TYPE_CHAR, 24, 104, offsetof(mavlink_component_information_basic_t, hardware_version) }, \ - { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32, 128, offsetof(mavlink_component_information_basic_t, serial_number) }, \ - } \ -} -#endif - -/** - * @brief Pack a component_information_basic message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param capabilities Component capability flags - * @param time_manufacture_s [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - * @param vendor_name Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param model_name Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param software_version Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param hardware_version Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param serial_number Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_basic_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s, const char *vendor_name, const char *model_name, const char *software_version, const char *hardware_version, const char *serial_number) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN]; - _mav_put_uint64_t(buf, 0, capabilities); - _mav_put_uint32_t(buf, 8, time_boot_ms); - _mav_put_uint32_t(buf, 12, time_manufacture_s); - _mav_put_char_array(buf, 16, vendor_name, 32); - _mav_put_char_array(buf, 48, model_name, 32); - _mav_put_char_array(buf, 80, software_version, 24); - _mav_put_char_array(buf, 104, hardware_version, 24); - _mav_put_char_array(buf, 128, serial_number, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#else - mavlink_component_information_basic_t packet; - packet.capabilities = capabilities; - packet.time_boot_ms = time_boot_ms; - packet.time_manufacture_s = time_manufacture_s; - mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(char)*32); - mav_array_memcpy(packet.model_name, model_name, sizeof(char)*32); - mav_array_memcpy(packet.software_version, software_version, sizeof(char)*24); - mav_array_memcpy(packet.hardware_version, hardware_version, sizeof(char)*24); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -} - -/** - * @brief Pack a component_information_basic message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param capabilities Component capability flags - * @param time_manufacture_s [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - * @param vendor_name Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param model_name Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param software_version Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param hardware_version Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param serial_number Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_basic_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s, const char *vendor_name, const char *model_name, const char *software_version, const char *hardware_version, const char *serial_number) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN]; - _mav_put_uint64_t(buf, 0, capabilities); - _mav_put_uint32_t(buf, 8, time_boot_ms); - _mav_put_uint32_t(buf, 12, time_manufacture_s); - _mav_put_char_array(buf, 16, vendor_name, 32); - _mav_put_char_array(buf, 48, model_name, 32); - _mav_put_char_array(buf, 80, software_version, 24); - _mav_put_char_array(buf, 104, hardware_version, 24); - _mav_put_char_array(buf, 128, serial_number, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#else - mavlink_component_information_basic_t packet; - packet.capabilities = capabilities; - packet.time_boot_ms = time_boot_ms; - packet.time_manufacture_s = time_manufacture_s; - mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(char)*32); - mav_array_memcpy(packet.model_name, model_name, sizeof(char)*32); - mav_array_memcpy(packet.software_version, software_version, sizeof(char)*24); - mav_array_memcpy(packet.hardware_version, hardware_version, sizeof(char)*24); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#endif -} - -/** - * @brief Pack a component_information_basic message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param capabilities Component capability flags - * @param time_manufacture_s [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - * @param vendor_name Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param model_name Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param software_version Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param hardware_version Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param serial_number Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_information_basic_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,uint64_t capabilities,uint32_t time_manufacture_s,const char *vendor_name,const char *model_name,const char *software_version,const char *hardware_version,const char *serial_number) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN]; - _mav_put_uint64_t(buf, 0, capabilities); - _mav_put_uint32_t(buf, 8, time_boot_ms); - _mav_put_uint32_t(buf, 12, time_manufacture_s); - _mav_put_char_array(buf, 16, vendor_name, 32); - _mav_put_char_array(buf, 48, model_name, 32); - _mav_put_char_array(buf, 80, software_version, 24); - _mav_put_char_array(buf, 104, hardware_version, 24); - _mav_put_char_array(buf, 128, serial_number, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#else - mavlink_component_information_basic_t packet; - packet.capabilities = capabilities; - packet.time_boot_ms = time_boot_ms; - packet.time_manufacture_s = time_manufacture_s; - mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(char)*32); - mav_array_memcpy(packet.model_name, model_name, sizeof(char)*32); - mav_array_memcpy(packet.software_version, software_version, sizeof(char)*24); - mav_array_memcpy(packet.hardware_version, hardware_version, sizeof(char)*24); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -} - -/** - * @brief Encode a component_information_basic struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param component_information_basic C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_basic_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_component_information_basic_t* component_information_basic) -{ - return mavlink_msg_component_information_basic_pack(system_id, component_id, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number); -} - -/** - * @brief Encode a component_information_basic struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param component_information_basic C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_basic_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_component_information_basic_t* component_information_basic) -{ - return mavlink_msg_component_information_basic_pack_chan(system_id, component_id, chan, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number); -} - -/** - * @brief Encode a component_information_basic struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param component_information_basic C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_information_basic_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_component_information_basic_t* component_information_basic) -{ - return mavlink_msg_component_information_basic_pack_status(system_id, component_id, _status, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number); -} - -/** - * @brief Send a component_information_basic message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param capabilities Component capability flags - * @param time_manufacture_s [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - * @param vendor_name Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param model_name Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - * @param software_version Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param hardware_version Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - * @param serial_number Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_component_information_basic_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s, const char *vendor_name, const char *model_name, const char *software_version, const char *hardware_version, const char *serial_number) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN]; - _mav_put_uint64_t(buf, 0, capabilities); - _mav_put_uint32_t(buf, 8, time_boot_ms); - _mav_put_uint32_t(buf, 12, time_manufacture_s); - _mav_put_char_array(buf, 16, vendor_name, 32); - _mav_put_char_array(buf, 48, model_name, 32); - _mav_put_char_array(buf, 80, software_version, 24); - _mav_put_char_array(buf, 104, hardware_version, 24); - _mav_put_char_array(buf, 128, serial_number, 32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#else - mavlink_component_information_basic_t packet; - packet.capabilities = capabilities; - packet.time_boot_ms = time_boot_ms; - packet.time_manufacture_s = time_manufacture_s; - mav_array_memcpy(packet.vendor_name, vendor_name, sizeof(char)*32); - mav_array_memcpy(packet.model_name, model_name, sizeof(char)*32); - mav_array_memcpy(packet.software_version, software_version, sizeof(char)*24); - mav_array_memcpy(packet.hardware_version, hardware_version, sizeof(char)*24); - mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (const char *)&packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#endif -} - -/** - * @brief Send a component_information_basic message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_component_information_basic_send_struct(mavlink_channel_t chan, const mavlink_component_information_basic_t* component_information_basic) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_component_information_basic_send(chan, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (const char *)component_information_basic, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#endif -} - -#if MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_component_information_basic_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s, const char *vendor_name, const char *model_name, const char *software_version, const char *hardware_version, const char *serial_number) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, capabilities); - _mav_put_uint32_t(buf, 8, time_boot_ms); - _mav_put_uint32_t(buf, 12, time_manufacture_s); - _mav_put_char_array(buf, 16, vendor_name, 32); - _mav_put_char_array(buf, 48, model_name, 32); - _mav_put_char_array(buf, 80, software_version, 24); - _mav_put_char_array(buf, 104, hardware_version, 24); - _mav_put_char_array(buf, 128, serial_number, 32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#else - mavlink_component_information_basic_t *packet = (mavlink_component_information_basic_t *)msgbuf; - packet->capabilities = capabilities; - packet->time_boot_ms = time_boot_ms; - packet->time_manufacture_s = time_manufacture_s; - mav_array_memcpy(packet->vendor_name, vendor_name, sizeof(char)*32); - mav_array_memcpy(packet->model_name, model_name, sizeof(char)*32); - mav_array_memcpy(packet->software_version, software_version, sizeof(char)*24); - mav_array_memcpy(packet->hardware_version, hardware_version, sizeof(char)*24); - mav_array_memcpy(packet->serial_number, serial_number, sizeof(char)*32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (const char *)packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC); -#endif -} -#endif - -#endif - -// MESSAGE COMPONENT_INFORMATION_BASIC UNPACKING - - -/** - * @brief Get field time_boot_ms from component_information_basic message - * - * @return [ms] Timestamp (time since system boot). - */ -static inline uint32_t mavlink_msg_component_information_basic_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field capabilities from component_information_basic message - * - * @return Component capability flags - */ -static inline uint64_t mavlink_msg_component_information_basic_get_capabilities(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field time_manufacture_s from component_information_basic message - * - * @return [s] Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - */ -static inline uint32_t mavlink_msg_component_information_basic_get_time_manufacture_s(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 12); -} - -/** - * @brief Get field vendor_name from component_information_basic message - * - * @return Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - */ -static inline uint16_t mavlink_msg_component_information_basic_get_vendor_name(const mavlink_message_t* msg, char *vendor_name) -{ - return _MAV_RETURN_char_array(msg, vendor_name, 32, 16); -} - -/** - * @brief Get field model_name from component_information_basic message - * - * @return Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - */ -static inline uint16_t mavlink_msg_component_information_basic_get_model_name(const mavlink_message_t* msg, char *model_name) -{ - return _MAV_RETURN_char_array(msg, model_name, 32, 48); -} - -/** - * @brief Get field software_version from component_information_basic message - * - * @return Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - */ -static inline uint16_t mavlink_msg_component_information_basic_get_software_version(const mavlink_message_t* msg, char *software_version) -{ - return _MAV_RETURN_char_array(msg, software_version, 24, 80); -} - -/** - * @brief Get field hardware_version from component_information_basic message - * - * @return Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - */ -static inline uint16_t mavlink_msg_component_information_basic_get_hardware_version(const mavlink_message_t* msg, char *hardware_version) -{ - return _MAV_RETURN_char_array(msg, hardware_version, 24, 104); -} - -/** - * @brief Get field serial_number from component_information_basic message - * - * @return Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - */ -static inline uint16_t mavlink_msg_component_information_basic_get_serial_number(const mavlink_message_t* msg, char *serial_number) -{ - return _MAV_RETURN_char_array(msg, serial_number, 32, 128); -} - -/** - * @brief Decode a component_information_basic message into a struct - * - * @param msg The message to decode - * @param component_information_basic C-struct to decode the message contents into - */ -static inline void mavlink_msg_component_information_basic_decode(const mavlink_message_t* msg, mavlink_component_information_basic_t* component_information_basic) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - component_information_basic->capabilities = mavlink_msg_component_information_basic_get_capabilities(msg); - component_information_basic->time_boot_ms = mavlink_msg_component_information_basic_get_time_boot_ms(msg); - component_information_basic->time_manufacture_s = mavlink_msg_component_information_basic_get_time_manufacture_s(msg); - mavlink_msg_component_information_basic_get_vendor_name(msg, component_information_basic->vendor_name); - mavlink_msg_component_information_basic_get_model_name(msg, component_information_basic->model_name); - mavlink_msg_component_information_basic_get_software_version(msg, component_information_basic->software_version); - mavlink_msg_component_information_basic_get_hardware_version(msg, component_information_basic->hardware_version); - mavlink_msg_component_information_basic_get_serial_number(msg, component_information_basic->serial_number); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN; - memset(component_information_basic, 0, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN); - memcpy(component_information_basic, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_component_metadata.h b/common/mavlink_msg_component_metadata.h deleted file mode 100644 index aa4c1520e..000000000 --- a/common/mavlink_msg_component_metadata.h +++ /dev/null @@ -1,306 +0,0 @@ -#pragma once -// MESSAGE COMPONENT_METADATA PACKING - -#define MAVLINK_MSG_ID_COMPONENT_METADATA 397 - - -typedef struct __mavlink_component_metadata_t { - uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - uint32_t file_crc; /*< CRC32 of the general metadata file.*/ - char uri[100]; /*< MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated.*/ -} mavlink_component_metadata_t; - -#define MAVLINK_MSG_ID_COMPONENT_METADATA_LEN 108 -#define MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN 108 -#define MAVLINK_MSG_ID_397_LEN 108 -#define MAVLINK_MSG_ID_397_MIN_LEN 108 - -#define MAVLINK_MSG_ID_COMPONENT_METADATA_CRC 182 -#define MAVLINK_MSG_ID_397_CRC 182 - -#define MAVLINK_MSG_COMPONENT_METADATA_FIELD_URI_LEN 100 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_COMPONENT_METADATA { \ - 397, \ - "COMPONENT_METADATA", \ - 3, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_component_metadata_t, time_boot_ms) }, \ - { "file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_component_metadata_t, file_crc) }, \ - { "uri", NULL, MAVLINK_TYPE_CHAR, 100, 8, offsetof(mavlink_component_metadata_t, uri) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_COMPONENT_METADATA { \ - "COMPONENT_METADATA", \ - 3, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_component_metadata_t, time_boot_ms) }, \ - { "file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_component_metadata_t, file_crc) }, \ - { "uri", NULL, MAVLINK_TYPE_CHAR, 100, 8, offsetof(mavlink_component_metadata_t, uri) }, \ - } \ -} -#endif - -/** - * @brief Pack a component_metadata message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param file_crc CRC32 of the general metadata file. - * @param uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_metadata_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint32_t file_crc, const char *uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_METADATA_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, file_crc); - _mav_put_char_array(buf, 8, uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#else - mavlink_component_metadata_t packet; - packet.time_boot_ms = time_boot_ms; - packet.file_crc = file_crc; - mav_array_memcpy(packet.uri, uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_METADATA; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -} - -/** - * @brief Pack a component_metadata message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param file_crc CRC32 of the general metadata file. - * @param uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_metadata_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint32_t file_crc, const char *uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_METADATA_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, file_crc); - _mav_put_char_array(buf, 8, uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#else - mavlink_component_metadata_t packet; - packet.time_boot_ms = time_boot_ms; - packet.file_crc = file_crc; - mav_array_memcpy(packet.uri, uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_METADATA; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#endif -} - -/** - * @brief Pack a component_metadata message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param file_crc CRC32 of the general metadata file. - * @param uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_component_metadata_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,uint32_t file_crc,const char *uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_METADATA_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, file_crc); - _mav_put_char_array(buf, 8, uri, 100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#else - mavlink_component_metadata_t packet; - packet.time_boot_ms = time_boot_ms; - packet.file_crc = file_crc; - mav_array_memcpy(packet.uri, uri, sizeof(char)*100); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_COMPONENT_METADATA; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -} - -/** - * @brief Encode a component_metadata struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param component_metadata C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_metadata_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_component_metadata_t* component_metadata) -{ - return mavlink_msg_component_metadata_pack(system_id, component_id, msg, component_metadata->time_boot_ms, component_metadata->file_crc, component_metadata->uri); -} - -/** - * @brief Encode a component_metadata struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param component_metadata C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_metadata_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_component_metadata_t* component_metadata) -{ - return mavlink_msg_component_metadata_pack_chan(system_id, component_id, chan, msg, component_metadata->time_boot_ms, component_metadata->file_crc, component_metadata->uri); -} - -/** - * @brief Encode a component_metadata struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param component_metadata C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_component_metadata_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_component_metadata_t* component_metadata) -{ - return mavlink_msg_component_metadata_pack_status(system_id, component_id, _status, msg, component_metadata->time_boot_ms, component_metadata->file_crc, component_metadata->uri); -} - -/** - * @brief Send a component_metadata message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param file_crc CRC32 of the general metadata file. - * @param uri MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_component_metadata_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t file_crc, const char *uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_COMPONENT_METADATA_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, file_crc); - _mav_put_char_array(buf, 8, uri, 100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_METADATA, buf, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#else - mavlink_component_metadata_t packet; - packet.time_boot_ms = time_boot_ms; - packet.file_crc = file_crc; - mav_array_memcpy(packet.uri, uri, sizeof(char)*100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_METADATA, (const char *)&packet, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#endif -} - -/** - * @brief Send a component_metadata message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_component_metadata_send_struct(mavlink_channel_t chan, const mavlink_component_metadata_t* component_metadata) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_component_metadata_send(chan, component_metadata->time_boot_ms, component_metadata->file_crc, component_metadata->uri); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_METADATA, (const char *)component_metadata, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#endif -} - -#if MAVLINK_MSG_ID_COMPONENT_METADATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_component_metadata_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t file_crc, const char *uri) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint32_t(buf, 4, file_crc); - _mav_put_char_array(buf, 8, uri, 100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_METADATA, buf, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#else - mavlink_component_metadata_t *packet = (mavlink_component_metadata_t *)msgbuf; - packet->time_boot_ms = time_boot_ms; - packet->file_crc = file_crc; - mav_array_memcpy(packet->uri, uri, sizeof(char)*100); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_METADATA, (const char *)packet, MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN, MAVLINK_MSG_ID_COMPONENT_METADATA_CRC); -#endif -} -#endif - -#endif - -// MESSAGE COMPONENT_METADATA UNPACKING - - -/** - * @brief Get field time_boot_ms from component_metadata message - * - * @return [ms] Timestamp (time since system boot). - */ -static inline uint32_t mavlink_msg_component_metadata_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field file_crc from component_metadata message - * - * @return CRC32 of the general metadata file. - */ -static inline uint32_t mavlink_msg_component_metadata_get_file_crc(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field uri from component_metadata message - * - * @return MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - */ -static inline uint16_t mavlink_msg_component_metadata_get_uri(const mavlink_message_t* msg, char *uri) -{ - return _MAV_RETURN_char_array(msg, uri, 100, 8); -} - -/** - * @brief Decode a component_metadata message into a struct - * - * @param msg The message to decode - * @param component_metadata C-struct to decode the message contents into - */ -static inline void mavlink_msg_component_metadata_decode(const mavlink_message_t* msg, mavlink_component_metadata_t* component_metadata) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - component_metadata->time_boot_ms = mavlink_msg_component_metadata_get_time_boot_ms(msg); - component_metadata->file_crc = mavlink_msg_component_metadata_get_file_crc(msg); - mavlink_msg_component_metadata_get_uri(msg, component_metadata->uri); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_METADATA_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_METADATA_LEN; - memset(component_metadata, 0, MAVLINK_MSG_ID_COMPONENT_METADATA_LEN); - memcpy(component_metadata, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_current_event_sequence.h b/common/mavlink_msg_current_event_sequence.h deleted file mode 100644 index e15d2929c..000000000 --- a/common/mavlink_msg_current_event_sequence.h +++ /dev/null @@ -1,288 +0,0 @@ -#pragma once -// MESSAGE CURRENT_EVENT_SEQUENCE PACKING - -#define MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE 411 - - -typedef struct __mavlink_current_event_sequence_t { - uint16_t sequence; /*< Sequence number.*/ - uint8_t flags; /*< Flag bitset.*/ -} mavlink_current_event_sequence_t; - -#define MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN 3 -#define MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN 3 -#define MAVLINK_MSG_ID_411_LEN 3 -#define MAVLINK_MSG_ID_411_MIN_LEN 3 - -#define MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC 106 -#define MAVLINK_MSG_ID_411_CRC 106 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE { \ - 411, \ - "CURRENT_EVENT_SEQUENCE", \ - 2, \ - { { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_current_event_sequence_t, sequence) }, \ - { "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_current_event_sequence_t, flags) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE { \ - "CURRENT_EVENT_SEQUENCE", \ - 2, \ - { { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_current_event_sequence_t, sequence) }, \ - { "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_current_event_sequence_t, flags) }, \ - } \ -} -#endif - -/** - * @brief Pack a current_event_sequence message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sequence Sequence number. - * @param flags Flag bitset. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_event_sequence_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t sequence, uint8_t flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint8_t(buf, 2, flags); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#else - mavlink_current_event_sequence_t packet; - packet.sequence = sequence; - packet.flags = flags; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -} - -/** - * @brief Pack a current_event_sequence message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sequence Sequence number. - * @param flags Flag bitset. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_event_sequence_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t sequence, uint8_t flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint8_t(buf, 2, flags); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#else - mavlink_current_event_sequence_t packet; - packet.sequence = sequence; - packet.flags = flags; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#endif -} - -/** - * @brief Pack a current_event_sequence message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sequence Sequence number. - * @param flags Flag bitset. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_event_sequence_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint16_t sequence,uint8_t flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint8_t(buf, 2, flags); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#else - mavlink_current_event_sequence_t packet; - packet.sequence = sequence; - packet.flags = flags; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -} - -/** - * @brief Encode a current_event_sequence struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param current_event_sequence C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_event_sequence_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_current_event_sequence_t* current_event_sequence) -{ - return mavlink_msg_current_event_sequence_pack(system_id, component_id, msg, current_event_sequence->sequence, current_event_sequence->flags); -} - -/** - * @brief Encode a current_event_sequence struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param current_event_sequence C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_event_sequence_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_current_event_sequence_t* current_event_sequence) -{ - return mavlink_msg_current_event_sequence_pack_chan(system_id, component_id, chan, msg, current_event_sequence->sequence, current_event_sequence->flags); -} - -/** - * @brief Encode a current_event_sequence struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param current_event_sequence C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_event_sequence_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_current_event_sequence_t* current_event_sequence) -{ - return mavlink_msg_current_event_sequence_pack_status(system_id, component_id, _status, msg, current_event_sequence->sequence, current_event_sequence->flags); -} - -/** - * @brief Send a current_event_sequence message - * @param chan MAVLink channel to send the message - * - * @param sequence Sequence number. - * @param flags Flag bitset. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_current_event_sequence_send(mavlink_channel_t chan, uint16_t sequence, uint8_t flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint8_t(buf, 2, flags); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE, buf, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#else - mavlink_current_event_sequence_t packet; - packet.sequence = sequence; - packet.flags = flags; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE, (const char *)&packet, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#endif -} - -/** - * @brief Send a current_event_sequence message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_current_event_sequence_send_struct(mavlink_channel_t chan, const mavlink_current_event_sequence_t* current_event_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_current_event_sequence_send(chan, current_event_sequence->sequence, current_event_sequence->flags); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE, (const char *)current_event_sequence, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#endif -} - -#if MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_current_event_sequence_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t sequence, uint8_t flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint8_t(buf, 2, flags); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE, buf, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#else - mavlink_current_event_sequence_t *packet = (mavlink_current_event_sequence_t *)msgbuf; - packet->sequence = sequence; - packet->flags = flags; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE, (const char *)packet, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_CRC); -#endif -} -#endif - -#endif - -// MESSAGE CURRENT_EVENT_SEQUENCE UNPACKING - - -/** - * @brief Get field sequence from current_event_sequence message - * - * @return Sequence number. - */ -static inline uint16_t mavlink_msg_current_event_sequence_get_sequence(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field flags from current_event_sequence message - * - * @return Flag bitset. - */ -static inline uint8_t mavlink_msg_current_event_sequence_get_flags(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Decode a current_event_sequence message into a struct - * - * @param msg The message to decode - * @param current_event_sequence C-struct to decode the message contents into - */ -static inline void mavlink_msg_current_event_sequence_decode(const mavlink_message_t* msg, mavlink_current_event_sequence_t* current_event_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - current_event_sequence->sequence = mavlink_msg_current_event_sequence_get_sequence(msg); - current_event_sequence->flags = mavlink_msg_current_event_sequence_get_flags(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN? msg->len : MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN; - memset(current_event_sequence, 0, MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_LEN); - memcpy(current_event_sequence, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_distance_sensor.h b/common/mavlink_msg_distance_sensor.h index 8a58fc0fd..fdbc77628 100644 --- a/common/mavlink_msg_distance_sensor.h +++ b/common/mavlink_msg_distance_sensor.h @@ -12,7 +12,7 @@ typedef struct __mavlink_distance_sensor_t { uint8_t type; /*< Type of distance sensor.*/ uint8_t id; /*< Onboard ID of the sensor*/ uint8_t orientation; /*< Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270*/ - uint8_t covariance; /*< [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown.*/ + uint8_t covariance; /*< [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown.*/ float horizontal_fov; /*< [rad] Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0.*/ float vertical_fov; /*< [rad] Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0.*/ float quaternion[4]; /*< Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid."*/ @@ -81,7 +81,7 @@ typedef struct __mavlink_distance_sensor_t { * @param type Type of distance sensor. * @param id Onboard ID of the sensor * @param orientation Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270 - * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. + * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown. * @param horizontal_fov [rad] Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param vertical_fov [rad] Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param quaternion Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid." @@ -141,7 +141,7 @@ static inline uint16_t mavlink_msg_distance_sensor_pack(uint8_t system_id, uint8 * @param type Type of distance sensor. * @param id Onboard ID of the sensor * @param orientation Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270 - * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. + * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown. * @param horizontal_fov [rad] Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param vertical_fov [rad] Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param quaternion Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid." @@ -204,7 +204,7 @@ static inline uint16_t mavlink_msg_distance_sensor_pack_status(uint8_t system_id * @param type Type of distance sensor. * @param id Onboard ID of the sensor * @param orientation Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270 - * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. + * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown. * @param horizontal_fov [rad] Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param vertical_fov [rad] Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param quaternion Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid." @@ -303,7 +303,7 @@ static inline uint16_t mavlink_msg_distance_sensor_encode_status(uint8_t system_ * @param type Type of distance sensor. * @param id Onboard ID of the sensor * @param orientation Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270 - * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. + * @param covariance [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown. * @param horizontal_fov [rad] Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param vertical_fov [rad] Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. * @param quaternion Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid." @@ -482,7 +482,7 @@ static inline uint8_t mavlink_msg_distance_sensor_get_orientation(const mavlink_ /** * @brief Get field covariance from distance_sensor message * - * @return [cm^2] Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. + * @return [cm^2] Measurement variance. Max standard deviation is 6cm. 255 if unknown. */ static inline uint8_t mavlink_msg_distance_sensor_get_covariance(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_esc_info.h b/common/mavlink_msg_esc_info.h deleted file mode 100644 index 5db191397..000000000 --- a/common/mavlink_msg_esc_info.h +++ /dev/null @@ -1,476 +0,0 @@ -#pragma once -// MESSAGE ESC_INFO PACKING - -#define MAVLINK_MSG_ID_ESC_INFO 290 - - -typedef struct __mavlink_esc_info_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.*/ - uint32_t error_count[4]; /*< Number of reported errors by each ESC since boot.*/ - uint16_t counter; /*< Counter of data packets received.*/ - uint16_t failure_flags[4]; /*< Bitmap of ESC failure flags.*/ - int16_t temperature[4]; /*< [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC.*/ - uint8_t index; /*< Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4.*/ - uint8_t count; /*< Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data.*/ - uint8_t connection_type; /*< Connection type protocol for all ESC.*/ - uint8_t info; /*< Information regarding online/offline status of each ESC.*/ -} mavlink_esc_info_t; - -#define MAVLINK_MSG_ID_ESC_INFO_LEN 46 -#define MAVLINK_MSG_ID_ESC_INFO_MIN_LEN 46 -#define MAVLINK_MSG_ID_290_LEN 46 -#define MAVLINK_MSG_ID_290_MIN_LEN 46 - -#define MAVLINK_MSG_ID_ESC_INFO_CRC 251 -#define MAVLINK_MSG_ID_290_CRC 251 - -#define MAVLINK_MSG_ESC_INFO_FIELD_ERROR_COUNT_LEN 4 -#define MAVLINK_MSG_ESC_INFO_FIELD_FAILURE_FLAGS_LEN 4 -#define MAVLINK_MSG_ESC_INFO_FIELD_TEMPERATURE_LEN 4 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ESC_INFO { \ - 290, \ - "ESC_INFO", \ - 9, \ - { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_esc_info_t, index) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_esc_info_t, time_usec) }, \ - { "counter", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_esc_info_t, counter) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_esc_info_t, count) }, \ - { "connection_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_esc_info_t, connection_type) }, \ - { "info", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_esc_info_t, info) }, \ - { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 4, 26, offsetof(mavlink_esc_info_t, failure_flags) }, \ - { "error_count", NULL, MAVLINK_TYPE_UINT32_T, 4, 8, offsetof(mavlink_esc_info_t, error_count) }, \ - { "temperature", NULL, MAVLINK_TYPE_INT16_T, 4, 34, offsetof(mavlink_esc_info_t, temperature) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ESC_INFO { \ - "ESC_INFO", \ - 9, \ - { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_esc_info_t, index) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_esc_info_t, time_usec) }, \ - { "counter", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_esc_info_t, counter) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_esc_info_t, count) }, \ - { "connection_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_esc_info_t, connection_type) }, \ - { "info", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_esc_info_t, info) }, \ - { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 4, 26, offsetof(mavlink_esc_info_t, failure_flags) }, \ - { "error_count", NULL, MAVLINK_TYPE_UINT32_T, 4, 8, offsetof(mavlink_esc_info_t, error_count) }, \ - { "temperature", NULL, MAVLINK_TYPE_INT16_T, 4, 34, offsetof(mavlink_esc_info_t, temperature) }, \ - } \ -} -#endif - -/** - * @brief Pack a esc_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param counter Counter of data packets received. - * @param count Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - * @param connection_type Connection type protocol for all ESC. - * @param info Information regarding online/offline status of each ESC. - * @param failure_flags Bitmap of ESC failure flags. - * @param error_count Number of reported errors by each ESC since boot. - * @param temperature [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info, const uint16_t *failure_flags, const uint32_t *error_count, const int16_t *temperature) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_INFO_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint16_t(buf, 24, counter); - _mav_put_uint8_t(buf, 42, index); - _mav_put_uint8_t(buf, 43, count); - _mav_put_uint8_t(buf, 44, connection_type); - _mav_put_uint8_t(buf, 45, info); - _mav_put_uint32_t_array(buf, 8, error_count, 4); - _mav_put_uint16_t_array(buf, 26, failure_flags, 4); - _mav_put_int16_t_array(buf, 34, temperature, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_INFO_LEN); -#else - mavlink_esc_info_t packet; - packet.time_usec = time_usec; - packet.counter = counter; - packet.index = index; - packet.count = count; - packet.connection_type = connection_type; - packet.info = info; - mav_array_memcpy(packet.error_count, error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet.failure_flags, failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_INFO; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -} - -/** - * @brief Pack a esc_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param counter Counter of data packets received. - * @param count Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - * @param connection_type Connection type protocol for all ESC. - * @param info Information regarding online/offline status of each ESC. - * @param failure_flags Bitmap of ESC failure flags. - * @param error_count Number of reported errors by each ESC since boot. - * @param temperature [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info, const uint16_t *failure_flags, const uint32_t *error_count, const int16_t *temperature) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_INFO_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint16_t(buf, 24, counter); - _mav_put_uint8_t(buf, 42, index); - _mav_put_uint8_t(buf, 43, count); - _mav_put_uint8_t(buf, 44, connection_type); - _mav_put_uint8_t(buf, 45, info); - _mav_put_uint32_t_array(buf, 8, error_count, 4); - _mav_put_uint16_t_array(buf, 26, failure_flags, 4); - _mav_put_int16_t_array(buf, 34, temperature, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_INFO_LEN); -#else - mavlink_esc_info_t packet; - packet.time_usec = time_usec; - packet.counter = counter; - packet.index = index; - packet.count = count; - packet.connection_type = connection_type; - packet.info = info; - mav_array_memcpy(packet.error_count, error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet.failure_flags, failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_INFO; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN); -#endif -} - -/** - * @brief Pack a esc_info message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param counter Counter of data packets received. - * @param count Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - * @param connection_type Connection type protocol for all ESC. - * @param info Information regarding online/offline status of each ESC. - * @param failure_flags Bitmap of ESC failure flags. - * @param error_count Number of reported errors by each ESC since boot. - * @param temperature [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t index,uint64_t time_usec,uint16_t counter,uint8_t count,uint8_t connection_type,uint8_t info,const uint16_t *failure_flags,const uint32_t *error_count,const int16_t *temperature) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_INFO_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint16_t(buf, 24, counter); - _mav_put_uint8_t(buf, 42, index); - _mav_put_uint8_t(buf, 43, count); - _mav_put_uint8_t(buf, 44, connection_type); - _mav_put_uint8_t(buf, 45, info); - _mav_put_uint32_t_array(buf, 8, error_count, 4); - _mav_put_uint16_t_array(buf, 26, failure_flags, 4); - _mav_put_int16_t_array(buf, 34, temperature, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_INFO_LEN); -#else - mavlink_esc_info_t packet; - packet.time_usec = time_usec; - packet.counter = counter; - packet.index = index; - packet.count = count; - packet.connection_type = connection_type; - packet.info = info; - mav_array_memcpy(packet.error_count, error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet.failure_flags, failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_INFO; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -} - -/** - * @brief Encode a esc_info struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param esc_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_info_t* esc_info) -{ - return mavlink_msg_esc_info_pack(system_id, component_id, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature); -} - -/** - * @brief Encode a esc_info struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param esc_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_info_t* esc_info) -{ - return mavlink_msg_esc_info_pack_chan(system_id, component_id, chan, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature); -} - -/** - * @brief Encode a esc_info struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param esc_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_info_t* esc_info) -{ - return mavlink_msg_esc_info_pack_status(system_id, component_id, _status, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature); -} - -/** - * @brief Send a esc_info message - * @param chan MAVLink channel to send the message - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param counter Counter of data packets received. - * @param count Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - * @param connection_type Connection type protocol for all ESC. - * @param info Information regarding online/offline status of each ESC. - * @param failure_flags Bitmap of ESC failure flags. - * @param error_count Number of reported errors by each ESC since boot. - * @param temperature [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_esc_info_send(mavlink_channel_t chan, uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info, const uint16_t *failure_flags, const uint32_t *error_count, const int16_t *temperature) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_INFO_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint16_t(buf, 24, counter); - _mav_put_uint8_t(buf, 42, index); - _mav_put_uint8_t(buf, 43, count); - _mav_put_uint8_t(buf, 44, connection_type); - _mav_put_uint8_t(buf, 45, info); - _mav_put_uint32_t_array(buf, 8, error_count, 4); - _mav_put_uint16_t_array(buf, 26, failure_flags, 4); - _mav_put_int16_t_array(buf, 34, temperature, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, buf, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#else - mavlink_esc_info_t packet; - packet.time_usec = time_usec; - packet.counter = counter; - packet.index = index; - packet.count = count; - packet.connection_type = connection_type; - packet.info = info; - mav_array_memcpy(packet.error_count, error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet.failure_flags, failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet.temperature, temperature, sizeof(int16_t)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (const char *)&packet, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#endif -} - -/** - * @brief Send a esc_info message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_esc_info_send_struct(mavlink_channel_t chan, const mavlink_esc_info_t* esc_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_esc_info_send(chan, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (const char *)esc_info, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ESC_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_esc_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info, const uint16_t *failure_flags, const uint32_t *error_count, const int16_t *temperature) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint16_t(buf, 24, counter); - _mav_put_uint8_t(buf, 42, index); - _mav_put_uint8_t(buf, 43, count); - _mav_put_uint8_t(buf, 44, connection_type); - _mav_put_uint8_t(buf, 45, info); - _mav_put_uint32_t_array(buf, 8, error_count, 4); - _mav_put_uint16_t_array(buf, 26, failure_flags, 4); - _mav_put_int16_t_array(buf, 34, temperature, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, buf, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#else - mavlink_esc_info_t *packet = (mavlink_esc_info_t *)msgbuf; - packet->time_usec = time_usec; - packet->counter = counter; - packet->index = index; - packet->count = count; - packet->connection_type = connection_type; - packet->info = info; - mav_array_memcpy(packet->error_count, error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet->failure_flags, failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet->temperature, temperature, sizeof(int16_t)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (const char *)packet, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ESC_INFO UNPACKING - - -/** - * @brief Get field index from esc_info message - * - * @return Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - */ -static inline uint8_t mavlink_msg_esc_info_get_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 42); -} - -/** - * @brief Get field time_usec from esc_info message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - */ -static inline uint64_t mavlink_msg_esc_info_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field counter from esc_info message - * - * @return Counter of data packets received. - */ -static inline uint16_t mavlink_msg_esc_info_get_counter(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 24); -} - -/** - * @brief Get field count from esc_info message - * - * @return Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - */ -static inline uint8_t mavlink_msg_esc_info_get_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 43); -} - -/** - * @brief Get field connection_type from esc_info message - * - * @return Connection type protocol for all ESC. - */ -static inline uint8_t mavlink_msg_esc_info_get_connection_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 44); -} - -/** - * @brief Get field info from esc_info message - * - * @return Information regarding online/offline status of each ESC. - */ -static inline uint8_t mavlink_msg_esc_info_get_info(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 45); -} - -/** - * @brief Get field failure_flags from esc_info message - * - * @return Bitmap of ESC failure flags. - */ -static inline uint16_t mavlink_msg_esc_info_get_failure_flags(const mavlink_message_t* msg, uint16_t *failure_flags) -{ - return _MAV_RETURN_uint16_t_array(msg, failure_flags, 4, 26); -} - -/** - * @brief Get field error_count from esc_info message - * - * @return Number of reported errors by each ESC since boot. - */ -static inline uint16_t mavlink_msg_esc_info_get_error_count(const mavlink_message_t* msg, uint32_t *error_count) -{ - return _MAV_RETURN_uint32_t_array(msg, error_count, 4, 8); -} - -/** - * @brief Get field temperature from esc_info message - * - * @return [cdegC] Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - */ -static inline uint16_t mavlink_msg_esc_info_get_temperature(const mavlink_message_t* msg, int16_t *temperature) -{ - return _MAV_RETURN_int16_t_array(msg, temperature, 4, 34); -} - -/** - * @brief Decode a esc_info message into a struct - * - * @param msg The message to decode - * @param esc_info C-struct to decode the message contents into - */ -static inline void mavlink_msg_esc_info_decode(const mavlink_message_t* msg, mavlink_esc_info_t* esc_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - esc_info->time_usec = mavlink_msg_esc_info_get_time_usec(msg); - mavlink_msg_esc_info_get_error_count(msg, esc_info->error_count); - esc_info->counter = mavlink_msg_esc_info_get_counter(msg); - mavlink_msg_esc_info_get_failure_flags(msg, esc_info->failure_flags); - mavlink_msg_esc_info_get_temperature(msg, esc_info->temperature); - esc_info->index = mavlink_msg_esc_info_get_index(msg); - esc_info->count = mavlink_msg_esc_info_get_count(msg); - esc_info->connection_type = mavlink_msg_esc_info_get_connection_type(msg); - esc_info->info = mavlink_msg_esc_info_get_info(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_INFO_LEN? msg->len : MAVLINK_MSG_ID_ESC_INFO_LEN; - memset(esc_info, 0, MAVLINK_MSG_ID_ESC_INFO_LEN); - memcpy(esc_info, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_esc_status.h b/common/mavlink_msg_esc_status.h deleted file mode 100644 index a793889f6..000000000 --- a/common/mavlink_msg_esc_status.h +++ /dev/null @@ -1,364 +0,0 @@ -#pragma once -// MESSAGE ESC_STATUS PACKING - -#define MAVLINK_MSG_ID_ESC_STATUS 291 - - -typedef struct __mavlink_esc_status_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number.*/ - int32_t rpm[4]; /*< [rpm] Reported motor RPM from each ESC (negative for reverse rotation).*/ - float voltage[4]; /*< [V] Voltage measured from each ESC.*/ - float current[4]; /*< [A] Current measured from each ESC.*/ - uint8_t index; /*< Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4.*/ -} mavlink_esc_status_t; - -#define MAVLINK_MSG_ID_ESC_STATUS_LEN 57 -#define MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN 57 -#define MAVLINK_MSG_ID_291_LEN 57 -#define MAVLINK_MSG_ID_291_MIN_LEN 57 - -#define MAVLINK_MSG_ID_ESC_STATUS_CRC 10 -#define MAVLINK_MSG_ID_291_CRC 10 - -#define MAVLINK_MSG_ESC_STATUS_FIELD_RPM_LEN 4 -#define MAVLINK_MSG_ESC_STATUS_FIELD_VOLTAGE_LEN 4 -#define MAVLINK_MSG_ESC_STATUS_FIELD_CURRENT_LEN 4 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ESC_STATUS { \ - 291, \ - "ESC_STATUS", \ - 5, \ - { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 56, offsetof(mavlink_esc_status_t, index) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_esc_status_t, time_usec) }, \ - { "rpm", NULL, MAVLINK_TYPE_INT32_T, 4, 8, offsetof(mavlink_esc_status_t, rpm) }, \ - { "voltage", NULL, MAVLINK_TYPE_FLOAT, 4, 24, offsetof(mavlink_esc_status_t, voltage) }, \ - { "current", NULL, MAVLINK_TYPE_FLOAT, 4, 40, offsetof(mavlink_esc_status_t, current) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ESC_STATUS { \ - "ESC_STATUS", \ - 5, \ - { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0, 56, offsetof(mavlink_esc_status_t, index) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_esc_status_t, time_usec) }, \ - { "rpm", NULL, MAVLINK_TYPE_INT32_T, 4, 8, offsetof(mavlink_esc_status_t, rpm) }, \ - { "voltage", NULL, MAVLINK_TYPE_FLOAT, 4, 24, offsetof(mavlink_esc_status_t, voltage) }, \ - { "current", NULL, MAVLINK_TYPE_FLOAT, 4, 40, offsetof(mavlink_esc_status_t, current) }, \ - } \ -} -#endif - -/** - * @brief Pack a esc_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param rpm [rpm] Reported motor RPM from each ESC (negative for reverse rotation). - * @param voltage [V] Voltage measured from each ESC. - * @param current [A] Current measured from each ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t index, uint64_t time_usec, const int32_t *rpm, const float *voltage, const float *current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 56, index); - _mav_put_int32_t_array(buf, 8, rpm, 4); - _mav_put_float_array(buf, 24, voltage, 4); - _mav_put_float_array(buf, 40, current, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#else - mavlink_esc_status_t packet; - packet.time_usec = time_usec; - packet.index = index; - mav_array_memcpy(packet.rpm, rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet.voltage, voltage, sizeof(float)*4); - mav_array_memcpy(packet.current, current, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -} - -/** - * @brief Pack a esc_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param rpm [rpm] Reported motor RPM from each ESC (negative for reverse rotation). - * @param voltage [V] Voltage measured from each ESC. - * @param current [A] Current measured from each ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t index, uint64_t time_usec, const int32_t *rpm, const float *voltage, const float *current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 56, index); - _mav_put_int32_t_array(buf, 8, rpm, 4); - _mav_put_float_array(buf, 24, voltage, 4); - _mav_put_float_array(buf, 40, current, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#else - mavlink_esc_status_t packet; - packet.time_usec = time_usec; - packet.index = index; - mav_array_memcpy(packet.rpm, rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet.voltage, voltage, sizeof(float)*4); - mav_array_memcpy(packet.current, current, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#endif -} - -/** - * @brief Pack a esc_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param rpm [rpm] Reported motor RPM from each ESC (negative for reverse rotation). - * @param voltage [V] Voltage measured from each ESC. - * @param current [A] Current measured from each ESC. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_esc_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t index,uint64_t time_usec,const int32_t *rpm,const float *voltage,const float *current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 56, index); - _mav_put_int32_t_array(buf, 8, rpm, 4); - _mav_put_float_array(buf, 24, voltage, 4); - _mav_put_float_array(buf, 40, current, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#else - mavlink_esc_status_t packet; - packet.time_usec = time_usec; - packet.index = index; - mav_array_memcpy(packet.rpm, rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet.voltage, voltage, sizeof(float)*4); - mav_array_memcpy(packet.current, current, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ESC_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -} - -/** - * @brief Encode a esc_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param esc_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_esc_status_t* esc_status) -{ - return mavlink_msg_esc_status_pack(system_id, component_id, msg, esc_status->index, esc_status->time_usec, esc_status->rpm, esc_status->voltage, esc_status->current); -} - -/** - * @brief Encode a esc_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param esc_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_esc_status_t* esc_status) -{ - return mavlink_msg_esc_status_pack_chan(system_id, component_id, chan, msg, esc_status->index, esc_status->time_usec, esc_status->rpm, esc_status->voltage, esc_status->current); -} - -/** - * @brief Encode a esc_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param esc_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_esc_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_status_t* esc_status) -{ - return mavlink_msg_esc_status_pack_status(system_id, component_id, _status, msg, esc_status->index, esc_status->time_usec, esc_status->rpm, esc_status->voltage, esc_status->current); -} - -/** - * @brief Send a esc_status message - * @param chan MAVLink channel to send the message - * - * @param index Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - * @param rpm [rpm] Reported motor RPM from each ESC (negative for reverse rotation). - * @param voltage [V] Voltage measured from each ESC. - * @param current [A] Current measured from each ESC. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_esc_status_send(mavlink_channel_t chan, uint8_t index, uint64_t time_usec, const int32_t *rpm, const float *voltage, const float *current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ESC_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 56, index); - _mav_put_int32_t_array(buf, 8, rpm, 4); - _mav_put_float_array(buf, 24, voltage, 4); - _mav_put_float_array(buf, 40, current, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_STATUS, buf, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#else - mavlink_esc_status_t packet; - packet.time_usec = time_usec; - packet.index = index; - mav_array_memcpy(packet.rpm, rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet.voltage, voltage, sizeof(float)*4); - mav_array_memcpy(packet.current, current, sizeof(float)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#endif -} - -/** - * @brief Send a esc_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_esc_status_send_struct(mavlink_channel_t chan, const mavlink_esc_status_t* esc_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_esc_status_send(chan, esc_status->index, esc_status->time_usec, esc_status->rpm, esc_status->voltage, esc_status->current); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_STATUS, (const char *)esc_status, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ESC_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_esc_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, uint64_t time_usec, const int32_t *rpm, const float *voltage, const float *current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 56, index); - _mav_put_int32_t_array(buf, 8, rpm, 4); - _mav_put_float_array(buf, 24, voltage, 4); - _mav_put_float_array(buf, 40, current, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_STATUS, buf, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#else - mavlink_esc_status_t *packet = (mavlink_esc_status_t *)msgbuf; - packet->time_usec = time_usec; - packet->index = index; - mav_array_memcpy(packet->rpm, rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet->voltage, voltage, sizeof(float)*4); - mav_array_memcpy(packet->current, current, sizeof(float)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_STATUS, (const char *)packet, MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESC_STATUS_LEN, MAVLINK_MSG_ID_ESC_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ESC_STATUS UNPACKING - - -/** - * @brief Get field index from esc_status message - * - * @return Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - */ -static inline uint8_t mavlink_msg_esc_status_get_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 56); -} - -/** - * @brief Get field time_usec from esc_status message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - */ -static inline uint64_t mavlink_msg_esc_status_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field rpm from esc_status message - * - * @return [rpm] Reported motor RPM from each ESC (negative for reverse rotation). - */ -static inline uint16_t mavlink_msg_esc_status_get_rpm(const mavlink_message_t* msg, int32_t *rpm) -{ - return _MAV_RETURN_int32_t_array(msg, rpm, 4, 8); -} - -/** - * @brief Get field voltage from esc_status message - * - * @return [V] Voltage measured from each ESC. - */ -static inline uint16_t mavlink_msg_esc_status_get_voltage(const mavlink_message_t* msg, float *voltage) -{ - return _MAV_RETURN_float_array(msg, voltage, 4, 24); -} - -/** - * @brief Get field current from esc_status message - * - * @return [A] Current measured from each ESC. - */ -static inline uint16_t mavlink_msg_esc_status_get_current(const mavlink_message_t* msg, float *current) -{ - return _MAV_RETURN_float_array(msg, current, 4, 40); -} - -/** - * @brief Decode a esc_status message into a struct - * - * @param msg The message to decode - * @param esc_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_esc_status_decode(const mavlink_message_t* msg, mavlink_esc_status_t* esc_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - esc_status->time_usec = mavlink_msg_esc_status_get_time_usec(msg); - mavlink_msg_esc_status_get_rpm(msg, esc_status->rpm); - mavlink_msg_esc_status_get_voltage(msg, esc_status->voltage); - mavlink_msg_esc_status_get_current(msg, esc_status->current); - esc_status->index = mavlink_msg_esc_status_get_index(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ESC_STATUS_LEN; - memset(esc_status, 0, MAVLINK_MSG_ID_ESC_STATUS_LEN); - memcpy(esc_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_event.h b/common/mavlink_msg_event.h deleted file mode 100644 index 100739b87..000000000 --- a/common/mavlink_msg_event.h +++ /dev/null @@ -1,418 +0,0 @@ -#pragma once -// MESSAGE EVENT PACKING - -#define MAVLINK_MSG_ID_EVENT 410 - - -typedef struct __mavlink_event_t { - uint32_t id; /*< Event ID (as defined in the component metadata)*/ - uint32_t event_time_boot_ms; /*< [ms] Timestamp (time since system boot when the event happened).*/ - uint16_t sequence; /*< Sequence number.*/ - uint8_t destination_component; /*< Component ID*/ - uint8_t destination_system; /*< System ID*/ - uint8_t log_levels; /*< Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9*/ - uint8_t arguments[40]; /*< Arguments (depend on event ID).*/ -} mavlink_event_t; - -#define MAVLINK_MSG_ID_EVENT_LEN 53 -#define MAVLINK_MSG_ID_EVENT_MIN_LEN 53 -#define MAVLINK_MSG_ID_410_LEN 53 -#define MAVLINK_MSG_ID_410_MIN_LEN 53 - -#define MAVLINK_MSG_ID_EVENT_CRC 160 -#define MAVLINK_MSG_ID_410_CRC 160 - -#define MAVLINK_MSG_EVENT_FIELD_ARGUMENTS_LEN 40 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_EVENT { \ - 410, \ - "EVENT", \ - 7, \ - { { "destination_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_event_t, destination_component) }, \ - { "destination_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_event_t, destination_system) }, \ - { "id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_event_t, id) }, \ - { "event_time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_event_t, event_time_boot_ms) }, \ - { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_event_t, sequence) }, \ - { "log_levels", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_event_t, log_levels) }, \ - { "arguments", NULL, MAVLINK_TYPE_UINT8_T, 40, 13, offsetof(mavlink_event_t, arguments) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_EVENT { \ - "EVENT", \ - 7, \ - { { "destination_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_event_t, destination_component) }, \ - { "destination_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_event_t, destination_system) }, \ - { "id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_event_t, id) }, \ - { "event_time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_event_t, event_time_boot_ms) }, \ - { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_event_t, sequence) }, \ - { "log_levels", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_event_t, log_levels) }, \ - { "arguments", NULL, MAVLINK_TYPE_UINT8_T, 40, 13, offsetof(mavlink_event_t, arguments) }, \ - } \ -} -#endif - -/** - * @brief Pack a event message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param destination_component Component ID - * @param destination_system System ID - * @param id Event ID (as defined in the component metadata) - * @param event_time_boot_ms [ms] Timestamp (time since system boot when the event happened). - * @param sequence Sequence number. - * @param log_levels Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - * @param arguments Arguments (depend on event ID). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_event_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels, const uint8_t *arguments) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_EVENT_LEN]; - _mav_put_uint32_t(buf, 0, id); - _mav_put_uint32_t(buf, 4, event_time_boot_ms); - _mav_put_uint16_t(buf, 8, sequence); - _mav_put_uint8_t(buf, 10, destination_component); - _mav_put_uint8_t(buf, 11, destination_system); - _mav_put_uint8_t(buf, 12, log_levels); - _mav_put_uint8_t_array(buf, 13, arguments, 40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EVENT_LEN); -#else - mavlink_event_t packet; - packet.id = id; - packet.event_time_boot_ms = event_time_boot_ms; - packet.sequence = sequence; - packet.destination_component = destination_component; - packet.destination_system = destination_system; - packet.log_levels = log_levels; - mav_array_memcpy(packet.arguments, arguments, sizeof(uint8_t)*40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_EVENT; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -} - -/** - * @brief Pack a event message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param destination_component Component ID - * @param destination_system System ID - * @param id Event ID (as defined in the component metadata) - * @param event_time_boot_ms [ms] Timestamp (time since system boot when the event happened). - * @param sequence Sequence number. - * @param log_levels Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - * @param arguments Arguments (depend on event ID). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_event_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels, const uint8_t *arguments) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_EVENT_LEN]; - _mav_put_uint32_t(buf, 0, id); - _mav_put_uint32_t(buf, 4, event_time_boot_ms); - _mav_put_uint16_t(buf, 8, sequence); - _mav_put_uint8_t(buf, 10, destination_component); - _mav_put_uint8_t(buf, 11, destination_system); - _mav_put_uint8_t(buf, 12, log_levels); - _mav_put_uint8_t_array(buf, 13, arguments, 40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EVENT_LEN); -#else - mavlink_event_t packet; - packet.id = id; - packet.event_time_boot_ms = event_time_boot_ms; - packet.sequence = sequence; - packet.destination_component = destination_component; - packet.destination_system = destination_system; - packet.log_levels = log_levels; - mav_array_memcpy(packet.arguments, arguments, sizeof(uint8_t)*40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_EVENT; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN); -#endif -} - -/** - * @brief Pack a event message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param destination_component Component ID - * @param destination_system System ID - * @param id Event ID (as defined in the component metadata) - * @param event_time_boot_ms [ms] Timestamp (time since system boot when the event happened). - * @param sequence Sequence number. - * @param log_levels Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - * @param arguments Arguments (depend on event ID). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_event_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t destination_component,uint8_t destination_system,uint32_t id,uint32_t event_time_boot_ms,uint16_t sequence,uint8_t log_levels,const uint8_t *arguments) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_EVENT_LEN]; - _mav_put_uint32_t(buf, 0, id); - _mav_put_uint32_t(buf, 4, event_time_boot_ms); - _mav_put_uint16_t(buf, 8, sequence); - _mav_put_uint8_t(buf, 10, destination_component); - _mav_put_uint8_t(buf, 11, destination_system); - _mav_put_uint8_t(buf, 12, log_levels); - _mav_put_uint8_t_array(buf, 13, arguments, 40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EVENT_LEN); -#else - mavlink_event_t packet; - packet.id = id; - packet.event_time_boot_ms = event_time_boot_ms; - packet.sequence = sequence; - packet.destination_component = destination_component; - packet.destination_system = destination_system; - packet.log_levels = log_levels; - mav_array_memcpy(packet.arguments, arguments, sizeof(uint8_t)*40); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_EVENT; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -} - -/** - * @brief Encode a event struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_event_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_event_t* event) -{ - return mavlink_msg_event_pack(system_id, component_id, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments); -} - -/** - * @brief Encode a event struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_event_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_event_t* event) -{ - return mavlink_msg_event_pack_chan(system_id, component_id, chan, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments); -} - -/** - * @brief Encode a event struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_event_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_event_t* event) -{ - return mavlink_msg_event_pack_status(system_id, component_id, _status, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments); -} - -/** - * @brief Send a event message - * @param chan MAVLink channel to send the message - * - * @param destination_component Component ID - * @param destination_system System ID - * @param id Event ID (as defined in the component metadata) - * @param event_time_boot_ms [ms] Timestamp (time since system boot when the event happened). - * @param sequence Sequence number. - * @param log_levels Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - * @param arguments Arguments (depend on event ID). - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_event_send(mavlink_channel_t chan, uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels, const uint8_t *arguments) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_EVENT_LEN]; - _mav_put_uint32_t(buf, 0, id); - _mav_put_uint32_t(buf, 4, event_time_boot_ms); - _mav_put_uint16_t(buf, 8, sequence); - _mav_put_uint8_t(buf, 10, destination_component); - _mav_put_uint8_t(buf, 11, destination_system); - _mav_put_uint8_t(buf, 12, log_levels); - _mav_put_uint8_t_array(buf, 13, arguments, 40); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, buf, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#else - mavlink_event_t packet; - packet.id = id; - packet.event_time_boot_ms = event_time_boot_ms; - packet.sequence = sequence; - packet.destination_component = destination_component; - packet.destination_system = destination_system; - packet.log_levels = log_levels; - mav_array_memcpy(packet.arguments, arguments, sizeof(uint8_t)*40); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (const char *)&packet, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#endif -} - -/** - * @brief Send a event message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_event_send_struct(mavlink_channel_t chan, const mavlink_event_t* event) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_event_send(chan, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (const char *)event, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#endif -} - -#if MAVLINK_MSG_ID_EVENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_event_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels, const uint8_t *arguments) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, id); - _mav_put_uint32_t(buf, 4, event_time_boot_ms); - _mav_put_uint16_t(buf, 8, sequence); - _mav_put_uint8_t(buf, 10, destination_component); - _mav_put_uint8_t(buf, 11, destination_system); - _mav_put_uint8_t(buf, 12, log_levels); - _mav_put_uint8_t_array(buf, 13, arguments, 40); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, buf, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#else - mavlink_event_t *packet = (mavlink_event_t *)msgbuf; - packet->id = id; - packet->event_time_boot_ms = event_time_boot_ms; - packet->sequence = sequence; - packet->destination_component = destination_component; - packet->destination_system = destination_system; - packet->log_levels = log_levels; - mav_array_memcpy(packet->arguments, arguments, sizeof(uint8_t)*40); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (const char *)packet, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC); -#endif -} -#endif - -#endif - -// MESSAGE EVENT UNPACKING - - -/** - * @brief Get field destination_component from event message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_event_get_destination_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 10); -} - -/** - * @brief Get field destination_system from event message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_event_get_destination_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 11); -} - -/** - * @brief Get field id from event message - * - * @return Event ID (as defined in the component metadata) - */ -static inline uint32_t mavlink_msg_event_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field event_time_boot_ms from event message - * - * @return [ms] Timestamp (time since system boot when the event happened). - */ -static inline uint32_t mavlink_msg_event_get_event_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field sequence from event message - * - * @return Sequence number. - */ -static inline uint16_t mavlink_msg_event_get_sequence(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 8); -} - -/** - * @brief Get field log_levels from event message - * - * @return Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - */ -static inline uint8_t mavlink_msg_event_get_log_levels(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 12); -} - -/** - * @brief Get field arguments from event message - * - * @return Arguments (depend on event ID). - */ -static inline uint16_t mavlink_msg_event_get_arguments(const mavlink_message_t* msg, uint8_t *arguments) -{ - return _MAV_RETURN_uint8_t_array(msg, arguments, 40, 13); -} - -/** - * @brief Decode a event message into a struct - * - * @param msg The message to decode - * @param event C-struct to decode the message contents into - */ -static inline void mavlink_msg_event_decode(const mavlink_message_t* msg, mavlink_event_t* event) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - event->id = mavlink_msg_event_get_id(msg); - event->event_time_boot_ms = mavlink_msg_event_get_event_time_boot_ms(msg); - event->sequence = mavlink_msg_event_get_sequence(msg); - event->destination_component = mavlink_msg_event_get_destination_component(msg); - event->destination_system = mavlink_msg_event_get_destination_system(msg); - event->log_levels = mavlink_msg_event_get_log_levels(msg); - mavlink_msg_event_get_arguments(msg, event->arguments); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_EVENT_LEN? msg->len : MAVLINK_MSG_ID_EVENT_LEN; - memset(event, 0, MAVLINK_MSG_ID_EVENT_LEN); - memcpy(event, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_file_transfer_protocol.h b/common/mavlink_msg_file_transfer_protocol.h index adc74e56f..8b116365a 100644 --- a/common/mavlink_msg_file_transfer_protocol.h +++ b/common/mavlink_msg_file_transfer_protocol.h @@ -8,7 +8,7 @@ typedef struct __mavlink_file_transfer_protocol_t { uint8_t target_network; /*< Network ID (0 for broadcast)*/ uint8_t target_system; /*< System ID (0 for broadcast)*/ uint8_t target_component; /*< Component ID (0 for broadcast)*/ - uint8_t payload[251]; /*< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html.*/ + uint8_t payload[251]; /*< Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification.*/ } mavlink_file_transfer_protocol_t; #define MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL_LEN 254 @@ -53,7 +53,7 @@ typedef struct __mavlink_file_transfer_protocol_t { * @param target_network Network ID (0 for broadcast) * @param target_system System ID (0 for broadcast) * @param target_component Component ID (0 for broadcast) - * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. + * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_file_transfer_protocol_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_file_transfer_protocol_pack(uint8_t system_id * @param target_network Network ID (0 for broadcast) * @param target_system System ID (0 for broadcast) * @param target_component Component ID (0 for broadcast) - * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. + * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_file_transfer_protocol_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -128,7 +128,7 @@ static inline uint16_t mavlink_msg_file_transfer_protocol_pack_status(uint8_t sy * @param target_network Network ID (0 for broadcast) * @param target_system System ID (0 for broadcast) * @param target_component Component ID (0 for broadcast) - * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. + * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_file_transfer_protocol_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -203,7 +203,7 @@ static inline uint16_t mavlink_msg_file_transfer_protocol_encode_status(uint8_t * @param target_network Network ID (0 for broadcast) * @param target_system System ID (0 for broadcast) * @param target_component Component ID (0 for broadcast) - * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. + * @param payload Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -306,7 +306,7 @@ static inline uint8_t mavlink_msg_file_transfer_protocol_get_target_component(co /** * @brief Get field payload from file_transfer_protocol message * - * @return Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. + * @return Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. */ static inline uint16_t mavlink_msg_file_transfer_protocol_get_payload(const mavlink_message_t* msg, uint8_t *payload) { diff --git a/common/mavlink_msg_flight_information.h b/common/mavlink_msg_flight_information.h index 040b5e104..f300d95b0 100644 --- a/common/mavlink_msg_flight_information.h +++ b/common/mavlink_msg_flight_information.h @@ -5,16 +5,15 @@ typedef struct __mavlink_flight_information_t { - uint64_t arming_time_utc; /*< [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC.*/ - uint64_t takeoff_time_utc; /*< [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC.*/ - uint64_t flight_uuid; /*< Flight number. Note, field is misnamed UUID.*/ + uint64_t arming_time_utc; /*< [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown*/ + uint64_t takeoff_time_utc; /*< [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown*/ + uint64_t flight_uuid; /*< Universally unique identifier (UUID) of flight, should correspond to name of log files*/ uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - uint32_t landing_time; /*< [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming.*/ } mavlink_flight_information_t; -#define MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN 32 +#define MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN 28 #define MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN 28 -#define MAVLINK_MSG_ID_264_LEN 32 +#define MAVLINK_MSG_ID_264_LEN 28 #define MAVLINK_MSG_ID_264_MIN_LEN 28 #define MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC 49 @@ -26,23 +25,21 @@ typedef struct __mavlink_flight_information_t { #define MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION { \ 264, \ "FLIGHT_INFORMATION", \ - 5, \ + 4, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_flight_information_t, time_boot_ms) }, \ { "arming_time_utc", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_flight_information_t, arming_time_utc) }, \ { "takeoff_time_utc", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_flight_information_t, takeoff_time_utc) }, \ { "flight_uuid", NULL, MAVLINK_TYPE_UINT64_T, 0, 16, offsetof(mavlink_flight_information_t, flight_uuid) }, \ - { "landing_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 28, offsetof(mavlink_flight_information_t, landing_time) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION { \ "FLIGHT_INFORMATION", \ - 5, \ + 4, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_flight_information_t, time_boot_ms) }, \ { "arming_time_utc", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_flight_information_t, arming_time_utc) }, \ { "takeoff_time_utc", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_flight_information_t, takeoff_time_utc) }, \ { "flight_uuid", NULL, MAVLINK_TYPE_UINT64_T, 0, 16, offsetof(mavlink_flight_information_t, flight_uuid) }, \ - { "landing_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 28, offsetof(mavlink_flight_information_t, landing_time) }, \ } \ } #endif @@ -54,14 +51,13 @@ typedef struct __mavlink_flight_information_t { * @param msg The MAVLink message to compress the data into * * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param arming_time_utc [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. - * @param takeoff_time_utc [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. - * @param flight_uuid Flight number. Note, field is misnamed UUID. - * @param landing_time [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. + * @param arming_time_utc [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown + * @param takeoff_time_utc [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown + * @param flight_uuid Universally unique identifier (UUID) of flight, should correspond to name of log files * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_flight_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid, uint32_t landing_time) + uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN]; @@ -69,7 +65,6 @@ static inline uint16_t mavlink_msg_flight_information_pack(uint8_t system_id, ui _mav_put_uint64_t(buf, 8, takeoff_time_utc); _mav_put_uint64_t(buf, 16, flight_uuid); _mav_put_uint32_t(buf, 24, time_boot_ms); - _mav_put_uint32_t(buf, 28, landing_time); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #else @@ -78,7 +73,6 @@ static inline uint16_t mavlink_msg_flight_information_pack(uint8_t system_id, ui packet.takeoff_time_utc = takeoff_time_utc; packet.flight_uuid = flight_uuid; packet.time_boot_ms = time_boot_ms; - packet.landing_time = landing_time; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #endif @@ -95,14 +89,13 @@ static inline uint16_t mavlink_msg_flight_information_pack(uint8_t system_id, ui * @param msg The MAVLink message to compress the data into * * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param arming_time_utc [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. - * @param takeoff_time_utc [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. - * @param flight_uuid Flight number. Note, field is misnamed UUID. - * @param landing_time [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. + * @param arming_time_utc [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown + * @param takeoff_time_utc [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown + * @param flight_uuid Universally unique identifier (UUID) of flight, should correspond to name of log files * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_flight_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid, uint32_t landing_time) + uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN]; @@ -110,7 +103,6 @@ static inline uint16_t mavlink_msg_flight_information_pack_status(uint8_t system _mav_put_uint64_t(buf, 8, takeoff_time_utc); _mav_put_uint64_t(buf, 16, flight_uuid); _mav_put_uint32_t(buf, 24, time_boot_ms); - _mav_put_uint32_t(buf, 28, landing_time); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #else @@ -119,7 +111,6 @@ static inline uint16_t mavlink_msg_flight_information_pack_status(uint8_t system packet.takeoff_time_utc = takeoff_time_utc; packet.flight_uuid = flight_uuid; packet.time_boot_ms = time_boot_ms; - packet.landing_time = landing_time; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #endif @@ -139,15 +130,14 @@ static inline uint16_t mavlink_msg_flight_information_pack_status(uint8_t system * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param arming_time_utc [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. - * @param takeoff_time_utc [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. - * @param flight_uuid Flight number. Note, field is misnamed UUID. - * @param landing_time [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. + * @param arming_time_utc [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown + * @param takeoff_time_utc [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown + * @param flight_uuid Universally unique identifier (UUID) of flight, should correspond to name of log files * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_flight_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t time_boot_ms,uint64_t arming_time_utc,uint64_t takeoff_time_utc,uint64_t flight_uuid,uint32_t landing_time) + uint32_t time_boot_ms,uint64_t arming_time_utc,uint64_t takeoff_time_utc,uint64_t flight_uuid) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN]; @@ -155,7 +145,6 @@ static inline uint16_t mavlink_msg_flight_information_pack_chan(uint8_t system_i _mav_put_uint64_t(buf, 8, takeoff_time_utc); _mav_put_uint64_t(buf, 16, flight_uuid); _mav_put_uint32_t(buf, 24, time_boot_ms); - _mav_put_uint32_t(buf, 28, landing_time); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #else @@ -164,7 +153,6 @@ static inline uint16_t mavlink_msg_flight_information_pack_chan(uint8_t system_i packet.takeoff_time_utc = takeoff_time_utc; packet.flight_uuid = flight_uuid; packet.time_boot_ms = time_boot_ms; - packet.landing_time = landing_time; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); #endif @@ -183,7 +171,7 @@ static inline uint16_t mavlink_msg_flight_information_pack_chan(uint8_t system_i */ static inline uint16_t mavlink_msg_flight_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flight_information_t* flight_information) { - return mavlink_msg_flight_information_pack(system_id, component_id, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid, flight_information->landing_time); + return mavlink_msg_flight_information_pack(system_id, component_id, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid); } /** @@ -197,7 +185,7 @@ static inline uint16_t mavlink_msg_flight_information_encode(uint8_t system_id, */ static inline uint16_t mavlink_msg_flight_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flight_information_t* flight_information) { - return mavlink_msg_flight_information_pack_chan(system_id, component_id, chan, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid, flight_information->landing_time); + return mavlink_msg_flight_information_pack_chan(system_id, component_id, chan, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid); } /** @@ -211,7 +199,7 @@ static inline uint16_t mavlink_msg_flight_information_encode_chan(uint8_t system */ static inline uint16_t mavlink_msg_flight_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flight_information_t* flight_information) { - return mavlink_msg_flight_information_pack_status(system_id, component_id, _status, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid, flight_information->landing_time); + return mavlink_msg_flight_information_pack_status(system_id, component_id, _status, msg, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid); } /** @@ -219,14 +207,13 @@ static inline uint16_t mavlink_msg_flight_information_encode_status(uint8_t syst * @param chan MAVLink channel to send the message * * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param arming_time_utc [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. - * @param takeoff_time_utc [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. - * @param flight_uuid Flight number. Note, field is misnamed UUID. - * @param landing_time [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. + * @param arming_time_utc [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown + * @param takeoff_time_utc [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown + * @param flight_uuid Universally unique identifier (UUID) of flight, should correspond to name of log files */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_flight_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid, uint32_t landing_time) +static inline void mavlink_msg_flight_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN]; @@ -234,7 +221,6 @@ static inline void mavlink_msg_flight_information_send(mavlink_channel_t chan, u _mav_put_uint64_t(buf, 8, takeoff_time_utc); _mav_put_uint64_t(buf, 16, flight_uuid); _mav_put_uint32_t(buf, 24, time_boot_ms); - _mav_put_uint32_t(buf, 28, landing_time); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLIGHT_INFORMATION, buf, MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC); #else @@ -243,7 +229,6 @@ static inline void mavlink_msg_flight_information_send(mavlink_channel_t chan, u packet.takeoff_time_utc = takeoff_time_utc; packet.flight_uuid = flight_uuid; packet.time_boot_ms = time_boot_ms; - packet.landing_time = landing_time; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLIGHT_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC); #endif @@ -257,7 +242,7 @@ static inline void mavlink_msg_flight_information_send(mavlink_channel_t chan, u static inline void mavlink_msg_flight_information_send_struct(mavlink_channel_t chan, const mavlink_flight_information_t* flight_information) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flight_information_send(chan, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid, flight_information->landing_time); + mavlink_msg_flight_information_send(chan, flight_information->time_boot_ms, flight_information->arming_time_utc, flight_information->takeoff_time_utc, flight_information->flight_uuid); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLIGHT_INFORMATION, (const char *)flight_information, MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC); #endif @@ -271,7 +256,7 @@ static inline void mavlink_msg_flight_information_send_struct(mavlink_channel_t is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_flight_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid, uint32_t landing_time) +static inline void mavlink_msg_flight_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t arming_time_utc, uint64_t takeoff_time_utc, uint64_t flight_uuid) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -279,7 +264,6 @@ static inline void mavlink_msg_flight_information_send_buf(mavlink_message_t *ms _mav_put_uint64_t(buf, 8, takeoff_time_utc); _mav_put_uint64_t(buf, 16, flight_uuid); _mav_put_uint32_t(buf, 24, time_boot_ms); - _mav_put_uint32_t(buf, 28, landing_time); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLIGHT_INFORMATION, buf, MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC); #else @@ -288,7 +272,6 @@ static inline void mavlink_msg_flight_information_send_buf(mavlink_message_t *ms packet->takeoff_time_utc = takeoff_time_utc; packet->flight_uuid = flight_uuid; packet->time_boot_ms = time_boot_ms; - packet->landing_time = landing_time; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLIGHT_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_FLIGHT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN, MAVLINK_MSG_ID_FLIGHT_INFORMATION_CRC); #endif @@ -313,7 +296,7 @@ static inline uint32_t mavlink_msg_flight_information_get_time_boot_ms(const mav /** * @brief Get field arming_time_utc from flight_information message * - * @return [us] Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. + * @return [us] Timestamp at arming (time since UNIX epoch) in UTC, 0 for unknown */ static inline uint64_t mavlink_msg_flight_information_get_arming_time_utc(const mavlink_message_t* msg) { @@ -323,7 +306,7 @@ static inline uint64_t mavlink_msg_flight_information_get_arming_time_utc(const /** * @brief Get field takeoff_time_utc from flight_information message * - * @return [us] Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. + * @return [us] Timestamp at takeoff (time since UNIX epoch) in UTC, 0 for unknown */ static inline uint64_t mavlink_msg_flight_information_get_takeoff_time_utc(const mavlink_message_t* msg) { @@ -333,23 +316,13 @@ static inline uint64_t mavlink_msg_flight_information_get_takeoff_time_utc(const /** * @brief Get field flight_uuid from flight_information message * - * @return Flight number. Note, field is misnamed UUID. + * @return Universally unique identifier (UUID) of flight, should correspond to name of log files */ static inline uint64_t mavlink_msg_flight_information_get_flight_uuid(const mavlink_message_t* msg) { return _MAV_RETURN_uint64_t(msg, 16); } -/** - * @brief Get field landing_time from flight_information message - * - * @return [ms] Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. - */ -static inline uint32_t mavlink_msg_flight_information_get_landing_time(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 28); -} - /** * @brief Decode a flight_information message into a struct * @@ -363,7 +336,6 @@ static inline void mavlink_msg_flight_information_decode(const mavlink_message_t flight_information->takeoff_time_utc = mavlink_msg_flight_information_get_takeoff_time_utc(msg); flight_information->flight_uuid = mavlink_msg_flight_information_get_flight_uuid(msg); flight_information->time_boot_ms = mavlink_msg_flight_information_get_time_boot_ms(msg); - flight_information->landing_time = mavlink_msg_flight_information_get_landing_time(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN; memset(flight_information, 0, MAVLINK_MSG_ID_FLIGHT_INFORMATION_LEN); diff --git a/common/mavlink_msg_follow_target.h b/common/mavlink_msg_follow_target.h index 5200e68c3..7c104280c 100644 --- a/common/mavlink_msg_follow_target.h +++ b/common/mavlink_msg_follow_target.h @@ -12,7 +12,7 @@ typedef struct __mavlink_follow_target_t { float alt; /*< [m] Altitude (MSL)*/ float vel[3]; /*< [m/s] target velocity (0,0,0) for unknown*/ float acc[3]; /*< [m/s/s] linear target acceleration (0,0,0) for unknown*/ - float attitude_q[4]; /*< (0 0 0 0 for unknown)*/ + float attitude_q[4]; /*< (1 0 0 0 for unknown)*/ float rates[3]; /*< (0 0 0 for unknown)*/ float position_cov[3]; /*< eph epv*/ uint8_t est_capabilities; /*< bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)*/ @@ -82,7 +82,7 @@ typedef struct __mavlink_follow_target_t { * @param alt [m] Altitude (MSL) * @param vel [m/s] target velocity (0,0,0) for unknown * @param acc [m/s/s] linear target acceleration (0,0,0) for unknown - * @param attitude_q (0 0 0 0 for unknown) + * @param attitude_q (1 0 0 0 for unknown) * @param rates (0 0 0 for unknown) * @param position_cov eph epv * @param custom_state button states or switches of a tracker device @@ -139,7 +139,7 @@ static inline uint16_t mavlink_msg_follow_target_pack(uint8_t system_id, uint8_t * @param alt [m] Altitude (MSL) * @param vel [m/s] target velocity (0,0,0) for unknown * @param acc [m/s/s] linear target acceleration (0,0,0) for unknown - * @param attitude_q (0 0 0 0 for unknown) + * @param attitude_q (1 0 0 0 for unknown) * @param rates (0 0 0 for unknown) * @param position_cov eph epv * @param custom_state button states or switches of a tracker device @@ -199,7 +199,7 @@ static inline uint16_t mavlink_msg_follow_target_pack_status(uint8_t system_id, * @param alt [m] Altitude (MSL) * @param vel [m/s] target velocity (0,0,0) for unknown * @param acc [m/s/s] linear target acceleration (0,0,0) for unknown - * @param attitude_q (0 0 0 0 for unknown) + * @param attitude_q (1 0 0 0 for unknown) * @param rates (0 0 0 for unknown) * @param position_cov eph epv * @param custom_state button states or switches of a tracker device @@ -295,7 +295,7 @@ static inline uint16_t mavlink_msg_follow_target_encode_status(uint8_t system_id * @param alt [m] Altitude (MSL) * @param vel [m/s] target velocity (0,0,0) for unknown * @param acc [m/s/s] linear target acceleration (0,0,0) for unknown - * @param attitude_q (0 0 0 0 for unknown) + * @param attitude_q (1 0 0 0 for unknown) * @param rates (0 0 0 for unknown) * @param position_cov eph epv * @param custom_state button states or switches of a tracker device @@ -469,7 +469,7 @@ static inline uint16_t mavlink_msg_follow_target_get_acc(const mavlink_message_t /** * @brief Get field attitude_q from follow_target message * - * @return (0 0 0 0 for unknown) + * @return (1 0 0 0 for unknown) */ static inline uint16_t mavlink_msg_follow_target_get_attitude_q(const mavlink_message_t* msg, float *attitude_q) { diff --git a/common/mavlink_msg_global_position_int.h b/common/mavlink_msg_global_position_int.h index 484c5182c..545e5e532 100644 --- a/common/mavlink_msg_global_position_int.h +++ b/common/mavlink_msg_global_position_int.h @@ -9,7 +9,7 @@ typedef struct __mavlink_global_position_int_t { int32_t lat; /*< [degE7] Latitude, expressed*/ int32_t lon; /*< [degE7] Longitude, expressed*/ int32_t alt; /*< [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.*/ - int32_t relative_alt; /*< [mm] Altitude above home*/ + int32_t relative_alt; /*< [mm] Altitude above ground*/ int16_t vx; /*< [cm/s] Ground X Speed (Latitude, positive north)*/ int16_t vy; /*< [cm/s] Ground Y Speed (Longitude, positive east)*/ int16_t vz; /*< [cm/s] Ground Z Speed (Altitude, positive down)*/ @@ -69,7 +69,7 @@ typedef struct __mavlink_global_position_int_t { * @param lat [degE7] Latitude, expressed * @param lon [degE7] Longitude, expressed * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - * @param relative_alt [mm] Altitude above home + * @param relative_alt [mm] Altitude above ground * @param vx [cm/s] Ground X Speed (Latitude, positive north) * @param vy [cm/s] Ground Y Speed (Longitude, positive east) * @param vz [cm/s] Ground Z Speed (Altitude, positive down) @@ -122,7 +122,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u * @param lat [degE7] Latitude, expressed * @param lon [degE7] Longitude, expressed * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - * @param relative_alt [mm] Altitude above home + * @param relative_alt [mm] Altitude above ground * @param vx [cm/s] Ground X Speed (Latitude, positive north) * @param vy [cm/s] Ground Y Speed (Longitude, positive east) * @param vz [cm/s] Ground Z Speed (Altitude, positive down) @@ -178,7 +178,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack_status(uint8_t syste * @param lat [degE7] Latitude, expressed * @param lon [degE7] Longitude, expressed * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - * @param relative_alt [mm] Altitude above home + * @param relative_alt [mm] Altitude above ground * @param vx [cm/s] Ground X Speed (Latitude, positive north) * @param vy [cm/s] Ground Y Speed (Longitude, positive east) * @param vz [cm/s] Ground Z Speed (Altitude, positive down) @@ -270,7 +270,7 @@ static inline uint16_t mavlink_msg_global_position_int_encode_status(uint8_t sys * @param lat [degE7] Latitude, expressed * @param lon [degE7] Longitude, expressed * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - * @param relative_alt [mm] Altitude above home + * @param relative_alt [mm] Altitude above ground * @param vx [cm/s] Ground X Speed (Latitude, positive north) * @param vy [cm/s] Ground Y Speed (Longitude, positive east) * @param vz [cm/s] Ground Z Speed (Altitude, positive down) @@ -411,7 +411,7 @@ static inline int32_t mavlink_msg_global_position_int_get_alt(const mavlink_mess /** * @brief Get field relative_alt from global_position_int message * - * @return [mm] Altitude above home + * @return [mm] Altitude above ground */ static inline int32_t mavlink_msg_global_position_int_get_relative_alt(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_gps2_raw.h b/common/mavlink_msg_gps2_raw.h index 6583917fa..25bac0bb6 100644 --- a/common/mavlink_msg_gps2_raw.h +++ b/common/mavlink_msg_gps2_raw.h @@ -10,14 +10,14 @@ typedef struct __mavlink_gps2_raw_t { int32_t lon; /*< [degE7] Longitude (WGS84)*/ int32_t alt; /*< [mm] Altitude (MSL). Positive for up.*/ uint32_t dgps_age; /*< [ms] Age of DGPS info*/ - uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ - uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/ uint16_t vel; /*< [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX*/ uint16_t cog; /*< [cdeg] Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ uint8_t fix_type; /*< GPS fix type.*/ - uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to UINT8_MAX*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ uint8_t dgps_numch; /*< Number of DGPS satellites*/ - uint16_t yaw; /*< [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north.*/ + uint16_t yaw; /*< [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north.*/ int32_t alt_ellipsoid; /*< [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up.*/ uint32_t h_acc; /*< [mm] Position uncertainty.*/ uint32_t v_acc; /*< [mm] Altitude uncertainty.*/ @@ -97,14 +97,14 @@ typedef struct __mavlink_gps2_raw_t { * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param dgps_numch Number of DGPS satellites * @param dgps_age [ms] Age of DGPS info - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. @@ -177,14 +177,14 @@ static inline uint16_t mavlink_msg_gps2_raw_pack(uint8_t system_id, uint8_t comp * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param dgps_numch Number of DGPS satellites * @param dgps_age [ms] Age of DGPS info - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. @@ -260,14 +260,14 @@ static inline uint16_t mavlink_msg_gps2_raw_pack_status(uint8_t system_id, uint8 * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param dgps_numch Number of DGPS satellites * @param dgps_age [ms] Age of DGPS info - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. @@ -379,14 +379,14 @@ static inline uint16_t mavlink_msg_gps2_raw_encode_status(uint8_t system_id, uin * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param dgps_numch Number of DGPS satellites * @param dgps_age [ms] Age of DGPS info - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. @@ -574,7 +574,7 @@ static inline int32_t mavlink_msg_gps2_raw_get_alt(const mavlink_message_t* msg) /** * @brief Get field eph from gps2_raw message * - * @return GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps2_raw_get_eph(const mavlink_message_t* msg) { @@ -584,7 +584,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_eph(const mavlink_message_t* msg /** * @brief Get field epv from gps2_raw message * - * @return GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps2_raw_get_epv(const mavlink_message_t* msg) { @@ -614,7 +614,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_cog(const mavlink_message_t* msg /** * @brief Get field satellites_visible from gps2_raw message * - * @return Number of satellites visible. If unknown, set to UINT8_MAX + * @return Number of satellites visible. If unknown, set to 255 */ static inline uint8_t mavlink_msg_gps2_raw_get_satellites_visible(const mavlink_message_t* msg) { @@ -644,7 +644,7 @@ static inline uint32_t mavlink_msg_gps2_raw_get_dgps_age(const mavlink_message_t /** * @brief Get field yaw from gps2_raw message * - * @return [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @return [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. */ static inline uint16_t mavlink_msg_gps2_raw_get_yaw(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_gps_raw_int.h b/common/mavlink_msg_gps_raw_int.h index 427044e59..114542a18 100644 --- a/common/mavlink_msg_gps_raw_int.h +++ b/common/mavlink_msg_gps_raw_int.h @@ -9,18 +9,18 @@ typedef struct __mavlink_gps_raw_int_t { int32_t lat; /*< [degE7] Latitude (WGS84, EGM96 ellipsoid)*/ int32_t lon; /*< [degE7] Longitude (WGS84, EGM96 ellipsoid)*/ int32_t alt; /*< [mm] Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude.*/ - uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ - uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/ uint16_t vel; /*< [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX*/ uint16_t cog; /*< [cdeg] Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ uint8_t fix_type; /*< GPS fix type.*/ - uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to UINT8_MAX*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ int32_t alt_ellipsoid; /*< [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up.*/ uint32_t h_acc; /*< [mm] Position uncertainty.*/ uint32_t v_acc; /*< [mm] Altitude uncertainty.*/ uint32_t vel_acc; /*< [mm] Speed uncertainty.*/ uint32_t hdg_acc; /*< [degE5] Heading / track uncertainty*/ - uint16_t yaw; /*< [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north.*/ + uint16_t yaw; /*< [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north.*/ }) mavlink_gps_raw_int_t; #define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 52 @@ -91,17 +91,17 @@ typedef struct __mavlink_gps_raw_int_t { * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param alt [mm] Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. * @param vel_acc [mm] Speed uncertainty. * @param hdg_acc [degE5] Heading / track uncertainty - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -165,17 +165,17 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param alt [mm] Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. * @param vel_acc [mm] Speed uncertainty. * @param hdg_acc [degE5] Heading / track uncertainty - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gps_raw_int_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -242,17 +242,17 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack_status(uint8_t system_id, ui * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param alt [mm] Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. * @param vel_acc [mm] Speed uncertainty. * @param hdg_acc [degE5] Heading / track uncertainty - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -355,17 +355,17 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode_status(uint8_t system_id, * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param alt [mm] Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX * @param cog [cdeg] Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param alt_ellipsoid [mm] Altitude (above WGS84, EGM96 ellipsoid). Positive for up. * @param h_acc [mm] Position uncertainty. * @param v_acc [mm] Altitude uncertainty. * @param vel_acc [mm] Speed uncertainty. * @param hdg_acc [degE5] Heading / track uncertainty - * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @param yaw [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -540,7 +540,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* m /** * @brief Get field eph from gps_raw_int message * - * @return GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg) { @@ -550,7 +550,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* /** * @brief Get field epv from gps_raw_int message * - * @return GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg) { @@ -580,7 +580,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t* /** * @brief Get field satellites_visible from gps_raw_int message * - * @return Number of satellites visible. If unknown, set to UINT8_MAX + * @return Number of satellites visible. If unknown, set to 255 */ static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(const mavlink_message_t* msg) { @@ -640,7 +640,7 @@ static inline uint32_t mavlink_msg_gps_raw_int_get_hdg_acc(const mavlink_message /** * @brief Get field yaw from gps_raw_int message * - * @return [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. + * @return [cdeg] Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. */ static inline uint16_t mavlink_msg_gps_raw_int_get_yaw(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_high_latency.h b/common/mavlink_msg_high_latency.h index 35a6fe025..308693c1d 100644 --- a/common/mavlink_msg_high_latency.h +++ b/common/mavlink_msg_high_latency.h @@ -22,7 +22,7 @@ typedef struct __mavlink_high_latency_t { uint8_t airspeed_sp; /*< [m/s] airspeed setpoint*/ uint8_t groundspeed; /*< [m/s] groundspeed*/ int8_t climb_rate; /*< [m/s] climb rate*/ - uint8_t gps_nsat; /*< Number of satellites visible. If unknown, set to UINT8_MAX*/ + uint8_t gps_nsat; /*< Number of satellites visible. If unknown, set to 255*/ uint8_t gps_fix_type; /*< GPS Fix type.*/ uint8_t battery_remaining; /*< [%] Remaining battery (percentage)*/ int8_t temperature; /*< [degC] Autopilot temperature (degrees C)*/ @@ -126,7 +126,7 @@ typedef struct __mavlink_high_latency_t { * @param airspeed_sp [m/s] airspeed setpoint * @param groundspeed [m/s] groundspeed * @param climb_rate [m/s] climb rate - * @param gps_nsat Number of satellites visible. If unknown, set to UINT8_MAX + * @param gps_nsat Number of satellites visible. If unknown, set to 255 * @param gps_fix_type GPS Fix type. * @param battery_remaining [%] Remaining battery (percentage) * @param temperature [degC] Autopilot temperature (degrees C) @@ -224,7 +224,7 @@ static inline uint16_t mavlink_msg_high_latency_pack(uint8_t system_id, uint8_t * @param airspeed_sp [m/s] airspeed setpoint * @param groundspeed [m/s] groundspeed * @param climb_rate [m/s] climb rate - * @param gps_nsat Number of satellites visible. If unknown, set to UINT8_MAX + * @param gps_nsat Number of satellites visible. If unknown, set to 255 * @param gps_fix_type GPS Fix type. * @param battery_remaining [%] Remaining battery (percentage) * @param temperature [degC] Autopilot temperature (degrees C) @@ -325,7 +325,7 @@ static inline uint16_t mavlink_msg_high_latency_pack_status(uint8_t system_id, u * @param airspeed_sp [m/s] airspeed setpoint * @param groundspeed [m/s] groundspeed * @param climb_rate [m/s] climb rate - * @param gps_nsat Number of satellites visible. If unknown, set to UINT8_MAX + * @param gps_nsat Number of satellites visible. If unknown, set to 255 * @param gps_fix_type GPS Fix type. * @param battery_remaining [%] Remaining battery (percentage) * @param temperature [degC] Autopilot temperature (degrees C) @@ -462,7 +462,7 @@ static inline uint16_t mavlink_msg_high_latency_encode_status(uint8_t system_id, * @param airspeed_sp [m/s] airspeed setpoint * @param groundspeed [m/s] groundspeed * @param climb_rate [m/s] climb rate - * @param gps_nsat Number of satellites visible. If unknown, set to UINT8_MAX + * @param gps_nsat Number of satellites visible. If unknown, set to 255 * @param gps_fix_type GPS Fix type. * @param battery_remaining [%] Remaining battery (percentage) * @param temperature [degC] Autopilot temperature (degrees C) @@ -786,7 +786,7 @@ static inline int8_t mavlink_msg_high_latency_get_climb_rate(const mavlink_messa /** * @brief Get field gps_nsat from high_latency message * - * @return Number of satellites visible. If unknown, set to UINT8_MAX + * @return Number of satellites visible. If unknown, set to 255 */ static inline uint8_t mavlink_msg_high_latency_get_gps_nsat(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_highres_imu.h b/common/mavlink_msg_highres_imu.h index 49fecc705..2585eb931 100644 --- a/common/mavlink_msg_highres_imu.h +++ b/common/mavlink_msg_highres_imu.h @@ -19,7 +19,7 @@ typedef struct __mavlink_highres_imu_t { float diff_pressure; /*< [hPa] Differential pressure*/ float pressure_alt; /*< Altitude calculated from pressure*/ float temperature; /*< [degC] Temperature*/ - uint16_t fields_updated; /*< Bitmap for fields that have updated since last message*/ + uint16_t fields_updated; /*< Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature*/ uint8_t id; /*< Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)*/ } mavlink_highres_imu_t; @@ -100,7 +100,7 @@ typedef struct __mavlink_highres_imu_t { * @param diff_pressure [hPa] Differential pressure * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature * @param id Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) * @return length of the message in bytes (excluding serial stream start sign) */ @@ -174,7 +174,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t c * @param diff_pressure [hPa] Differential pressure * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature * @param id Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) * @return length of the message in bytes (excluding serial stream start sign) */ @@ -251,7 +251,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack_status(uint8_t system_id, ui * @param diff_pressure [hPa] Differential pressure * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature * @param id Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) * @return length of the message in bytes (excluding serial stream start sign) */ @@ -364,7 +364,7 @@ static inline uint16_t mavlink_msg_highres_imu_encode_status(uint8_t system_id, * @param diff_pressure [hPa] Differential pressure * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature * @param id Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -630,7 +630,7 @@ static inline float mavlink_msg_highres_imu_get_temperature(const mavlink_messag /** * @brief Get field fields_updated from highres_imu message * - * @return Bitmap for fields that have updated since last message + * @return Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature */ static inline uint16_t mavlink_msg_highres_imu_get_fields_updated(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_hil_gps.h b/common/mavlink_msg_hil_gps.h index da4367ea3..3e19b42bf 100644 --- a/common/mavlink_msg_hil_gps.h +++ b/common/mavlink_msg_hil_gps.h @@ -9,15 +9,15 @@ typedef struct __mavlink_hil_gps_t { int32_t lat; /*< [degE7] Latitude (WGS84)*/ int32_t lon; /*< [degE7] Longitude (WGS84)*/ int32_t alt; /*< [mm] Altitude (MSL). Positive for up.*/ - uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ - uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX*/ - uint16_t vel; /*< [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX*/ + uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/ + uint16_t vel; /*< [cm/s] GPS ground speed. If unknown, set to: 65535*/ int16_t vn; /*< [cm/s] GPS velocity in north direction in earth-fixed NED frame*/ int16_t ve; /*< [cm/s] GPS velocity in east direction in earth-fixed NED frame*/ int16_t vd; /*< [cm/s] GPS velocity in down direction in earth-fixed NED frame*/ - uint16_t cog; /*< [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/ + uint16_t cog; /*< [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535*/ uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.*/ - uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to UINT8_MAX*/ + uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/ uint8_t id; /*< GPS ID (zero indexed). Used for multiple GPS inputs*/ uint16_t yaw; /*< [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north*/ }) mavlink_hil_gps_t; @@ -88,14 +88,14 @@ typedef struct __mavlink_hil_gps_t { * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param vel [cm/s] GPS ground speed. If unknown, set to: 65535 * @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame * @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame * @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame - * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535 + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param id GPS ID (zero indexed). Used for multiple GPS inputs * @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north * @return length of the message in bytes (excluding serial stream start sign) @@ -159,14 +159,14 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint8_t system_id, uint8_t compo * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param vel [cm/s] GPS ground speed. If unknown, set to: 65535 * @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame * @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame * @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame - * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535 + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param id GPS ID (zero indexed). Used for multiple GPS inputs * @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north * @return length of the message in bytes (excluding serial stream start sign) @@ -233,14 +233,14 @@ static inline uint16_t mavlink_msg_hil_gps_pack_status(uint8_t system_id, uint8_ * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param vel [cm/s] GPS ground speed. If unknown, set to: 65535 * @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame * @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame * @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame - * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535 + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param id GPS ID (zero indexed). Used for multiple GPS inputs * @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north * @return length of the message in bytes (excluding serial stream start sign) @@ -343,14 +343,14 @@ static inline uint16_t mavlink_msg_hil_gps_encode_status(uint8_t system_id, uint * @param lat [degE7] Latitude (WGS84) * @param lon [degE7] Longitude (WGS84) * @param alt [mm] Altitude (MSL). Positive for up. - * @param eph GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param epv GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - * @param vel [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX + * @param eph GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param epv GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX + * @param vel [cm/s] GPS ground speed. If unknown, set to: 65535 * @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame * @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame * @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame - * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - * @param satellites_visible Number of satellites visible. If unknown, set to UINT8_MAX + * @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535 + * @param satellites_visible Number of satellites visible. If unknown, set to 255 * @param id GPS ID (zero indexed). Used for multiple GPS inputs * @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north */ @@ -523,7 +523,7 @@ static inline int32_t mavlink_msg_hil_gps_get_alt(const mavlink_message_t* msg) /** * @brief Get field eph from hil_gps message * - * @return GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_hil_gps_get_eph(const mavlink_message_t* msg) { @@ -533,7 +533,7 @@ static inline uint16_t mavlink_msg_hil_gps_get_eph(const mavlink_message_t* msg) /** * @brief Get field epv from hil_gps message * - * @return GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX + * @return GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX */ static inline uint16_t mavlink_msg_hil_gps_get_epv(const mavlink_message_t* msg) { @@ -543,7 +543,7 @@ static inline uint16_t mavlink_msg_hil_gps_get_epv(const mavlink_message_t* msg) /** * @brief Get field vel from hil_gps message * - * @return [cm/s] GPS ground speed. If unknown, set to: UINT16_MAX + * @return [cm/s] GPS ground speed. If unknown, set to: 65535 */ static inline uint16_t mavlink_msg_hil_gps_get_vel(const mavlink_message_t* msg) { @@ -583,7 +583,7 @@ static inline int16_t mavlink_msg_hil_gps_get_vd(const mavlink_message_t* msg) /** * @brief Get field cog from hil_gps message * - * @return [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX + * @return [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535 */ static inline uint16_t mavlink_msg_hil_gps_get_cog(const mavlink_message_t* msg) { @@ -593,7 +593,7 @@ static inline uint16_t mavlink_msg_hil_gps_get_cog(const mavlink_message_t* msg) /** * @brief Get field satellites_visible from hil_gps message * - * @return Number of satellites visible. If unknown, set to UINT8_MAX + * @return Number of satellites visible. If unknown, set to 255 */ static inline uint8_t mavlink_msg_hil_gps_get_satellites_visible(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_hil_rc_inputs_raw.h b/common/mavlink_msg_hil_rc_inputs_raw.h index 2c571c02c..492143379 100644 --- a/common/mavlink_msg_hil_rc_inputs_raw.h +++ b/common/mavlink_msg_hil_rc_inputs_raw.h @@ -18,7 +18,7 @@ typedef struct __mavlink_hil_rc_inputs_raw_t { uint16_t chan10_raw; /*< [us] RC channel 10 value*/ uint16_t chan11_raw; /*< [us] RC channel 11 value*/ uint16_t chan12_raw; /*< [us] RC channel 12 value*/ - uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ } mavlink_hil_rc_inputs_raw_t; #define MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW_LEN 33 @@ -93,7 +93,7 @@ typedef struct __mavlink_hil_rc_inputs_raw_t { * @param chan10_raw [us] RC channel 10 value * @param chan11_raw [us] RC channel 11 value * @param chan12_raw [us] RC channel 12 value - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -161,7 +161,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uin * @param chan10_raw [us] RC channel 10 value * @param chan11_raw [us] RC channel 11 value * @param chan12_raw [us] RC channel 12 value - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -232,7 +232,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_status(uint8_t system_ * @param chan10_raw [us] RC channel 10 value * @param chan11_raw [us] RC channel 11 value * @param chan12_raw [us] RC channel 12 value - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -339,7 +339,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode_status(uint8_t syste * @param chan10_raw [us] RC channel 10 value * @param chan11_raw [us] RC channel 11 value * @param chan12_raw [us] RC channel 12 value - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -586,7 +586,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_get_chan12_raw(const mavlin /** * @brief Get field rssi from hil_rc_inputs_raw message * - * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_hil_rc_inputs_raw_get_rssi(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_hil_sensor.h b/common/mavlink_msg_hil_sensor.h index d56243aae..9bd1cd0d9 100644 --- a/common/mavlink_msg_hil_sensor.h +++ b/common/mavlink_msg_hil_sensor.h @@ -19,7 +19,7 @@ typedef struct __mavlink_hil_sensor_t { float diff_pressure; /*< [hPa] Differential pressure (airspeed)*/ float pressure_alt; /*< Altitude calculated from pressure*/ float temperature; /*< [degC] Temperature*/ - uint32_t fields_updated; /*< Bitmap for fields that have updated since last message*/ + uint32_t fields_updated; /*< Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim.*/ uint8_t id; /*< Sensor ID (zero indexed). Used for multiple sensor inputs*/ } mavlink_hil_sensor_t; @@ -100,7 +100,7 @@ typedef struct __mavlink_hil_sensor_t { * @param diff_pressure [hPa] Differential pressure (airspeed) * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim. * @param id Sensor ID (zero indexed). Used for multiple sensor inputs * @return length of the message in bytes (excluding serial stream start sign) */ @@ -174,7 +174,7 @@ static inline uint16_t mavlink_msg_hil_sensor_pack(uint8_t system_id, uint8_t co * @param diff_pressure [hPa] Differential pressure (airspeed) * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim. * @param id Sensor ID (zero indexed). Used for multiple sensor inputs * @return length of the message in bytes (excluding serial stream start sign) */ @@ -251,7 +251,7 @@ static inline uint16_t mavlink_msg_hil_sensor_pack_status(uint8_t system_id, uin * @param diff_pressure [hPa] Differential pressure (airspeed) * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim. * @param id Sensor ID (zero indexed). Used for multiple sensor inputs * @return length of the message in bytes (excluding serial stream start sign) */ @@ -364,7 +364,7 @@ static inline uint16_t mavlink_msg_hil_sensor_encode_status(uint8_t system_id, u * @param diff_pressure [hPa] Differential pressure (airspeed) * @param pressure_alt Altitude calculated from pressure * @param temperature [degC] Temperature - * @param fields_updated Bitmap for fields that have updated since last message + * @param fields_updated Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim. * @param id Sensor ID (zero indexed). Used for multiple sensor inputs */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -630,7 +630,7 @@ static inline float mavlink_msg_hil_sensor_get_temperature(const mavlink_message /** * @brief Get field fields_updated from hil_sensor message * - * @return Bitmap for fields that have updated since last message + * @return Bitmap for fields that have updated since last message, bit 0 = xacc, bit 12: temperature, bit 31: full reset of attitude/position/velocities/etc was performed in sim. */ static inline uint32_t mavlink_msg_hil_sensor_get_fields_updated(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_home_position.h b/common/mavlink_msg_home_position.h index b220664b8..d373fae4b 100644 --- a/common/mavlink_msg_home_position.h +++ b/common/mavlink_msg_home_position.h @@ -8,14 +8,10 @@ typedef struct __mavlink_home_position_t { int32_t latitude; /*< [degE7] Latitude (WGS84)*/ int32_t longitude; /*< [degE7] Longitude (WGS84)*/ int32_t altitude; /*< [mm] Altitude (MSL). Positive for up.*/ - float x; /*< [m] Local X position of this position in the local coordinate frame (NED)*/ - float y; /*< [m] Local Y position of this position in the local coordinate frame (NED)*/ - float z; /*< [m] Local Z position of this position in the local coordinate frame (NED: positive "down")*/ - float q[4]; /*< - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - */ + float x; /*< [m] Local X position of this position in the local coordinate frame*/ + float y; /*< [m] Local Y position of this position in the local coordinate frame*/ + float z; /*< [m] Local Z position of this position in the local coordinate frame*/ + float q[4]; /*< World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground*/ float approach_x; /*< [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ float approach_y; /*< [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ float approach_z; /*< [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ @@ -78,14 +74,10 @@ typedef struct __mavlink_home_position_t { * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") - * @param q - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_z [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -139,14 +131,10 @@ static inline uint16_t mavlink_msg_home_position_pack(uint8_t system_id, uint8_t * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") - * @param q - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_z [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -203,14 +191,10 @@ static inline uint16_t mavlink_msg_home_position_pack_status(uint8_t system_id, * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") - * @param q - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_z [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -303,14 +287,10 @@ static inline uint16_t mavlink_msg_home_position_encode_status(uint8_t system_id * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") - * @param q - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame + * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_z [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -445,7 +425,7 @@ static inline int32_t mavlink_msg_home_position_get_altitude(const mavlink_messa /** * @brief Get field x from home_position message * - * @return [m] Local X position of this position in the local coordinate frame (NED) + * @return [m] Local X position of this position in the local coordinate frame */ static inline float mavlink_msg_home_position_get_x(const mavlink_message_t* msg) { @@ -455,7 +435,7 @@ static inline float mavlink_msg_home_position_get_x(const mavlink_message_t* msg /** * @brief Get field y from home_position message * - * @return [m] Local Y position of this position in the local coordinate frame (NED) + * @return [m] Local Y position of this position in the local coordinate frame */ static inline float mavlink_msg_home_position_get_y(const mavlink_message_t* msg) { @@ -465,7 +445,7 @@ static inline float mavlink_msg_home_position_get_y(const mavlink_message_t* msg /** * @brief Get field z from home_position message * - * @return [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @return [m] Local Z position of this position in the local coordinate frame */ static inline float mavlink_msg_home_position_get_z(const mavlink_message_t* msg) { @@ -475,11 +455,7 @@ static inline float mavlink_msg_home_position_get_z(const mavlink_message_t* msg /** * @brief Get field q from home_position message * - * @return - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - + * @return World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground */ static inline uint16_t mavlink_msg_home_position_get_q(const mavlink_message_t* msg, float *q) { diff --git a/common/mavlink_msg_illuminator_status.h b/common/mavlink_msg_illuminator_status.h deleted file mode 100644 index d73fbc153..000000000 --- a/common/mavlink_msg_illuminator_status.h +++ /dev/null @@ -1,540 +0,0 @@ -#pragma once -// MESSAGE ILLUMINATOR_STATUS PACKING - -#define MAVLINK_MSG_ID_ILLUMINATOR_STATUS 440 - - -typedef struct __mavlink_illuminator_status_t { - uint32_t uptime_ms; /*< [ms] Time since the start-up of the illuminator in ms*/ - uint32_t error_status; /*< Errors*/ - float brightness; /*< [%] Illuminator brightness*/ - float strobe_period; /*< [s] Illuminator strobing period in seconds*/ - float strobe_duty_cycle; /*< [%] Illuminator strobing duty cycle*/ - float temp_c; /*< Temperature in Celsius*/ - float min_strobe_period; /*< [s] Minimum strobing period in seconds*/ - float max_strobe_period; /*< [s] Maximum strobing period in seconds*/ - uint8_t enable; /*< 0: Illuminators OFF, 1: Illuminators ON*/ - uint8_t mode_bitmask; /*< Supported illuminator modes*/ - uint8_t mode; /*< Illuminator mode*/ -} mavlink_illuminator_status_t; - -#define MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN 35 -#define MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN 35 -#define MAVLINK_MSG_ID_440_LEN 35 -#define MAVLINK_MSG_ID_440_MIN_LEN 35 - -#define MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC 66 -#define MAVLINK_MSG_ID_440_CRC 66 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS { \ - 440, \ - "ILLUMINATOR_STATUS", \ - 11, \ - { { "uptime_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_illuminator_status_t, uptime_ms) }, \ - { "enable", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_illuminator_status_t, enable) }, \ - { "mode_bitmask", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_illuminator_status_t, mode_bitmask) }, \ - { "error_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_illuminator_status_t, error_status) }, \ - { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_illuminator_status_t, mode) }, \ - { "brightness", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_illuminator_status_t, brightness) }, \ - { "strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_illuminator_status_t, strobe_period) }, \ - { "strobe_duty_cycle", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_illuminator_status_t, strobe_duty_cycle) }, \ - { "temp_c", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_illuminator_status_t, temp_c) }, \ - { "min_strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_illuminator_status_t, min_strobe_period) }, \ - { "max_strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_illuminator_status_t, max_strobe_period) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS { \ - "ILLUMINATOR_STATUS", \ - 11, \ - { { "uptime_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_illuminator_status_t, uptime_ms) }, \ - { "enable", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_illuminator_status_t, enable) }, \ - { "mode_bitmask", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_illuminator_status_t, mode_bitmask) }, \ - { "error_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_illuminator_status_t, error_status) }, \ - { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_illuminator_status_t, mode) }, \ - { "brightness", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_illuminator_status_t, brightness) }, \ - { "strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_illuminator_status_t, strobe_period) }, \ - { "strobe_duty_cycle", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_illuminator_status_t, strobe_duty_cycle) }, \ - { "temp_c", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_illuminator_status_t, temp_c) }, \ - { "min_strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_illuminator_status_t, min_strobe_period) }, \ - { "max_strobe_period", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_illuminator_status_t, max_strobe_period) }, \ - } \ -} -#endif - -/** - * @brief Pack a illuminator_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param uptime_ms [ms] Time since the start-up of the illuminator in ms - * @param enable 0: Illuminators OFF, 1: Illuminators ON - * @param mode_bitmask Supported illuminator modes - * @param error_status Errors - * @param mode Illuminator mode - * @param brightness [%] Illuminator brightness - * @param strobe_period [s] Illuminator strobing period in seconds - * @param strobe_duty_cycle [%] Illuminator strobing duty cycle - * @param temp_c Temperature in Celsius - * @param min_strobe_period [s] Minimum strobing period in seconds - * @param max_strobe_period [s] Maximum strobing period in seconds - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_illuminator_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t uptime_ms, uint8_t enable, uint8_t mode_bitmask, uint32_t error_status, uint8_t mode, float brightness, float strobe_period, float strobe_duty_cycle, float temp_c, float min_strobe_period, float max_strobe_period) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN]; - _mav_put_uint32_t(buf, 0, uptime_ms); - _mav_put_uint32_t(buf, 4, error_status); - _mav_put_float(buf, 8, brightness); - _mav_put_float(buf, 12, strobe_period); - _mav_put_float(buf, 16, strobe_duty_cycle); - _mav_put_float(buf, 20, temp_c); - _mav_put_float(buf, 24, min_strobe_period); - _mav_put_float(buf, 28, max_strobe_period); - _mav_put_uint8_t(buf, 32, enable); - _mav_put_uint8_t(buf, 33, mode_bitmask); - _mav_put_uint8_t(buf, 34, mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#else - mavlink_illuminator_status_t packet; - packet.uptime_ms = uptime_ms; - packet.error_status = error_status; - packet.brightness = brightness; - packet.strobe_period = strobe_period; - packet.strobe_duty_cycle = strobe_duty_cycle; - packet.temp_c = temp_c; - packet.min_strobe_period = min_strobe_period; - packet.max_strobe_period = max_strobe_period; - packet.enable = enable; - packet.mode_bitmask = mode_bitmask; - packet.mode = mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ILLUMINATOR_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -} - -/** - * @brief Pack a illuminator_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param uptime_ms [ms] Time since the start-up of the illuminator in ms - * @param enable 0: Illuminators OFF, 1: Illuminators ON - * @param mode_bitmask Supported illuminator modes - * @param error_status Errors - * @param mode Illuminator mode - * @param brightness [%] Illuminator brightness - * @param strobe_period [s] Illuminator strobing period in seconds - * @param strobe_duty_cycle [%] Illuminator strobing duty cycle - * @param temp_c Temperature in Celsius - * @param min_strobe_period [s] Minimum strobing period in seconds - * @param max_strobe_period [s] Maximum strobing period in seconds - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_illuminator_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t uptime_ms, uint8_t enable, uint8_t mode_bitmask, uint32_t error_status, uint8_t mode, float brightness, float strobe_period, float strobe_duty_cycle, float temp_c, float min_strobe_period, float max_strobe_period) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN]; - _mav_put_uint32_t(buf, 0, uptime_ms); - _mav_put_uint32_t(buf, 4, error_status); - _mav_put_float(buf, 8, brightness); - _mav_put_float(buf, 12, strobe_period); - _mav_put_float(buf, 16, strobe_duty_cycle); - _mav_put_float(buf, 20, temp_c); - _mav_put_float(buf, 24, min_strobe_period); - _mav_put_float(buf, 28, max_strobe_period); - _mav_put_uint8_t(buf, 32, enable); - _mav_put_uint8_t(buf, 33, mode_bitmask); - _mav_put_uint8_t(buf, 34, mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#else - mavlink_illuminator_status_t packet; - packet.uptime_ms = uptime_ms; - packet.error_status = error_status; - packet.brightness = brightness; - packet.strobe_period = strobe_period; - packet.strobe_duty_cycle = strobe_duty_cycle; - packet.temp_c = temp_c; - packet.min_strobe_period = min_strobe_period; - packet.max_strobe_period = max_strobe_period; - packet.enable = enable; - packet.mode_bitmask = mode_bitmask; - packet.mode = mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ILLUMINATOR_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#endif -} - -/** - * @brief Pack a illuminator_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param uptime_ms [ms] Time since the start-up of the illuminator in ms - * @param enable 0: Illuminators OFF, 1: Illuminators ON - * @param mode_bitmask Supported illuminator modes - * @param error_status Errors - * @param mode Illuminator mode - * @param brightness [%] Illuminator brightness - * @param strobe_period [s] Illuminator strobing period in seconds - * @param strobe_duty_cycle [%] Illuminator strobing duty cycle - * @param temp_c Temperature in Celsius - * @param min_strobe_period [s] Minimum strobing period in seconds - * @param max_strobe_period [s] Maximum strobing period in seconds - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_illuminator_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t uptime_ms,uint8_t enable,uint8_t mode_bitmask,uint32_t error_status,uint8_t mode,float brightness,float strobe_period,float strobe_duty_cycle,float temp_c,float min_strobe_period,float max_strobe_period) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN]; - _mav_put_uint32_t(buf, 0, uptime_ms); - _mav_put_uint32_t(buf, 4, error_status); - _mav_put_float(buf, 8, brightness); - _mav_put_float(buf, 12, strobe_period); - _mav_put_float(buf, 16, strobe_duty_cycle); - _mav_put_float(buf, 20, temp_c); - _mav_put_float(buf, 24, min_strobe_period); - _mav_put_float(buf, 28, max_strobe_period); - _mav_put_uint8_t(buf, 32, enable); - _mav_put_uint8_t(buf, 33, mode_bitmask); - _mav_put_uint8_t(buf, 34, mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#else - mavlink_illuminator_status_t packet; - packet.uptime_ms = uptime_ms; - packet.error_status = error_status; - packet.brightness = brightness; - packet.strobe_period = strobe_period; - packet.strobe_duty_cycle = strobe_duty_cycle; - packet.temp_c = temp_c; - packet.min_strobe_period = min_strobe_period; - packet.max_strobe_period = max_strobe_period; - packet.enable = enable; - packet.mode_bitmask = mode_bitmask; - packet.mode = mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ILLUMINATOR_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -} - -/** - * @brief Encode a illuminator_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param illuminator_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_illuminator_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_illuminator_status_t* illuminator_status) -{ - return mavlink_msg_illuminator_status_pack(system_id, component_id, msg, illuminator_status->uptime_ms, illuminator_status->enable, illuminator_status->mode_bitmask, illuminator_status->error_status, illuminator_status->mode, illuminator_status->brightness, illuminator_status->strobe_period, illuminator_status->strobe_duty_cycle, illuminator_status->temp_c, illuminator_status->min_strobe_period, illuminator_status->max_strobe_period); -} - -/** - * @brief Encode a illuminator_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param illuminator_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_illuminator_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_illuminator_status_t* illuminator_status) -{ - return mavlink_msg_illuminator_status_pack_chan(system_id, component_id, chan, msg, illuminator_status->uptime_ms, illuminator_status->enable, illuminator_status->mode_bitmask, illuminator_status->error_status, illuminator_status->mode, illuminator_status->brightness, illuminator_status->strobe_period, illuminator_status->strobe_duty_cycle, illuminator_status->temp_c, illuminator_status->min_strobe_period, illuminator_status->max_strobe_period); -} - -/** - * @brief Encode a illuminator_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param illuminator_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_illuminator_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_illuminator_status_t* illuminator_status) -{ - return mavlink_msg_illuminator_status_pack_status(system_id, component_id, _status, msg, illuminator_status->uptime_ms, illuminator_status->enable, illuminator_status->mode_bitmask, illuminator_status->error_status, illuminator_status->mode, illuminator_status->brightness, illuminator_status->strobe_period, illuminator_status->strobe_duty_cycle, illuminator_status->temp_c, illuminator_status->min_strobe_period, illuminator_status->max_strobe_period); -} - -/** - * @brief Send a illuminator_status message - * @param chan MAVLink channel to send the message - * - * @param uptime_ms [ms] Time since the start-up of the illuminator in ms - * @param enable 0: Illuminators OFF, 1: Illuminators ON - * @param mode_bitmask Supported illuminator modes - * @param error_status Errors - * @param mode Illuminator mode - * @param brightness [%] Illuminator brightness - * @param strobe_period [s] Illuminator strobing period in seconds - * @param strobe_duty_cycle [%] Illuminator strobing duty cycle - * @param temp_c Temperature in Celsius - * @param min_strobe_period [s] Minimum strobing period in seconds - * @param max_strobe_period [s] Maximum strobing period in seconds - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_illuminator_status_send(mavlink_channel_t chan, uint32_t uptime_ms, uint8_t enable, uint8_t mode_bitmask, uint32_t error_status, uint8_t mode, float brightness, float strobe_period, float strobe_duty_cycle, float temp_c, float min_strobe_period, float max_strobe_period) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN]; - _mav_put_uint32_t(buf, 0, uptime_ms); - _mav_put_uint32_t(buf, 4, error_status); - _mav_put_float(buf, 8, brightness); - _mav_put_float(buf, 12, strobe_period); - _mav_put_float(buf, 16, strobe_duty_cycle); - _mav_put_float(buf, 20, temp_c); - _mav_put_float(buf, 24, min_strobe_period); - _mav_put_float(buf, 28, max_strobe_period); - _mav_put_uint8_t(buf, 32, enable); - _mav_put_uint8_t(buf, 33, mode_bitmask); - _mav_put_uint8_t(buf, 34, mode); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS, buf, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#else - mavlink_illuminator_status_t packet; - packet.uptime_ms = uptime_ms; - packet.error_status = error_status; - packet.brightness = brightness; - packet.strobe_period = strobe_period; - packet.strobe_duty_cycle = strobe_duty_cycle; - packet.temp_c = temp_c; - packet.min_strobe_period = min_strobe_period; - packet.max_strobe_period = max_strobe_period; - packet.enable = enable; - packet.mode_bitmask = mode_bitmask; - packet.mode = mode; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#endif -} - -/** - * @brief Send a illuminator_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_illuminator_status_send_struct(mavlink_channel_t chan, const mavlink_illuminator_status_t* illuminator_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_illuminator_status_send(chan, illuminator_status->uptime_ms, illuminator_status->enable, illuminator_status->mode_bitmask, illuminator_status->error_status, illuminator_status->mode, illuminator_status->brightness, illuminator_status->strobe_period, illuminator_status->strobe_duty_cycle, illuminator_status->temp_c, illuminator_status->min_strobe_period, illuminator_status->max_strobe_period); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS, (const char *)illuminator_status, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_illuminator_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t uptime_ms, uint8_t enable, uint8_t mode_bitmask, uint32_t error_status, uint8_t mode, float brightness, float strobe_period, float strobe_duty_cycle, float temp_c, float min_strobe_period, float max_strobe_period) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, uptime_ms); - _mav_put_uint32_t(buf, 4, error_status); - _mav_put_float(buf, 8, brightness); - _mav_put_float(buf, 12, strobe_period); - _mav_put_float(buf, 16, strobe_duty_cycle); - _mav_put_float(buf, 20, temp_c); - _mav_put_float(buf, 24, min_strobe_period); - _mav_put_float(buf, 28, max_strobe_period); - _mav_put_uint8_t(buf, 32, enable); - _mav_put_uint8_t(buf, 33, mode_bitmask); - _mav_put_uint8_t(buf, 34, mode); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS, buf, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#else - mavlink_illuminator_status_t *packet = (mavlink_illuminator_status_t *)msgbuf; - packet->uptime_ms = uptime_ms; - packet->error_status = error_status; - packet->brightness = brightness; - packet->strobe_period = strobe_period; - packet->strobe_duty_cycle = strobe_duty_cycle; - packet->temp_c = temp_c; - packet->min_strobe_period = min_strobe_period; - packet->max_strobe_period = max_strobe_period; - packet->enable = enable; - packet->mode_bitmask = mode_bitmask; - packet->mode = mode; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ILLUMINATOR_STATUS, (const char *)packet, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ILLUMINATOR_STATUS UNPACKING - - -/** - * @brief Get field uptime_ms from illuminator_status message - * - * @return [ms] Time since the start-up of the illuminator in ms - */ -static inline uint32_t mavlink_msg_illuminator_status_get_uptime_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field enable from illuminator_status message - * - * @return 0: Illuminators OFF, 1: Illuminators ON - */ -static inline uint8_t mavlink_msg_illuminator_status_get_enable(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 32); -} - -/** - * @brief Get field mode_bitmask from illuminator_status message - * - * @return Supported illuminator modes - */ -static inline uint8_t mavlink_msg_illuminator_status_get_mode_bitmask(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 33); -} - -/** - * @brief Get field error_status from illuminator_status message - * - * @return Errors - */ -static inline uint32_t mavlink_msg_illuminator_status_get_error_status(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field mode from illuminator_status message - * - * @return Illuminator mode - */ -static inline uint8_t mavlink_msg_illuminator_status_get_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 34); -} - -/** - * @brief Get field brightness from illuminator_status message - * - * @return [%] Illuminator brightness - */ -static inline float mavlink_msg_illuminator_status_get_brightness(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field strobe_period from illuminator_status message - * - * @return [s] Illuminator strobing period in seconds - */ -static inline float mavlink_msg_illuminator_status_get_strobe_period(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field strobe_duty_cycle from illuminator_status message - * - * @return [%] Illuminator strobing duty cycle - */ -static inline float mavlink_msg_illuminator_status_get_strobe_duty_cycle(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field temp_c from illuminator_status message - * - * @return Temperature in Celsius - */ -static inline float mavlink_msg_illuminator_status_get_temp_c(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 20); -} - -/** - * @brief Get field min_strobe_period from illuminator_status message - * - * @return [s] Minimum strobing period in seconds - */ -static inline float mavlink_msg_illuminator_status_get_min_strobe_period(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 24); -} - -/** - * @brief Get field max_strobe_period from illuminator_status message - * - * @return [s] Maximum strobing period in seconds - */ -static inline float mavlink_msg_illuminator_status_get_max_strobe_period(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 28); -} - -/** - * @brief Decode a illuminator_status message into a struct - * - * @param msg The message to decode - * @param illuminator_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_illuminator_status_decode(const mavlink_message_t* msg, mavlink_illuminator_status_t* illuminator_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - illuminator_status->uptime_ms = mavlink_msg_illuminator_status_get_uptime_ms(msg); - illuminator_status->error_status = mavlink_msg_illuminator_status_get_error_status(msg); - illuminator_status->brightness = mavlink_msg_illuminator_status_get_brightness(msg); - illuminator_status->strobe_period = mavlink_msg_illuminator_status_get_strobe_period(msg); - illuminator_status->strobe_duty_cycle = mavlink_msg_illuminator_status_get_strobe_duty_cycle(msg); - illuminator_status->temp_c = mavlink_msg_illuminator_status_get_temp_c(msg); - illuminator_status->min_strobe_period = mavlink_msg_illuminator_status_get_min_strobe_period(msg); - illuminator_status->max_strobe_period = mavlink_msg_illuminator_status_get_max_strobe_period(msg); - illuminator_status->enable = mavlink_msg_illuminator_status_get_enable(msg); - illuminator_status->mode_bitmask = mavlink_msg_illuminator_status_get_mode_bitmask(msg); - illuminator_status->mode = mavlink_msg_illuminator_status_get_mode(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN; - memset(illuminator_status, 0, MAVLINK_MSG_ID_ILLUMINATOR_STATUS_LEN); - memcpy(illuminator_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_link_node_status.h b/common/mavlink_msg_link_node_status.h deleted file mode 100644 index ee21a165e..000000000 --- a/common/mavlink_msg_link_node_status.h +++ /dev/null @@ -1,540 +0,0 @@ -#pragma once -// MESSAGE LINK_NODE_STATUS PACKING - -#define MAVLINK_MSG_ID_LINK_NODE_STATUS 8 - - -typedef struct __mavlink_link_node_status_t { - uint64_t timestamp; /*< [ms] Timestamp (time since system boot).*/ - uint32_t tx_rate; /*< [bytes/s] Transmit rate*/ - uint32_t rx_rate; /*< [bytes/s] Receive rate*/ - uint32_t messages_sent; /*< Messages sent*/ - uint32_t messages_received; /*< Messages received (estimated from counting seq)*/ - uint32_t messages_lost; /*< Messages lost (estimated from counting seq)*/ - uint16_t rx_parse_err; /*< [bytes] Number of bytes that could not be parsed correctly.*/ - uint16_t tx_overflows; /*< [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX*/ - uint16_t rx_overflows; /*< [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX*/ - uint8_t tx_buf; /*< [%] Remaining free transmit buffer space*/ - uint8_t rx_buf; /*< [%] Remaining free receive buffer space*/ -} mavlink_link_node_status_t; - -#define MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN 36 -#define MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN 36 -#define MAVLINK_MSG_ID_8_LEN 36 -#define MAVLINK_MSG_ID_8_MIN_LEN 36 - -#define MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC 117 -#define MAVLINK_MSG_ID_8_CRC 117 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS { \ - 8, \ - "LINK_NODE_STATUS", \ - 11, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_link_node_status_t, timestamp) }, \ - { "tx_buf", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_link_node_status_t, tx_buf) }, \ - { "rx_buf", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_link_node_status_t, rx_buf) }, \ - { "tx_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_link_node_status_t, tx_rate) }, \ - { "rx_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_link_node_status_t, rx_rate) }, \ - { "rx_parse_err", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_link_node_status_t, rx_parse_err) }, \ - { "tx_overflows", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_link_node_status_t, tx_overflows) }, \ - { "rx_overflows", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_link_node_status_t, rx_overflows) }, \ - { "messages_sent", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_link_node_status_t, messages_sent) }, \ - { "messages_received", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_link_node_status_t, messages_received) }, \ - { "messages_lost", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_link_node_status_t, messages_lost) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS { \ - "LINK_NODE_STATUS", \ - 11, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_link_node_status_t, timestamp) }, \ - { "tx_buf", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_link_node_status_t, tx_buf) }, \ - { "rx_buf", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_link_node_status_t, rx_buf) }, \ - { "tx_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_link_node_status_t, tx_rate) }, \ - { "rx_rate", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_link_node_status_t, rx_rate) }, \ - { "rx_parse_err", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_link_node_status_t, rx_parse_err) }, \ - { "tx_overflows", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_link_node_status_t, tx_overflows) }, \ - { "rx_overflows", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_link_node_status_t, rx_overflows) }, \ - { "messages_sent", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_link_node_status_t, messages_sent) }, \ - { "messages_received", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_link_node_status_t, messages_received) }, \ - { "messages_lost", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_link_node_status_t, messages_lost) }, \ - } \ -} -#endif - -/** - * @brief Pack a link_node_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [ms] Timestamp (time since system boot). - * @param tx_buf [%] Remaining free transmit buffer space - * @param rx_buf [%] Remaining free receive buffer space - * @param tx_rate [bytes/s] Transmit rate - * @param rx_rate [bytes/s] Receive rate - * @param rx_parse_err [bytes] Number of bytes that could not be parsed correctly. - * @param tx_overflows [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param rx_overflows [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param messages_sent Messages sent - * @param messages_received Messages received (estimated from counting seq) - * @param messages_lost Messages lost (estimated from counting seq) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_link_node_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t timestamp, uint8_t tx_buf, uint8_t rx_buf, uint32_t tx_rate, uint32_t rx_rate, uint16_t rx_parse_err, uint16_t tx_overflows, uint16_t rx_overflows, uint32_t messages_sent, uint32_t messages_received, uint32_t messages_lost) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_uint32_t(buf, 8, tx_rate); - _mav_put_uint32_t(buf, 12, rx_rate); - _mav_put_uint32_t(buf, 16, messages_sent); - _mav_put_uint32_t(buf, 20, messages_received); - _mav_put_uint32_t(buf, 24, messages_lost); - _mav_put_uint16_t(buf, 28, rx_parse_err); - _mav_put_uint16_t(buf, 30, tx_overflows); - _mav_put_uint16_t(buf, 32, rx_overflows); - _mav_put_uint8_t(buf, 34, tx_buf); - _mav_put_uint8_t(buf, 35, rx_buf); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#else - mavlink_link_node_status_t packet; - packet.timestamp = timestamp; - packet.tx_rate = tx_rate; - packet.rx_rate = rx_rate; - packet.messages_sent = messages_sent; - packet.messages_received = messages_received; - packet.messages_lost = messages_lost; - packet.rx_parse_err = rx_parse_err; - packet.tx_overflows = tx_overflows; - packet.rx_overflows = rx_overflows; - packet.tx_buf = tx_buf; - packet.rx_buf = rx_buf; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_LINK_NODE_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -} - -/** - * @brief Pack a link_node_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [ms] Timestamp (time since system boot). - * @param tx_buf [%] Remaining free transmit buffer space - * @param rx_buf [%] Remaining free receive buffer space - * @param tx_rate [bytes/s] Transmit rate - * @param rx_rate [bytes/s] Receive rate - * @param rx_parse_err [bytes] Number of bytes that could not be parsed correctly. - * @param tx_overflows [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param rx_overflows [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param messages_sent Messages sent - * @param messages_received Messages received (estimated from counting seq) - * @param messages_lost Messages lost (estimated from counting seq) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_link_node_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t timestamp, uint8_t tx_buf, uint8_t rx_buf, uint32_t tx_rate, uint32_t rx_rate, uint16_t rx_parse_err, uint16_t tx_overflows, uint16_t rx_overflows, uint32_t messages_sent, uint32_t messages_received, uint32_t messages_lost) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_uint32_t(buf, 8, tx_rate); - _mav_put_uint32_t(buf, 12, rx_rate); - _mav_put_uint32_t(buf, 16, messages_sent); - _mav_put_uint32_t(buf, 20, messages_received); - _mav_put_uint32_t(buf, 24, messages_lost); - _mav_put_uint16_t(buf, 28, rx_parse_err); - _mav_put_uint16_t(buf, 30, tx_overflows); - _mav_put_uint16_t(buf, 32, rx_overflows); - _mav_put_uint8_t(buf, 34, tx_buf); - _mav_put_uint8_t(buf, 35, rx_buf); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#else - mavlink_link_node_status_t packet; - packet.timestamp = timestamp; - packet.tx_rate = tx_rate; - packet.rx_rate = rx_rate; - packet.messages_sent = messages_sent; - packet.messages_received = messages_received; - packet.messages_lost = messages_lost; - packet.rx_parse_err = rx_parse_err; - packet.tx_overflows = tx_overflows; - packet.rx_overflows = rx_overflows; - packet.tx_buf = tx_buf; - packet.rx_buf = rx_buf; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_LINK_NODE_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#endif -} - -/** - * @brief Pack a link_node_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param timestamp [ms] Timestamp (time since system boot). - * @param tx_buf [%] Remaining free transmit buffer space - * @param rx_buf [%] Remaining free receive buffer space - * @param tx_rate [bytes/s] Transmit rate - * @param rx_rate [bytes/s] Receive rate - * @param rx_parse_err [bytes] Number of bytes that could not be parsed correctly. - * @param tx_overflows [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param rx_overflows [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param messages_sent Messages sent - * @param messages_received Messages received (estimated from counting seq) - * @param messages_lost Messages lost (estimated from counting seq) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_link_node_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t timestamp,uint8_t tx_buf,uint8_t rx_buf,uint32_t tx_rate,uint32_t rx_rate,uint16_t rx_parse_err,uint16_t tx_overflows,uint16_t rx_overflows,uint32_t messages_sent,uint32_t messages_received,uint32_t messages_lost) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_uint32_t(buf, 8, tx_rate); - _mav_put_uint32_t(buf, 12, rx_rate); - _mav_put_uint32_t(buf, 16, messages_sent); - _mav_put_uint32_t(buf, 20, messages_received); - _mav_put_uint32_t(buf, 24, messages_lost); - _mav_put_uint16_t(buf, 28, rx_parse_err); - _mav_put_uint16_t(buf, 30, tx_overflows); - _mav_put_uint16_t(buf, 32, rx_overflows); - _mav_put_uint8_t(buf, 34, tx_buf); - _mav_put_uint8_t(buf, 35, rx_buf); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#else - mavlink_link_node_status_t packet; - packet.timestamp = timestamp; - packet.tx_rate = tx_rate; - packet.rx_rate = rx_rate; - packet.messages_sent = messages_sent; - packet.messages_received = messages_received; - packet.messages_lost = messages_lost; - packet.rx_parse_err = rx_parse_err; - packet.tx_overflows = tx_overflows; - packet.rx_overflows = rx_overflows; - packet.tx_buf = tx_buf; - packet.rx_buf = rx_buf; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_LINK_NODE_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -} - -/** - * @brief Encode a link_node_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param link_node_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_link_node_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_link_node_status_t* link_node_status) -{ - return mavlink_msg_link_node_status_pack(system_id, component_id, msg, link_node_status->timestamp, link_node_status->tx_buf, link_node_status->rx_buf, link_node_status->tx_rate, link_node_status->rx_rate, link_node_status->rx_parse_err, link_node_status->tx_overflows, link_node_status->rx_overflows, link_node_status->messages_sent, link_node_status->messages_received, link_node_status->messages_lost); -} - -/** - * @brief Encode a link_node_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param link_node_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_link_node_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_link_node_status_t* link_node_status) -{ - return mavlink_msg_link_node_status_pack_chan(system_id, component_id, chan, msg, link_node_status->timestamp, link_node_status->tx_buf, link_node_status->rx_buf, link_node_status->tx_rate, link_node_status->rx_rate, link_node_status->rx_parse_err, link_node_status->tx_overflows, link_node_status->rx_overflows, link_node_status->messages_sent, link_node_status->messages_received, link_node_status->messages_lost); -} - -/** - * @brief Encode a link_node_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param link_node_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_link_node_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_link_node_status_t* link_node_status) -{ - return mavlink_msg_link_node_status_pack_status(system_id, component_id, _status, msg, link_node_status->timestamp, link_node_status->tx_buf, link_node_status->rx_buf, link_node_status->tx_rate, link_node_status->rx_rate, link_node_status->rx_parse_err, link_node_status->tx_overflows, link_node_status->rx_overflows, link_node_status->messages_sent, link_node_status->messages_received, link_node_status->messages_lost); -} - -/** - * @brief Send a link_node_status message - * @param chan MAVLink channel to send the message - * - * @param timestamp [ms] Timestamp (time since system boot). - * @param tx_buf [%] Remaining free transmit buffer space - * @param rx_buf [%] Remaining free receive buffer space - * @param tx_rate [bytes/s] Transmit rate - * @param rx_rate [bytes/s] Receive rate - * @param rx_parse_err [bytes] Number of bytes that could not be parsed correctly. - * @param tx_overflows [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param rx_overflows [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - * @param messages_sent Messages sent - * @param messages_received Messages received (estimated from counting seq) - * @param messages_lost Messages lost (estimated from counting seq) - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_link_node_status_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t tx_buf, uint8_t rx_buf, uint32_t tx_rate, uint32_t rx_rate, uint16_t rx_parse_err, uint16_t tx_overflows, uint16_t rx_overflows, uint32_t messages_sent, uint32_t messages_received, uint32_t messages_lost) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_uint32_t(buf, 8, tx_rate); - _mav_put_uint32_t(buf, 12, rx_rate); - _mav_put_uint32_t(buf, 16, messages_sent); - _mav_put_uint32_t(buf, 20, messages_received); - _mav_put_uint32_t(buf, 24, messages_lost); - _mav_put_uint16_t(buf, 28, rx_parse_err); - _mav_put_uint16_t(buf, 30, tx_overflows); - _mav_put_uint16_t(buf, 32, rx_overflows); - _mav_put_uint8_t(buf, 34, tx_buf); - _mav_put_uint8_t(buf, 35, rx_buf); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LINK_NODE_STATUS, buf, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#else - mavlink_link_node_status_t packet; - packet.timestamp = timestamp; - packet.tx_rate = tx_rate; - packet.rx_rate = rx_rate; - packet.messages_sent = messages_sent; - packet.messages_received = messages_received; - packet.messages_lost = messages_lost; - packet.rx_parse_err = rx_parse_err; - packet.tx_overflows = tx_overflows; - packet.rx_overflows = rx_overflows; - packet.tx_buf = tx_buf; - packet.rx_buf = rx_buf; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LINK_NODE_STATUS, (const char *)&packet, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#endif -} - -/** - * @brief Send a link_node_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_link_node_status_send_struct(mavlink_channel_t chan, const mavlink_link_node_status_t* link_node_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_link_node_status_send(chan, link_node_status->timestamp, link_node_status->tx_buf, link_node_status->rx_buf, link_node_status->tx_rate, link_node_status->rx_rate, link_node_status->rx_parse_err, link_node_status->tx_overflows, link_node_status->rx_overflows, link_node_status->messages_sent, link_node_status->messages_received, link_node_status->messages_lost); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LINK_NODE_STATUS, (const char *)link_node_status, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_link_node_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t tx_buf, uint8_t rx_buf, uint32_t tx_rate, uint32_t rx_rate, uint16_t rx_parse_err, uint16_t tx_overflows, uint16_t rx_overflows, uint32_t messages_sent, uint32_t messages_received, uint32_t messages_lost) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_uint32_t(buf, 8, tx_rate); - _mav_put_uint32_t(buf, 12, rx_rate); - _mav_put_uint32_t(buf, 16, messages_sent); - _mav_put_uint32_t(buf, 20, messages_received); - _mav_put_uint32_t(buf, 24, messages_lost); - _mav_put_uint16_t(buf, 28, rx_parse_err); - _mav_put_uint16_t(buf, 30, tx_overflows); - _mav_put_uint16_t(buf, 32, rx_overflows); - _mav_put_uint8_t(buf, 34, tx_buf); - _mav_put_uint8_t(buf, 35, rx_buf); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LINK_NODE_STATUS, buf, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#else - mavlink_link_node_status_t *packet = (mavlink_link_node_status_t *)msgbuf; - packet->timestamp = timestamp; - packet->tx_rate = tx_rate; - packet->rx_rate = rx_rate; - packet->messages_sent = messages_sent; - packet->messages_received = messages_received; - packet->messages_lost = messages_lost; - packet->rx_parse_err = rx_parse_err; - packet->tx_overflows = tx_overflows; - packet->rx_overflows = rx_overflows; - packet->tx_buf = tx_buf; - packet->rx_buf = rx_buf; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LINK_NODE_STATUS, (const char *)packet, MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN, MAVLINK_MSG_ID_LINK_NODE_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE LINK_NODE_STATUS UNPACKING - - -/** - * @brief Get field timestamp from link_node_status message - * - * @return [ms] Timestamp (time since system boot). - */ -static inline uint64_t mavlink_msg_link_node_status_get_timestamp(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field tx_buf from link_node_status message - * - * @return [%] Remaining free transmit buffer space - */ -static inline uint8_t mavlink_msg_link_node_status_get_tx_buf(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 34); -} - -/** - * @brief Get field rx_buf from link_node_status message - * - * @return [%] Remaining free receive buffer space - */ -static inline uint8_t mavlink_msg_link_node_status_get_rx_buf(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 35); -} - -/** - * @brief Get field tx_rate from link_node_status message - * - * @return [bytes/s] Transmit rate - */ -static inline uint32_t mavlink_msg_link_node_status_get_tx_rate(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field rx_rate from link_node_status message - * - * @return [bytes/s] Receive rate - */ -static inline uint32_t mavlink_msg_link_node_status_get_rx_rate(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 12); -} - -/** - * @brief Get field rx_parse_err from link_node_status message - * - * @return [bytes] Number of bytes that could not be parsed correctly. - */ -static inline uint16_t mavlink_msg_link_node_status_get_rx_parse_err(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 28); -} - -/** - * @brief Get field tx_overflows from link_node_status message - * - * @return [bytes] Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - */ -static inline uint16_t mavlink_msg_link_node_status_get_tx_overflows(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 30); -} - -/** - * @brief Get field rx_overflows from link_node_status message - * - * @return [bytes] Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - */ -static inline uint16_t mavlink_msg_link_node_status_get_rx_overflows(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 32); -} - -/** - * @brief Get field messages_sent from link_node_status message - * - * @return Messages sent - */ -static inline uint32_t mavlink_msg_link_node_status_get_messages_sent(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 16); -} - -/** - * @brief Get field messages_received from link_node_status message - * - * @return Messages received (estimated from counting seq) - */ -static inline uint32_t mavlink_msg_link_node_status_get_messages_received(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 20); -} - -/** - * @brief Get field messages_lost from link_node_status message - * - * @return Messages lost (estimated from counting seq) - */ -static inline uint32_t mavlink_msg_link_node_status_get_messages_lost(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 24); -} - -/** - * @brief Decode a link_node_status message into a struct - * - * @param msg The message to decode - * @param link_node_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_link_node_status_decode(const mavlink_message_t* msg, mavlink_link_node_status_t* link_node_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - link_node_status->timestamp = mavlink_msg_link_node_status_get_timestamp(msg); - link_node_status->tx_rate = mavlink_msg_link_node_status_get_tx_rate(msg); - link_node_status->rx_rate = mavlink_msg_link_node_status_get_rx_rate(msg); - link_node_status->messages_sent = mavlink_msg_link_node_status_get_messages_sent(msg); - link_node_status->messages_received = mavlink_msg_link_node_status_get_messages_received(msg); - link_node_status->messages_lost = mavlink_msg_link_node_status_get_messages_lost(msg); - link_node_status->rx_parse_err = mavlink_msg_link_node_status_get_rx_parse_err(msg); - link_node_status->tx_overflows = mavlink_msg_link_node_status_get_tx_overflows(msg); - link_node_status->rx_overflows = mavlink_msg_link_node_status_get_rx_overflows(msg); - link_node_status->tx_buf = mavlink_msg_link_node_status_get_tx_buf(msg); - link_node_status->rx_buf = mavlink_msg_link_node_status_get_rx_buf(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN? msg->len : MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN; - memset(link_node_status, 0, MAVLINK_MSG_ID_LINK_NODE_STATUS_LEN); - memcpy(link_node_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_logging_data.h b/common/mavlink_msg_logging_data.h index bd680ee77..3504cc297 100644 --- a/common/mavlink_msg_logging_data.h +++ b/common/mavlink_msg_logging_data.h @@ -9,7 +9,7 @@ typedef struct __mavlink_logging_data_t { uint8_t target_system; /*< system ID of the target*/ uint8_t target_component; /*< component ID of the target*/ uint8_t length; /*< [bytes] data length*/ - uint8_t first_message_offset; /*< [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists).*/ + uint8_t first_message_offset; /*< [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists).*/ uint8_t data[249]; /*< logged data*/ } mavlink_logging_data_t; @@ -60,7 +60,7 @@ typedef struct __mavlink_logging_data_t { * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -102,7 +102,7 @@ static inline uint16_t mavlink_msg_logging_data_pack(uint8_t system_id, uint8_t * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -147,7 +147,7 @@ static inline uint16_t mavlink_msg_logging_data_pack_status(uint8_t system_id, u * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -228,7 +228,7 @@ static inline uint16_t mavlink_msg_logging_data_encode_status(uint8_t system_id, * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -350,7 +350,7 @@ static inline uint8_t mavlink_msg_logging_data_get_length(const mavlink_message_ /** * @brief Get field first_message_offset from logging_data message * - * @return [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @return [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). */ static inline uint8_t mavlink_msg_logging_data_get_first_message_offset(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_logging_data_acked.h b/common/mavlink_msg_logging_data_acked.h index c277a579d..c992f63ff 100644 --- a/common/mavlink_msg_logging_data_acked.h +++ b/common/mavlink_msg_logging_data_acked.h @@ -9,7 +9,7 @@ typedef struct __mavlink_logging_data_acked_t { uint8_t target_system; /*< system ID of the target*/ uint8_t target_component; /*< component ID of the target*/ uint8_t length; /*< [bytes] data length*/ - uint8_t first_message_offset; /*< [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists).*/ + uint8_t first_message_offset; /*< [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists).*/ uint8_t data[249]; /*< logged data*/ } mavlink_logging_data_acked_t; @@ -60,7 +60,7 @@ typedef struct __mavlink_logging_data_acked_t { * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -102,7 +102,7 @@ static inline uint16_t mavlink_msg_logging_data_acked_pack(uint8_t system_id, ui * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -147,7 +147,7 @@ static inline uint16_t mavlink_msg_logging_data_acked_pack_status(uint8_t system * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data * @return length of the message in bytes (excluding serial stream start sign) */ @@ -228,7 +228,7 @@ static inline uint16_t mavlink_msg_logging_data_acked_encode_status(uint8_t syst * @param target_component component ID of the target * @param sequence sequence number (can wrap) * @param length [bytes] data length - * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @param first_message_offset [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). * @param data logged data */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -350,7 +350,7 @@ static inline uint8_t mavlink_msg_logging_data_acked_get_length(const mavlink_me /** * @brief Get field first_message_offset from logging_data_acked message * - * @return [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). + * @return [bytes] offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to 255 if no start exists). */ static inline uint8_t mavlink_msg_logging_data_acked_get_first_message_offset(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_manual_control.h b/common/mavlink_msg_manual_control.h index d2b1e38bd..d0b318629 100644 --- a/common/mavlink_msg_manual_control.h +++ b/common/mavlink_msg_manual_control.h @@ -9,7 +9,7 @@ typedef struct __mavlink_manual_control_t { int16_t y; /*< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.*/ int16_t z; /*< Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust.*/ int16_t r; /*< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle.*/ - uint16_t buttons; /*< A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.*/ + uint16_t buttons; /*< A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1.*/ uint8_t target; /*< The system to be controlled.*/ uint16_t buttons2; /*< A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16.*/ uint8_t enabled_extensions; /*< Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6*/ @@ -91,7 +91,7 @@ typedef struct __mavlink_manual_control_t { * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. + * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16. * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid. @@ -165,7 +165,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_ * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. + * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16. * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid. @@ -242,7 +242,7 @@ static inline uint16_t mavlink_msg_manual_control_pack_status(uint8_t system_id, * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. + * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16. * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid. @@ -355,7 +355,7 @@ static inline uint16_t mavlink_msg_manual_control_encode_status(uint8_t system_i * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - * @param buttons A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. + * @param buttons A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. * @param buttons2 A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16. * @param enabled_extensions Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6 * @param s Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid. @@ -540,7 +540,7 @@ static inline int16_t mavlink_msg_manual_control_get_r(const mavlink_message_t* /** * @brief Get field buttons from manual_control message * - * @return A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. + * @return A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. */ static inline uint16_t mavlink_msg_manual_control_get_buttons(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_mission_ack.h b/common/mavlink_msg_mission_ack.h index 62def0a36..5f47e99ee 100644 --- a/common/mavlink_msg_mission_ack.h +++ b/common/mavlink_msg_mission_ack.h @@ -9,18 +9,11 @@ typedef struct __mavlink_mission_ack_t { uint8_t target_component; /*< Component ID*/ uint8_t type; /*< Mission result.*/ uint8_t mission_type; /*< Mission type.*/ - uint32_t opaque_id; /*< Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - */ } mavlink_mission_ack_t; -#define MAVLINK_MSG_ID_MISSION_ACK_LEN 8 +#define MAVLINK_MSG_ID_MISSION_ACK_LEN 4 #define MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN 3 -#define MAVLINK_MSG_ID_47_LEN 8 +#define MAVLINK_MSG_ID_47_LEN 4 #define MAVLINK_MSG_ID_47_MIN_LEN 3 #define MAVLINK_MSG_ID_MISSION_ACK_CRC 153 @@ -32,23 +25,21 @@ typedef struct __mavlink_mission_ack_t { #define MAVLINK_MESSAGE_INFO_MISSION_ACK { \ 47, \ "MISSION_ACK", \ - 5, \ + 4, \ { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_ack_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_ack_t, target_component) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_ack_t, type) }, \ { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_ack_t, mission_type) }, \ - { "opaque_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_mission_ack_t, opaque_id) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_MISSION_ACK { \ "MISSION_ACK", \ - 5, \ + 4, \ { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_mission_ack_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_mission_ack_t, target_component) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_ack_t, type) }, \ { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_ack_t, mission_type) }, \ - { "opaque_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_mission_ack_t, opaque_id) }, \ } \ } #endif @@ -63,17 +54,10 @@ typedef struct __mavlink_mission_ack_t { * @param target_component Component ID * @param type Mission result. * @param mission_type Mission type. - * @param opaque_id Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type, uint32_t opaque_id) + uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN]; @@ -81,7 +65,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, type); _mav_put_uint8_t(buf, 3, mission_type); - _mav_put_uint32_t(buf, 4, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ACK_LEN); #else @@ -90,7 +73,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c packet.target_component = target_component; packet.type = type; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ACK_LEN); #endif @@ -110,17 +92,10 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c * @param target_component Component ID * @param type Mission result. * @param mission_type Mission type. - * @param opaque_id Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_ack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type, uint32_t opaque_id) + uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN]; @@ -128,7 +103,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack_status(uint8_t system_id, ui _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, type); _mav_put_uint8_t(buf, 3, mission_type); - _mav_put_uint32_t(buf, 4, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ACK_LEN); #else @@ -137,7 +111,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack_status(uint8_t system_id, ui packet.target_component = target_component; packet.type = type; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ACK_LEN); #endif @@ -160,18 +133,11 @@ static inline uint16_t mavlink_msg_mission_ack_pack_status(uint8_t system_id, ui * @param target_component Component ID * @param type Mission result. * @param mission_type Mission type. - * @param opaque_id Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint8_t type,uint8_t mission_type,uint32_t opaque_id) + uint8_t target_system,uint8_t target_component,uint8_t type,uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN]; @@ -179,7 +145,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, type); _mav_put_uint8_t(buf, 3, mission_type); - _mav_put_uint32_t(buf, 4, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_ACK_LEN); #else @@ -188,7 +153,6 @@ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint packet.target_component = target_component; packet.type = type; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_ACK_LEN); #endif @@ -207,7 +171,7 @@ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint */ static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_ack_t* mission_ack) { - return mavlink_msg_mission_ack_pack(system_id, component_id, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type, mission_ack->opaque_id); + return mavlink_msg_mission_ack_pack(system_id, component_id, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type); } /** @@ -221,7 +185,7 @@ static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t */ static inline uint16_t mavlink_msg_mission_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_ack_t* mission_ack) { - return mavlink_msg_mission_ack_pack_chan(system_id, component_id, chan, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type, mission_ack->opaque_id); + return mavlink_msg_mission_ack_pack_chan(system_id, component_id, chan, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type); } /** @@ -235,7 +199,7 @@ static inline uint16_t mavlink_msg_mission_ack_encode_chan(uint8_t system_id, ui */ static inline uint16_t mavlink_msg_mission_ack_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mission_ack_t* mission_ack) { - return mavlink_msg_mission_ack_pack_status(system_id, component_id, _status, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type, mission_ack->opaque_id); + return mavlink_msg_mission_ack_pack_status(system_id, component_id, _status, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type); } /** @@ -246,17 +210,10 @@ static inline uint16_t mavlink_msg_mission_ack_encode_status(uint8_t system_id, * @param target_component Component ID * @param type Mission result. * @param mission_type Mission type. - * @param opaque_id Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type, uint32_t opaque_id) +static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_ACK_LEN]; @@ -264,7 +221,6 @@ static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, type); _mav_put_uint8_t(buf, 3, mission_type); - _mav_put_uint32_t(buf, 4, opaque_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC); #else @@ -273,7 +229,6 @@ static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t packet.target_component = target_component; packet.type = type; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)&packet, MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC); #endif @@ -287,7 +242,7 @@ static inline void mavlink_msg_mission_ack_send(mavlink_channel_t chan, uint8_t static inline void mavlink_msg_mission_ack_send_struct(mavlink_channel_t chan, const mavlink_mission_ack_t* mission_ack) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_mission_ack_send(chan, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type, mission_ack->opaque_id); + mavlink_msg_mission_ack_send(chan, mission_ack->target_system, mission_ack->target_component, mission_ack->type, mission_ack->mission_type); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)mission_ack, MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC); #endif @@ -301,7 +256,7 @@ static inline void mavlink_msg_mission_ack_send_struct(mavlink_channel_t chan, c is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_mission_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type, uint32_t opaque_id) +static inline void mavlink_msg_mission_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t type, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -309,7 +264,6 @@ static inline void mavlink_msg_mission_ack_send_buf(mavlink_message_t *msgbuf, m _mav_put_uint8_t(buf, 1, target_component); _mav_put_uint8_t(buf, 2, type); _mav_put_uint8_t(buf, 3, mission_type); - _mav_put_uint32_t(buf, 4, opaque_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, buf, MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC); #else @@ -318,7 +272,6 @@ static inline void mavlink_msg_mission_ack_send_buf(mavlink_message_t *msgbuf, m packet->target_component = target_component; packet->type = type; packet->mission_type = mission_type; - packet->opaque_id = opaque_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_ACK, (const char *)packet, MAVLINK_MSG_ID_MISSION_ACK_MIN_LEN, MAVLINK_MSG_ID_MISSION_ACK_LEN, MAVLINK_MSG_ID_MISSION_ACK_CRC); #endif @@ -370,22 +323,6 @@ static inline uint8_t mavlink_msg_mission_ack_get_mission_type(const mavlink_mes return _MAV_RETURN_uint8_t(msg, 3); } -/** - * @brief Get field opaque_id from mission_ack message - * - * @return Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - - */ -static inline uint32_t mavlink_msg_mission_ack_get_opaque_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - /** * @brief Decode a mission_ack message into a struct * @@ -399,7 +336,6 @@ static inline void mavlink_msg_mission_ack_decode(const mavlink_message_t* msg, mission_ack->target_component = mavlink_msg_mission_ack_get_target_component(msg); mission_ack->type = mavlink_msg_mission_ack_get_type(msg); mission_ack->mission_type = mavlink_msg_mission_ack_get_mission_type(msg); - mission_ack->opaque_id = mavlink_msg_mission_ack_get_opaque_id(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_ACK_LEN? msg->len : MAVLINK_MSG_ID_MISSION_ACK_LEN; memset(mission_ack, 0, MAVLINK_MSG_ID_MISSION_ACK_LEN); diff --git a/common/mavlink_msg_mission_count.h b/common/mavlink_msg_mission_count.h index 635fc3141..052f92669 100644 --- a/common/mavlink_msg_mission_count.h +++ b/common/mavlink_msg_mission_count.h @@ -3,24 +3,17 @@ #define MAVLINK_MSG_ID_MISSION_COUNT 44 -MAVPACKED( + typedef struct __mavlink_mission_count_t { uint16_t count; /*< Number of mission items in the sequence*/ uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ uint8_t mission_type; /*< Mission type.*/ - uint32_t opaque_id; /*< Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - */ -}) mavlink_mission_count_t; - -#define MAVLINK_MSG_ID_MISSION_COUNT_LEN 9 +} mavlink_mission_count_t; + +#define MAVLINK_MSG_ID_MISSION_COUNT_LEN 5 #define MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN 4 -#define MAVLINK_MSG_ID_44_LEN 9 +#define MAVLINK_MSG_ID_44_LEN 5 #define MAVLINK_MSG_ID_44_MIN_LEN 4 #define MAVLINK_MSG_ID_MISSION_COUNT_CRC 221 @@ -32,23 +25,21 @@ typedef struct __mavlink_mission_count_t { #define MAVLINK_MESSAGE_INFO_MISSION_COUNT { \ 44, \ "MISSION_COUNT", \ - 5, \ + 4, \ { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_count_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_count_t, target_component) }, \ { "count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_count_t, count) }, \ { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_count_t, mission_type) }, \ - { "opaque_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 5, offsetof(mavlink_mission_count_t, opaque_id) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_MISSION_COUNT { \ "MISSION_COUNT", \ - 5, \ + 4, \ { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_count_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_count_t, target_component) }, \ { "count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_count_t, count) }, \ { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_count_t, mission_type) }, \ - { "opaque_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 5, offsetof(mavlink_mission_count_t, opaque_id) }, \ } \ } #endif @@ -63,17 +54,10 @@ typedef struct __mavlink_mission_count_t { * @param target_component Component ID * @param count Number of mission items in the sequence * @param mission_type Mission type. - * @param opaque_id Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type, uint32_t opaque_id) + uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN]; @@ -81,7 +65,6 @@ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t _mav_put_uint8_t(buf, 2, target_system); _mav_put_uint8_t(buf, 3, target_component); _mav_put_uint8_t(buf, 4, mission_type); - _mav_put_uint32_t(buf, 5, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #else @@ -90,7 +73,6 @@ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t packet.target_system = target_system; packet.target_component = target_component; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #endif @@ -110,17 +92,10 @@ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t * @param target_component Component ID * @param count Number of mission items in the sequence * @param mission_type Mission type. - * @param opaque_id Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_count_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type, uint32_t opaque_id) + uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN]; @@ -128,7 +103,6 @@ static inline uint16_t mavlink_msg_mission_count_pack_status(uint8_t system_id, _mav_put_uint8_t(buf, 2, target_system); _mav_put_uint8_t(buf, 3, target_component); _mav_put_uint8_t(buf, 4, mission_type); - _mav_put_uint32_t(buf, 5, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #else @@ -137,7 +111,6 @@ static inline uint16_t mavlink_msg_mission_count_pack_status(uint8_t system_id, packet.target_system = target_system; packet.target_component = target_component; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #endif @@ -160,18 +133,11 @@ static inline uint16_t mavlink_msg_mission_count_pack_status(uint8_t system_id, * @param target_component Component ID * @param count Number of mission items in the sequence * @param mission_type Mission type. - * @param opaque_id Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t count,uint8_t mission_type,uint32_t opaque_id) + uint8_t target_system,uint8_t target_component,uint16_t count,uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN]; @@ -179,7 +145,6 @@ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, ui _mav_put_uint8_t(buf, 2, target_system); _mav_put_uint8_t(buf, 3, target_component); _mav_put_uint8_t(buf, 4, mission_type); - _mav_put_uint32_t(buf, 5, opaque_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #else @@ -188,7 +153,6 @@ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, ui packet.target_system = target_system; packet.target_component = target_component; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_COUNT_LEN); #endif @@ -207,7 +171,7 @@ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, ui */ static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_count_t* mission_count) { - return mavlink_msg_mission_count_pack(system_id, component_id, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type, mission_count->opaque_id); + return mavlink_msg_mission_count_pack(system_id, component_id, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type); } /** @@ -221,7 +185,7 @@ static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8 */ static inline uint16_t mavlink_msg_mission_count_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_count_t* mission_count) { - return mavlink_msg_mission_count_pack_chan(system_id, component_id, chan, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type, mission_count->opaque_id); + return mavlink_msg_mission_count_pack_chan(system_id, component_id, chan, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type); } /** @@ -235,7 +199,7 @@ static inline uint16_t mavlink_msg_mission_count_encode_chan(uint8_t system_id, */ static inline uint16_t mavlink_msg_mission_count_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mission_count_t* mission_count) { - return mavlink_msg_mission_count_pack_status(system_id, component_id, _status, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type, mission_count->opaque_id); + return mavlink_msg_mission_count_pack_status(system_id, component_id, _status, msg, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type); } /** @@ -246,17 +210,10 @@ static inline uint16_t mavlink_msg_mission_count_encode_status(uint8_t system_id * @param target_component Component ID * @param count Number of mission items in the sequence * @param mission_type Mission type. - * @param opaque_id Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type, uint32_t opaque_id) +static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_COUNT_LEN]; @@ -264,7 +221,6 @@ static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_ _mav_put_uint8_t(buf, 2, target_system); _mav_put_uint8_t(buf, 3, target_component); _mav_put_uint8_t(buf, 4, mission_type); - _mav_put_uint32_t(buf, 5, opaque_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC); #else @@ -273,7 +229,6 @@ static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_ packet.target_system = target_system; packet.target_component = target_component; packet.mission_type = mission_type; - packet.opaque_id = opaque_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC); #endif @@ -287,7 +242,7 @@ static inline void mavlink_msg_mission_count_send(mavlink_channel_t chan, uint8_ static inline void mavlink_msg_mission_count_send_struct(mavlink_channel_t chan, const mavlink_mission_count_t* mission_count) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_mission_count_send(chan, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type, mission_count->opaque_id); + mavlink_msg_mission_count_send(chan, mission_count->target_system, mission_count->target_component, mission_count->count, mission_count->mission_type); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)mission_count, MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC); #endif @@ -301,7 +256,7 @@ static inline void mavlink_msg_mission_count_send_struct(mavlink_channel_t chan, is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_mission_count_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type, uint32_t opaque_id) +static inline void mavlink_msg_mission_count_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count, uint8_t mission_type) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -309,7 +264,6 @@ static inline void mavlink_msg_mission_count_send_buf(mavlink_message_t *msgbuf, _mav_put_uint8_t(buf, 2, target_system); _mav_put_uint8_t(buf, 3, target_component); _mav_put_uint8_t(buf, 4, mission_type); - _mav_put_uint32_t(buf, 5, opaque_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, buf, MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC); #else @@ -318,7 +272,6 @@ static inline void mavlink_msg_mission_count_send_buf(mavlink_message_t *msgbuf, packet->target_system = target_system; packet->target_component = target_component; packet->mission_type = mission_type; - packet->opaque_id = opaque_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_COUNT, (const char *)packet, MAVLINK_MSG_ID_MISSION_COUNT_MIN_LEN, MAVLINK_MSG_ID_MISSION_COUNT_LEN, MAVLINK_MSG_ID_MISSION_COUNT_CRC); #endif @@ -370,22 +323,6 @@ static inline uint8_t mavlink_msg_mission_count_get_mission_type(const mavlink_m return _MAV_RETURN_uint8_t(msg, 4); } -/** - * @brief Get field opaque_id from mission_count message - * - * @return Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - - */ -static inline uint32_t mavlink_msg_mission_count_get_opaque_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 5); -} - /** * @brief Decode a mission_count message into a struct * @@ -399,7 +336,6 @@ static inline void mavlink_msg_mission_count_decode(const mavlink_message_t* msg mission_count->target_system = mavlink_msg_mission_count_get_target_system(msg); mission_count->target_component = mavlink_msg_mission_count_get_target_component(msg); mission_count->mission_type = mavlink_msg_mission_count_get_mission_type(msg); - mission_count->opaque_id = mavlink_msg_mission_count_get_opaque_id(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_COUNT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_COUNT_LEN; memset(mission_count, 0, MAVLINK_MSG_ID_MISSION_COUNT_LEN); diff --git a/common/mavlink_msg_mission_current.h b/common/mavlink_msg_mission_current.h index bbb2dfcde..ae473ad81 100644 --- a/common/mavlink_msg_mission_current.h +++ b/common/mavlink_msg_mission_current.h @@ -3,20 +3,17 @@ #define MAVLINK_MSG_ID_MISSION_CURRENT 42 -MAVPACKED( + typedef struct __mavlink_mission_current_t { uint16_t seq; /*< Sequence*/ uint16_t total; /*< Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle.*/ uint8_t mission_state; /*< Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported.*/ uint8_t mission_mode; /*< Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode).*/ - uint32_t mission_id; /*< Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK).*/ - uint32_t fence_id; /*< Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK).*/ - uint32_t rally_points_id; /*< Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK).*/ -}) mavlink_mission_current_t; +} mavlink_mission_current_t; -#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 18 +#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 6 #define MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN 2 -#define MAVLINK_MSG_ID_42_LEN 18 +#define MAVLINK_MSG_ID_42_LEN 6 #define MAVLINK_MSG_ID_42_MIN_LEN 2 #define MAVLINK_MSG_ID_MISSION_CURRENT_CRC 28 @@ -28,27 +25,21 @@ typedef struct __mavlink_mission_current_t { #define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \ 42, \ "MISSION_CURRENT", \ - 7, \ + 4, \ { { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \ { "total", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_mission_current_t, total) }, \ { "mission_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_current_t, mission_state) }, \ { "mission_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_mission_current_t, mission_mode) }, \ - { "mission_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 6, offsetof(mavlink_mission_current_t, mission_id) }, \ - { "fence_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 10, offsetof(mavlink_mission_current_t, fence_id) }, \ - { "rally_points_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 14, offsetof(mavlink_mission_current_t, rally_points_id) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \ "MISSION_CURRENT", \ - 7, \ + 4, \ { { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \ { "total", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_mission_current_t, total) }, \ { "mission_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_current_t, mission_state) }, \ { "mission_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_mission_current_t, mission_mode) }, \ - { "mission_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 6, offsetof(mavlink_mission_current_t, mission_id) }, \ - { "fence_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 10, offsetof(mavlink_mission_current_t, fence_id) }, \ - { "rally_points_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 14, offsetof(mavlink_mission_current_t, rally_points_id) }, \ } \ } #endif @@ -63,13 +54,10 @@ typedef struct __mavlink_mission_current_t { * @param total Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle. * @param mission_state Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported. * @param mission_mode Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode). - * @param mission_id Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - * @param fence_id Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - * @param rally_points_id Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode, uint32_t mission_id, uint32_t fence_id, uint32_t rally_points_id) + uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN]; @@ -77,9 +65,6 @@ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8 _mav_put_uint16_t(buf, 2, total); _mav_put_uint8_t(buf, 4, mission_state); _mav_put_uint8_t(buf, 5, mission_mode); - _mav_put_uint32_t(buf, 6, mission_id); - _mav_put_uint32_t(buf, 10, fence_id); - _mav_put_uint32_t(buf, 14, rally_points_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #else @@ -88,9 +73,6 @@ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8 packet.total = total; packet.mission_state = mission_state; packet.mission_mode = mission_mode; - packet.mission_id = mission_id; - packet.fence_id = fence_id; - packet.rally_points_id = rally_points_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #endif @@ -110,13 +92,10 @@ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8 * @param total Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle. * @param mission_state Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported. * @param mission_mode Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode). - * @param mission_id Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - * @param fence_id Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - * @param rally_points_id Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_current_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode, uint32_t mission_id, uint32_t fence_id, uint32_t rally_points_id) + uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN]; @@ -124,9 +103,6 @@ static inline uint16_t mavlink_msg_mission_current_pack_status(uint8_t system_id _mav_put_uint16_t(buf, 2, total); _mav_put_uint8_t(buf, 4, mission_state); _mav_put_uint8_t(buf, 5, mission_mode); - _mav_put_uint32_t(buf, 6, mission_id); - _mav_put_uint32_t(buf, 10, fence_id); - _mav_put_uint32_t(buf, 14, rally_points_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #else @@ -135,9 +111,6 @@ static inline uint16_t mavlink_msg_mission_current_pack_status(uint8_t system_id packet.total = total; packet.mission_state = mission_state; packet.mission_mode = mission_mode; - packet.mission_id = mission_id; - packet.fence_id = fence_id; - packet.rally_points_id = rally_points_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #endif @@ -160,14 +133,11 @@ static inline uint16_t mavlink_msg_mission_current_pack_status(uint8_t system_id * @param total Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle. * @param mission_state Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported. * @param mission_mode Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode). - * @param mission_id Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - * @param fence_id Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - * @param rally_points_id Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint16_t seq,uint16_t total,uint8_t mission_state,uint8_t mission_mode,uint32_t mission_id,uint32_t fence_id,uint32_t rally_points_id) + uint16_t seq,uint16_t total,uint8_t mission_state,uint8_t mission_mode) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN]; @@ -175,9 +145,6 @@ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, _mav_put_uint16_t(buf, 2, total); _mav_put_uint8_t(buf, 4, mission_state); _mav_put_uint8_t(buf, 5, mission_mode); - _mav_put_uint32_t(buf, 6, mission_id); - _mav_put_uint32_t(buf, 10, fence_id); - _mav_put_uint32_t(buf, 14, rally_points_id); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #else @@ -186,9 +153,6 @@ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, packet.total = total; packet.mission_state = mission_state; packet.mission_mode = mission_mode; - packet.mission_id = mission_id; - packet.fence_id = fence_id; - packet.rally_points_id = rally_points_id; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); #endif @@ -207,7 +171,7 @@ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, */ static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current) { - return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode, mission_current->mission_id, mission_current->fence_id, mission_current->rally_points_id); + return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode); } /** @@ -221,7 +185,7 @@ static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uin */ static inline uint16_t mavlink_msg_mission_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current) { - return mavlink_msg_mission_current_pack_chan(system_id, component_id, chan, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode, mission_current->mission_id, mission_current->fence_id, mission_current->rally_points_id); + return mavlink_msg_mission_current_pack_chan(system_id, component_id, chan, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode); } /** @@ -235,7 +199,7 @@ static inline uint16_t mavlink_msg_mission_current_encode_chan(uint8_t system_id */ static inline uint16_t mavlink_msg_mission_current_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current) { - return mavlink_msg_mission_current_pack_status(system_id, component_id, _status, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode, mission_current->mission_id, mission_current->fence_id, mission_current->rally_points_id); + return mavlink_msg_mission_current_pack_status(system_id, component_id, _status, msg, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode); } /** @@ -246,13 +210,10 @@ static inline uint16_t mavlink_msg_mission_current_encode_status(uint8_t system_ * @param total Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle. * @param mission_state Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported. * @param mission_mode Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode). - * @param mission_id Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - * @param fence_id Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - * @param rally_points_id Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode, uint32_t mission_id, uint32_t fence_id, uint32_t rally_points_id) +static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN]; @@ -260,9 +221,6 @@ static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint _mav_put_uint16_t(buf, 2, total); _mav_put_uint8_t(buf, 4, mission_state); _mav_put_uint8_t(buf, 5, mission_mode); - _mav_put_uint32_t(buf, 6, mission_id); - _mav_put_uint32_t(buf, 10, fence_id); - _mav_put_uint32_t(buf, 14, rally_points_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC); #else @@ -271,9 +229,6 @@ static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint packet.total = total; packet.mission_state = mission_state; packet.mission_mode = mission_mode; - packet.mission_id = mission_id; - packet.fence_id = fence_id; - packet.rally_points_id = rally_points_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC); #endif @@ -287,7 +242,7 @@ static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint static inline void mavlink_msg_mission_current_send_struct(mavlink_channel_t chan, const mavlink_mission_current_t* mission_current) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_mission_current_send(chan, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode, mission_current->mission_id, mission_current->fence_id, mission_current->rally_points_id); + mavlink_msg_mission_current_send(chan, mission_current->seq, mission_current->total, mission_current->mission_state, mission_current->mission_mode); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)mission_current, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC); #endif @@ -301,7 +256,7 @@ static inline void mavlink_msg_mission_current_send_struct(mavlink_channel_t cha is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_mission_current_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode, uint32_t mission_id, uint32_t fence_id, uint32_t rally_points_id) +static inline void mavlink_msg_mission_current_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t seq, uint16_t total, uint8_t mission_state, uint8_t mission_mode) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -309,9 +264,6 @@ static inline void mavlink_msg_mission_current_send_buf(mavlink_message_t *msgbu _mav_put_uint16_t(buf, 2, total); _mav_put_uint8_t(buf, 4, mission_state); _mav_put_uint8_t(buf, 5, mission_mode); - _mav_put_uint32_t(buf, 6, mission_id); - _mav_put_uint32_t(buf, 10, fence_id); - _mav_put_uint32_t(buf, 14, rally_points_id); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC); #else @@ -320,9 +272,6 @@ static inline void mavlink_msg_mission_current_send_buf(mavlink_message_t *msgbu packet->total = total; packet->mission_state = mission_state; packet->mission_mode = mission_mode; - packet->mission_id = mission_id; - packet->fence_id = fence_id; - packet->rally_points_id = rally_points_id; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)packet, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC); #endif @@ -374,36 +323,6 @@ static inline uint8_t mavlink_msg_mission_current_get_mission_mode(const mavlink return _MAV_RETURN_uint8_t(msg, 5); } -/** - * @brief Get field mission_id from mission_current message - * - * @return Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - */ -static inline uint32_t mavlink_msg_mission_current_get_mission_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 6); -} - -/** - * @brief Get field fence_id from mission_current message - * - * @return Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - */ -static inline uint32_t mavlink_msg_mission_current_get_fence_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 10); -} - -/** - * @brief Get field rally_points_id from mission_current message - * - * @return Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). - */ -static inline uint32_t mavlink_msg_mission_current_get_rally_points_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 14); -} - /** * @brief Decode a mission_current message into a struct * @@ -417,9 +336,6 @@ static inline void mavlink_msg_mission_current_decode(const mavlink_message_t* m mission_current->total = mavlink_msg_mission_current_get_total(msg); mission_current->mission_state = mavlink_msg_mission_current_get_mission_state(msg); mission_current->mission_mode = mavlink_msg_mission_current_get_mission_mode(msg); - mission_current->mission_id = mavlink_msg_mission_current_get_mission_id(msg); - mission_current->fence_id = mavlink_msg_mission_current_get_fence_id(msg); - mission_current->rally_points_id = mavlink_msg_mission_current_get_rally_points_id(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_CURRENT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_CURRENT_LEN; memset(mission_current, 0, MAVLINK_MSG_ID_MISSION_CURRENT_LEN); diff --git a/common/mavlink_msg_mission_item.h b/common/mavlink_msg_mission_item.h index 1ffac4e2f..68f5034dc 100644 --- a/common/mavlink_msg_mission_item.h +++ b/common/mavlink_msg_mission_item.h @@ -18,7 +18,7 @@ typedef struct __mavlink_mission_item_t { uint8_t target_component; /*< Component ID*/ uint8_t frame; /*< The coordinate system of the waypoint.*/ uint8_t current; /*< false:0, true:1*/ - uint8_t autocontinue; /*< Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.*/ + uint8_t autocontinue; /*< Autocontinue to next waypoint*/ uint8_t mission_type; /*< Mission type.*/ } mavlink_mission_item_t; @@ -89,7 +89,7 @@ typedef struct __mavlink_mission_item_t { * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -160,7 +160,7 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -234,7 +234,7 @@ static inline uint16_t mavlink_msg_mission_item_pack_status(uint8_t system_id, u * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -344,7 +344,7 @@ static inline uint16_t mavlink_msg_mission_item_encode_status(uint8_t system_id, * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -533,7 +533,7 @@ static inline uint8_t mavlink_msg_mission_item_get_current(const mavlink_message /** * @brief Get field autocontinue from mission_item message * - * @return Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @return Autocontinue to next waypoint */ static inline uint8_t mavlink_msg_mission_item_get_autocontinue(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_mission_item_int.h b/common/mavlink_msg_mission_item_int.h index 47ca0de22..d5addb5fd 100644 --- a/common/mavlink_msg_mission_item_int.h +++ b/common/mavlink_msg_mission_item_int.h @@ -18,7 +18,7 @@ typedef struct __mavlink_mission_item_int_t { uint8_t target_component; /*< Component ID*/ uint8_t frame; /*< The coordinate system of the waypoint.*/ uint8_t current; /*< false:0, true:1*/ - uint8_t autocontinue; /*< Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.*/ + uint8_t autocontinue; /*< Autocontinue to next waypoint*/ uint8_t mission_type; /*< Mission type.*/ } mavlink_mission_item_int_t; @@ -89,7 +89,7 @@ typedef struct __mavlink_mission_item_int_t { * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -160,7 +160,7 @@ static inline uint16_t mavlink_msg_mission_item_int_pack(uint8_t system_id, uint * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -234,7 +234,7 @@ static inline uint16_t mavlink_msg_mission_item_int_pack_status(uint8_t system_i * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -344,7 +344,7 @@ static inline uint16_t mavlink_msg_mission_item_int_encode_status(uint8_t system * @param frame The coordinate system of the waypoint. * @param command The scheduled action for the waypoint. * @param current false:0, true:1 - * @param autocontinue Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @param autocontinue Autocontinue to next waypoint * @param param1 PARAM1, see MAV_CMD enum * @param param2 PARAM2, see MAV_CMD enum * @param param3 PARAM3, see MAV_CMD enum @@ -533,7 +533,7 @@ static inline uint8_t mavlink_msg_mission_item_int_get_current(const mavlink_mes /** * @brief Get field autocontinue from mission_item_int message * - * @return Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. + * @return Autocontinue to next waypoint */ static inline uint8_t mavlink_msg_mission_item_int_get_autocontinue(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_onboard_computer_status.h b/common/mavlink_msg_onboard_computer_status.h deleted file mode 100644 index b251972c7..000000000 --- a/common/mavlink_msg_onboard_computer_status.h +++ /dev/null @@ -1,795 +0,0 @@ -#pragma once -// MESSAGE ONBOARD_COMPUTER_STATUS PACKING - -#define MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS 390 - - -typedef struct __mavlink_onboard_computer_status_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - uint32_t uptime; /*< [ms] Time since system boot.*/ - uint32_t ram_usage; /*< [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t ram_total; /*< [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t storage_type[4]; /*< Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused.*/ - uint32_t storage_usage[4]; /*< [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t storage_total[4]; /*< [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t link_type[6]; /*< Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary*/ - uint32_t link_tx_rate[6]; /*< [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t link_rx_rate[6]; /*< [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t link_tx_max[6]; /*< [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused.*/ - uint32_t link_rx_max[6]; /*< [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused.*/ - int16_t fan_speed[4]; /*< [rpm] Fan speeds. A value of INT16_MAX implies the field is unused.*/ - uint8_t type; /*< Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers.*/ - uint8_t cpu_cores[8]; /*< CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused.*/ - uint8_t cpu_combined[10]; /*< Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused.*/ - uint8_t gpu_cores[4]; /*< GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused.*/ - uint8_t gpu_combined[10]; /*< Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused.*/ - int8_t temperature_board; /*< [degC] Temperature of the board. A value of INT8_MAX implies the field is unused.*/ - int8_t temperature_core[8]; /*< [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused.*/ -} mavlink_onboard_computer_status_t; - -#define MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN 238 -#define MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN 238 -#define MAVLINK_MSG_ID_390_LEN 238 -#define MAVLINK_MSG_ID_390_MIN_LEN 238 - -#define MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC 156 -#define MAVLINK_MSG_ID_390_CRC 156 - -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_STORAGE_TYPE_LEN 4 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_STORAGE_USAGE_LEN 4 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_STORAGE_TOTAL_LEN 4 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_LINK_TYPE_LEN 6 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_LINK_TX_RATE_LEN 6 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_LINK_RX_RATE_LEN 6 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_LINK_TX_MAX_LEN 6 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_LINK_RX_MAX_LEN 6 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_FAN_SPEED_LEN 4 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_CPU_CORES_LEN 8 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_CPU_COMBINED_LEN 10 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_GPU_CORES_LEN 4 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_GPU_COMBINED_LEN 10 -#define MAVLINK_MSG_ONBOARD_COMPUTER_STATUS_FIELD_TEMPERATURE_CORE_LEN 8 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS { \ - 390, \ - "ONBOARD_COMPUTER_STATUS", \ - 20, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_onboard_computer_status_t, time_usec) }, \ - { "uptime", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_onboard_computer_status_t, uptime) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 196, offsetof(mavlink_onboard_computer_status_t, type) }, \ - { "cpu_cores", NULL, MAVLINK_TYPE_UINT8_T, 8, 197, offsetof(mavlink_onboard_computer_status_t, cpu_cores) }, \ - { "cpu_combined", NULL, MAVLINK_TYPE_UINT8_T, 10, 205, offsetof(mavlink_onboard_computer_status_t, cpu_combined) }, \ - { "gpu_cores", NULL, MAVLINK_TYPE_UINT8_T, 4, 215, offsetof(mavlink_onboard_computer_status_t, gpu_cores) }, \ - { "gpu_combined", NULL, MAVLINK_TYPE_UINT8_T, 10, 219, offsetof(mavlink_onboard_computer_status_t, gpu_combined) }, \ - { "temperature_board", NULL, MAVLINK_TYPE_INT8_T, 0, 229, offsetof(mavlink_onboard_computer_status_t, temperature_board) }, \ - { "temperature_core", NULL, MAVLINK_TYPE_INT8_T, 8, 230, offsetof(mavlink_onboard_computer_status_t, temperature_core) }, \ - { "fan_speed", NULL, MAVLINK_TYPE_INT16_T, 4, 188, offsetof(mavlink_onboard_computer_status_t, fan_speed) }, \ - { "ram_usage", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_onboard_computer_status_t, ram_usage) }, \ - { "ram_total", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_onboard_computer_status_t, ram_total) }, \ - { "storage_type", NULL, MAVLINK_TYPE_UINT32_T, 4, 20, offsetof(mavlink_onboard_computer_status_t, storage_type) }, \ - { "storage_usage", NULL, MAVLINK_TYPE_UINT32_T, 4, 36, offsetof(mavlink_onboard_computer_status_t, storage_usage) }, \ - { "storage_total", NULL, MAVLINK_TYPE_UINT32_T, 4, 52, offsetof(mavlink_onboard_computer_status_t, storage_total) }, \ - { "link_type", NULL, MAVLINK_TYPE_UINT32_T, 6, 68, offsetof(mavlink_onboard_computer_status_t, link_type) }, \ - { "link_tx_rate", NULL, MAVLINK_TYPE_UINT32_T, 6, 92, offsetof(mavlink_onboard_computer_status_t, link_tx_rate) }, \ - { "link_rx_rate", NULL, MAVLINK_TYPE_UINT32_T, 6, 116, offsetof(mavlink_onboard_computer_status_t, link_rx_rate) }, \ - { "link_tx_max", NULL, MAVLINK_TYPE_UINT32_T, 6, 140, offsetof(mavlink_onboard_computer_status_t, link_tx_max) }, \ - { "link_rx_max", NULL, MAVLINK_TYPE_UINT32_T, 6, 164, offsetof(mavlink_onboard_computer_status_t, link_rx_max) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS { \ - "ONBOARD_COMPUTER_STATUS", \ - 20, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_onboard_computer_status_t, time_usec) }, \ - { "uptime", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_onboard_computer_status_t, uptime) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 196, offsetof(mavlink_onboard_computer_status_t, type) }, \ - { "cpu_cores", NULL, MAVLINK_TYPE_UINT8_T, 8, 197, offsetof(mavlink_onboard_computer_status_t, cpu_cores) }, \ - { "cpu_combined", NULL, MAVLINK_TYPE_UINT8_T, 10, 205, offsetof(mavlink_onboard_computer_status_t, cpu_combined) }, \ - { "gpu_cores", NULL, MAVLINK_TYPE_UINT8_T, 4, 215, offsetof(mavlink_onboard_computer_status_t, gpu_cores) }, \ - { "gpu_combined", NULL, MAVLINK_TYPE_UINT8_T, 10, 219, offsetof(mavlink_onboard_computer_status_t, gpu_combined) }, \ - { "temperature_board", NULL, MAVLINK_TYPE_INT8_T, 0, 229, offsetof(mavlink_onboard_computer_status_t, temperature_board) }, \ - { "temperature_core", NULL, MAVLINK_TYPE_INT8_T, 8, 230, offsetof(mavlink_onboard_computer_status_t, temperature_core) }, \ - { "fan_speed", NULL, MAVLINK_TYPE_INT16_T, 4, 188, offsetof(mavlink_onboard_computer_status_t, fan_speed) }, \ - { "ram_usage", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_onboard_computer_status_t, ram_usage) }, \ - { "ram_total", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_onboard_computer_status_t, ram_total) }, \ - { "storage_type", NULL, MAVLINK_TYPE_UINT32_T, 4, 20, offsetof(mavlink_onboard_computer_status_t, storage_type) }, \ - { "storage_usage", NULL, MAVLINK_TYPE_UINT32_T, 4, 36, offsetof(mavlink_onboard_computer_status_t, storage_usage) }, \ - { "storage_total", NULL, MAVLINK_TYPE_UINT32_T, 4, 52, offsetof(mavlink_onboard_computer_status_t, storage_total) }, \ - { "link_type", NULL, MAVLINK_TYPE_UINT32_T, 6, 68, offsetof(mavlink_onboard_computer_status_t, link_type) }, \ - { "link_tx_rate", NULL, MAVLINK_TYPE_UINT32_T, 6, 92, offsetof(mavlink_onboard_computer_status_t, link_tx_rate) }, \ - { "link_rx_rate", NULL, MAVLINK_TYPE_UINT32_T, 6, 116, offsetof(mavlink_onboard_computer_status_t, link_rx_rate) }, \ - { "link_tx_max", NULL, MAVLINK_TYPE_UINT32_T, 6, 140, offsetof(mavlink_onboard_computer_status_t, link_tx_max) }, \ - { "link_rx_max", NULL, MAVLINK_TYPE_UINT32_T, 6, 164, offsetof(mavlink_onboard_computer_status_t, link_rx_max) }, \ - } \ -} -#endif - -/** - * @brief Pack a onboard_computer_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param uptime [ms] Time since system boot. - * @param type Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - * @param cpu_cores CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param cpu_combined Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param gpu_cores GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param gpu_combined Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param temperature_board [degC] Temperature of the board. A value of INT8_MAX implies the field is unused. - * @param temperature_core [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - * @param fan_speed [rpm] Fan speeds. A value of INT16_MAX implies the field is unused. - * @param ram_usage [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param ram_total [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_type Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - * @param storage_usage [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_total [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param link_type Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - * @param link_tx_rate [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_rate [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - * @param link_tx_max [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_max [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_onboard_computer_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t time_usec, uint32_t uptime, uint8_t type, const uint8_t *cpu_cores, const uint8_t *cpu_combined, const uint8_t *gpu_cores, const uint8_t *gpu_combined, int8_t temperature_board, const int8_t *temperature_core, const int16_t *fan_speed, uint32_t ram_usage, uint32_t ram_total, const uint32_t *storage_type, const uint32_t *storage_usage, const uint32_t *storage_total, const uint32_t *link_type, const uint32_t *link_tx_rate, const uint32_t *link_rx_rate, const uint32_t *link_tx_max, const uint32_t *link_rx_max) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, uptime); - _mav_put_uint32_t(buf, 12, ram_usage); - _mav_put_uint32_t(buf, 16, ram_total); - _mav_put_uint8_t(buf, 196, type); - _mav_put_int8_t(buf, 229, temperature_board); - _mav_put_uint32_t_array(buf, 20, storage_type, 4); - _mav_put_uint32_t_array(buf, 36, storage_usage, 4); - _mav_put_uint32_t_array(buf, 52, storage_total, 4); - _mav_put_uint32_t_array(buf, 68, link_type, 6); - _mav_put_uint32_t_array(buf, 92, link_tx_rate, 6); - _mav_put_uint32_t_array(buf, 116, link_rx_rate, 6); - _mav_put_uint32_t_array(buf, 140, link_tx_max, 6); - _mav_put_uint32_t_array(buf, 164, link_rx_max, 6); - _mav_put_int16_t_array(buf, 188, fan_speed, 4); - _mav_put_uint8_t_array(buf, 197, cpu_cores, 8); - _mav_put_uint8_t_array(buf, 205, cpu_combined, 10); - _mav_put_uint8_t_array(buf, 215, gpu_cores, 4); - _mav_put_uint8_t_array(buf, 219, gpu_combined, 10); - _mav_put_int8_t_array(buf, 230, temperature_core, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#else - mavlink_onboard_computer_status_t packet; - packet.time_usec = time_usec; - packet.uptime = uptime; - packet.ram_usage = ram_usage; - packet.ram_total = ram_total; - packet.type = type; - packet.temperature_board = temperature_board; - mav_array_memcpy(packet.storage_type, storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_usage, storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_total, storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet.link_type, link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_rate, link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_rate, link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_max, link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_max, link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.fan_speed, fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet.cpu_cores, cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet.cpu_combined, cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.gpu_cores, gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet.gpu_combined, gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.temperature_core, temperature_core, sizeof(int8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -} - -/** - * @brief Pack a onboard_computer_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param uptime [ms] Time since system boot. - * @param type Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - * @param cpu_cores CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param cpu_combined Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param gpu_cores GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param gpu_combined Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param temperature_board [degC] Temperature of the board. A value of INT8_MAX implies the field is unused. - * @param temperature_core [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - * @param fan_speed [rpm] Fan speeds. A value of INT16_MAX implies the field is unused. - * @param ram_usage [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param ram_total [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_type Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - * @param storage_usage [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_total [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param link_type Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - * @param link_tx_rate [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_rate [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - * @param link_tx_max [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_max [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_onboard_computer_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t time_usec, uint32_t uptime, uint8_t type, const uint8_t *cpu_cores, const uint8_t *cpu_combined, const uint8_t *gpu_cores, const uint8_t *gpu_combined, int8_t temperature_board, const int8_t *temperature_core, const int16_t *fan_speed, uint32_t ram_usage, uint32_t ram_total, const uint32_t *storage_type, const uint32_t *storage_usage, const uint32_t *storage_total, const uint32_t *link_type, const uint32_t *link_tx_rate, const uint32_t *link_rx_rate, const uint32_t *link_tx_max, const uint32_t *link_rx_max) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, uptime); - _mav_put_uint32_t(buf, 12, ram_usage); - _mav_put_uint32_t(buf, 16, ram_total); - _mav_put_uint8_t(buf, 196, type); - _mav_put_int8_t(buf, 229, temperature_board); - _mav_put_uint32_t_array(buf, 20, storage_type, 4); - _mav_put_uint32_t_array(buf, 36, storage_usage, 4); - _mav_put_uint32_t_array(buf, 52, storage_total, 4); - _mav_put_uint32_t_array(buf, 68, link_type, 6); - _mav_put_uint32_t_array(buf, 92, link_tx_rate, 6); - _mav_put_uint32_t_array(buf, 116, link_rx_rate, 6); - _mav_put_uint32_t_array(buf, 140, link_tx_max, 6); - _mav_put_uint32_t_array(buf, 164, link_rx_max, 6); - _mav_put_int16_t_array(buf, 188, fan_speed, 4); - _mav_put_uint8_t_array(buf, 197, cpu_cores, 8); - _mav_put_uint8_t_array(buf, 205, cpu_combined, 10); - _mav_put_uint8_t_array(buf, 215, gpu_cores, 4); - _mav_put_uint8_t_array(buf, 219, gpu_combined, 10); - _mav_put_int8_t_array(buf, 230, temperature_core, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#else - mavlink_onboard_computer_status_t packet; - packet.time_usec = time_usec; - packet.uptime = uptime; - packet.ram_usage = ram_usage; - packet.ram_total = ram_total; - packet.type = type; - packet.temperature_board = temperature_board; - mav_array_memcpy(packet.storage_type, storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_usage, storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_total, storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet.link_type, link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_rate, link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_rate, link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_max, link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_max, link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.fan_speed, fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet.cpu_cores, cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet.cpu_combined, cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.gpu_cores, gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet.gpu_combined, gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.temperature_core, temperature_core, sizeof(int8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#endif -} - -/** - * @brief Pack a onboard_computer_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param uptime [ms] Time since system boot. - * @param type Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - * @param cpu_cores CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param cpu_combined Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param gpu_cores GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param gpu_combined Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param temperature_board [degC] Temperature of the board. A value of INT8_MAX implies the field is unused. - * @param temperature_core [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - * @param fan_speed [rpm] Fan speeds. A value of INT16_MAX implies the field is unused. - * @param ram_usage [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param ram_total [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_type Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - * @param storage_usage [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_total [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param link_type Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - * @param link_tx_rate [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_rate [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - * @param link_tx_max [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_max [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_onboard_computer_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t time_usec,uint32_t uptime,uint8_t type,const uint8_t *cpu_cores,const uint8_t *cpu_combined,const uint8_t *gpu_cores,const uint8_t *gpu_combined,int8_t temperature_board,const int8_t *temperature_core,const int16_t *fan_speed,uint32_t ram_usage,uint32_t ram_total,const uint32_t *storage_type,const uint32_t *storage_usage,const uint32_t *storage_total,const uint32_t *link_type,const uint32_t *link_tx_rate,const uint32_t *link_rx_rate,const uint32_t *link_tx_max,const uint32_t *link_rx_max) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, uptime); - _mav_put_uint32_t(buf, 12, ram_usage); - _mav_put_uint32_t(buf, 16, ram_total); - _mav_put_uint8_t(buf, 196, type); - _mav_put_int8_t(buf, 229, temperature_board); - _mav_put_uint32_t_array(buf, 20, storage_type, 4); - _mav_put_uint32_t_array(buf, 36, storage_usage, 4); - _mav_put_uint32_t_array(buf, 52, storage_total, 4); - _mav_put_uint32_t_array(buf, 68, link_type, 6); - _mav_put_uint32_t_array(buf, 92, link_tx_rate, 6); - _mav_put_uint32_t_array(buf, 116, link_rx_rate, 6); - _mav_put_uint32_t_array(buf, 140, link_tx_max, 6); - _mav_put_uint32_t_array(buf, 164, link_rx_max, 6); - _mav_put_int16_t_array(buf, 188, fan_speed, 4); - _mav_put_uint8_t_array(buf, 197, cpu_cores, 8); - _mav_put_uint8_t_array(buf, 205, cpu_combined, 10); - _mav_put_uint8_t_array(buf, 215, gpu_cores, 4); - _mav_put_uint8_t_array(buf, 219, gpu_combined, 10); - _mav_put_int8_t_array(buf, 230, temperature_core, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#else - mavlink_onboard_computer_status_t packet; - packet.time_usec = time_usec; - packet.uptime = uptime; - packet.ram_usage = ram_usage; - packet.ram_total = ram_total; - packet.type = type; - packet.temperature_board = temperature_board; - mav_array_memcpy(packet.storage_type, storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_usage, storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_total, storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet.link_type, link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_rate, link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_rate, link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_max, link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_max, link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.fan_speed, fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet.cpu_cores, cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet.cpu_combined, cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.gpu_cores, gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet.gpu_combined, gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.temperature_core, temperature_core, sizeof(int8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -} - -/** - * @brief Encode a onboard_computer_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param onboard_computer_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_onboard_computer_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_onboard_computer_status_t* onboard_computer_status) -{ - return mavlink_msg_onboard_computer_status_pack(system_id, component_id, msg, onboard_computer_status->time_usec, onboard_computer_status->uptime, onboard_computer_status->type, onboard_computer_status->cpu_cores, onboard_computer_status->cpu_combined, onboard_computer_status->gpu_cores, onboard_computer_status->gpu_combined, onboard_computer_status->temperature_board, onboard_computer_status->temperature_core, onboard_computer_status->fan_speed, onboard_computer_status->ram_usage, onboard_computer_status->ram_total, onboard_computer_status->storage_type, onboard_computer_status->storage_usage, onboard_computer_status->storage_total, onboard_computer_status->link_type, onboard_computer_status->link_tx_rate, onboard_computer_status->link_rx_rate, onboard_computer_status->link_tx_max, onboard_computer_status->link_rx_max); -} - -/** - * @brief Encode a onboard_computer_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param onboard_computer_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_onboard_computer_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_onboard_computer_status_t* onboard_computer_status) -{ - return mavlink_msg_onboard_computer_status_pack_chan(system_id, component_id, chan, msg, onboard_computer_status->time_usec, onboard_computer_status->uptime, onboard_computer_status->type, onboard_computer_status->cpu_cores, onboard_computer_status->cpu_combined, onboard_computer_status->gpu_cores, onboard_computer_status->gpu_combined, onboard_computer_status->temperature_board, onboard_computer_status->temperature_core, onboard_computer_status->fan_speed, onboard_computer_status->ram_usage, onboard_computer_status->ram_total, onboard_computer_status->storage_type, onboard_computer_status->storage_usage, onboard_computer_status->storage_total, onboard_computer_status->link_type, onboard_computer_status->link_tx_rate, onboard_computer_status->link_rx_rate, onboard_computer_status->link_tx_max, onboard_computer_status->link_rx_max); -} - -/** - * @brief Encode a onboard_computer_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param onboard_computer_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_onboard_computer_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_onboard_computer_status_t* onboard_computer_status) -{ - return mavlink_msg_onboard_computer_status_pack_status(system_id, component_id, _status, msg, onboard_computer_status->time_usec, onboard_computer_status->uptime, onboard_computer_status->type, onboard_computer_status->cpu_cores, onboard_computer_status->cpu_combined, onboard_computer_status->gpu_cores, onboard_computer_status->gpu_combined, onboard_computer_status->temperature_board, onboard_computer_status->temperature_core, onboard_computer_status->fan_speed, onboard_computer_status->ram_usage, onboard_computer_status->ram_total, onboard_computer_status->storage_type, onboard_computer_status->storage_usage, onboard_computer_status->storage_total, onboard_computer_status->link_type, onboard_computer_status->link_tx_rate, onboard_computer_status->link_rx_rate, onboard_computer_status->link_tx_max, onboard_computer_status->link_rx_max); -} - -/** - * @brief Send a onboard_computer_status message - * @param chan MAVLink channel to send the message - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param uptime [ms] Time since system boot. - * @param type Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - * @param cpu_cores CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param cpu_combined Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param gpu_cores GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - * @param gpu_combined Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - * @param temperature_board [degC] Temperature of the board. A value of INT8_MAX implies the field is unused. - * @param temperature_core [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - * @param fan_speed [rpm] Fan speeds. A value of INT16_MAX implies the field is unused. - * @param ram_usage [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param ram_total [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_type Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - * @param storage_usage [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param storage_total [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - * @param link_type Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - * @param link_tx_rate [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_rate [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - * @param link_tx_max [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - * @param link_rx_max [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_onboard_computer_status_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime, uint8_t type, const uint8_t *cpu_cores, const uint8_t *cpu_combined, const uint8_t *gpu_cores, const uint8_t *gpu_combined, int8_t temperature_board, const int8_t *temperature_core, const int16_t *fan_speed, uint32_t ram_usage, uint32_t ram_total, const uint32_t *storage_type, const uint32_t *storage_usage, const uint32_t *storage_total, const uint32_t *link_type, const uint32_t *link_tx_rate, const uint32_t *link_rx_rate, const uint32_t *link_tx_max, const uint32_t *link_rx_max) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, uptime); - _mav_put_uint32_t(buf, 12, ram_usage); - _mav_put_uint32_t(buf, 16, ram_total); - _mav_put_uint8_t(buf, 196, type); - _mav_put_int8_t(buf, 229, temperature_board); - _mav_put_uint32_t_array(buf, 20, storage_type, 4); - _mav_put_uint32_t_array(buf, 36, storage_usage, 4); - _mav_put_uint32_t_array(buf, 52, storage_total, 4); - _mav_put_uint32_t_array(buf, 68, link_type, 6); - _mav_put_uint32_t_array(buf, 92, link_tx_rate, 6); - _mav_put_uint32_t_array(buf, 116, link_rx_rate, 6); - _mav_put_uint32_t_array(buf, 140, link_tx_max, 6); - _mav_put_uint32_t_array(buf, 164, link_rx_max, 6); - _mav_put_int16_t_array(buf, 188, fan_speed, 4); - _mav_put_uint8_t_array(buf, 197, cpu_cores, 8); - _mav_put_uint8_t_array(buf, 205, cpu_combined, 10); - _mav_put_uint8_t_array(buf, 215, gpu_cores, 4); - _mav_put_uint8_t_array(buf, 219, gpu_combined, 10); - _mav_put_int8_t_array(buf, 230, temperature_core, 8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS, buf, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#else - mavlink_onboard_computer_status_t packet; - packet.time_usec = time_usec; - packet.uptime = uptime; - packet.ram_usage = ram_usage; - packet.ram_total = ram_total; - packet.type = type; - packet.temperature_board = temperature_board; - mav_array_memcpy(packet.storage_type, storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_usage, storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet.storage_total, storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet.link_type, link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_rate, link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_rate, link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_tx_max, link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.link_rx_max, link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet.fan_speed, fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet.cpu_cores, cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet.cpu_combined, cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.gpu_cores, gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet.gpu_combined, gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet.temperature_core, temperature_core, sizeof(int8_t)*8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#endif -} - -/** - * @brief Send a onboard_computer_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_onboard_computer_status_send_struct(mavlink_channel_t chan, const mavlink_onboard_computer_status_t* onboard_computer_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_onboard_computer_status_send(chan, onboard_computer_status->time_usec, onboard_computer_status->uptime, onboard_computer_status->type, onboard_computer_status->cpu_cores, onboard_computer_status->cpu_combined, onboard_computer_status->gpu_cores, onboard_computer_status->gpu_combined, onboard_computer_status->temperature_board, onboard_computer_status->temperature_core, onboard_computer_status->fan_speed, onboard_computer_status->ram_usage, onboard_computer_status->ram_total, onboard_computer_status->storage_type, onboard_computer_status->storage_usage, onboard_computer_status->storage_total, onboard_computer_status->link_type, onboard_computer_status->link_tx_rate, onboard_computer_status->link_rx_rate, onboard_computer_status->link_tx_max, onboard_computer_status->link_rx_max); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS, (const char *)onboard_computer_status, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_onboard_computer_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime, uint8_t type, const uint8_t *cpu_cores, const uint8_t *cpu_combined, const uint8_t *gpu_cores, const uint8_t *gpu_combined, int8_t temperature_board, const int8_t *temperature_core, const int16_t *fan_speed, uint32_t ram_usage, uint32_t ram_total, const uint32_t *storage_type, const uint32_t *storage_usage, const uint32_t *storage_total, const uint32_t *link_type, const uint32_t *link_tx_rate, const uint32_t *link_rx_rate, const uint32_t *link_tx_max, const uint32_t *link_rx_max) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, uptime); - _mav_put_uint32_t(buf, 12, ram_usage); - _mav_put_uint32_t(buf, 16, ram_total); - _mav_put_uint8_t(buf, 196, type); - _mav_put_int8_t(buf, 229, temperature_board); - _mav_put_uint32_t_array(buf, 20, storage_type, 4); - _mav_put_uint32_t_array(buf, 36, storage_usage, 4); - _mav_put_uint32_t_array(buf, 52, storage_total, 4); - _mav_put_uint32_t_array(buf, 68, link_type, 6); - _mav_put_uint32_t_array(buf, 92, link_tx_rate, 6); - _mav_put_uint32_t_array(buf, 116, link_rx_rate, 6); - _mav_put_uint32_t_array(buf, 140, link_tx_max, 6); - _mav_put_uint32_t_array(buf, 164, link_rx_max, 6); - _mav_put_int16_t_array(buf, 188, fan_speed, 4); - _mav_put_uint8_t_array(buf, 197, cpu_cores, 8); - _mav_put_uint8_t_array(buf, 205, cpu_combined, 10); - _mav_put_uint8_t_array(buf, 215, gpu_cores, 4); - _mav_put_uint8_t_array(buf, 219, gpu_combined, 10); - _mav_put_int8_t_array(buf, 230, temperature_core, 8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS, buf, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#else - mavlink_onboard_computer_status_t *packet = (mavlink_onboard_computer_status_t *)msgbuf; - packet->time_usec = time_usec; - packet->uptime = uptime; - packet->ram_usage = ram_usage; - packet->ram_total = ram_total; - packet->type = type; - packet->temperature_board = temperature_board; - mav_array_memcpy(packet->storage_type, storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet->storage_usage, storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet->storage_total, storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet->link_type, link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet->link_tx_rate, link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet->link_rx_rate, link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet->link_tx_max, link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet->link_rx_max, link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet->fan_speed, fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet->cpu_cores, cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet->cpu_combined, cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet->gpu_cores, gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet->gpu_combined, gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet->temperature_core, temperature_core, sizeof(int8_t)*8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS, (const char *)packet, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ONBOARD_COMPUTER_STATUS UNPACKING - - -/** - * @brief Get field time_usec from onboard_computer_status message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_onboard_computer_status_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field uptime from onboard_computer_status message - * - * @return [ms] Time since system boot. - */ -static inline uint32_t mavlink_msg_onboard_computer_status_get_uptime(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field type from onboard_computer_status message - * - * @return Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - */ -static inline uint8_t mavlink_msg_onboard_computer_status_get_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 196); -} - -/** - * @brief Get field cpu_cores from onboard_computer_status message - * - * @return CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_cpu_cores(const mavlink_message_t* msg, uint8_t *cpu_cores) -{ - return _MAV_RETURN_uint8_t_array(msg, cpu_cores, 8, 197); -} - -/** - * @brief Get field cpu_combined from onboard_computer_status message - * - * @return Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_cpu_combined(const mavlink_message_t* msg, uint8_t *cpu_combined) -{ - return _MAV_RETURN_uint8_t_array(msg, cpu_combined, 10, 205); -} - -/** - * @brief Get field gpu_cores from onboard_computer_status message - * - * @return GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_gpu_cores(const mavlink_message_t* msg, uint8_t *gpu_cores) -{ - return _MAV_RETURN_uint8_t_array(msg, gpu_cores, 4, 215); -} - -/** - * @brief Get field gpu_combined from onboard_computer_status message - * - * @return Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_gpu_combined(const mavlink_message_t* msg, uint8_t *gpu_combined) -{ - return _MAV_RETURN_uint8_t_array(msg, gpu_combined, 10, 219); -} - -/** - * @brief Get field temperature_board from onboard_computer_status message - * - * @return [degC] Temperature of the board. A value of INT8_MAX implies the field is unused. - */ -static inline int8_t mavlink_msg_onboard_computer_status_get_temperature_board(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int8_t(msg, 229); -} - -/** - * @brief Get field temperature_core from onboard_computer_status message - * - * @return [degC] Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_temperature_core(const mavlink_message_t* msg, int8_t *temperature_core) -{ - return _MAV_RETURN_int8_t_array(msg, temperature_core, 8, 230); -} - -/** - * @brief Get field fan_speed from onboard_computer_status message - * - * @return [rpm] Fan speeds. A value of INT16_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_fan_speed(const mavlink_message_t* msg, int16_t *fan_speed) -{ - return _MAV_RETURN_int16_t_array(msg, fan_speed, 4, 188); -} - -/** - * @brief Get field ram_usage from onboard_computer_status message - * - * @return [MiB] Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint32_t mavlink_msg_onboard_computer_status_get_ram_usage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 12); -} - -/** - * @brief Get field ram_total from onboard_computer_status message - * - * @return [MiB] Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint32_t mavlink_msg_onboard_computer_status_get_ram_total(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 16); -} - -/** - * @brief Get field storage_type from onboard_computer_status message - * - * @return Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_storage_type(const mavlink_message_t* msg, uint32_t *storage_type) -{ - return _MAV_RETURN_uint32_t_array(msg, storage_type, 4, 20); -} - -/** - * @brief Get field storage_usage from onboard_computer_status message - * - * @return [MiB] Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_storage_usage(const mavlink_message_t* msg, uint32_t *storage_usage) -{ - return _MAV_RETURN_uint32_t_array(msg, storage_usage, 4, 36); -} - -/** - * @brief Get field storage_total from onboard_computer_status message - * - * @return [MiB] Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_storage_total(const mavlink_message_t* msg, uint32_t *storage_total) -{ - return _MAV_RETURN_uint32_t_array(msg, storage_total, 4, 52); -} - -/** - * @brief Get field link_type from onboard_computer_status message - * - * @return Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_link_type(const mavlink_message_t* msg, uint32_t *link_type) -{ - return _MAV_RETURN_uint32_t_array(msg, link_type, 6, 68); -} - -/** - * @brief Get field link_tx_rate from onboard_computer_status message - * - * @return [KiB/s] Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_link_tx_rate(const mavlink_message_t* msg, uint32_t *link_tx_rate) -{ - return _MAV_RETURN_uint32_t_array(msg, link_tx_rate, 6, 92); -} - -/** - * @brief Get field link_rx_rate from onboard_computer_status message - * - * @return [KiB/s] Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_link_rx_rate(const mavlink_message_t* msg, uint32_t *link_rx_rate) -{ - return _MAV_RETURN_uint32_t_array(msg, link_rx_rate, 6, 116); -} - -/** - * @brief Get field link_tx_max from onboard_computer_status message - * - * @return [KiB/s] Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_link_tx_max(const mavlink_message_t* msg, uint32_t *link_tx_max) -{ - return _MAV_RETURN_uint32_t_array(msg, link_tx_max, 6, 140); -} - -/** - * @brief Get field link_rx_max from onboard_computer_status message - * - * @return [KiB/s] Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - */ -static inline uint16_t mavlink_msg_onboard_computer_status_get_link_rx_max(const mavlink_message_t* msg, uint32_t *link_rx_max) -{ - return _MAV_RETURN_uint32_t_array(msg, link_rx_max, 6, 164); -} - -/** - * @brief Decode a onboard_computer_status message into a struct - * - * @param msg The message to decode - * @param onboard_computer_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_onboard_computer_status_decode(const mavlink_message_t* msg, mavlink_onboard_computer_status_t* onboard_computer_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - onboard_computer_status->time_usec = mavlink_msg_onboard_computer_status_get_time_usec(msg); - onboard_computer_status->uptime = mavlink_msg_onboard_computer_status_get_uptime(msg); - onboard_computer_status->ram_usage = mavlink_msg_onboard_computer_status_get_ram_usage(msg); - onboard_computer_status->ram_total = mavlink_msg_onboard_computer_status_get_ram_total(msg); - mavlink_msg_onboard_computer_status_get_storage_type(msg, onboard_computer_status->storage_type); - mavlink_msg_onboard_computer_status_get_storage_usage(msg, onboard_computer_status->storage_usage); - mavlink_msg_onboard_computer_status_get_storage_total(msg, onboard_computer_status->storage_total); - mavlink_msg_onboard_computer_status_get_link_type(msg, onboard_computer_status->link_type); - mavlink_msg_onboard_computer_status_get_link_tx_rate(msg, onboard_computer_status->link_tx_rate); - mavlink_msg_onboard_computer_status_get_link_rx_rate(msg, onboard_computer_status->link_rx_rate); - mavlink_msg_onboard_computer_status_get_link_tx_max(msg, onboard_computer_status->link_tx_max); - mavlink_msg_onboard_computer_status_get_link_rx_max(msg, onboard_computer_status->link_rx_max); - mavlink_msg_onboard_computer_status_get_fan_speed(msg, onboard_computer_status->fan_speed); - onboard_computer_status->type = mavlink_msg_onboard_computer_status_get_type(msg); - mavlink_msg_onboard_computer_status_get_cpu_cores(msg, onboard_computer_status->cpu_cores); - mavlink_msg_onboard_computer_status_get_cpu_combined(msg, onboard_computer_status->cpu_combined); - mavlink_msg_onboard_computer_status_get_gpu_cores(msg, onboard_computer_status->gpu_cores); - mavlink_msg_onboard_computer_status_get_gpu_combined(msg, onboard_computer_status->gpu_combined); - onboard_computer_status->temperature_board = mavlink_msg_onboard_computer_status_get_temperature_board(msg); - mavlink_msg_onboard_computer_status_get_temperature_core(msg, onboard_computer_status->temperature_core); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN; - memset(onboard_computer_status, 0, MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_LEN); - memcpy(onboard_computer_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_open_drone_id_message_pack.h b/common/mavlink_msg_open_drone_id_message_pack.h index 52dfcfddb..ead4ca626 100644 --- a/common/mavlink_msg_open_drone_id_message_pack.h +++ b/common/mavlink_msg_open_drone_id_message_pack.h @@ -8,7 +8,7 @@ typedef struct __mavlink_open_drone_id_message_pack_t { uint8_t target_system; /*< System ID (0 for broadcast).*/ uint8_t target_component; /*< Component ID (0 for broadcast).*/ uint8_t id_or_mac[20]; /*< Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. */ - uint8_t single_message_size; /*< [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.*/ + uint8_t single_message_size; /*< [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length.*/ uint8_t msg_pack_size; /*< Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.*/ uint8_t messages[225]; /*< Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.*/ } mavlink_open_drone_id_message_pack_t; @@ -60,7 +60,7 @@ typedef struct __mavlink_open_drone_id_message_pack_t { * @param target_system System ID (0 for broadcast). * @param target_component Component ID (0 for broadcast). * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. + * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field. * @return length of the message in bytes (excluding serial stream start sign) @@ -102,7 +102,7 @@ static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack(uint8_t syste * @param target_system System ID (0 for broadcast). * @param target_component Component ID (0 for broadcast). * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. + * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field. * @return length of the message in bytes (excluding serial stream start sign) @@ -147,7 +147,7 @@ static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack_status(uint8_ * @param target_system System ID (0 for broadcast). * @param target_component Component ID (0 for broadcast). * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. + * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field. * @return length of the message in bytes (excluding serial stream start sign) @@ -228,7 +228,7 @@ static inline uint16_t mavlink_msg_open_drone_id_message_pack_encode_status(uint * @param target_system System ID (0 for broadcast). * @param target_component Component ID (0 for broadcast). * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. + * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field. */ @@ -341,7 +341,7 @@ static inline uint16_t mavlink_msg_open_drone_id_message_pack_get_id_or_mac(cons /** * @brief Get field single_message_size from open_drone_id_message_pack message * - * @return [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. + * @return [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specificed to have this length. */ static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_single_message_size(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_open_drone_id_system.h b/common/mavlink_msg_open_drone_id_system.h index 0dfba4182..70732ded8 100644 --- a/common/mavlink_msg_open_drone_id_system.h +++ b/common/mavlink_msg_open_drone_id_system.h @@ -7,12 +7,12 @@ typedef struct __mavlink_open_drone_id_system_t { int32_t operator_latitude; /*< [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).*/ int32_t operator_longitude; /*< [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).*/ - float area_ceiling; /*< [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.*/ - float area_floor; /*< [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.*/ + float area_ceiling; /*< [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m.*/ + float area_floor; /*< [m] Area Operations Floor relative to WGS84. If unknown: -1000 m.*/ float operator_altitude_geo; /*< [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.*/ uint32_t timestamp; /*< [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.*/ - uint16_t area_count; /*< Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.*/ - uint16_t area_radius; /*< [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.*/ + uint16_t area_count; /*< Number of aircraft in the area, group or formation (default 1).*/ + uint16_t area_radius; /*< [m] Radius of the cylindrical area of the group or formation (default 0).*/ uint8_t target_system; /*< System ID (0 for broadcast).*/ uint8_t target_component; /*< Component ID (0 for broadcast).*/ uint8_t id_or_mac[20]; /*< Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. */ @@ -90,10 +90,10 @@ typedef struct __mavlink_open_drone_id_system_t { * @param classification_type Specifies the classification type of the UA. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon). * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon). - * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. - * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. - * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @param area_count Number of aircraft in the area, group or formation (default 1). + * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). + * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. + * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. @@ -159,10 +159,10 @@ static inline uint16_t mavlink_msg_open_drone_id_system_pack(uint8_t system_id, * @param classification_type Specifies the classification type of the UA. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon). * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon). - * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. - * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. - * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @param area_count Number of aircraft in the area, group or formation (default 1). + * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). + * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. + * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. @@ -231,10 +231,10 @@ static inline uint16_t mavlink_msg_open_drone_id_system_pack_status(uint8_t syst * @param classification_type Specifies the classification type of the UA. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon). * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon). - * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. - * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. - * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @param area_count Number of aircraft in the area, group or formation (default 1). + * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). + * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. + * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. @@ -339,10 +339,10 @@ static inline uint16_t mavlink_msg_open_drone_id_system_encode_status(uint8_t sy * @param classification_type Specifies the classification type of the UA. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon). * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon). - * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. - * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. - * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @param area_count Number of aircraft in the area, group or formation (default 1). + * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). + * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. + * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. @@ -533,7 +533,7 @@ static inline int32_t mavlink_msg_open_drone_id_system_get_operator_longitude(co /** * @brief Get field area_count from open_drone_id_system message * - * @return Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. + * @return Number of aircraft in the area, group or formation (default 1). */ static inline uint16_t mavlink_msg_open_drone_id_system_get_area_count(const mavlink_message_t* msg) { @@ -543,7 +543,7 @@ static inline uint16_t mavlink_msg_open_drone_id_system_get_area_count(const mav /** * @brief Get field area_radius from open_drone_id_system message * - * @return [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. + * @return [m] Radius of the cylindrical area of the group or formation (default 0). */ static inline uint16_t mavlink_msg_open_drone_id_system_get_area_radius(const mavlink_message_t* msg) { @@ -553,7 +553,7 @@ static inline uint16_t mavlink_msg_open_drone_id_system_get_area_radius(const ma /** * @brief Get field area_ceiling from open_drone_id_system message * - * @return [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @return [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. */ static inline float mavlink_msg_open_drone_id_system_get_area_ceiling(const mavlink_message_t* msg) { @@ -563,7 +563,7 @@ static inline float mavlink_msg_open_drone_id_system_get_area_ceiling(const mavl /** * @brief Get field area_floor from open_drone_id_system message * - * @return [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. + * @return [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. */ static inline float mavlink_msg_open_drone_id_system_get_area_floor(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_optical_flow.h b/common/mavlink_msg_optical_flow.h index 45f648d97..ac4ce9853 100644 --- a/common/mavlink_msg_optical_flow.h +++ b/common/mavlink_msg_optical_flow.h @@ -9,8 +9,8 @@ typedef struct __mavlink_optical_flow_t { float flow_comp_m_x; /*< [m/s] Flow in x-sensor direction, angular-speed compensated*/ float flow_comp_m_y; /*< [m/s] Flow in y-sensor direction, angular-speed compensated*/ float ground_distance; /*< [m] Ground distance. Positive value: distance known. Negative value: Unknown distance*/ - int16_t flow_x; /*< [dpix] Flow in x-sensor direction*/ - int16_t flow_y; /*< [dpix] Flow in y-sensor direction*/ + int16_t flow_x; /*< [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x)*/ + int16_t flow_y; /*< [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y)*/ uint8_t sensor_id; /*< Sensor ID*/ uint8_t quality; /*< Optical flow quality / confidence. 0: bad, 255: maximum quality*/ float flow_rate_x; /*< [rad/s] Flow rate about X axis*/ @@ -70,8 +70,8 @@ typedef struct __mavlink_optical_flow_t { * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param sensor_id Sensor ID - * @param flow_x [dpix] Flow in x-sensor direction - * @param flow_y [dpix] Flow in y-sensor direction + * @param flow_x [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x) + * @param flow_y [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y) * @param flow_comp_m_x [m/s] Flow in x-sensor direction, angular-speed compensated * @param flow_comp_m_y [m/s] Flow in y-sensor direction, angular-speed compensated * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality @@ -126,8 +126,8 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param sensor_id Sensor ID - * @param flow_x [dpix] Flow in x-sensor direction - * @param flow_y [dpix] Flow in y-sensor direction + * @param flow_x [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x) + * @param flow_y [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y) * @param flow_comp_m_x [m/s] Flow in x-sensor direction, angular-speed compensated * @param flow_comp_m_y [m/s] Flow in y-sensor direction, angular-speed compensated * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality @@ -185,8 +185,8 @@ static inline uint16_t mavlink_msg_optical_flow_pack_status(uint8_t system_id, u * @param msg The MAVLink message to compress the data into * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param sensor_id Sensor ID - * @param flow_x [dpix] Flow in x-sensor direction - * @param flow_y [dpix] Flow in y-sensor direction + * @param flow_x [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x) + * @param flow_y [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y) * @param flow_comp_m_x [m/s] Flow in x-sensor direction, angular-speed compensated * @param flow_comp_m_y [m/s] Flow in y-sensor direction, angular-speed compensated * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality @@ -280,8 +280,8 @@ static inline uint16_t mavlink_msg_optical_flow_encode_status(uint8_t system_id, * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param sensor_id Sensor ID - * @param flow_x [dpix] Flow in x-sensor direction - * @param flow_y [dpix] Flow in y-sensor direction + * @param flow_x [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x) + * @param flow_y [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y) * @param flow_comp_m_x [m/s] Flow in x-sensor direction, angular-speed compensated * @param flow_comp_m_y [m/s] Flow in y-sensor direction, angular-speed compensated * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality @@ -408,7 +408,7 @@ static inline uint8_t mavlink_msg_optical_flow_get_sensor_id(const mavlink_messa /** * @brief Get field flow_x from optical_flow message * - * @return [dpix] Flow in x-sensor direction + * @return [rad/s] Flow rate around X-axis (deprecated; use flow_rate_x) */ static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_t* msg) { @@ -418,7 +418,7 @@ static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_ /** * @brief Get field flow_y from optical_flow message * - * @return [dpix] Flow in y-sensor direction + * @return [rad/s] Flow rate around Y-axis (deprecated; use flow_rate_y) */ static inline int16_t mavlink_msg_optical_flow_get_flow_y(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_orbit_execution_status.h b/common/mavlink_msg_orbit_execution_status.h deleted file mode 100644 index 2a38cb669..000000000 --- a/common/mavlink_msg_orbit_execution_status.h +++ /dev/null @@ -1,400 +0,0 @@ -#pragma once -// MESSAGE ORBIT_EXECUTION_STATUS PACKING - -#define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS 360 - - -typedef struct __mavlink_orbit_execution_status_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - float radius; /*< [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise.*/ - int32_t x; /*< X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.*/ - int32_t y; /*< Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7.*/ - float z; /*< [m] Altitude of center point. Coordinate system depends on frame field.*/ - uint8_t frame; /*< The coordinate system of the fields: x, y, z.*/ -} mavlink_orbit_execution_status_t; - -#define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN 25 -#define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN 25 -#define MAVLINK_MSG_ID_360_LEN 25 -#define MAVLINK_MSG_ID_360_MIN_LEN 25 - -#define MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC 11 -#define MAVLINK_MSG_ID_360_CRC 11 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS { \ - 360, \ - "ORBIT_EXECUTION_STATUS", \ - 6, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_orbit_execution_status_t, time_usec) }, \ - { "radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_orbit_execution_status_t, radius) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_orbit_execution_status_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_orbit_execution_status_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_orbit_execution_status_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_orbit_execution_status_t, z) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS { \ - "ORBIT_EXECUTION_STATUS", \ - 6, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_orbit_execution_status_t, time_usec) }, \ - { "radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_orbit_execution_status_t, radius) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_orbit_execution_status_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_orbit_execution_status_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_orbit_execution_status_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_orbit_execution_status_t, z) }, \ - } \ -} -#endif - -/** - * @brief Pack a orbit_execution_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_orbit_execution_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t time_usec, float radius, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, radius); - _mav_put_int32_t(buf, 12, x); - _mav_put_int32_t(buf, 16, y); - _mav_put_float(buf, 20, z); - _mav_put_uint8_t(buf, 24, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#else - mavlink_orbit_execution_status_t packet; - packet.time_usec = time_usec; - packet.radius = radius; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -} - -/** - * @brief Pack a orbit_execution_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_orbit_execution_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t time_usec, float radius, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, radius); - _mav_put_int32_t(buf, 12, x); - _mav_put_int32_t(buf, 16, y); - _mav_put_float(buf, 20, z); - _mav_put_uint8_t(buf, 24, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#else - mavlink_orbit_execution_status_t packet; - packet.time_usec = time_usec; - packet.radius = radius; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#endif -} - -/** - * @brief Pack a orbit_execution_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_orbit_execution_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t time_usec,float radius,uint8_t frame,int32_t x,int32_t y,float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, radius); - _mav_put_int32_t(buf, 12, x); - _mav_put_int32_t(buf, 16, y); - _mav_put_float(buf, 20, z); - _mav_put_uint8_t(buf, 24, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#else - mavlink_orbit_execution_status_t packet; - packet.time_usec = time_usec; - packet.radius = radius; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -} - -/** - * @brief Encode a orbit_execution_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param orbit_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_orbit_execution_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_orbit_execution_status_t* orbit_execution_status) -{ - return mavlink_msg_orbit_execution_status_pack(system_id, component_id, msg, orbit_execution_status->time_usec, orbit_execution_status->radius, orbit_execution_status->frame, orbit_execution_status->x, orbit_execution_status->y, orbit_execution_status->z); -} - -/** - * @brief Encode a orbit_execution_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param orbit_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_orbit_execution_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_orbit_execution_status_t* orbit_execution_status) -{ - return mavlink_msg_orbit_execution_status_pack_chan(system_id, component_id, chan, msg, orbit_execution_status->time_usec, orbit_execution_status->radius, orbit_execution_status->frame, orbit_execution_status->x, orbit_execution_status->y, orbit_execution_status->z); -} - -/** - * @brief Encode a orbit_execution_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param orbit_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_orbit_execution_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_orbit_execution_status_t* orbit_execution_status) -{ - return mavlink_msg_orbit_execution_status_pack_status(system_id, component_id, _status, msg, orbit_execution_status->time_usec, orbit_execution_status->radius, orbit_execution_status->frame, orbit_execution_status->x, orbit_execution_status->y, orbit_execution_status->z); -} - -/** - * @brief Send a orbit_execution_status message - * @param chan MAVLink channel to send the message - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param radius [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param y Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_orbit_execution_status_send(mavlink_channel_t chan, uint64_t time_usec, float radius, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, radius); - _mav_put_int32_t(buf, 12, x); - _mav_put_int32_t(buf, 16, y); - _mav_put_float(buf, 20, z); - _mav_put_uint8_t(buf, 24, frame); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS, buf, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#else - mavlink_orbit_execution_status_t packet; - packet.time_usec = time_usec; - packet.radius = radius; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#endif -} - -/** - * @brief Send a orbit_execution_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_orbit_execution_status_send_struct(mavlink_channel_t chan, const mavlink_orbit_execution_status_t* orbit_execution_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_orbit_execution_status_send(chan, orbit_execution_status->time_usec, orbit_execution_status->radius, orbit_execution_status->frame, orbit_execution_status->x, orbit_execution_status->y, orbit_execution_status->z); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS, (const char *)orbit_execution_status, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_orbit_execution_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, float radius, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, radius); - _mav_put_int32_t(buf, 12, x); - _mav_put_int32_t(buf, 16, y); - _mav_put_float(buf, 20, z); - _mav_put_uint8_t(buf, 24, frame); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS, buf, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#else - mavlink_orbit_execution_status_t *packet = (mavlink_orbit_execution_status_t *)msgbuf; - packet->time_usec = time_usec; - packet->radius = radius; - packet->x = x; - packet->y = y; - packet->z = z; - packet->frame = frame; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS, (const char *)packet, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ORBIT_EXECUTION_STATUS UNPACKING - - -/** - * @brief Get field time_usec from orbit_execution_status message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_orbit_execution_status_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field radius from orbit_execution_status message - * - * @return [m] Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - */ -static inline float mavlink_msg_orbit_execution_status_get_radius(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field frame from orbit_execution_status message - * - * @return The coordinate system of the fields: x, y, z. - */ -static inline uint8_t mavlink_msg_orbit_execution_status_get_frame(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 24); -} - -/** - * @brief Get field x from orbit_execution_status message - * - * @return X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - */ -static inline int32_t mavlink_msg_orbit_execution_status_get_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field y from orbit_execution_status message - * - * @return Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - */ -static inline int32_t mavlink_msg_orbit_execution_status_get_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 16); -} - -/** - * @brief Get field z from orbit_execution_status message - * - * @return [m] Altitude of center point. Coordinate system depends on frame field. - */ -static inline float mavlink_msg_orbit_execution_status_get_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 20); -} - -/** - * @brief Decode a orbit_execution_status message into a struct - * - * @param msg The message to decode - * @param orbit_execution_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_orbit_execution_status_decode(const mavlink_message_t* msg, mavlink_orbit_execution_status_t* orbit_execution_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - orbit_execution_status->time_usec = mavlink_msg_orbit_execution_status_get_time_usec(msg); - orbit_execution_status->radius = mavlink_msg_orbit_execution_status_get_radius(msg); - orbit_execution_status->x = mavlink_msg_orbit_execution_status_get_x(msg); - orbit_execution_status->y = mavlink_msg_orbit_execution_status_get_y(msg); - orbit_execution_status->z = mavlink_msg_orbit_execution_status_get_z(msg); - orbit_execution_status->frame = mavlink_msg_orbit_execution_status_get_frame(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN; - memset(orbit_execution_status, 0, MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_LEN); - memcpy(orbit_execution_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_play_tune_v2.h b/common/mavlink_msg_play_tune_v2.h deleted file mode 100644 index 2985f429a..000000000 --- a/common/mavlink_msg_play_tune_v2.h +++ /dev/null @@ -1,334 +0,0 @@ -#pragma once -// MESSAGE PLAY_TUNE_V2 PACKING - -#define MAVLINK_MSG_ID_PLAY_TUNE_V2 400 - - -typedef struct __mavlink_play_tune_v2_t { - uint32_t format; /*< Tune format*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - char tune[248]; /*< Tune definition as a NULL-terminated string.*/ -} mavlink_play_tune_v2_t; - -#define MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN 254 -#define MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN 254 -#define MAVLINK_MSG_ID_400_LEN 254 -#define MAVLINK_MSG_ID_400_MIN_LEN 254 - -#define MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC 110 -#define MAVLINK_MSG_ID_400_CRC 110 - -#define MAVLINK_MSG_PLAY_TUNE_V2_FIELD_TUNE_LEN 248 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2 { \ - 400, \ - "PLAY_TUNE_V2", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_play_tune_v2_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_play_tune_v2_t, target_component) }, \ - { "format", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_play_tune_v2_t, format) }, \ - { "tune", NULL, MAVLINK_TYPE_CHAR, 248, 6, offsetof(mavlink_play_tune_v2_t, tune) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2 { \ - "PLAY_TUNE_V2", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_play_tune_v2_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_play_tune_v2_t, target_component) }, \ - { "format", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_play_tune_v2_t, format) }, \ - { "tune", NULL, MAVLINK_TYPE_CHAR, 248, 6, offsetof(mavlink_play_tune_v2_t, tune) }, \ - } \ -} -#endif - -/** - * @brief Pack a play_tune_v2 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param format Tune format - * @param tune Tune definition as a NULL-terminated string. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_play_tune_v2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint32_t format, const char *tune) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_char_array(buf, 6, tune, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#else - mavlink_play_tune_v2_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.tune, tune, sizeof(char)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PLAY_TUNE_V2; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -} - -/** - * @brief Pack a play_tune_v2 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param format Tune format - * @param tune Tune definition as a NULL-terminated string. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_play_tune_v2_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint32_t format, const char *tune) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_char_array(buf, 6, tune, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#else - mavlink_play_tune_v2_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.tune, tune, sizeof(char)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PLAY_TUNE_V2; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#endif -} - -/** - * @brief Pack a play_tune_v2 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param format Tune format - * @param tune Tune definition as a NULL-terminated string. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_play_tune_v2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint32_t format,const char *tune) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_char_array(buf, 6, tune, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#else - mavlink_play_tune_v2_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.tune, tune, sizeof(char)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PLAY_TUNE_V2; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -} - -/** - * @brief Encode a play_tune_v2 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param play_tune_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_play_tune_v2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_play_tune_v2_t* play_tune_v2) -{ - return mavlink_msg_play_tune_v2_pack(system_id, component_id, msg, play_tune_v2->target_system, play_tune_v2->target_component, play_tune_v2->format, play_tune_v2->tune); -} - -/** - * @brief Encode a play_tune_v2 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param play_tune_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_play_tune_v2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_play_tune_v2_t* play_tune_v2) -{ - return mavlink_msg_play_tune_v2_pack_chan(system_id, component_id, chan, msg, play_tune_v2->target_system, play_tune_v2->target_component, play_tune_v2->format, play_tune_v2->tune); -} - -/** - * @brief Encode a play_tune_v2 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param play_tune_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_play_tune_v2_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_play_tune_v2_t* play_tune_v2) -{ - return mavlink_msg_play_tune_v2_pack_status(system_id, component_id, _status, msg, play_tune_v2->target_system, play_tune_v2->target_component, play_tune_v2->format, play_tune_v2->tune); -} - -/** - * @brief Send a play_tune_v2 message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param format Tune format - * @param tune Tune definition as a NULL-terminated string. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_play_tune_v2_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t format, const char *tune) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_char_array(buf, 6, tune, 248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PLAY_TUNE_V2, buf, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#else - mavlink_play_tune_v2_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.tune, tune, sizeof(char)*248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PLAY_TUNE_V2, (const char *)&packet, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#endif -} - -/** - * @brief Send a play_tune_v2 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_play_tune_v2_send_struct(mavlink_channel_t chan, const mavlink_play_tune_v2_t* play_tune_v2) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_play_tune_v2_send(chan, play_tune_v2->target_system, play_tune_v2->target_component, play_tune_v2->format, play_tune_v2->tune); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PLAY_TUNE_V2, (const char *)play_tune_v2, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#endif -} - -#if MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_play_tune_v2_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t format, const char *tune) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_char_array(buf, 6, tune, 248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PLAY_TUNE_V2, buf, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#else - mavlink_play_tune_v2_t *packet = (mavlink_play_tune_v2_t *)msgbuf; - packet->format = format; - packet->target_system = target_system; - packet->target_component = target_component; - mav_array_memcpy(packet->tune, tune, sizeof(char)*248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PLAY_TUNE_V2, (const char *)packet, MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN, MAVLINK_MSG_ID_PLAY_TUNE_V2_CRC); -#endif -} -#endif - -#endif - -// MESSAGE PLAY_TUNE_V2 UNPACKING - - -/** - * @brief Get field target_system from play_tune_v2 message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_play_tune_v2_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from play_tune_v2 message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_play_tune_v2_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field format from play_tune_v2 message - * - * @return Tune format - */ -static inline uint32_t mavlink_msg_play_tune_v2_get_format(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field tune from play_tune_v2 message - * - * @return Tune definition as a NULL-terminated string. - */ -static inline uint16_t mavlink_msg_play_tune_v2_get_tune(const mavlink_message_t* msg, char *tune) -{ - return _MAV_RETURN_char_array(msg, tune, 248, 6); -} - -/** - * @brief Decode a play_tune_v2 message into a struct - * - * @param msg The message to decode - * @param play_tune_v2 C-struct to decode the message contents into - */ -static inline void mavlink_msg_play_tune_v2_decode(const mavlink_message_t* msg, mavlink_play_tune_v2_t* play_tune_v2) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - play_tune_v2->format = mavlink_msg_play_tune_v2_get_format(msg); - play_tune_v2->target_system = mavlink_msg_play_tune_v2_get_target_system(msg); - play_tune_v2->target_component = mavlink_msg_play_tune_v2_get_target_component(msg); - mavlink_msg_play_tune_v2_get_tune(msg, play_tune_v2->tune); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN? msg->len : MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN; - memset(play_tune_v2, 0, MAVLINK_MSG_ID_PLAY_TUNE_V2_LEN); - memcpy(play_tune_v2, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_position_target_global_int.h b/common/mavlink_msg_position_target_global_int.h index e4e0e83b5..2ad7a9987 100644 --- a/common/mavlink_msg_position_target_global_int.h +++ b/common/mavlink_msg_position_target_global_int.h @@ -6,8 +6,8 @@ typedef struct __mavlink_position_target_global_int_t { uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.*/ - int32_t lat_int; /*< [degE7] Latitude in WGS84 frame*/ - int32_t lon_int; /*< [degE7] Longitude in WGS84 frame*/ + int32_t lat_int; /*< [degE7] X Position in WGS84 frame*/ + int32_t lon_int; /*< [degE7] Y Position in WGS84 frame*/ float alt; /*< [m] Altitude (MSL, AGL or relative to home altitude, depending on frame)*/ float vx; /*< [m/s] X velocity in NED frame*/ float vy; /*< [m/s] Y velocity in NED frame*/ @@ -18,7 +18,7 @@ typedef struct __mavlink_position_target_global_int_t { float yaw; /*< [rad] yaw setpoint*/ float yaw_rate; /*< [rad/s] yaw rate setpoint*/ uint16_t type_mask; /*< Bitmap to indicate which dimensions should be ignored by the vehicle.*/ - uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11*/ } mavlink_position_target_global_int_t; #define MAVLINK_MSG_ID_POSITION_TARGET_GLOBAL_INT_LEN 51 @@ -81,10 +81,10 @@ typedef struct __mavlink_position_target_global_int_t { * @param msg The MAVLink message to compress the data into * * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, AGL or relative to home altitude, depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -149,10 +149,10 @@ static inline uint16_t mavlink_msg_position_target_global_int_pack(uint8_t syste * @param msg The MAVLink message to compress the data into * * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, AGL or relative to home altitude, depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -220,10 +220,10 @@ static inline uint16_t mavlink_msg_position_target_global_int_pack_status(uint8_ * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, AGL or relative to home altitude, depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -327,10 +327,10 @@ static inline uint16_t mavlink_msg_position_target_global_int_encode_status(uint * @param chan MAVLink channel to send the message * * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, AGL or relative to home altitude, depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -466,7 +466,7 @@ static inline uint32_t mavlink_msg_position_target_global_int_get_time_boot_ms(c /** * @brief Get field coordinate_frame from position_target_global_int message * - * @return Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @return Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 */ static inline uint8_t mavlink_msg_position_target_global_int_get_coordinate_frame(const mavlink_message_t* msg) { @@ -486,7 +486,7 @@ static inline uint16_t mavlink_msg_position_target_global_int_get_type_mask(cons /** * @brief Get field lat_int from position_target_global_int message * - * @return [degE7] Latitude in WGS84 frame + * @return [degE7] X Position in WGS84 frame */ static inline int32_t mavlink_msg_position_target_global_int_get_lat_int(const mavlink_message_t* msg) { @@ -496,7 +496,7 @@ static inline int32_t mavlink_msg_position_target_global_int_get_lat_int(const m /** * @brief Get field lon_int from position_target_global_int message * - * @return [degE7] Longitude in WGS84 frame + * @return [degE7] Y Position in WGS84 frame */ static inline int32_t mavlink_msg_position_target_global_int_get_lon_int(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_radio_status.h b/common/mavlink_msg_radio_status.h index 8a6c5591d..5545a2c28 100644 --- a/common/mavlink_msg_radio_status.h +++ b/common/mavlink_msg_radio_status.h @@ -7,11 +7,11 @@ typedef struct __mavlink_radio_status_t { uint16_t rxerrors; /*< Count of radio packet receive errors (since boot).*/ uint16_t fixed; /*< Count of error corrected radio packets (since boot).*/ - uint8_t rssi; /*< Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ - uint8_t remrssi; /*< Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t rssi; /*< Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ + uint8_t remrssi; /*< Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ uint8_t txbuf; /*< [%] Remaining free transmitter buffer space.*/ - uint8_t noise; /*< Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown.*/ - uint8_t remnoise; /*< Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t noise; /*< Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown.*/ + uint8_t remnoise; /*< Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown.*/ } mavlink_radio_status_t; #define MAVLINK_MSG_ID_RADIO_STATUS_LEN 9 @@ -59,11 +59,11 @@ typedef struct __mavlink_radio_status_t { * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * - * @param rssi Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. + * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @param txbuf [%] Remaining free transmitter buffer space. - * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. + * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. * @param rxerrors Count of radio packet receive errors (since boot). * @param fixed Count of error corrected radio packets (since boot). * @return length of the message in bytes (excluding serial stream start sign) @@ -106,11 +106,11 @@ static inline uint16_t mavlink_msg_radio_status_pack(uint8_t system_id, uint8_t * @param status MAVLink status structure * @param msg The MAVLink message to compress the data into * - * @param rssi Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. + * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @param txbuf [%] Remaining free transmitter buffer space. - * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. + * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. * @param rxerrors Count of radio packet receive errors (since boot). * @param fixed Count of error corrected radio packets (since boot). * @return length of the message in bytes (excluding serial stream start sign) @@ -156,11 +156,11 @@ static inline uint16_t mavlink_msg_radio_status_pack_status(uint8_t system_id, u * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into - * @param rssi Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. + * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @param txbuf [%] Remaining free transmitter buffer space. - * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. + * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. * @param rxerrors Count of radio packet receive errors (since boot). * @param fixed Count of error corrected radio packets (since boot). * @return length of the message in bytes (excluding serial stream start sign) @@ -242,11 +242,11 @@ static inline uint16_t mavlink_msg_radio_status_encode_status(uint8_t system_id, * @brief Send a radio_status message * @param chan MAVLink channel to send the message * - * @param rssi Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. + * @param remrssi Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @param txbuf [%] Remaining free transmitter buffer space. - * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @param noise Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. + * @param remnoise Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. * @param rxerrors Count of radio packet receive errors (since boot). * @param fixed Count of error corrected radio packets (since boot). */ @@ -337,7 +337,7 @@ static inline void mavlink_msg_radio_status_send_buf(mavlink_message_t *msgbuf, /** * @brief Get field rssi from radio_status message * - * @return Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Local (message sender) recieved signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_radio_status_get_rssi(const mavlink_message_t* msg) { @@ -347,7 +347,7 @@ static inline uint8_t mavlink_msg_radio_status_get_rssi(const mavlink_message_t* /** * @brief Get field remrssi from radio_status message * - * @return Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_radio_status_get_remrssi(const mavlink_message_t* msg) { @@ -367,7 +367,7 @@ static inline uint8_t mavlink_msg_radio_status_get_txbuf(const mavlink_message_t /** * @brief Get field noise from radio_status message * - * @return Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_radio_status_get_noise(const mavlink_message_t* msg) { @@ -377,7 +377,7 @@ static inline uint8_t mavlink_msg_radio_status_get_noise(const mavlink_message_t /** * @brief Get field remnoise from radio_status message * - * @return Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_radio_status_get_remnoise(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_rc_channels.h b/common/mavlink_msg_rc_channels.h index 8a3af5444..1ebf62825 100644 --- a/common/mavlink_msg_rc_channels.h +++ b/common/mavlink_msg_rc_channels.h @@ -25,7 +25,7 @@ typedef struct __mavlink_rc_channels_t { uint16_t chan17_raw; /*< [us] RC channel 17 value.*/ uint16_t chan18_raw; /*< [us] RC channel 18 value.*/ uint8_t chancount; /*< Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available.*/ - uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ } mavlink_rc_channels_t; #define MAVLINK_MSG_ID_RC_CHANNELS_LEN 42 @@ -121,7 +121,7 @@ typedef struct __mavlink_rc_channels_t { * @param chan16_raw [us] RC channel 16 value. * @param chan17_raw [us] RC channel 17 value. * @param chan18_raw [us] RC channel 18 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -210,7 +210,7 @@ static inline uint16_t mavlink_msg_rc_channels_pack(uint8_t system_id, uint8_t c * @param chan16_raw [us] RC channel 16 value. * @param chan17_raw [us] RC channel 17 value. * @param chan18_raw [us] RC channel 18 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -302,7 +302,7 @@ static inline uint16_t mavlink_msg_rc_channels_pack_status(uint8_t system_id, ui * @param chan16_raw [us] RC channel 16 value. * @param chan17_raw [us] RC channel 17 value. * @param chan18_raw [us] RC channel 18 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -430,7 +430,7 @@ static inline uint16_t mavlink_msg_rc_channels_encode_status(uint8_t system_id, * @param chan16_raw [us] RC channel 16 value. * @param chan17_raw [us] RC channel 17 value. * @param chan18_raw [us] RC channel 18 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -775,7 +775,7 @@ static inline uint16_t mavlink_msg_rc_channels_get_chan18_raw(const mavlink_mess /** * @brief Get field rssi from rc_channels message * - * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_rc_channels_get_rssi(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_rc_channels_raw.h b/common/mavlink_msg_rc_channels_raw.h index ef87f107c..e656bc658 100644 --- a/common/mavlink_msg_rc_channels_raw.h +++ b/common/mavlink_msg_rc_channels_raw.h @@ -15,7 +15,7 @@ typedef struct __mavlink_rc_channels_raw_t { uint16_t chan7_raw; /*< [us] RC channel 7 value.*/ uint16_t chan8_raw; /*< [us] RC channel 8 value.*/ uint8_t port; /*< Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX.*/ - uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ } mavlink_rc_channels_raw_t; #define MAVLINK_MSG_ID_RC_CHANNELS_RAW_LEN 22 @@ -81,7 +81,7 @@ typedef struct __mavlink_rc_channels_raw_t { * @param chan6_raw [us] RC channel 6 value. * @param chan7_raw [us] RC channel 7 value. * @param chan8_raw [us] RC channel 8 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -140,7 +140,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack(uint8_t system_id, uint8 * @param chan6_raw [us] RC channel 6 value. * @param chan7_raw [us] RC channel 7 value. * @param chan8_raw [us] RC channel 8 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_raw_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -202,7 +202,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_pack_status(uint8_t system_id * @param chan6_raw [us] RC channel 6 value. * @param chan7_raw [us] RC channel 7 value. * @param chan8_raw [us] RC channel 8 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -300,7 +300,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_encode_status(uint8_t system_ * @param chan6_raw [us] RC channel 6 value. * @param chan7_raw [us] RC channel 7 value. * @param chan8_raw [us] RC channel 8 value. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -505,7 +505,7 @@ static inline uint16_t mavlink_msg_rc_channels_raw_get_chan8_raw(const mavlink_m /** * @brief Get field rssi from rc_channels_raw message * - * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_rc_channels_raw_get_rssi(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_rc_channels_scaled.h b/common/mavlink_msg_rc_channels_scaled.h index 509ba0294..89b8b3987 100644 --- a/common/mavlink_msg_rc_channels_scaled.h +++ b/common/mavlink_msg_rc_channels_scaled.h @@ -15,7 +15,7 @@ typedef struct __mavlink_rc_channels_scaled_t { int16_t chan7_scaled; /*< RC channel 7 value scaled.*/ int16_t chan8_scaled; /*< RC channel 8 value scaled.*/ uint8_t port; /*< Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX.*/ - uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown.*/ + uint8_t rssi; /*< Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown.*/ } mavlink_rc_channels_scaled_t; #define MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN 22 @@ -81,7 +81,7 @@ typedef struct __mavlink_rc_channels_scaled_t { * @param chan6_scaled RC channel 6 value scaled. * @param chan7_scaled RC channel 7 value scaled. * @param chan8_scaled RC channel 8 value scaled. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -140,7 +140,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack(uint8_t system_id, ui * @param chan6_scaled RC channel 6 value scaled. * @param chan7_scaled RC channel 7 value scaled. * @param chan8_scaled RC channel 8 value scaled. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -202,7 +202,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_status(uint8_t system * @param chan6_scaled RC channel 6 value scaled. * @param chan7_scaled RC channel 7 value scaled. * @param chan8_scaled RC channel 8 value scaled. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_rc_channels_scaled_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -300,7 +300,7 @@ static inline uint16_t mavlink_msg_rc_channels_scaled_encode_status(uint8_t syst * @param chan6_scaled RC channel 6 value scaled. * @param chan7_scaled RC channel 7 value scaled. * @param chan8_scaled RC channel 8 value scaled. - * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @param rssi Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -505,7 +505,7 @@ static inline int16_t mavlink_msg_rc_channels_scaled_get_chan8_scaled(const mavl /** * @brief Get field rssi from rc_channels_scaled message * - * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. + * @return Receive signal strength indicator in device-dependent units/scale. Values: [0-254], 255: invalid/unknown. */ static inline uint8_t mavlink_msg_rc_channels_scaled_get_rssi(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_relay_status.h b/common/mavlink_msg_relay_status.h new file mode 100644 index 000000000..8be617e4b --- /dev/null +++ b/common/mavlink_msg_relay_status.h @@ -0,0 +1,316 @@ +#pragma once +// MESSAGE RELAY_STATUS PACKING + +#define MAVLINK_MSG_ID_RELAY_STATUS 376 + + +typedef struct __mavlink_relay_status_t { + uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ + uint16_t on; /*< Relay states. Relay instance numbers are represented as individual bits in this mask by offset.*/ + uint16_t present; /*< Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured.*/ +} mavlink_relay_status_t; + +#define MAVLINK_MSG_ID_RELAY_STATUS_LEN 8 +#define MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN 8 +#define MAVLINK_MSG_ID_376_LEN 8 +#define MAVLINK_MSG_ID_376_MIN_LEN 8 + +#define MAVLINK_MSG_ID_RELAY_STATUS_CRC 199 +#define MAVLINK_MSG_ID_376_CRC 199 + + + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_RELAY_STATUS { \ + 376, \ + "RELAY_STATUS", \ + 3, \ + { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_relay_status_t, time_boot_ms) }, \ + { "on", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_relay_status_t, on) }, \ + { "present", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_relay_status_t, present) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_RELAY_STATUS { \ + "RELAY_STATUS", \ + 3, \ + { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_relay_status_t, time_boot_ms) }, \ + { "on", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_relay_status_t, on) }, \ + { "present", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_relay_status_t, present) }, \ + } \ +} +#endif + +/** + * @brief Pack a relay_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param on Relay states. Relay instance numbers are represented as individual bits in this mask by offset. + * @param present Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_relay_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint32_t time_boot_ms, uint16_t on, uint16_t present) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RELAY_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_uint16_t(buf, 4, on); + _mav_put_uint16_t(buf, 6, present); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#else + mavlink_relay_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.on = on; + packet.present = present; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RELAY_STATUS; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +} + +/** + * @brief Pack a relay_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param on Relay states. Relay instance numbers are represented as individual bits in this mask by offset. + * @param present Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_relay_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint32_t time_boot_ms, uint16_t on, uint16_t present) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RELAY_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_uint16_t(buf, 4, on); + _mav_put_uint16_t(buf, 6, present); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#else + mavlink_relay_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.on = on; + packet.present = present; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RELAY_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#endif +} + +/** + * @brief Pack a relay_status message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param on Relay states. Relay instance numbers are represented as individual bits in this mask by offset. + * @param present Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_relay_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint32_t time_boot_ms,uint16_t on,uint16_t present) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RELAY_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_uint16_t(buf, 4, on); + _mav_put_uint16_t(buf, 6, present); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#else + mavlink_relay_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.on = on; + packet.present = present; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RELAY_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_RELAY_STATUS; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +} + +/** + * @brief Encode a relay_status struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param relay_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_relay_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_relay_status_t* relay_status) +{ + return mavlink_msg_relay_status_pack(system_id, component_id, msg, relay_status->time_boot_ms, relay_status->on, relay_status->present); +} + +/** + * @brief Encode a relay_status struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param relay_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_relay_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_relay_status_t* relay_status) +{ + return mavlink_msg_relay_status_pack_chan(system_id, component_id, chan, msg, relay_status->time_boot_ms, relay_status->on, relay_status->present); +} + +/** + * @brief Encode a relay_status struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param relay_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_relay_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_relay_status_t* relay_status) +{ + return mavlink_msg_relay_status_pack_status(system_id, component_id, _status, msg, relay_status->time_boot_ms, relay_status->on, relay_status->present); +} + +/** + * @brief Send a relay_status message + * @param chan MAVLink channel to send the message + * + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param on Relay states. Relay instance numbers are represented as individual bits in this mask by offset. + * @param present Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_relay_status_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint16_t on, uint16_t present) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_RELAY_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_uint16_t(buf, 4, on); + _mav_put_uint16_t(buf, 6, present); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RELAY_STATUS, buf, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#else + mavlink_relay_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.on = on; + packet.present = present; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RELAY_STATUS, (const char *)&packet, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#endif +} + +/** + * @brief Send a relay_status message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_relay_status_send_struct(mavlink_channel_t chan, const mavlink_relay_status_t* relay_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_relay_status_send(chan, relay_status->time_boot_ms, relay_status->on, relay_status->present); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RELAY_STATUS, (const char *)relay_status, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#endif +} + +#if MAVLINK_MSG_ID_RELAY_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_relay_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint16_t on, uint16_t present) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_uint16_t(buf, 4, on); + _mav_put_uint16_t(buf, 6, present); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RELAY_STATUS, buf, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#else + mavlink_relay_status_t *packet = (mavlink_relay_status_t *)msgbuf; + packet->time_boot_ms = time_boot_ms; + packet->on = on; + packet->present = present; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RELAY_STATUS, (const char *)packet, MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN, MAVLINK_MSG_ID_RELAY_STATUS_LEN, MAVLINK_MSG_ID_RELAY_STATUS_CRC); +#endif +} +#endif + +#endif + +// MESSAGE RELAY_STATUS UNPACKING + + +/** + * @brief Get field time_boot_ms from relay_status message + * + * @return [ms] Timestamp (time since system boot). + */ +static inline uint32_t mavlink_msg_relay_status_get_time_boot_ms(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field on from relay_status message + * + * @return Relay states. Relay instance numbers are represented as individual bits in this mask by offset. + */ +static inline uint16_t mavlink_msg_relay_status_get_on(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 4); +} + +/** + * @brief Get field present from relay_status message + * + * @return Relay present. Relay instance numbers are represented as individual bits in this mask by offset. Bits will be true if a relay instance is configured. + */ +static inline uint16_t mavlink_msg_relay_status_get_present(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 6); +} + +/** + * @brief Decode a relay_status message into a struct + * + * @param msg The message to decode + * @param relay_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_relay_status_decode(const mavlink_message_t* msg, mavlink_relay_status_t* relay_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + relay_status->time_boot_ms = mavlink_msg_relay_status_get_time_boot_ms(msg); + relay_status->on = mavlink_msg_relay_status_get_on(msg); + relay_status->present = mavlink_msg_relay_status_get_present(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_RELAY_STATUS_LEN? msg->len : MAVLINK_MSG_ID_RELAY_STATUS_LEN; + memset(relay_status, 0, MAVLINK_MSG_ID_RELAY_STATUS_LEN); + memcpy(relay_status, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/common/mavlink_msg_request_event.h b/common/mavlink_msg_request_event.h deleted file mode 100644 index 5aebfb263..000000000 --- a/common/mavlink_msg_request_event.h +++ /dev/null @@ -1,344 +0,0 @@ -#pragma once -// MESSAGE REQUEST_EVENT PACKING - -#define MAVLINK_MSG_ID_REQUEST_EVENT 412 - - -typedef struct __mavlink_request_event_t { - uint16_t first_sequence; /*< First sequence number of the requested event.*/ - uint16_t last_sequence; /*< Last sequence number of the requested event.*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_request_event_t; - -#define MAVLINK_MSG_ID_REQUEST_EVENT_LEN 6 -#define MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN 6 -#define MAVLINK_MSG_ID_412_LEN 6 -#define MAVLINK_MSG_ID_412_MIN_LEN 6 - -#define MAVLINK_MSG_ID_REQUEST_EVENT_CRC 33 -#define MAVLINK_MSG_ID_412_CRC 33 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_REQUEST_EVENT { \ - 412, \ - "REQUEST_EVENT", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_request_event_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_request_event_t, target_component) }, \ - { "first_sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_request_event_t, first_sequence) }, \ - { "last_sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_request_event_t, last_sequence) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_REQUEST_EVENT { \ - "REQUEST_EVENT", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_request_event_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_request_event_t, target_component) }, \ - { "first_sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_request_event_t, first_sequence) }, \ - { "last_sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_request_event_t, last_sequence) }, \ - } \ -} -#endif - -/** - * @brief Pack a request_event message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param first_sequence First sequence number of the requested event. - * @param last_sequence Last sequence number of the requested event. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_request_event_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t first_sequence, uint16_t last_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_REQUEST_EVENT_LEN]; - _mav_put_uint16_t(buf, 0, first_sequence); - _mav_put_uint16_t(buf, 2, last_sequence); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#else - mavlink_request_event_t packet; - packet.first_sequence = first_sequence; - packet.last_sequence = last_sequence; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_REQUEST_EVENT; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -} - -/** - * @brief Pack a request_event message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param first_sequence First sequence number of the requested event. - * @param last_sequence Last sequence number of the requested event. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_request_event_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t first_sequence, uint16_t last_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_REQUEST_EVENT_LEN]; - _mav_put_uint16_t(buf, 0, first_sequence); - _mav_put_uint16_t(buf, 2, last_sequence); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#else - mavlink_request_event_t packet; - packet.first_sequence = first_sequence; - packet.last_sequence = last_sequence; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_REQUEST_EVENT; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#endif -} - -/** - * @brief Pack a request_event message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param first_sequence First sequence number of the requested event. - * @param last_sequence Last sequence number of the requested event. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_request_event_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t first_sequence,uint16_t last_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_REQUEST_EVENT_LEN]; - _mav_put_uint16_t(buf, 0, first_sequence); - _mav_put_uint16_t(buf, 2, last_sequence); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#else - mavlink_request_event_t packet; - packet.first_sequence = first_sequence; - packet.last_sequence = last_sequence; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_REQUEST_EVENT; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -} - -/** - * @brief Encode a request_event struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param request_event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_request_event_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_request_event_t* request_event) -{ - return mavlink_msg_request_event_pack(system_id, component_id, msg, request_event->target_system, request_event->target_component, request_event->first_sequence, request_event->last_sequence); -} - -/** - * @brief Encode a request_event struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param request_event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_request_event_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_request_event_t* request_event) -{ - return mavlink_msg_request_event_pack_chan(system_id, component_id, chan, msg, request_event->target_system, request_event->target_component, request_event->first_sequence, request_event->last_sequence); -} - -/** - * @brief Encode a request_event struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param request_event C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_request_event_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_request_event_t* request_event) -{ - return mavlink_msg_request_event_pack_status(system_id, component_id, _status, msg, request_event->target_system, request_event->target_component, request_event->first_sequence, request_event->last_sequence); -} - -/** - * @brief Send a request_event message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param first_sequence First sequence number of the requested event. - * @param last_sequence Last sequence number of the requested event. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_request_event_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t first_sequence, uint16_t last_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_REQUEST_EVENT_LEN]; - _mav_put_uint16_t(buf, 0, first_sequence); - _mav_put_uint16_t(buf, 2, last_sequence); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_EVENT, buf, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#else - mavlink_request_event_t packet; - packet.first_sequence = first_sequence; - packet.last_sequence = last_sequence; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_EVENT, (const char *)&packet, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#endif -} - -/** - * @brief Send a request_event message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_request_event_send_struct(mavlink_channel_t chan, const mavlink_request_event_t* request_event) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_request_event_send(chan, request_event->target_system, request_event->target_component, request_event->first_sequence, request_event->last_sequence); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_EVENT, (const char *)request_event, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#endif -} - -#if MAVLINK_MSG_ID_REQUEST_EVENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_request_event_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t first_sequence, uint16_t last_sequence) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, first_sequence); - _mav_put_uint16_t(buf, 2, last_sequence); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_EVENT, buf, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#else - mavlink_request_event_t *packet = (mavlink_request_event_t *)msgbuf; - packet->first_sequence = first_sequence; - packet->last_sequence = last_sequence; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_REQUEST_EVENT, (const char *)packet, MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_LEN, MAVLINK_MSG_ID_REQUEST_EVENT_CRC); -#endif -} -#endif - -#endif - -// MESSAGE REQUEST_EVENT UNPACKING - - -/** - * @brief Get field target_system from request_event message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_request_event_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from request_event message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_request_event_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field first_sequence from request_event message - * - * @return First sequence number of the requested event. - */ -static inline uint16_t mavlink_msg_request_event_get_first_sequence(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field last_sequence from request_event message - * - * @return Last sequence number of the requested event. - */ -static inline uint16_t mavlink_msg_request_event_get_last_sequence(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Decode a request_event message into a struct - * - * @param msg The message to decode - * @param request_event C-struct to decode the message contents into - */ -static inline void mavlink_msg_request_event_decode(const mavlink_message_t* msg, mavlink_request_event_t* request_event) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - request_event->first_sequence = mavlink_msg_request_event_get_first_sequence(msg); - request_event->last_sequence = mavlink_msg_request_event_get_last_sequence(msg); - request_event->target_system = mavlink_msg_request_event_get_target_system(msg); - request_event->target_component = mavlink_msg_request_event_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_REQUEST_EVENT_LEN? msg->len : MAVLINK_MSG_ID_REQUEST_EVENT_LEN; - memset(request_event, 0, MAVLINK_MSG_ID_REQUEST_EVENT_LEN); - memcpy(request_event, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_response_event_error.h b/common/mavlink_msg_response_event_error.h deleted file mode 100644 index e0079421f..000000000 --- a/common/mavlink_msg_response_event_error.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -// MESSAGE RESPONSE_EVENT_ERROR PACKING - -#define MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR 413 - - -typedef struct __mavlink_response_event_error_t { - uint16_t sequence; /*< Sequence number.*/ - uint16_t sequence_oldest_available; /*< Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT.*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - uint8_t reason; /*< Error reason.*/ -} mavlink_response_event_error_t; - -#define MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN 7 -#define MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN 7 -#define MAVLINK_MSG_ID_413_LEN 7 -#define MAVLINK_MSG_ID_413_MIN_LEN 7 - -#define MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC 77 -#define MAVLINK_MSG_ID_413_CRC 77 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR { \ - 413, \ - "RESPONSE_EVENT_ERROR", \ - 5, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_response_event_error_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_response_event_error_t, target_component) }, \ - { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_response_event_error_t, sequence) }, \ - { "sequence_oldest_available", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_response_event_error_t, sequence_oldest_available) }, \ - { "reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_response_event_error_t, reason) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR { \ - "RESPONSE_EVENT_ERROR", \ - 5, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_response_event_error_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_response_event_error_t, target_component) }, \ - { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_response_event_error_t, sequence) }, \ - { "sequence_oldest_available", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_response_event_error_t, sequence_oldest_available) }, \ - { "reason", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_response_event_error_t, reason) }, \ - } \ -} -#endif - -/** - * @brief Pack a response_event_error message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param sequence Sequence number. - * @param sequence_oldest_available Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - * @param reason Error reason. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_response_event_error_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t sequence, uint16_t sequence_oldest_available, uint8_t reason) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint16_t(buf, 2, sequence_oldest_available); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 6, reason); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#else - mavlink_response_event_error_t packet; - packet.sequence = sequence; - packet.sequence_oldest_available = sequence_oldest_available; - packet.target_system = target_system; - packet.target_component = target_component; - packet.reason = reason; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -} - -/** - * @brief Pack a response_event_error message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param sequence Sequence number. - * @param sequence_oldest_available Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - * @param reason Error reason. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_response_event_error_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t sequence, uint16_t sequence_oldest_available, uint8_t reason) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint16_t(buf, 2, sequence_oldest_available); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 6, reason); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#else - mavlink_response_event_error_t packet; - packet.sequence = sequence; - packet.sequence_oldest_available = sequence_oldest_available; - packet.target_system = target_system; - packet.target_component = target_component; - packet.reason = reason; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#endif -} - -/** - * @brief Pack a response_event_error message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param sequence Sequence number. - * @param sequence_oldest_available Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - * @param reason Error reason. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_response_event_error_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t sequence,uint16_t sequence_oldest_available,uint8_t reason) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint16_t(buf, 2, sequence_oldest_available); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 6, reason); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#else - mavlink_response_event_error_t packet; - packet.sequence = sequence; - packet.sequence_oldest_available = sequence_oldest_available; - packet.target_system = target_system; - packet.target_component = target_component; - packet.reason = reason; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -} - -/** - * @brief Encode a response_event_error struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param response_event_error C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_response_event_error_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_response_event_error_t* response_event_error) -{ - return mavlink_msg_response_event_error_pack(system_id, component_id, msg, response_event_error->target_system, response_event_error->target_component, response_event_error->sequence, response_event_error->sequence_oldest_available, response_event_error->reason); -} - -/** - * @brief Encode a response_event_error struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param response_event_error C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_response_event_error_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_response_event_error_t* response_event_error) -{ - return mavlink_msg_response_event_error_pack_chan(system_id, component_id, chan, msg, response_event_error->target_system, response_event_error->target_component, response_event_error->sequence, response_event_error->sequence_oldest_available, response_event_error->reason); -} - -/** - * @brief Encode a response_event_error struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param response_event_error C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_response_event_error_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_response_event_error_t* response_event_error) -{ - return mavlink_msg_response_event_error_pack_status(system_id, component_id, _status, msg, response_event_error->target_system, response_event_error->target_component, response_event_error->sequence, response_event_error->sequence_oldest_available, response_event_error->reason); -} - -/** - * @brief Send a response_event_error message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param sequence Sequence number. - * @param sequence_oldest_available Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - * @param reason Error reason. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_response_event_error_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t sequence, uint16_t sequence_oldest_available, uint8_t reason) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN]; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint16_t(buf, 2, sequence_oldest_available); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 6, reason); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR, buf, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#else - mavlink_response_event_error_t packet; - packet.sequence = sequence; - packet.sequence_oldest_available = sequence_oldest_available; - packet.target_system = target_system; - packet.target_component = target_component; - packet.reason = reason; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR, (const char *)&packet, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#endif -} - -/** - * @brief Send a response_event_error message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_response_event_error_send_struct(mavlink_channel_t chan, const mavlink_response_event_error_t* response_event_error) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_response_event_error_send(chan, response_event_error->target_system, response_event_error->target_component, response_event_error->sequence, response_event_error->sequence_oldest_available, response_event_error->reason); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR, (const char *)response_event_error, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#endif -} - -#if MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_response_event_error_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t sequence, uint16_t sequence_oldest_available, uint8_t reason) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, sequence); - _mav_put_uint16_t(buf, 2, sequence_oldest_available); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 6, reason); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR, buf, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#else - mavlink_response_event_error_t *packet = (mavlink_response_event_error_t *)msgbuf; - packet->sequence = sequence; - packet->sequence_oldest_available = sequence_oldest_available; - packet->target_system = target_system; - packet->target_component = target_component; - packet->reason = reason; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR, (const char *)packet, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_CRC); -#endif -} -#endif - -#endif - -// MESSAGE RESPONSE_EVENT_ERROR UNPACKING - - -/** - * @brief Get field target_system from response_event_error message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_response_event_error_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from response_event_error message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_response_event_error_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field sequence from response_event_error message - * - * @return Sequence number. - */ -static inline uint16_t mavlink_msg_response_event_error_get_sequence(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field sequence_oldest_available from response_event_error message - * - * @return Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - */ -static inline uint16_t mavlink_msg_response_event_error_get_sequence_oldest_available(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Get field reason from response_event_error message - * - * @return Error reason. - */ -static inline uint8_t mavlink_msg_response_event_error_get_reason(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Decode a response_event_error message into a struct - * - * @param msg The message to decode - * @param response_event_error C-struct to decode the message contents into - */ -static inline void mavlink_msg_response_event_error_decode(const mavlink_message_t* msg, mavlink_response_event_error_t* response_event_error) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - response_event_error->sequence = mavlink_msg_response_event_error_get_sequence(msg); - response_event_error->sequence_oldest_available = mavlink_msg_response_event_error_get_sequence_oldest_available(msg); - response_event_error->target_system = mavlink_msg_response_event_error_get_target_system(msg); - response_event_error->target_component = mavlink_msg_response_event_error_get_target_component(msg); - response_event_error->reason = mavlink_msg_response_event_error_get_reason(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN? msg->len : MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN; - memset(response_event_error, 0, MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_LEN); - memcpy(response_event_error, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_serial_control.h b/common/mavlink_msg_serial_control.h index 90b539434..e4dbb0d96 100644 --- a/common/mavlink_msg_serial_control.h +++ b/common/mavlink_msg_serial_control.h @@ -11,13 +11,11 @@ typedef struct __mavlink_serial_control_t { uint8_t flags; /*< Bitmap of serial control flags.*/ uint8_t count; /*< [bytes] how many bytes in this transfer*/ uint8_t data[70]; /*< serial data*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ } mavlink_serial_control_t; -#define MAVLINK_MSG_ID_SERIAL_CONTROL_LEN 81 +#define MAVLINK_MSG_ID_SERIAL_CONTROL_LEN 79 #define MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN 79 -#define MAVLINK_MSG_ID_126_LEN 81 +#define MAVLINK_MSG_ID_126_LEN 79 #define MAVLINK_MSG_ID_126_MIN_LEN 79 #define MAVLINK_MSG_ID_SERIAL_CONTROL_CRC 220 @@ -29,29 +27,25 @@ typedef struct __mavlink_serial_control_t { #define MAVLINK_MESSAGE_INFO_SERIAL_CONTROL { \ 126, \ "SERIAL_CONTROL", \ - 8, \ + 6, \ { { "device", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_control_t, device) }, \ { "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_control_t, flags) }, \ { "timeout", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_serial_control_t, timeout) }, \ { "baudrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_control_t, baudrate) }, \ { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_serial_control_t, count) }, \ { "data", NULL, MAVLINK_TYPE_UINT8_T, 70, 9, offsetof(mavlink_serial_control_t, data) }, \ - { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 79, offsetof(mavlink_serial_control_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 80, offsetof(mavlink_serial_control_t, target_component) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_SERIAL_CONTROL { \ "SERIAL_CONTROL", \ - 8, \ + 6, \ { { "device", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_control_t, device) }, \ { "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_control_t, flags) }, \ { "timeout", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_serial_control_t, timeout) }, \ { "baudrate", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_control_t, baudrate) }, \ { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_serial_control_t, count) }, \ { "data", NULL, MAVLINK_TYPE_UINT8_T, 70, 9, offsetof(mavlink_serial_control_t, data) }, \ - { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 79, offsetof(mavlink_serial_control_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 80, offsetof(mavlink_serial_control_t, target_component) }, \ } \ } #endif @@ -68,12 +62,10 @@ typedef struct __mavlink_serial_control_t { * @param baudrate [bits/s] Baudrate of transfer. Zero means no change. * @param count [bytes] how many bytes in this transfer * @param data serial data - * @param target_system System ID - * @param target_component Component ID * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_serial_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data, uint8_t target_system, uint8_t target_component) + uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SERIAL_CONTROL_LEN]; @@ -82,8 +74,6 @@ static inline uint16_t mavlink_msg_serial_control_pack(uint8_t system_id, uint8_ _mav_put_uint8_t(buf, 6, device); _mav_put_uint8_t(buf, 7, flags); _mav_put_uint8_t(buf, 8, count); - _mav_put_uint8_t(buf, 79, target_system); - _mav_put_uint8_t(buf, 80, target_component); _mav_put_uint8_t_array(buf, 9, data, 70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #else @@ -93,8 +83,6 @@ static inline uint16_t mavlink_msg_serial_control_pack(uint8_t system_id, uint8_ packet.device = device; packet.flags = flags; packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; mav_array_memcpy(packet.data, data, sizeof(uint8_t)*70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #endif @@ -116,12 +104,10 @@ static inline uint16_t mavlink_msg_serial_control_pack(uint8_t system_id, uint8_ * @param baudrate [bits/s] Baudrate of transfer. Zero means no change. * @param count [bytes] how many bytes in this transfer * @param data serial data - * @param target_system System ID - * @param target_component Component ID * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_serial_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data, uint8_t target_system, uint8_t target_component) + uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SERIAL_CONTROL_LEN]; @@ -130,8 +116,6 @@ static inline uint16_t mavlink_msg_serial_control_pack_status(uint8_t system_id, _mav_put_uint8_t(buf, 6, device); _mav_put_uint8_t(buf, 7, flags); _mav_put_uint8_t(buf, 8, count); - _mav_put_uint8_t(buf, 79, target_system); - _mav_put_uint8_t(buf, 80, target_component); _mav_put_uint8_t_array(buf, 9, data, 70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #else @@ -141,8 +125,6 @@ static inline uint16_t mavlink_msg_serial_control_pack_status(uint8_t system_id, packet.device = device; packet.flags = flags; packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; mav_array_memcpy(packet.data, data, sizeof(uint8_t)*70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #endif @@ -167,13 +149,11 @@ static inline uint16_t mavlink_msg_serial_control_pack_status(uint8_t system_id, * @param baudrate [bits/s] Baudrate of transfer. Zero means no change. * @param count [bytes] how many bytes in this transfer * @param data serial data - * @param target_system System ID - * @param target_component Component ID * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_serial_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t device,uint8_t flags,uint16_t timeout,uint32_t baudrate,uint8_t count,const uint8_t *data,uint8_t target_system,uint8_t target_component) + uint8_t device,uint8_t flags,uint16_t timeout,uint32_t baudrate,uint8_t count,const uint8_t *data) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SERIAL_CONTROL_LEN]; @@ -182,8 +162,6 @@ static inline uint16_t mavlink_msg_serial_control_pack_chan(uint8_t system_id, u _mav_put_uint8_t(buf, 6, device); _mav_put_uint8_t(buf, 7, flags); _mav_put_uint8_t(buf, 8, count); - _mav_put_uint8_t(buf, 79, target_system); - _mav_put_uint8_t(buf, 80, target_component); _mav_put_uint8_t_array(buf, 9, data, 70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #else @@ -193,8 +171,6 @@ static inline uint16_t mavlink_msg_serial_control_pack_chan(uint8_t system_id, u packet.device = device; packet.flags = flags; packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; mav_array_memcpy(packet.data, data, sizeof(uint8_t)*70); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); #endif @@ -213,7 +189,7 @@ static inline uint16_t mavlink_msg_serial_control_pack_chan(uint8_t system_id, u */ static inline uint16_t mavlink_msg_serial_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_control_t* serial_control) { - return mavlink_msg_serial_control_pack(system_id, component_id, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data, serial_control->target_system, serial_control->target_component); + return mavlink_msg_serial_control_pack(system_id, component_id, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data); } /** @@ -227,7 +203,7 @@ static inline uint16_t mavlink_msg_serial_control_encode(uint8_t system_id, uint */ static inline uint16_t mavlink_msg_serial_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_control_t* serial_control) { - return mavlink_msg_serial_control_pack_chan(system_id, component_id, chan, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data, serial_control->target_system, serial_control->target_component); + return mavlink_msg_serial_control_pack_chan(system_id, component_id, chan, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data); } /** @@ -241,7 +217,7 @@ static inline uint16_t mavlink_msg_serial_control_encode_chan(uint8_t system_id, */ static inline uint16_t mavlink_msg_serial_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_control_t* serial_control) { - return mavlink_msg_serial_control_pack_status(system_id, component_id, _status, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data, serial_control->target_system, serial_control->target_component); + return mavlink_msg_serial_control_pack_status(system_id, component_id, _status, msg, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data); } /** @@ -254,12 +230,10 @@ static inline uint16_t mavlink_msg_serial_control_encode_status(uint8_t system_i * @param baudrate [bits/s] Baudrate of transfer. Zero means no change. * @param count [bytes] how many bytes in this transfer * @param data serial data - * @param target_system System ID - * @param target_component Component ID */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_serial_control_send(mavlink_channel_t chan, uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data, uint8_t target_system, uint8_t target_component) +static inline void mavlink_msg_serial_control_send(mavlink_channel_t chan, uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SERIAL_CONTROL_LEN]; @@ -268,8 +242,6 @@ static inline void mavlink_msg_serial_control_send(mavlink_channel_t chan, uint8 _mav_put_uint8_t(buf, 6, device); _mav_put_uint8_t(buf, 7, flags); _mav_put_uint8_t(buf, 8, count); - _mav_put_uint8_t(buf, 79, target_system); - _mav_put_uint8_t(buf, 80, target_component); _mav_put_uint8_t_array(buf, 9, data, 70); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_CONTROL, buf, MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_CRC); #else @@ -279,8 +251,6 @@ static inline void mavlink_msg_serial_control_send(mavlink_channel_t chan, uint8 packet.device = device; packet.flags = flags; packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; mav_array_memcpy(packet.data, data, sizeof(uint8_t)*70); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_CRC); #endif @@ -294,7 +264,7 @@ static inline void mavlink_msg_serial_control_send(mavlink_channel_t chan, uint8 static inline void mavlink_msg_serial_control_send_struct(mavlink_channel_t chan, const mavlink_serial_control_t* serial_control) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_control_send(chan, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data, serial_control->target_system, serial_control->target_component); + mavlink_msg_serial_control_send(chan, serial_control->device, serial_control->flags, serial_control->timeout, serial_control->baudrate, serial_control->count, serial_control->data); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_CONTROL, (const char *)serial_control, MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_CRC); #endif @@ -308,7 +278,7 @@ static inline void mavlink_msg_serial_control_send_struct(mavlink_channel_t chan is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_serial_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data, uint8_t target_system, uint8_t target_component) +static inline void mavlink_msg_serial_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate, uint8_t count, const uint8_t *data) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -317,8 +287,6 @@ static inline void mavlink_msg_serial_control_send_buf(mavlink_message_t *msgbuf _mav_put_uint8_t(buf, 6, device); _mav_put_uint8_t(buf, 7, flags); _mav_put_uint8_t(buf, 8, count); - _mav_put_uint8_t(buf, 79, target_system); - _mav_put_uint8_t(buf, 80, target_component); _mav_put_uint8_t_array(buf, 9, data, 70); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_CONTROL, buf, MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_CRC); #else @@ -328,8 +296,6 @@ static inline void mavlink_msg_serial_control_send_buf(mavlink_message_t *msgbuf packet->device = device; packet->flags = flags; packet->count = count; - packet->target_system = target_system; - packet->target_component = target_component; mav_array_memcpy(packet->data, data, sizeof(uint8_t)*70); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_CONTROL, (const char *)packet, MAVLINK_MSG_ID_SERIAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN, MAVLINK_MSG_ID_SERIAL_CONTROL_CRC); #endif @@ -401,26 +367,6 @@ static inline uint16_t mavlink_msg_serial_control_get_data(const mavlink_message return _MAV_RETURN_uint8_t_array(msg, data, 70, 9); } -/** - * @brief Get field target_system from serial_control message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_serial_control_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 79); -} - -/** - * @brief Get field target_component from serial_control message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_serial_control_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 80); -} - /** * @brief Decode a serial_control message into a struct * @@ -436,8 +382,6 @@ static inline void mavlink_msg_serial_control_decode(const mavlink_message_t* ms serial_control->flags = mavlink_msg_serial_control_get_flags(msg); serial_control->count = mavlink_msg_serial_control_get_count(msg); mavlink_msg_serial_control_get_data(msg, serial_control->data); - serial_control->target_system = mavlink_msg_serial_control_get_target_system(msg); - serial_control->target_component = mavlink_msg_serial_control_get_target_component(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_CONTROL_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_CONTROL_LEN; memset(serial_control, 0, MAVLINK_MSG_ID_SERIAL_CONTROL_LEN); diff --git a/common/mavlink_msg_set_attitude_target.h b/common/mavlink_msg_set_attitude_target.h index a9c7ce027..e97db3933 100644 --- a/common/mavlink_msg_set_attitude_target.h +++ b/common/mavlink_msg_set_attitude_target.h @@ -3,10 +3,10 @@ #define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET 82 -MAVPACKED( + typedef struct __mavlink_set_attitude_target_t { uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD*/ + float q[4]; /*< Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ float body_roll_rate; /*< [rad/s] Body roll rate*/ float body_pitch_rate; /*< [rad/s] Body pitch rate*/ float body_yaw_rate; /*< [rad/s] Body yaw rate*/ @@ -14,25 +14,23 @@ typedef struct __mavlink_set_attitude_target_t { uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ uint8_t type_mask; /*< Bitmap to indicate which dimensions should be ignored by the vehicle.*/ - float thrust_body[3]; /*< 3D thrust setpoint in the body NED frame, normalized to -1 .. 1*/ -}) mavlink_set_attitude_target_t; +} mavlink_set_attitude_target_t; -#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN 51 +#define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN 39 #define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN 39 -#define MAVLINK_MSG_ID_82_LEN 51 +#define MAVLINK_MSG_ID_82_LEN 39 #define MAVLINK_MSG_ID_82_MIN_LEN 39 #define MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC 49 #define MAVLINK_MSG_ID_82_CRC 49 #define MAVLINK_MSG_SET_ATTITUDE_TARGET_FIELD_Q_LEN 4 -#define MAVLINK_MSG_SET_ATTITUDE_TARGET_FIELD_THRUST_BODY_LEN 3 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET { \ 82, \ "SET_ATTITUDE_TARGET", \ - 10, \ + 9, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_set_attitude_target_t, time_boot_ms) }, \ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_set_attitude_target_t, target_component) }, \ @@ -42,13 +40,12 @@ typedef struct __mavlink_set_attitude_target_t { { "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_set_attitude_target_t, body_pitch_rate) }, \ { "body_yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_set_attitude_target_t, body_yaw_rate) }, \ { "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_set_attitude_target_t, thrust) }, \ - { "thrust_body", NULL, MAVLINK_TYPE_FLOAT, 3, 39, offsetof(mavlink_set_attitude_target_t, thrust_body) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET { \ "SET_ATTITUDE_TARGET", \ - 10, \ + 9, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_set_attitude_target_t, time_boot_ms) }, \ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_set_attitude_target_t, target_system) }, \ { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_set_attitude_target_t, target_component) }, \ @@ -58,7 +55,6 @@ typedef struct __mavlink_set_attitude_target_t { { "body_pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_set_attitude_target_t, body_pitch_rate) }, \ { "body_yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_set_attitude_target_t, body_yaw_rate) }, \ { "thrust", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_set_attitude_target_t, thrust) }, \ - { "thrust_body", NULL, MAVLINK_TYPE_FLOAT, 3, 39, offsetof(mavlink_set_attitude_target_t, thrust_body) }, \ } \ } #endif @@ -73,16 +69,15 @@ typedef struct __mavlink_set_attitude_target_t { * @param target_system System ID * @param target_component Component ID * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD + * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) * @param body_roll_rate [rad/s] Body roll rate * @param body_pitch_rate [rad/s] Body pitch rate * @param body_yaw_rate [rad/s] Body yaw rate * @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - * @param thrust_body 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust, const float *thrust_body) + uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN]; @@ -95,7 +90,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint8_t system_id, u _mav_put_uint8_t(buf, 37, target_component); _mav_put_uint8_t(buf, 38, type_mask); _mav_put_float_array(buf, 4, q, 4); - _mav_put_float_array(buf, 39, thrust_body, 3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #else mavlink_set_attitude_target_t packet; @@ -108,7 +102,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint8_t system_id, u packet.target_component = target_component; packet.type_mask = type_mask; mav_array_memcpy(packet.q, q, sizeof(float)*4); - mav_array_memcpy(packet.thrust_body, thrust_body, sizeof(float)*3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #endif @@ -127,16 +120,15 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack(uint8_t system_id, u * @param target_system System ID * @param target_component Component ID * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD + * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) * @param body_roll_rate [rad/s] Body roll rate * @param body_pitch_rate [rad/s] Body pitch rate * @param body_yaw_rate [rad/s] Body yaw rate * @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - * @param thrust_body 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_set_attitude_target_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust, const float *thrust_body) + uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN]; @@ -149,7 +141,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_status(uint8_t syste _mav_put_uint8_t(buf, 37, target_component); _mav_put_uint8_t(buf, 38, type_mask); _mav_put_float_array(buf, 4, q, 4); - _mav_put_float_array(buf, 39, thrust_body, 3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #else mavlink_set_attitude_target_t packet; @@ -162,7 +153,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_status(uint8_t syste packet.target_component = target_component; packet.type_mask = type_mask; mav_array_memcpy(packet.q, q, sizeof(float)*4); - mav_array_memcpy(packet.thrust_body, thrust_body, sizeof(float)*3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #endif @@ -184,17 +174,16 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_status(uint8_t syste * @param target_system System ID * @param target_component Component ID * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD + * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) * @param body_roll_rate [rad/s] Body roll rate * @param body_pitch_rate [rad/s] Body pitch rate * @param body_yaw_rate [rad/s] Body yaw rate * @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - * @param thrust_body 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t type_mask,const float *q,float body_roll_rate,float body_pitch_rate,float body_yaw_rate,float thrust,const float *thrust_body) + uint32_t time_boot_ms,uint8_t target_system,uint8_t target_component,uint8_t type_mask,const float *q,float body_roll_rate,float body_pitch_rate,float body_yaw_rate,float thrust) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN]; @@ -207,7 +196,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint8_t system_ _mav_put_uint8_t(buf, 37, target_component); _mav_put_uint8_t(buf, 38, type_mask); _mav_put_float_array(buf, 4, q, 4); - _mav_put_float_array(buf, 39, thrust_body, 3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #else mavlink_set_attitude_target_t packet; @@ -220,7 +208,6 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint8_t system_ packet.target_component = target_component; packet.type_mask = type_mask; mav_array_memcpy(packet.q, q, sizeof(float)*4); - mav_array_memcpy(packet.thrust_body, thrust_body, sizeof(float)*3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); #endif @@ -238,7 +225,7 @@ static inline uint16_t mavlink_msg_set_attitude_target_pack_chan(uint8_t system_ */ static inline uint16_t mavlink_msg_set_attitude_target_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_attitude_target_t* set_attitude_target) { - return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body); + return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust); } /** @@ -252,7 +239,7 @@ static inline uint16_t mavlink_msg_set_attitude_target_encode(uint8_t system_id, */ static inline uint16_t mavlink_msg_set_attitude_target_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_attitude_target_t* set_attitude_target) { - return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body); + return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust); } /** @@ -266,7 +253,7 @@ static inline uint16_t mavlink_msg_set_attitude_target_encode_chan(uint8_t syste */ static inline uint16_t mavlink_msg_set_attitude_target_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_set_attitude_target_t* set_attitude_target) { - return mavlink_msg_set_attitude_target_pack_status(system_id, component_id, _status, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body); + return mavlink_msg_set_attitude_target_pack_status(system_id, component_id, _status, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust); } /** @@ -277,16 +264,15 @@ static inline uint16_t mavlink_msg_set_attitude_target_encode_status(uint8_t sys * @param target_system System ID * @param target_component Component ID * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD + * @param q Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) * @param body_roll_rate [rad/s] Body roll rate * @param body_pitch_rate [rad/s] Body pitch rate * @param body_yaw_rate [rad/s] Body yaw rate * @param thrust Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - * @param thrust_body 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust, const float *thrust_body) +static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN]; @@ -299,7 +285,6 @@ static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, _mav_put_uint8_t(buf, 37, target_component); _mav_put_uint8_t(buf, 38, type_mask); _mav_put_float_array(buf, 4, q, 4); - _mav_put_float_array(buf, 39, thrust_body, 3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC); #else mavlink_set_attitude_target_t packet; @@ -312,7 +297,6 @@ static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, packet.target_component = target_component; packet.type_mask = type_mask; mav_array_memcpy(packet.q, q, sizeof(float)*4); - mav_array_memcpy(packet.thrust_body, thrust_body, sizeof(float)*3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, (const char *)&packet, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC); #endif } @@ -325,7 +309,7 @@ static inline void mavlink_msg_set_attitude_target_send(mavlink_channel_t chan, static inline void mavlink_msg_set_attitude_target_send_struct(mavlink_channel_t chan, const mavlink_set_attitude_target_t* set_attitude_target) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_set_attitude_target_send(chan, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body); + mavlink_msg_set_attitude_target_send(chan, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, (const char *)set_attitude_target, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC); #endif @@ -339,7 +323,7 @@ static inline void mavlink_msg_set_attitude_target_send_struct(mavlink_channel_t is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust, const float *thrust_body) +static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t target_system, uint8_t target_component, uint8_t type_mask, const float *q, float body_roll_rate, float body_pitch_rate, float body_yaw_rate, float thrust) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -352,7 +336,6 @@ static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *m _mav_put_uint8_t(buf, 37, target_component); _mav_put_uint8_t(buf, 38, type_mask); _mav_put_float_array(buf, 4, q, 4); - _mav_put_float_array(buf, 39, thrust_body, 3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, buf, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC); #else mavlink_set_attitude_target_t *packet = (mavlink_set_attitude_target_t *)msgbuf; @@ -365,7 +348,6 @@ static inline void mavlink_msg_set_attitude_target_send_buf(mavlink_message_t *m packet->target_component = target_component; packet->type_mask = type_mask; mav_array_memcpy(packet->q, q, sizeof(float)*4); - mav_array_memcpy(packet->thrust_body, thrust_body, sizeof(float)*3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET, (const char *)packet, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_MIN_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_CRC); #endif } @@ -419,7 +401,7 @@ static inline uint8_t mavlink_msg_set_attitude_target_get_type_mask(const mavlin /** * @brief Get field q from set_attitude_target message * - * @return Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD + * @return Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) */ static inline uint16_t mavlink_msg_set_attitude_target_get_q(const mavlink_message_t* msg, float *q) { @@ -466,16 +448,6 @@ static inline float mavlink_msg_set_attitude_target_get_thrust(const mavlink_mes return _MAV_RETURN_float(msg, 32); } -/** - * @brief Get field thrust_body from set_attitude_target message - * - * @return 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 - */ -static inline uint16_t mavlink_msg_set_attitude_target_get_thrust_body(const mavlink_message_t* msg, float *thrust_body) -{ - return _MAV_RETURN_float_array(msg, thrust_body, 3, 39); -} - /** * @brief Decode a set_attitude_target message into a struct * @@ -494,7 +466,6 @@ static inline void mavlink_msg_set_attitude_target_decode(const mavlink_message_ set_attitude_target->target_system = mavlink_msg_set_attitude_target_get_target_system(msg); set_attitude_target->target_component = mavlink_msg_set_attitude_target_get_target_component(msg); set_attitude_target->type_mask = mavlink_msg_set_attitude_target_get_type_mask(msg); - mavlink_msg_set_attitude_target_get_thrust_body(msg, set_attitude_target->thrust_body); #else uint8_t len = msg->len < MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN? msg->len : MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN; memset(set_attitude_target, 0, MAVLINK_MSG_ID_SET_ATTITUDE_TARGET_LEN); diff --git a/common/mavlink_msg_set_home_position.h b/common/mavlink_msg_set_home_position.h index 5d109273c..c7cf68a69 100644 --- a/common/mavlink_msg_set_home_position.h +++ b/common/mavlink_msg_set_home_position.h @@ -8,9 +8,9 @@ typedef struct __mavlink_set_home_position_t { int32_t latitude; /*< [degE7] Latitude (WGS84)*/ int32_t longitude; /*< [degE7] Longitude (WGS84)*/ int32_t altitude; /*< [mm] Altitude (MSL). Positive for up.*/ - float x; /*< [m] Local X position of this position in the local coordinate frame (NED)*/ - float y; /*< [m] Local Y position of this position in the local coordinate frame (NED)*/ - float z; /*< [m] Local Z position of this position in the local coordinate frame (NED: positive "down")*/ + float x; /*< [m] Local X position of this position in the local coordinate frame*/ + float y; /*< [m] Local Y position of this position in the local coordinate frame*/ + float z; /*< [m] Local Z position of this position in the local coordinate frame*/ float q[4]; /*< World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground*/ float approach_x; /*< [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ float approach_y; /*< [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/ @@ -78,9 +78,9 @@ typedef struct __mavlink_set_home_position_t { * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -138,9 +138,9 @@ static inline uint16_t mavlink_msg_set_home_position_pack(uint8_t system_id, uin * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -201,9 +201,9 @@ static inline uint16_t mavlink_msg_set_home_position_pack_status(uint8_t system_ * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -300,9 +300,9 @@ static inline uint16_t mavlink_msg_set_home_position_encode_status(uint8_t syste * @param latitude [degE7] Latitude (WGS84) * @param longitude [degE7] Longitude (WGS84) * @param altitude [mm] Altitude (MSL). Positive for up. - * @param x [m] Local X position of this position in the local coordinate frame (NED) - * @param y [m] Local Y position of this position in the local coordinate frame (NED) - * @param z [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @param x [m] Local X position of this position in the local coordinate frame + * @param y [m] Local Y position of this position in the local coordinate frame + * @param z [m] Local Z position of this position in the local coordinate frame * @param q World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground * @param approach_x [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. * @param approach_y [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. @@ -452,7 +452,7 @@ static inline int32_t mavlink_msg_set_home_position_get_altitude(const mavlink_m /** * @brief Get field x from set_home_position message * - * @return [m] Local X position of this position in the local coordinate frame (NED) + * @return [m] Local X position of this position in the local coordinate frame */ static inline float mavlink_msg_set_home_position_get_x(const mavlink_message_t* msg) { @@ -462,7 +462,7 @@ static inline float mavlink_msg_set_home_position_get_x(const mavlink_message_t* /** * @brief Get field y from set_home_position message * - * @return [m] Local Y position of this position in the local coordinate frame (NED) + * @return [m] Local Y position of this position in the local coordinate frame */ static inline float mavlink_msg_set_home_position_get_y(const mavlink_message_t* msg) { @@ -472,7 +472,7 @@ static inline float mavlink_msg_set_home_position_get_y(const mavlink_message_t* /** * @brief Get field z from set_home_position message * - * @return [m] Local Z position of this position in the local coordinate frame (NED: positive "down") + * @return [m] Local Z position of this position in the local coordinate frame */ static inline float mavlink_msg_set_home_position_get_z(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_set_position_target_global_int.h b/common/mavlink_msg_set_position_target_global_int.h index 1d992baab..dd7f58f94 100644 --- a/common/mavlink_msg_set_position_target_global_int.h +++ b/common/mavlink_msg_set_position_target_global_int.h @@ -6,8 +6,8 @@ typedef struct __mavlink_set_position_target_global_int_t { uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.*/ - int32_t lat_int; /*< [degE7] Latitude in WGS84 frame*/ - int32_t lon_int; /*< [degE7] Longitude in WGS84 frame*/ + int32_t lat_int; /*< [degE7] X Position in WGS84 frame*/ + int32_t lon_int; /*< [degE7] Y Position in WGS84 frame*/ float alt; /*< [m] Altitude (MSL, Relative to home, or AGL - depending on frame)*/ float vx; /*< [m/s] X velocity in NED frame*/ float vy; /*< [m/s] Y velocity in NED frame*/ @@ -20,7 +20,7 @@ typedef struct __mavlink_set_position_target_global_int_t { uint16_t type_mask; /*< Bitmap to indicate which dimensions should be ignored by the vehicle.*/ uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ - uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)*/ + uint8_t coordinate_frame; /*< Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11*/ } mavlink_set_position_target_global_int_t; #define MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT_LEN 53 @@ -89,10 +89,10 @@ typedef struct __mavlink_set_position_target_global_int_t { * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. * @param target_system System ID * @param target_component Component ID - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, Relative to home, or AGL - depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -163,10 +163,10 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_pack(uint8_t s * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. * @param target_system System ID * @param target_component Component ID - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, Relative to home, or AGL - depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -240,10 +240,10 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_pack_status(ui * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. * @param target_system System ID * @param target_component Component ID - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, Relative to home, or AGL - depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -353,10 +353,10 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_encode_status( * @param time_boot_ms [ms] Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. * @param target_system System ID * @param target_component Component ID - * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @param coordinate_frame Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 * @param type_mask Bitmap to indicate which dimensions should be ignored by the vehicle. - * @param lat_int [degE7] Latitude in WGS84 frame - * @param lon_int [degE7] Longitude in WGS84 frame + * @param lat_int [degE7] X Position in WGS84 frame + * @param lon_int [degE7] Y Position in WGS84 frame * @param alt [m] Altitude (MSL, Relative to home, or AGL - depending on frame) * @param vx [m/s] X velocity in NED frame * @param vy [m/s] Y velocity in NED frame @@ -520,7 +520,7 @@ static inline uint8_t mavlink_msg_set_position_target_global_int_get_target_comp /** * @brief Get field coordinate_frame from set_position_target_global_int message * - * @return Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) + * @return Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 */ static inline uint8_t mavlink_msg_set_position_target_global_int_get_coordinate_frame(const mavlink_message_t* msg) { @@ -540,7 +540,7 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_get_type_mask( /** * @brief Get field lat_int from set_position_target_global_int message * - * @return [degE7] Latitude in WGS84 frame + * @return [degE7] X Position in WGS84 frame */ static inline int32_t mavlink_msg_set_position_target_global_int_get_lat_int(const mavlink_message_t* msg) { @@ -550,7 +550,7 @@ static inline int32_t mavlink_msg_set_position_target_global_int_get_lat_int(con /** * @brief Get field lon_int from set_position_target_global_int message * - * @return [degE7] Longitude in WGS84 frame + * @return [degE7] Y Position in WGS84 frame */ static inline int32_t mavlink_msg_set_position_target_global_int_get_lon_int(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_sim_state.h b/common/mavlink_msg_sim_state.h index 8fbae13ff..ec7ef5564 100644 --- a/common/mavlink_msg_sim_state.h +++ b/common/mavlink_msg_sim_state.h @@ -9,17 +9,17 @@ typedef struct __mavlink_sim_state_t { float q2; /*< True attitude quaternion component 2, x (0 in null-rotation)*/ float q3; /*< True attitude quaternion component 3, y (0 in null-rotation)*/ float q4; /*< True attitude quaternion component 4, z (0 in null-rotation)*/ - float roll; /*< [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs*/ - float pitch; /*< [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs*/ - float yaw; /*< [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs*/ + float roll; /*< Attitude roll expressed as Euler angles, not recommended except for human-readable outputs*/ + float pitch; /*< Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs*/ + float yaw; /*< Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs*/ float xacc; /*< [m/s/s] X acceleration*/ float yacc; /*< [m/s/s] Y acceleration*/ float zacc; /*< [m/s/s] Z acceleration*/ float xgyro; /*< [rad/s] Angular speed around X axis*/ float ygyro; /*< [rad/s] Angular speed around Y axis*/ float zgyro; /*< [rad/s] Angular speed around Z axis*/ - float lat; /*< [deg] Latitude (lower precision). Both this and the lat_int field should be set.*/ - float lon; /*< [deg] Longitude (lower precision). Both this and the lon_int field should be set.*/ + float lat; /*< [deg] Latitude*/ + float lon; /*< [deg] Longitude*/ float alt; /*< [m] Altitude*/ float std_dev_horz; /*< Horizontal position standard deviation*/ float std_dev_vert; /*< Vertical position standard deviation*/ @@ -111,17 +111,17 @@ typedef struct __mavlink_sim_state_t { * @param q2 True attitude quaternion component 2, x (0 in null-rotation) * @param q3 True attitude quaternion component 3, y (0 in null-rotation) * @param q4 True attitude quaternion component 4, z (0 in null-rotation) - * @param roll [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - * @param pitch [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - * @param yaw [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs + * @param roll Attitude roll expressed as Euler angles, not recommended except for human-readable outputs + * @param pitch Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs + * @param yaw Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs * @param xacc [m/s/s] X acceleration * @param yacc [m/s/s] Y acceleration * @param zacc [m/s/s] Z acceleration * @param xgyro [rad/s] Angular speed around X axis * @param ygyro [rad/s] Angular speed around Y axis * @param zgyro [rad/s] Angular speed around Z axis - * @param lat [deg] Latitude (lower precision). Both this and the lat_int field should be set. - * @param lon [deg] Longitude (lower precision). Both this and the lon_int field should be set. + * @param lat [deg] Latitude + * @param lon [deg] Longitude * @param alt [m] Altitude * @param std_dev_horz Horizontal position standard deviation * @param std_dev_vert Vertical position standard deviation @@ -206,17 +206,17 @@ static inline uint16_t mavlink_msg_sim_state_pack(uint8_t system_id, uint8_t com * @param q2 True attitude quaternion component 2, x (0 in null-rotation) * @param q3 True attitude quaternion component 3, y (0 in null-rotation) * @param q4 True attitude quaternion component 4, z (0 in null-rotation) - * @param roll [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - * @param pitch [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - * @param yaw [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs + * @param roll Attitude roll expressed as Euler angles, not recommended except for human-readable outputs + * @param pitch Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs + * @param yaw Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs * @param xacc [m/s/s] X acceleration * @param yacc [m/s/s] Y acceleration * @param zacc [m/s/s] Z acceleration * @param xgyro [rad/s] Angular speed around X axis * @param ygyro [rad/s] Angular speed around Y axis * @param zgyro [rad/s] Angular speed around Z axis - * @param lat [deg] Latitude (lower precision). Both this and the lat_int field should be set. - * @param lon [deg] Longitude (lower precision). Both this and the lon_int field should be set. + * @param lat [deg] Latitude + * @param lon [deg] Longitude * @param alt [m] Altitude * @param std_dev_horz Horizontal position standard deviation * @param std_dev_vert Vertical position standard deviation @@ -304,17 +304,17 @@ static inline uint16_t mavlink_msg_sim_state_pack_status(uint8_t system_id, uint * @param q2 True attitude quaternion component 2, x (0 in null-rotation) * @param q3 True attitude quaternion component 3, y (0 in null-rotation) * @param q4 True attitude quaternion component 4, z (0 in null-rotation) - * @param roll [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - * @param pitch [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - * @param yaw [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs + * @param roll Attitude roll expressed as Euler angles, not recommended except for human-readable outputs + * @param pitch Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs + * @param yaw Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs * @param xacc [m/s/s] X acceleration * @param yacc [m/s/s] Y acceleration * @param zacc [m/s/s] Z acceleration * @param xgyro [rad/s] Angular speed around X axis * @param ygyro [rad/s] Angular speed around Y axis * @param zgyro [rad/s] Angular speed around Z axis - * @param lat [deg] Latitude (lower precision). Both this and the lat_int field should be set. - * @param lon [deg] Longitude (lower precision). Both this and the lon_int field should be set. + * @param lat [deg] Latitude + * @param lon [deg] Longitude * @param alt [m] Altitude * @param std_dev_horz Horizontal position standard deviation * @param std_dev_vert Vertical position standard deviation @@ -438,17 +438,17 @@ static inline uint16_t mavlink_msg_sim_state_encode_status(uint8_t system_id, ui * @param q2 True attitude quaternion component 2, x (0 in null-rotation) * @param q3 True attitude quaternion component 3, y (0 in null-rotation) * @param q4 True attitude quaternion component 4, z (0 in null-rotation) - * @param roll [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - * @param pitch [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - * @param yaw [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs + * @param roll Attitude roll expressed as Euler angles, not recommended except for human-readable outputs + * @param pitch Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs + * @param yaw Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs * @param xacc [m/s/s] X acceleration * @param yacc [m/s/s] Y acceleration * @param zacc [m/s/s] Z acceleration * @param xgyro [rad/s] Angular speed around X axis * @param ygyro [rad/s] Angular speed around Y axis * @param zgyro [rad/s] Angular speed around Z axis - * @param lat [deg] Latitude (lower precision). Both this and the lat_int field should be set. - * @param lon [deg] Longitude (lower precision). Both this and the lon_int field should be set. + * @param lat [deg] Latitude + * @param lon [deg] Longitude * @param alt [m] Altitude * @param std_dev_horz Horizontal position standard deviation * @param std_dev_vert Vertical position standard deviation @@ -649,7 +649,7 @@ static inline float mavlink_msg_sim_state_get_q4(const mavlink_message_t* msg) /** * @brief Get field roll from sim_state message * - * @return [rad] Attitude roll expressed as Euler angles, not recommended except for human-readable outputs + * @return Attitude roll expressed as Euler angles, not recommended except for human-readable outputs */ static inline float mavlink_msg_sim_state_get_roll(const mavlink_message_t* msg) { @@ -659,7 +659,7 @@ static inline float mavlink_msg_sim_state_get_roll(const mavlink_message_t* msg) /** * @brief Get field pitch from sim_state message * - * @return [rad] Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs + * @return Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs */ static inline float mavlink_msg_sim_state_get_pitch(const mavlink_message_t* msg) { @@ -669,7 +669,7 @@ static inline float mavlink_msg_sim_state_get_pitch(const mavlink_message_t* msg /** * @brief Get field yaw from sim_state message * - * @return [rad] Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs + * @return Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs */ static inline float mavlink_msg_sim_state_get_yaw(const mavlink_message_t* msg) { @@ -739,7 +739,7 @@ static inline float mavlink_msg_sim_state_get_zgyro(const mavlink_message_t* msg /** * @brief Get field lat from sim_state message * - * @return [deg] Latitude (lower precision). Both this and the lat_int field should be set. + * @return [deg] Latitude */ static inline float mavlink_msg_sim_state_get_lat(const mavlink_message_t* msg) { @@ -749,7 +749,7 @@ static inline float mavlink_msg_sim_state_get_lat(const mavlink_message_t* msg) /** * @brief Get field lon from sim_state message * - * @return [deg] Longitude (lower precision). Both this and the lon_int field should be set. + * @return [deg] Longitude */ static inline float mavlink_msg_sim_state_get_lon(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_smart_battery_info.h b/common/mavlink_msg_smart_battery_info.h new file mode 100644 index 000000000..292a6469e --- /dev/null +++ b/common/mavlink_msg_smart_battery_info.h @@ -0,0 +1,700 @@ +#pragma once +// MESSAGE SMART_BATTERY_INFO PACKING + +#define MAVLINK_MSG_ID_SMART_BATTERY_INFO 370 + +MAVPACKED( +typedef struct __mavlink_smart_battery_info_t { + int32_t capacity_full_specification; /*< [mAh] Capacity when full according to manufacturer, -1: field not provided.*/ + int32_t capacity_full; /*< [mAh] Capacity when full (accounting for battery degradation), -1: field not provided.*/ + uint16_t cycle_count; /*< Charge/discharge cycle count. UINT16_MAX: field not provided.*/ + uint16_t weight; /*< [g] Battery weight. 0: field not provided.*/ + uint16_t discharge_minimum_voltage; /*< [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value.*/ + uint16_t charging_minimum_voltage; /*< [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value.*/ + uint16_t resting_minimum_voltage; /*< [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value.*/ + uint8_t id; /*< Battery ID*/ + uint8_t battery_function; /*< Function of the battery*/ + uint8_t type; /*< Type (chemistry) of the battery*/ + char serial_number[16]; /*< Serial number in ASCII characters, 0 terminated. All 0: field not provided.*/ + char device_name[50]; /*< Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore.*/ + uint16_t charging_maximum_voltage; /*< [mV] Maximum per-cell voltage when charged. 0: field not provided.*/ + uint8_t cells_in_series; /*< Number of battery cells in series. 0: field not provided.*/ + uint32_t discharge_maximum_current; /*< [mA] Maximum pack discharge current. 0: field not provided.*/ + uint32_t discharge_maximum_burst_current; /*< [mA] Maximum pack discharge burst current. 0: field not provided.*/ + char manufacture_date[11]; /*< Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided.*/ +}) mavlink_smart_battery_info_t; + +#define MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN 109 +#define MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN 87 +#define MAVLINK_MSG_ID_370_LEN 109 +#define MAVLINK_MSG_ID_370_MIN_LEN 87 + +#define MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC 75 +#define MAVLINK_MSG_ID_370_CRC 75 + +#define MAVLINK_MSG_SMART_BATTERY_INFO_FIELD_SERIAL_NUMBER_LEN 16 +#define MAVLINK_MSG_SMART_BATTERY_INFO_FIELD_DEVICE_NAME_LEN 50 +#define MAVLINK_MSG_SMART_BATTERY_INFO_FIELD_MANUFACTURE_DATE_LEN 11 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO { \ + 370, \ + "SMART_BATTERY_INFO", \ + 17, \ + { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_smart_battery_info_t, id) }, \ + { "battery_function", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_smart_battery_info_t, battery_function) }, \ + { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_smart_battery_info_t, type) }, \ + { "capacity_full_specification", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_smart_battery_info_t, capacity_full_specification) }, \ + { "capacity_full", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_smart_battery_info_t, capacity_full) }, \ + { "cycle_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_smart_battery_info_t, cycle_count) }, \ + { "serial_number", NULL, MAVLINK_TYPE_CHAR, 16, 21, offsetof(mavlink_smart_battery_info_t, serial_number) }, \ + { "device_name", NULL, MAVLINK_TYPE_CHAR, 50, 37, offsetof(mavlink_smart_battery_info_t, device_name) }, \ + { "weight", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_smart_battery_info_t, weight) }, \ + { "discharge_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_smart_battery_info_t, discharge_minimum_voltage) }, \ + { "charging_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_smart_battery_info_t, charging_minimum_voltage) }, \ + { "resting_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_smart_battery_info_t, resting_minimum_voltage) }, \ + { "charging_maximum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 87, offsetof(mavlink_smart_battery_info_t, charging_maximum_voltage) }, \ + { "cells_in_series", NULL, MAVLINK_TYPE_UINT8_T, 0, 89, offsetof(mavlink_smart_battery_info_t, cells_in_series) }, \ + { "discharge_maximum_current", NULL, MAVLINK_TYPE_UINT32_T, 0, 90, offsetof(mavlink_smart_battery_info_t, discharge_maximum_current) }, \ + { "discharge_maximum_burst_current", NULL, MAVLINK_TYPE_UINT32_T, 0, 94, offsetof(mavlink_smart_battery_info_t, discharge_maximum_burst_current) }, \ + { "manufacture_date", NULL, MAVLINK_TYPE_CHAR, 11, 98, offsetof(mavlink_smart_battery_info_t, manufacture_date) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO { \ + "SMART_BATTERY_INFO", \ + 17, \ + { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_smart_battery_info_t, id) }, \ + { "battery_function", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_smart_battery_info_t, battery_function) }, \ + { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_smart_battery_info_t, type) }, \ + { "capacity_full_specification", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_smart_battery_info_t, capacity_full_specification) }, \ + { "capacity_full", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_smart_battery_info_t, capacity_full) }, \ + { "cycle_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_smart_battery_info_t, cycle_count) }, \ + { "serial_number", NULL, MAVLINK_TYPE_CHAR, 16, 21, offsetof(mavlink_smart_battery_info_t, serial_number) }, \ + { "device_name", NULL, MAVLINK_TYPE_CHAR, 50, 37, offsetof(mavlink_smart_battery_info_t, device_name) }, \ + { "weight", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_smart_battery_info_t, weight) }, \ + { "discharge_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_smart_battery_info_t, discharge_minimum_voltage) }, \ + { "charging_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 14, offsetof(mavlink_smart_battery_info_t, charging_minimum_voltage) }, \ + { "resting_minimum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_smart_battery_info_t, resting_minimum_voltage) }, \ + { "charging_maximum_voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 87, offsetof(mavlink_smart_battery_info_t, charging_maximum_voltage) }, \ + { "cells_in_series", NULL, MAVLINK_TYPE_UINT8_T, 0, 89, offsetof(mavlink_smart_battery_info_t, cells_in_series) }, \ + { "discharge_maximum_current", NULL, MAVLINK_TYPE_UINT32_T, 0, 90, offsetof(mavlink_smart_battery_info_t, discharge_maximum_current) }, \ + { "discharge_maximum_burst_current", NULL, MAVLINK_TYPE_UINT32_T, 0, 94, offsetof(mavlink_smart_battery_info_t, discharge_maximum_burst_current) }, \ + { "manufacture_date", NULL, MAVLINK_TYPE_CHAR, 11, 98, offsetof(mavlink_smart_battery_info_t, manufacture_date) }, \ + } \ +} +#endif + +/** + * @brief Pack a smart_battery_info message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param id Battery ID + * @param battery_function Function of the battery + * @param type Type (chemistry) of the battery + * @param capacity_full_specification [mAh] Capacity when full according to manufacturer, -1: field not provided. + * @param capacity_full [mAh] Capacity when full (accounting for battery degradation), -1: field not provided. + * @param cycle_count Charge/discharge cycle count. UINT16_MAX: field not provided. + * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. + * @param device_name Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore. + * @param weight [g] Battery weight. 0: field not provided. + * @param discharge_minimum_voltage [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value. + * @param charging_minimum_voltage [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value. + * @param resting_minimum_voltage [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value. + * @param charging_maximum_voltage [mV] Maximum per-cell voltage when charged. 0: field not provided. + * @param cells_in_series Number of battery cells in series. 0: field not provided. + * @param discharge_maximum_current [mA] Maximum pack discharge current. 0: field not provided. + * @param discharge_maximum_burst_current [mA] Maximum pack discharge burst current. 0: field not provided. + * @param manufacture_date Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_smart_battery_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t id, uint8_t battery_function, uint8_t type, int32_t capacity_full_specification, int32_t capacity_full, uint16_t cycle_count, const char *serial_number, const char *device_name, uint16_t weight, uint16_t discharge_minimum_voltage, uint16_t charging_minimum_voltage, uint16_t resting_minimum_voltage, uint16_t charging_maximum_voltage, uint8_t cells_in_series, uint32_t discharge_maximum_current, uint32_t discharge_maximum_burst_current, const char *manufacture_date) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN]; + _mav_put_int32_t(buf, 0, capacity_full_specification); + _mav_put_int32_t(buf, 4, capacity_full); + _mav_put_uint16_t(buf, 8, cycle_count); + _mav_put_uint16_t(buf, 10, weight); + _mav_put_uint16_t(buf, 12, discharge_minimum_voltage); + _mav_put_uint16_t(buf, 14, charging_minimum_voltage); + _mav_put_uint16_t(buf, 16, resting_minimum_voltage); + _mav_put_uint8_t(buf, 18, id); + _mav_put_uint8_t(buf, 19, battery_function); + _mav_put_uint8_t(buf, 20, type); + _mav_put_uint16_t(buf, 87, charging_maximum_voltage); + _mav_put_uint8_t(buf, 89, cells_in_series); + _mav_put_uint32_t(buf, 90, discharge_maximum_current); + _mav_put_uint32_t(buf, 94, discharge_maximum_burst_current); + _mav_put_char_array(buf, 21, serial_number, 16); + _mav_put_char_array(buf, 37, device_name, 50); + _mav_put_char_array(buf, 98, manufacture_date, 11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#else + mavlink_smart_battery_info_t packet; + packet.capacity_full_specification = capacity_full_specification; + packet.capacity_full = capacity_full; + packet.cycle_count = cycle_count; + packet.weight = weight; + packet.discharge_minimum_voltage = discharge_minimum_voltage; + packet.charging_minimum_voltage = charging_minimum_voltage; + packet.resting_minimum_voltage = resting_minimum_voltage; + packet.id = id; + packet.battery_function = battery_function; + packet.type = type; + packet.charging_maximum_voltage = charging_maximum_voltage; + packet.cells_in_series = cells_in_series; + packet.discharge_maximum_current = discharge_maximum_current; + packet.discharge_maximum_burst_current = discharge_maximum_burst_current; + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*16); + mav_array_memcpy(packet.device_name, device_name, sizeof(char)*50); + mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SMART_BATTERY_INFO; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +} + +/** + * @brief Pack a smart_battery_info message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param id Battery ID + * @param battery_function Function of the battery + * @param type Type (chemistry) of the battery + * @param capacity_full_specification [mAh] Capacity when full according to manufacturer, -1: field not provided. + * @param capacity_full [mAh] Capacity when full (accounting for battery degradation), -1: field not provided. + * @param cycle_count Charge/discharge cycle count. UINT16_MAX: field not provided. + * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. + * @param device_name Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore. + * @param weight [g] Battery weight. 0: field not provided. + * @param discharge_minimum_voltage [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value. + * @param charging_minimum_voltage [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value. + * @param resting_minimum_voltage [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value. + * @param charging_maximum_voltage [mV] Maximum per-cell voltage when charged. 0: field not provided. + * @param cells_in_series Number of battery cells in series. 0: field not provided. + * @param discharge_maximum_current [mA] Maximum pack discharge current. 0: field not provided. + * @param discharge_maximum_burst_current [mA] Maximum pack discharge burst current. 0: field not provided. + * @param manufacture_date Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_smart_battery_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t id, uint8_t battery_function, uint8_t type, int32_t capacity_full_specification, int32_t capacity_full, uint16_t cycle_count, const char *serial_number, const char *device_name, uint16_t weight, uint16_t discharge_minimum_voltage, uint16_t charging_minimum_voltage, uint16_t resting_minimum_voltage, uint16_t charging_maximum_voltage, uint8_t cells_in_series, uint32_t discharge_maximum_current, uint32_t discharge_maximum_burst_current, const char *manufacture_date) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN]; + _mav_put_int32_t(buf, 0, capacity_full_specification); + _mav_put_int32_t(buf, 4, capacity_full); + _mav_put_uint16_t(buf, 8, cycle_count); + _mav_put_uint16_t(buf, 10, weight); + _mav_put_uint16_t(buf, 12, discharge_minimum_voltage); + _mav_put_uint16_t(buf, 14, charging_minimum_voltage); + _mav_put_uint16_t(buf, 16, resting_minimum_voltage); + _mav_put_uint8_t(buf, 18, id); + _mav_put_uint8_t(buf, 19, battery_function); + _mav_put_uint8_t(buf, 20, type); + _mav_put_uint16_t(buf, 87, charging_maximum_voltage); + _mav_put_uint8_t(buf, 89, cells_in_series); + _mav_put_uint32_t(buf, 90, discharge_maximum_current); + _mav_put_uint32_t(buf, 94, discharge_maximum_burst_current); + _mav_put_char_array(buf, 21, serial_number, 16); + _mav_put_char_array(buf, 37, device_name, 50); + _mav_put_char_array(buf, 98, manufacture_date, 11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#else + mavlink_smart_battery_info_t packet; + packet.capacity_full_specification = capacity_full_specification; + packet.capacity_full = capacity_full; + packet.cycle_count = cycle_count; + packet.weight = weight; + packet.discharge_minimum_voltage = discharge_minimum_voltage; + packet.charging_minimum_voltage = charging_minimum_voltage; + packet.resting_minimum_voltage = resting_minimum_voltage; + packet.id = id; + packet.battery_function = battery_function; + packet.type = type; + packet.charging_maximum_voltage = charging_maximum_voltage; + packet.cells_in_series = cells_in_series; + packet.discharge_maximum_current = discharge_maximum_current; + packet.discharge_maximum_burst_current = discharge_maximum_burst_current; + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*16); + mav_array_memcpy(packet.device_name, device_name, sizeof(char)*50); + mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SMART_BATTERY_INFO; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#endif +} + +/** + * @brief Pack a smart_battery_info message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param id Battery ID + * @param battery_function Function of the battery + * @param type Type (chemistry) of the battery + * @param capacity_full_specification [mAh] Capacity when full according to manufacturer, -1: field not provided. + * @param capacity_full [mAh] Capacity when full (accounting for battery degradation), -1: field not provided. + * @param cycle_count Charge/discharge cycle count. UINT16_MAX: field not provided. + * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. + * @param device_name Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore. + * @param weight [g] Battery weight. 0: field not provided. + * @param discharge_minimum_voltage [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value. + * @param charging_minimum_voltage [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value. + * @param resting_minimum_voltage [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value. + * @param charging_maximum_voltage [mV] Maximum per-cell voltage when charged. 0: field not provided. + * @param cells_in_series Number of battery cells in series. 0: field not provided. + * @param discharge_maximum_current [mA] Maximum pack discharge current. 0: field not provided. + * @param discharge_maximum_burst_current [mA] Maximum pack discharge burst current. 0: field not provided. + * @param manufacture_date Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_smart_battery_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t id,uint8_t battery_function,uint8_t type,int32_t capacity_full_specification,int32_t capacity_full,uint16_t cycle_count,const char *serial_number,const char *device_name,uint16_t weight,uint16_t discharge_minimum_voltage,uint16_t charging_minimum_voltage,uint16_t resting_minimum_voltage,uint16_t charging_maximum_voltage,uint8_t cells_in_series,uint32_t discharge_maximum_current,uint32_t discharge_maximum_burst_current,const char *manufacture_date) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN]; + _mav_put_int32_t(buf, 0, capacity_full_specification); + _mav_put_int32_t(buf, 4, capacity_full); + _mav_put_uint16_t(buf, 8, cycle_count); + _mav_put_uint16_t(buf, 10, weight); + _mav_put_uint16_t(buf, 12, discharge_minimum_voltage); + _mav_put_uint16_t(buf, 14, charging_minimum_voltage); + _mav_put_uint16_t(buf, 16, resting_minimum_voltage); + _mav_put_uint8_t(buf, 18, id); + _mav_put_uint8_t(buf, 19, battery_function); + _mav_put_uint8_t(buf, 20, type); + _mav_put_uint16_t(buf, 87, charging_maximum_voltage); + _mav_put_uint8_t(buf, 89, cells_in_series); + _mav_put_uint32_t(buf, 90, discharge_maximum_current); + _mav_put_uint32_t(buf, 94, discharge_maximum_burst_current); + _mav_put_char_array(buf, 21, serial_number, 16); + _mav_put_char_array(buf, 37, device_name, 50); + _mav_put_char_array(buf, 98, manufacture_date, 11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#else + mavlink_smart_battery_info_t packet; + packet.capacity_full_specification = capacity_full_specification; + packet.capacity_full = capacity_full; + packet.cycle_count = cycle_count; + packet.weight = weight; + packet.discharge_minimum_voltage = discharge_minimum_voltage; + packet.charging_minimum_voltage = charging_minimum_voltage; + packet.resting_minimum_voltage = resting_minimum_voltage; + packet.id = id; + packet.battery_function = battery_function; + packet.type = type; + packet.charging_maximum_voltage = charging_maximum_voltage; + packet.cells_in_series = cells_in_series; + packet.discharge_maximum_current = discharge_maximum_current; + packet.discharge_maximum_burst_current = discharge_maximum_burst_current; + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*16); + mav_array_memcpy(packet.device_name, device_name, sizeof(char)*50); + mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*11); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SMART_BATTERY_INFO; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +} + +/** + * @brief Encode a smart_battery_info struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param smart_battery_info C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_smart_battery_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_smart_battery_info_t* smart_battery_info) +{ + return mavlink_msg_smart_battery_info_pack(system_id, component_id, msg, smart_battery_info->id, smart_battery_info->battery_function, smart_battery_info->type, smart_battery_info->capacity_full_specification, smart_battery_info->capacity_full, smart_battery_info->cycle_count, smart_battery_info->serial_number, smart_battery_info->device_name, smart_battery_info->weight, smart_battery_info->discharge_minimum_voltage, smart_battery_info->charging_minimum_voltage, smart_battery_info->resting_minimum_voltage, smart_battery_info->charging_maximum_voltage, smart_battery_info->cells_in_series, smart_battery_info->discharge_maximum_current, smart_battery_info->discharge_maximum_burst_current, smart_battery_info->manufacture_date); +} + +/** + * @brief Encode a smart_battery_info struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param smart_battery_info C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_smart_battery_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_smart_battery_info_t* smart_battery_info) +{ + return mavlink_msg_smart_battery_info_pack_chan(system_id, component_id, chan, msg, smart_battery_info->id, smart_battery_info->battery_function, smart_battery_info->type, smart_battery_info->capacity_full_specification, smart_battery_info->capacity_full, smart_battery_info->cycle_count, smart_battery_info->serial_number, smart_battery_info->device_name, smart_battery_info->weight, smart_battery_info->discharge_minimum_voltage, smart_battery_info->charging_minimum_voltage, smart_battery_info->resting_minimum_voltage, smart_battery_info->charging_maximum_voltage, smart_battery_info->cells_in_series, smart_battery_info->discharge_maximum_current, smart_battery_info->discharge_maximum_burst_current, smart_battery_info->manufacture_date); +} + +/** + * @brief Encode a smart_battery_info struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param smart_battery_info C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_smart_battery_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_smart_battery_info_t* smart_battery_info) +{ + return mavlink_msg_smart_battery_info_pack_status(system_id, component_id, _status, msg, smart_battery_info->id, smart_battery_info->battery_function, smart_battery_info->type, smart_battery_info->capacity_full_specification, smart_battery_info->capacity_full, smart_battery_info->cycle_count, smart_battery_info->serial_number, smart_battery_info->device_name, smart_battery_info->weight, smart_battery_info->discharge_minimum_voltage, smart_battery_info->charging_minimum_voltage, smart_battery_info->resting_minimum_voltage, smart_battery_info->charging_maximum_voltage, smart_battery_info->cells_in_series, smart_battery_info->discharge_maximum_current, smart_battery_info->discharge_maximum_burst_current, smart_battery_info->manufacture_date); +} + +/** + * @brief Send a smart_battery_info message + * @param chan MAVLink channel to send the message + * + * @param id Battery ID + * @param battery_function Function of the battery + * @param type Type (chemistry) of the battery + * @param capacity_full_specification [mAh] Capacity when full according to manufacturer, -1: field not provided. + * @param capacity_full [mAh] Capacity when full (accounting for battery degradation), -1: field not provided. + * @param cycle_count Charge/discharge cycle count. UINT16_MAX: field not provided. + * @param serial_number Serial number in ASCII characters, 0 terminated. All 0: field not provided. + * @param device_name Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore. + * @param weight [g] Battery weight. 0: field not provided. + * @param discharge_minimum_voltage [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value. + * @param charging_minimum_voltage [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value. + * @param resting_minimum_voltage [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value. + * @param charging_maximum_voltage [mV] Maximum per-cell voltage when charged. 0: field not provided. + * @param cells_in_series Number of battery cells in series. 0: field not provided. + * @param discharge_maximum_current [mA] Maximum pack discharge current. 0: field not provided. + * @param discharge_maximum_burst_current [mA] Maximum pack discharge burst current. 0: field not provided. + * @param manufacture_date Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_smart_battery_info_send(mavlink_channel_t chan, uint8_t id, uint8_t battery_function, uint8_t type, int32_t capacity_full_specification, int32_t capacity_full, uint16_t cycle_count, const char *serial_number, const char *device_name, uint16_t weight, uint16_t discharge_minimum_voltage, uint16_t charging_minimum_voltage, uint16_t resting_minimum_voltage, uint16_t charging_maximum_voltage, uint8_t cells_in_series, uint32_t discharge_maximum_current, uint32_t discharge_maximum_burst_current, const char *manufacture_date) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN]; + _mav_put_int32_t(buf, 0, capacity_full_specification); + _mav_put_int32_t(buf, 4, capacity_full); + _mav_put_uint16_t(buf, 8, cycle_count); + _mav_put_uint16_t(buf, 10, weight); + _mav_put_uint16_t(buf, 12, discharge_minimum_voltage); + _mav_put_uint16_t(buf, 14, charging_minimum_voltage); + _mav_put_uint16_t(buf, 16, resting_minimum_voltage); + _mav_put_uint8_t(buf, 18, id); + _mav_put_uint8_t(buf, 19, battery_function); + _mav_put_uint8_t(buf, 20, type); + _mav_put_uint16_t(buf, 87, charging_maximum_voltage); + _mav_put_uint8_t(buf, 89, cells_in_series); + _mav_put_uint32_t(buf, 90, discharge_maximum_current); + _mav_put_uint32_t(buf, 94, discharge_maximum_burst_current); + _mav_put_char_array(buf, 21, serial_number, 16); + _mav_put_char_array(buf, 37, device_name, 50); + _mav_put_char_array(buf, 98, manufacture_date, 11); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO, buf, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#else + mavlink_smart_battery_info_t packet; + packet.capacity_full_specification = capacity_full_specification; + packet.capacity_full = capacity_full; + packet.cycle_count = cycle_count; + packet.weight = weight; + packet.discharge_minimum_voltage = discharge_minimum_voltage; + packet.charging_minimum_voltage = charging_minimum_voltage; + packet.resting_minimum_voltage = resting_minimum_voltage; + packet.id = id; + packet.battery_function = battery_function; + packet.type = type; + packet.charging_maximum_voltage = charging_maximum_voltage; + packet.cells_in_series = cells_in_series; + packet.discharge_maximum_current = discharge_maximum_current; + packet.discharge_maximum_burst_current = discharge_maximum_burst_current; + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*16); + mav_array_memcpy(packet.device_name, device_name, sizeof(char)*50); + mav_array_memcpy(packet.manufacture_date, manufacture_date, sizeof(char)*11); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO, (const char *)&packet, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#endif +} + +/** + * @brief Send a smart_battery_info message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_smart_battery_info_send_struct(mavlink_channel_t chan, const mavlink_smart_battery_info_t* smart_battery_info) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_smart_battery_info_send(chan, smart_battery_info->id, smart_battery_info->battery_function, smart_battery_info->type, smart_battery_info->capacity_full_specification, smart_battery_info->capacity_full, smart_battery_info->cycle_count, smart_battery_info->serial_number, smart_battery_info->device_name, smart_battery_info->weight, smart_battery_info->discharge_minimum_voltage, smart_battery_info->charging_minimum_voltage, smart_battery_info->resting_minimum_voltage, smart_battery_info->charging_maximum_voltage, smart_battery_info->cells_in_series, smart_battery_info->discharge_maximum_current, smart_battery_info->discharge_maximum_burst_current, smart_battery_info->manufacture_date); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO, (const char *)smart_battery_info, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#endif +} + +#if MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_smart_battery_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, uint8_t battery_function, uint8_t type, int32_t capacity_full_specification, int32_t capacity_full, uint16_t cycle_count, const char *serial_number, const char *device_name, uint16_t weight, uint16_t discharge_minimum_voltage, uint16_t charging_minimum_voltage, uint16_t resting_minimum_voltage, uint16_t charging_maximum_voltage, uint8_t cells_in_series, uint32_t discharge_maximum_current, uint32_t discharge_maximum_burst_current, const char *manufacture_date) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int32_t(buf, 0, capacity_full_specification); + _mav_put_int32_t(buf, 4, capacity_full); + _mav_put_uint16_t(buf, 8, cycle_count); + _mav_put_uint16_t(buf, 10, weight); + _mav_put_uint16_t(buf, 12, discharge_minimum_voltage); + _mav_put_uint16_t(buf, 14, charging_minimum_voltage); + _mav_put_uint16_t(buf, 16, resting_minimum_voltage); + _mav_put_uint8_t(buf, 18, id); + _mav_put_uint8_t(buf, 19, battery_function); + _mav_put_uint8_t(buf, 20, type); + _mav_put_uint16_t(buf, 87, charging_maximum_voltage); + _mav_put_uint8_t(buf, 89, cells_in_series); + _mav_put_uint32_t(buf, 90, discharge_maximum_current); + _mav_put_uint32_t(buf, 94, discharge_maximum_burst_current); + _mav_put_char_array(buf, 21, serial_number, 16); + _mav_put_char_array(buf, 37, device_name, 50); + _mav_put_char_array(buf, 98, manufacture_date, 11); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO, buf, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#else + mavlink_smart_battery_info_t *packet = (mavlink_smart_battery_info_t *)msgbuf; + packet->capacity_full_specification = capacity_full_specification; + packet->capacity_full = capacity_full; + packet->cycle_count = cycle_count; + packet->weight = weight; + packet->discharge_minimum_voltage = discharge_minimum_voltage; + packet->charging_minimum_voltage = charging_minimum_voltage; + packet->resting_minimum_voltage = resting_minimum_voltage; + packet->id = id; + packet->battery_function = battery_function; + packet->type = type; + packet->charging_maximum_voltage = charging_maximum_voltage; + packet->cells_in_series = cells_in_series; + packet->discharge_maximum_current = discharge_maximum_current; + packet->discharge_maximum_burst_current = discharge_maximum_burst_current; + mav_array_memcpy(packet->serial_number, serial_number, sizeof(char)*16); + mav_array_memcpy(packet->device_name, device_name, sizeof(char)*50); + mav_array_memcpy(packet->manufacture_date, manufacture_date, sizeof(char)*11); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SMART_BATTERY_INFO, (const char *)packet, MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN, MAVLINK_MSG_ID_SMART_BATTERY_INFO_CRC); +#endif +} +#endif + +#endif + +// MESSAGE SMART_BATTERY_INFO UNPACKING + + +/** + * @brief Get field id from smart_battery_info message + * + * @return Battery ID + */ +static inline uint8_t mavlink_msg_smart_battery_info_get_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 18); +} + +/** + * @brief Get field battery_function from smart_battery_info message + * + * @return Function of the battery + */ +static inline uint8_t mavlink_msg_smart_battery_info_get_battery_function(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 19); +} + +/** + * @brief Get field type from smart_battery_info message + * + * @return Type (chemistry) of the battery + */ +static inline uint8_t mavlink_msg_smart_battery_info_get_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 20); +} + +/** + * @brief Get field capacity_full_specification from smart_battery_info message + * + * @return [mAh] Capacity when full according to manufacturer, -1: field not provided. + */ +static inline int32_t mavlink_msg_smart_battery_info_get_capacity_full_specification(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 0); +} + +/** + * @brief Get field capacity_full from smart_battery_info message + * + * @return [mAh] Capacity when full (accounting for battery degradation), -1: field not provided. + */ +static inline int32_t mavlink_msg_smart_battery_info_get_capacity_full(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 4); +} + +/** + * @brief Get field cycle_count from smart_battery_info message + * + * @return Charge/discharge cycle count. UINT16_MAX: field not provided. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_cycle_count(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 8); +} + +/** + * @brief Get field serial_number from smart_battery_info message + * + * @return Serial number in ASCII characters, 0 terminated. All 0: field not provided. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_serial_number(const mavlink_message_t* msg, char *serial_number) +{ + return _MAV_RETURN_char_array(msg, serial_number, 16, 21); +} + +/** + * @brief Get field device_name from smart_battery_info message + * + * @return Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_device_name(const mavlink_message_t* msg, char *device_name) +{ + return _MAV_RETURN_char_array(msg, device_name, 50, 37); +} + +/** + * @brief Get field weight from smart_battery_info message + * + * @return [g] Battery weight. 0: field not provided. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_weight(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 10); +} + +/** + * @brief Get field discharge_minimum_voltage from smart_battery_info message + * + * @return [mV] Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_discharge_minimum_voltage(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 12); +} + +/** + * @brief Get field charging_minimum_voltage from smart_battery_info message + * + * @return [mV] Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_charging_minimum_voltage(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 14); +} + +/** + * @brief Get field resting_minimum_voltage from smart_battery_info message + * + * @return [mV] Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_resting_minimum_voltage(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 16); +} + +/** + * @brief Get field charging_maximum_voltage from smart_battery_info message + * + * @return [mV] Maximum per-cell voltage when charged. 0: field not provided. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_charging_maximum_voltage(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 87); +} + +/** + * @brief Get field cells_in_series from smart_battery_info message + * + * @return Number of battery cells in series. 0: field not provided. + */ +static inline uint8_t mavlink_msg_smart_battery_info_get_cells_in_series(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 89); +} + +/** + * @brief Get field discharge_maximum_current from smart_battery_info message + * + * @return [mA] Maximum pack discharge current. 0: field not provided. + */ +static inline uint32_t mavlink_msg_smart_battery_info_get_discharge_maximum_current(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 90); +} + +/** + * @brief Get field discharge_maximum_burst_current from smart_battery_info message + * + * @return [mA] Maximum pack discharge burst current. 0: field not provided. + */ +static inline uint32_t mavlink_msg_smart_battery_info_get_discharge_maximum_burst_current(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 94); +} + +/** + * @brief Get field manufacture_date from smart_battery_info message + * + * @return Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. + */ +static inline uint16_t mavlink_msg_smart_battery_info_get_manufacture_date(const mavlink_message_t* msg, char *manufacture_date) +{ + return _MAV_RETURN_char_array(msg, manufacture_date, 11, 98); +} + +/** + * @brief Decode a smart_battery_info message into a struct + * + * @param msg The message to decode + * @param smart_battery_info C-struct to decode the message contents into + */ +static inline void mavlink_msg_smart_battery_info_decode(const mavlink_message_t* msg, mavlink_smart_battery_info_t* smart_battery_info) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + smart_battery_info->capacity_full_specification = mavlink_msg_smart_battery_info_get_capacity_full_specification(msg); + smart_battery_info->capacity_full = mavlink_msg_smart_battery_info_get_capacity_full(msg); + smart_battery_info->cycle_count = mavlink_msg_smart_battery_info_get_cycle_count(msg); + smart_battery_info->weight = mavlink_msg_smart_battery_info_get_weight(msg); + smart_battery_info->discharge_minimum_voltage = mavlink_msg_smart_battery_info_get_discharge_minimum_voltage(msg); + smart_battery_info->charging_minimum_voltage = mavlink_msg_smart_battery_info_get_charging_minimum_voltage(msg); + smart_battery_info->resting_minimum_voltage = mavlink_msg_smart_battery_info_get_resting_minimum_voltage(msg); + smart_battery_info->id = mavlink_msg_smart_battery_info_get_id(msg); + smart_battery_info->battery_function = mavlink_msg_smart_battery_info_get_battery_function(msg); + smart_battery_info->type = mavlink_msg_smart_battery_info_get_type(msg); + mavlink_msg_smart_battery_info_get_serial_number(msg, smart_battery_info->serial_number); + mavlink_msg_smart_battery_info_get_device_name(msg, smart_battery_info->device_name); + smart_battery_info->charging_maximum_voltage = mavlink_msg_smart_battery_info_get_charging_maximum_voltage(msg); + smart_battery_info->cells_in_series = mavlink_msg_smart_battery_info_get_cells_in_series(msg); + smart_battery_info->discharge_maximum_current = mavlink_msg_smart_battery_info_get_discharge_maximum_current(msg); + smart_battery_info->discharge_maximum_burst_current = mavlink_msg_smart_battery_info_get_discharge_maximum_burst_current(msg); + mavlink_msg_smart_battery_info_get_manufacture_date(msg, smart_battery_info->manufacture_date); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN? msg->len : MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN; + memset(smart_battery_info, 0, MAVLINK_MSG_ID_SMART_BATTERY_INFO_LEN); + memcpy(smart_battery_info, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/common/mavlink_msg_storage_information.h b/common/mavlink_msg_storage_information.h index 9ff61bd87..5796525a6 100644 --- a/common/mavlink_msg_storage_information.h +++ b/common/mavlink_msg_storage_information.h @@ -16,15 +16,11 @@ typedef struct __mavlink_storage_information_t { uint8_t status; /*< Status of storage*/ uint8_t type; /*< Type of storage*/ char name[32]; /*< Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user.*/ - uint8_t storage_usage; /*< Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types.*/ } mavlink_storage_information_t; -#define MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN 61 +#define MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN 60 #define MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN 27 -#define MAVLINK_MSG_ID_261_LEN 61 +#define MAVLINK_MSG_ID_261_LEN 60 #define MAVLINK_MSG_ID_261_MIN_LEN 27 #define MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC 179 @@ -36,7 +32,7 @@ typedef struct __mavlink_storage_information_t { #define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION { \ 261, \ "STORAGE_INFORMATION", \ - 12, \ + 11, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storage_information_t, time_boot_ms) }, \ { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_storage_information_t, storage_id) }, \ { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_storage_information_t, storage_count) }, \ @@ -48,13 +44,12 @@ typedef struct __mavlink_storage_information_t { { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storage_information_t, write_speed) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_storage_information_t, type) }, \ { "name", NULL, MAVLINK_TYPE_CHAR, 32, 28, offsetof(mavlink_storage_information_t, name) }, \ - { "storage_usage", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_storage_information_t, storage_usage) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION { \ "STORAGE_INFORMATION", \ - 12, \ + 11, \ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storage_information_t, time_boot_ms) }, \ { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_storage_information_t, storage_id) }, \ { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_storage_information_t, storage_count) }, \ @@ -66,7 +61,6 @@ typedef struct __mavlink_storage_information_t { { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storage_information_t, write_speed) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_storage_information_t, type) }, \ { "name", NULL, MAVLINK_TYPE_CHAR, 32, 28, offsetof(mavlink_storage_information_t, name) }, \ - { "storage_usage", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_storage_information_t, storage_usage) }, \ } \ } #endif @@ -88,14 +82,10 @@ typedef struct __mavlink_storage_information_t { * @param write_speed [MiB/s] Write speed. * @param type Type of storage * @param name Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user. - * @param storage_usage Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name, uint8_t storage_usage) + uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN]; @@ -109,7 +99,6 @@ static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, u _mav_put_uint8_t(buf, 25, storage_count); _mav_put_uint8_t(buf, 26, status); _mav_put_uint8_t(buf, 27, type); - _mav_put_uint8_t(buf, 60, storage_usage); _mav_put_char_array(buf, 28, name, 32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #else @@ -124,7 +113,6 @@ static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, u packet.storage_count = storage_count; packet.status = status; packet.type = type; - packet.storage_usage = storage_usage; mav_array_memcpy(packet.name, name, sizeof(char)*32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #endif @@ -151,14 +139,10 @@ static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, u * @param write_speed [MiB/s] Write speed. * @param type Type of storage * @param name Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user. - * @param storage_usage Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storage_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name, uint8_t storage_usage) + uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN]; @@ -172,7 +156,6 @@ static inline uint16_t mavlink_msg_storage_information_pack_status(uint8_t syste _mav_put_uint8_t(buf, 25, storage_count); _mav_put_uint8_t(buf, 26, status); _mav_put_uint8_t(buf, 27, type); - _mav_put_uint8_t(buf, 60, storage_usage); _mav_put_char_array(buf, 28, name, 32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #else @@ -187,7 +170,6 @@ static inline uint16_t mavlink_msg_storage_information_pack_status(uint8_t syste packet.storage_count = storage_count; packet.status = status; packet.type = type; - packet.storage_usage = storage_usage; mav_array_memcpy(packet.name, name, sizeof(char)*32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #endif @@ -217,15 +199,11 @@ static inline uint16_t mavlink_msg_storage_information_pack_status(uint8_t syste * @param write_speed [MiB/s] Write speed. * @param type Type of storage * @param name Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user. - * @param storage_usage Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t time_boot_ms,uint8_t storage_id,uint8_t storage_count,uint8_t status,float total_capacity,float used_capacity,float available_capacity,float read_speed,float write_speed,uint8_t type,const char *name,uint8_t storage_usage) + uint32_t time_boot_ms,uint8_t storage_id,uint8_t storage_count,uint8_t status,float total_capacity,float used_capacity,float available_capacity,float read_speed,float write_speed,uint8_t type,const char *name) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN]; @@ -239,7 +217,6 @@ static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_ _mav_put_uint8_t(buf, 25, storage_count); _mav_put_uint8_t(buf, 26, status); _mav_put_uint8_t(buf, 27, type); - _mav_put_uint8_t(buf, 60, storage_usage); _mav_put_char_array(buf, 28, name, 32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #else @@ -254,7 +231,6 @@ static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_ packet.storage_count = storage_count; packet.status = status; packet.type = type; - packet.storage_usage = storage_usage; mav_array_memcpy(packet.name, name, sizeof(char)*32); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); #endif @@ -273,7 +249,7 @@ static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_ */ static inline uint16_t mavlink_msg_storage_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information) { - return mavlink_msg_storage_information_pack(system_id, component_id, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name, storage_information->storage_usage); + return mavlink_msg_storage_information_pack(system_id, component_id, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name); } /** @@ -287,7 +263,7 @@ static inline uint16_t mavlink_msg_storage_information_encode(uint8_t system_id, */ static inline uint16_t mavlink_msg_storage_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information) { - return mavlink_msg_storage_information_pack_chan(system_id, component_id, chan, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name, storage_information->storage_usage); + return mavlink_msg_storage_information_pack_chan(system_id, component_id, chan, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name); } /** @@ -301,7 +277,7 @@ static inline uint16_t mavlink_msg_storage_information_encode_chan(uint8_t syste */ static inline uint16_t mavlink_msg_storage_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_storage_information_t* storage_information) { - return mavlink_msg_storage_information_pack_status(system_id, component_id, _status, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name, storage_information->storage_usage); + return mavlink_msg_storage_information_pack_status(system_id, component_id, _status, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name); } /** @@ -319,14 +295,10 @@ static inline uint16_t mavlink_msg_storage_information_encode_status(uint8_t sys * @param write_speed [MiB/s] Write speed. * @param type Type of storage * @param name Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user. - * @param storage_usage Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name, uint8_t storage_usage) +static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN]; @@ -340,7 +312,6 @@ static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, _mav_put_uint8_t(buf, 25, storage_count); _mav_put_uint8_t(buf, 26, status); _mav_put_uint8_t(buf, 27, type); - _mav_put_uint8_t(buf, 60, storage_usage); _mav_put_char_array(buf, 28, name, 32); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC); #else @@ -355,7 +326,6 @@ static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, packet.storage_count = storage_count; packet.status = status; packet.type = type; - packet.storage_usage = storage_usage; mav_array_memcpy(packet.name, name, sizeof(char)*32); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC); #endif @@ -369,7 +339,7 @@ static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, static inline void mavlink_msg_storage_information_send_struct(mavlink_channel_t chan, const mavlink_storage_information_t* storage_information) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_storage_information_send(chan, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name, storage_information->storage_usage); + mavlink_msg_storage_information_send(chan, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed, storage_information->type, storage_information->name); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (const char *)storage_information, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC); #endif @@ -383,7 +353,7 @@ static inline void mavlink_msg_storage_information_send_struct(mavlink_channel_t is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_storage_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name, uint8_t storage_usage) +static inline void mavlink_msg_storage_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status, float total_capacity, float used_capacity, float available_capacity, float read_speed, float write_speed, uint8_t type, const char *name) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -397,7 +367,6 @@ static inline void mavlink_msg_storage_information_send_buf(mavlink_message_t *m _mav_put_uint8_t(buf, 25, storage_count); _mav_put_uint8_t(buf, 26, status); _mav_put_uint8_t(buf, 27, type); - _mav_put_uint8_t(buf, 60, storage_usage); _mav_put_char_array(buf, 28, name, 32); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC); #else @@ -412,7 +381,6 @@ static inline void mavlink_msg_storage_information_send_buf(mavlink_message_t *m packet->storage_count = storage_count; packet->status = status; packet->type = type; - packet->storage_usage = storage_usage; mav_array_memcpy(packet->name, name, sizeof(char)*32); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC); #endif @@ -534,19 +502,6 @@ static inline uint16_t mavlink_msg_storage_information_get_name(const mavlink_me return _MAV_RETURN_char_array(msg, name, 32, 28); } -/** - * @brief Get field storage_usage from storage_information message - * - * @return Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. - */ -static inline uint8_t mavlink_msg_storage_information_get_storage_usage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 60); -} - /** * @brief Decode a storage_information message into a struct * @@ -567,7 +522,6 @@ static inline void mavlink_msg_storage_information_decode(const mavlink_message_ storage_information->status = mavlink_msg_storage_information_get_status(msg); storage_information->type = mavlink_msg_storage_information_get_type(msg); mavlink_msg_storage_information_get_name(msg, storage_information->name); - storage_information->storage_usage = mavlink_msg_storage_information_get_storage_usage(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN; memset(storage_information, 0, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN); diff --git a/common/mavlink_msg_supported_tunes.h b/common/mavlink_msg_supported_tunes.h deleted file mode 100644 index 8bba0f518..000000000 --- a/common/mavlink_msg_supported_tunes.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE SUPPORTED_TUNES PACKING - -#define MAVLINK_MSG_ID_SUPPORTED_TUNES 401 - - -typedef struct __mavlink_supported_tunes_t { - uint32_t format; /*< Bitfield of supported tune formats.*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_supported_tunes_t; - -#define MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN 6 -#define MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN 6 -#define MAVLINK_MSG_ID_401_LEN 6 -#define MAVLINK_MSG_ID_401_MIN_LEN 6 - -#define MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC 183 -#define MAVLINK_MSG_ID_401_CRC 183 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES { \ - 401, \ - "SUPPORTED_TUNES", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_supported_tunes_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_supported_tunes_t, target_component) }, \ - { "format", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_supported_tunes_t, format) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES { \ - "SUPPORTED_TUNES", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_supported_tunes_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_supported_tunes_t, target_component) }, \ - { "format", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_supported_tunes_t, format) }, \ - } \ -} -#endif - -/** - * @brief Pack a supported_tunes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param format Bitfield of supported tune formats. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_supported_tunes_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint32_t format) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#else - mavlink_supported_tunes_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SUPPORTED_TUNES; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -} - -/** - * @brief Pack a supported_tunes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param format Bitfield of supported tune formats. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_supported_tunes_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint32_t format) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#else - mavlink_supported_tunes_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SUPPORTED_TUNES; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#endif -} - -/** - * @brief Pack a supported_tunes message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param format Bitfield of supported tune formats. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_supported_tunes_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint32_t format) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#else - mavlink_supported_tunes_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SUPPORTED_TUNES; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -} - -/** - * @brief Encode a supported_tunes struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param supported_tunes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_supported_tunes_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_supported_tunes_t* supported_tunes) -{ - return mavlink_msg_supported_tunes_pack(system_id, component_id, msg, supported_tunes->target_system, supported_tunes->target_component, supported_tunes->format); -} - -/** - * @brief Encode a supported_tunes struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param supported_tunes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_supported_tunes_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_supported_tunes_t* supported_tunes) -{ - return mavlink_msg_supported_tunes_pack_chan(system_id, component_id, chan, msg, supported_tunes->target_system, supported_tunes->target_component, supported_tunes->format); -} - -/** - * @brief Encode a supported_tunes struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param supported_tunes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_supported_tunes_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_supported_tunes_t* supported_tunes) -{ - return mavlink_msg_supported_tunes_pack_status(system_id, component_id, _status, msg, supported_tunes->target_system, supported_tunes->target_component, supported_tunes->format); -} - -/** - * @brief Send a supported_tunes message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param format Bitfield of supported tune formats. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_supported_tunes_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t format) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN]; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUPPORTED_TUNES, buf, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#else - mavlink_supported_tunes_t packet; - packet.format = format; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUPPORTED_TUNES, (const char *)&packet, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#endif -} - -/** - * @brief Send a supported_tunes message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_supported_tunes_send_struct(mavlink_channel_t chan, const mavlink_supported_tunes_t* supported_tunes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_supported_tunes_send(chan, supported_tunes->target_system, supported_tunes->target_component, supported_tunes->format); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUPPORTED_TUNES, (const char *)supported_tunes, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_supported_tunes_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t format) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, format); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUPPORTED_TUNES, buf, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#else - mavlink_supported_tunes_t *packet = (mavlink_supported_tunes_t *)msgbuf; - packet->format = format; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUPPORTED_TUNES, (const char *)packet, MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN, MAVLINK_MSG_ID_SUPPORTED_TUNES_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SUPPORTED_TUNES UNPACKING - - -/** - * @brief Get field target_system from supported_tunes message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_supported_tunes_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from supported_tunes message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_supported_tunes_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field format from supported_tunes message - * - * @return Bitfield of supported tune formats. - */ -static inline uint32_t mavlink_msg_supported_tunes_get_format(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Decode a supported_tunes message into a struct - * - * @param msg The message to decode - * @param supported_tunes C-struct to decode the message contents into - */ -static inline void mavlink_msg_supported_tunes_decode(const mavlink_message_t* msg, mavlink_supported_tunes_t* supported_tunes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - supported_tunes->format = mavlink_msg_supported_tunes_get_format(msg); - supported_tunes->target_system = mavlink_msg_supported_tunes_get_target_system(msg); - supported_tunes->target_component = mavlink_msg_supported_tunes_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN? msg->len : MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN; - memset(supported_tunes, 0, MAVLINK_MSG_ID_SUPPORTED_TUNES_LEN); - memcpy(supported_tunes, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_sys_status.h b/common/mavlink_msg_sys_status.h index 86b0a27b5..9d47b5ae0 100644 --- a/common/mavlink_msg_sys_status.h +++ b/common/mavlink_msg_sys_status.h @@ -3,7 +3,7 @@ #define MAVLINK_MSG_ID_SYS_STATUS 1 -MAVPACKED( + typedef struct __mavlink_sys_status_t { uint32_t onboard_control_sensors_present; /*< Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.*/ uint32_t onboard_control_sensors_enabled; /*< Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.*/ @@ -18,14 +18,11 @@ typedef struct __mavlink_sys_status_t { uint16_t errors_count3; /*< Autopilot-specific errors*/ uint16_t errors_count4; /*< Autopilot-specific errors*/ int8_t battery_remaining; /*< [%] Battery energy remaining, -1: Battery remaining energy not sent by autopilot*/ - uint32_t onboard_control_sensors_present_extended; /*< Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.*/ - uint32_t onboard_control_sensors_enabled_extended; /*< Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled.*/ - uint32_t onboard_control_sensors_health_extended; /*< Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.*/ -}) mavlink_sys_status_t; +} mavlink_sys_status_t; -#define MAVLINK_MSG_ID_SYS_STATUS_LEN 43 +#define MAVLINK_MSG_ID_SYS_STATUS_LEN 31 #define MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN 31 -#define MAVLINK_MSG_ID_1_LEN 43 +#define MAVLINK_MSG_ID_1_LEN 31 #define MAVLINK_MSG_ID_1_MIN_LEN 31 #define MAVLINK_MSG_ID_SYS_STATUS_CRC 124 @@ -37,7 +34,7 @@ typedef struct __mavlink_sys_status_t { #define MAVLINK_MESSAGE_INFO_SYS_STATUS { \ 1, \ "SYS_STATUS", \ - 16, \ + 13, \ { { "onboard_control_sensors_present", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sys_status_t, onboard_control_sensors_present) }, \ { "onboard_control_sensors_enabled", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled) }, \ { "onboard_control_sensors_health", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_sys_status_t, onboard_control_sensors_health) }, \ @@ -51,15 +48,12 @@ typedef struct __mavlink_sys_status_t { { "errors_count2", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sys_status_t, errors_count2) }, \ { "errors_count3", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sys_status_t, errors_count3) }, \ { "errors_count4", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sys_status_t, errors_count4) }, \ - { "onboard_control_sensors_present_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 31, offsetof(mavlink_sys_status_t, onboard_control_sensors_present_extended) }, \ - { "onboard_control_sensors_enabled_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 35, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled_extended) }, \ - { "onboard_control_sensors_health_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 39, offsetof(mavlink_sys_status_t, onboard_control_sensors_health_extended) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_SYS_STATUS { \ "SYS_STATUS", \ - 16, \ + 13, \ { { "onboard_control_sensors_present", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sys_status_t, onboard_control_sensors_present) }, \ { "onboard_control_sensors_enabled", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled) }, \ { "onboard_control_sensors_health", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_sys_status_t, onboard_control_sensors_health) }, \ @@ -73,9 +67,6 @@ typedef struct __mavlink_sys_status_t { { "errors_count2", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sys_status_t, errors_count2) }, \ { "errors_count3", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sys_status_t, errors_count3) }, \ { "errors_count4", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sys_status_t, errors_count4) }, \ - { "onboard_control_sensors_present_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 31, offsetof(mavlink_sys_status_t, onboard_control_sensors_present_extended) }, \ - { "onboard_control_sensors_enabled_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 35, offsetof(mavlink_sys_status_t, onboard_control_sensors_enabled_extended) }, \ - { "onboard_control_sensors_health_extended", "0x%04x", MAVLINK_TYPE_UINT32_T, 0, 39, offsetof(mavlink_sys_status_t, onboard_control_sensors_health_extended) }, \ } \ } #endif @@ -99,13 +90,10 @@ typedef struct __mavlink_sys_status_t { * @param errors_count2 Autopilot-specific errors * @param errors_count3 Autopilot-specific errors * @param errors_count4 Autopilot-specific errors - * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended) + uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SYS_STATUS_LEN]; @@ -122,9 +110,6 @@ static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t co _mav_put_uint16_t(buf, 26, errors_count3); _mav_put_uint16_t(buf, 28, errors_count4); _mav_put_int8_t(buf, 30, battery_remaining); - _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended); - _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended); - _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN); #else @@ -142,9 +127,6 @@ static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t co packet.errors_count3 = errors_count3; packet.errors_count4 = errors_count4; packet.battery_remaining = battery_remaining; - packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended; - packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended; - packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN); #endif @@ -173,13 +155,10 @@ static inline uint16_t mavlink_msg_sys_status_pack(uint8_t system_id, uint8_t co * @param errors_count2 Autopilot-specific errors * @param errors_count3 Autopilot-specific errors * @param errors_count4 Autopilot-specific errors - * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_sys_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended) + uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SYS_STATUS_LEN]; @@ -196,9 +175,6 @@ static inline uint16_t mavlink_msg_sys_status_pack_status(uint8_t system_id, uin _mav_put_uint16_t(buf, 26, errors_count3); _mav_put_uint16_t(buf, 28, errors_count4); _mav_put_int8_t(buf, 30, battery_remaining); - _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended); - _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended); - _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN); #else @@ -216,9 +192,6 @@ static inline uint16_t mavlink_msg_sys_status_pack_status(uint8_t system_id, uin packet.errors_count3 = errors_count3; packet.errors_count4 = errors_count4; packet.battery_remaining = battery_remaining; - packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended; - packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended; - packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN); #endif @@ -250,14 +223,11 @@ static inline uint16_t mavlink_msg_sys_status_pack_status(uint8_t system_id, uin * @param errors_count2 Autopilot-specific errors * @param errors_count3 Autopilot-specific errors * @param errors_count4 Autopilot-specific errors - * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint32_t onboard_control_sensors_present,uint32_t onboard_control_sensors_enabled,uint32_t onboard_control_sensors_health,uint16_t load,uint16_t voltage_battery,int16_t current_battery,int8_t battery_remaining,uint16_t drop_rate_comm,uint16_t errors_comm,uint16_t errors_count1,uint16_t errors_count2,uint16_t errors_count3,uint16_t errors_count4,uint32_t onboard_control_sensors_present_extended,uint32_t onboard_control_sensors_enabled_extended,uint32_t onboard_control_sensors_health_extended) + uint32_t onboard_control_sensors_present,uint32_t onboard_control_sensors_enabled,uint32_t onboard_control_sensors_health,uint16_t load,uint16_t voltage_battery,int16_t current_battery,int8_t battery_remaining,uint16_t drop_rate_comm,uint16_t errors_comm,uint16_t errors_count1,uint16_t errors_count2,uint16_t errors_count3,uint16_t errors_count4) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SYS_STATUS_LEN]; @@ -274,9 +244,6 @@ static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8 _mav_put_uint16_t(buf, 26, errors_count3); _mav_put_uint16_t(buf, 28, errors_count4); _mav_put_int8_t(buf, 30, battery_remaining); - _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended); - _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended); - _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SYS_STATUS_LEN); #else @@ -294,9 +261,6 @@ static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8 packet.errors_count3 = errors_count3; packet.errors_count4 = errors_count4; packet.battery_remaining = battery_remaining; - packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended; - packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended; - packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SYS_STATUS_LEN); #endif @@ -315,7 +279,7 @@ static inline uint16_t mavlink_msg_sys_status_pack_chan(uint8_t system_id, uint8 */ static inline uint16_t mavlink_msg_sys_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status) { - return mavlink_msg_sys_status_pack(system_id, component_id, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended); + return mavlink_msg_sys_status_pack(system_id, component_id, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4); } /** @@ -329,7 +293,7 @@ static inline uint16_t mavlink_msg_sys_status_encode(uint8_t system_id, uint8_t */ static inline uint16_t mavlink_msg_sys_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status) { - return mavlink_msg_sys_status_pack_chan(system_id, component_id, chan, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended); + return mavlink_msg_sys_status_pack_chan(system_id, component_id, chan, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4); } /** @@ -343,7 +307,7 @@ static inline uint16_t mavlink_msg_sys_status_encode_chan(uint8_t system_id, uin */ static inline uint16_t mavlink_msg_sys_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sys_status_t* sys_status) { - return mavlink_msg_sys_status_pack_status(system_id, component_id, _status, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended); + return mavlink_msg_sys_status_pack_status(system_id, component_id, _status, msg, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4); } /** @@ -363,13 +327,10 @@ static inline uint16_t mavlink_msg_sys_status_encode_status(uint8_t system_id, u * @param errors_count2 Autopilot-specific errors * @param errors_count3 Autopilot-specific errors * @param errors_count4 Autopilot-specific errors - * @param onboard_control_sensors_present_extended Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - * @param onboard_control_sensors_enabled_extended Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - * @param onboard_control_sensors_health_extended Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended) +static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_SYS_STATUS_LEN]; @@ -386,9 +347,6 @@ static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t _mav_put_uint16_t(buf, 26, errors_count3); _mav_put_uint16_t(buf, 28, errors_count4); _mav_put_int8_t(buf, 30, battery_remaining); - _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended); - _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended); - _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, buf, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC); #else @@ -406,9 +364,6 @@ static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t packet.errors_count3 = errors_count3; packet.errors_count4 = errors_count4; packet.battery_remaining = battery_remaining; - packet.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended; - packet.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended; - packet.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)&packet, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC); #endif @@ -422,7 +377,7 @@ static inline void mavlink_msg_sys_status_send(mavlink_channel_t chan, uint32_t static inline void mavlink_msg_sys_status_send_struct(mavlink_channel_t chan, const mavlink_sys_status_t* sys_status) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_sys_status_send(chan, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4, sys_status->onboard_control_sensors_present_extended, sys_status->onboard_control_sensors_enabled_extended, sys_status->onboard_control_sensors_health_extended); + mavlink_msg_sys_status_send(chan, sys_status->onboard_control_sensors_present, sys_status->onboard_control_sensors_enabled, sys_status->onboard_control_sensors_health, sys_status->load, sys_status->voltage_battery, sys_status->current_battery, sys_status->battery_remaining, sys_status->drop_rate_comm, sys_status->errors_comm, sys_status->errors_count1, sys_status->errors_count2, sys_status->errors_count3, sys_status->errors_count4); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)sys_status, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC); #endif @@ -436,7 +391,7 @@ static inline void mavlink_msg_sys_status_send_struct(mavlink_channel_t chan, co is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_sys_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4, uint32_t onboard_control_sensors_present_extended, uint32_t onboard_control_sensors_enabled_extended, uint32_t onboard_control_sensors_health_extended) +static inline void mavlink_msg_sys_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t onboard_control_sensors_present, uint32_t onboard_control_sensors_enabled, uint32_t onboard_control_sensors_health, uint16_t load, uint16_t voltage_battery, int16_t current_battery, int8_t battery_remaining, uint16_t drop_rate_comm, uint16_t errors_comm, uint16_t errors_count1, uint16_t errors_count2, uint16_t errors_count3, uint16_t errors_count4) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -453,9 +408,6 @@ static inline void mavlink_msg_sys_status_send_buf(mavlink_message_t *msgbuf, ma _mav_put_uint16_t(buf, 26, errors_count3); _mav_put_uint16_t(buf, 28, errors_count4); _mav_put_int8_t(buf, 30, battery_remaining); - _mav_put_uint32_t(buf, 31, onboard_control_sensors_present_extended); - _mav_put_uint32_t(buf, 35, onboard_control_sensors_enabled_extended); - _mav_put_uint32_t(buf, 39, onboard_control_sensors_health_extended); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, buf, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC); #else @@ -473,9 +425,6 @@ static inline void mavlink_msg_sys_status_send_buf(mavlink_message_t *msgbuf, ma packet->errors_count3 = errors_count3; packet->errors_count4 = errors_count4; packet->battery_remaining = battery_remaining; - packet->onboard_control_sensors_present_extended = onboard_control_sensors_present_extended; - packet->onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended; - packet->onboard_control_sensors_health_extended = onboard_control_sensors_health_extended; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SYS_STATUS, (const char *)packet, MAVLINK_MSG_ID_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_SYS_STATUS_LEN, MAVLINK_MSG_ID_SYS_STATUS_CRC); #endif @@ -617,36 +566,6 @@ static inline uint16_t mavlink_msg_sys_status_get_errors_count4(const mavlink_me return _MAV_RETURN_uint16_t(msg, 28); } -/** - * @brief Get field onboard_control_sensors_present_extended from sys_status message - * - * @return Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - */ -static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_present_extended(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 31); -} - -/** - * @brief Get field onboard_control_sensors_enabled_extended from sys_status message - * - * @return Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - */ -static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_enabled_extended(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 35); -} - -/** - * @brief Get field onboard_control_sensors_health_extended from sys_status message - * - * @return Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. - */ -static inline uint32_t mavlink_msg_sys_status_get_onboard_control_sensors_health_extended(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 39); -} - /** * @brief Decode a sys_status message into a struct * @@ -669,9 +588,6 @@ static inline void mavlink_msg_sys_status_decode(const mavlink_message_t* msg, m sys_status->errors_count3 = mavlink_msg_sys_status_get_errors_count3(msg); sys_status->errors_count4 = mavlink_msg_sys_status_get_errors_count4(msg); sys_status->battery_remaining = mavlink_msg_sys_status_get_battery_remaining(msg); - sys_status->onboard_control_sensors_present_extended = mavlink_msg_sys_status_get_onboard_control_sensors_present_extended(msg); - sys_status->onboard_control_sensors_enabled_extended = mavlink_msg_sys_status_get_onboard_control_sensors_enabled_extended(msg); - sys_status->onboard_control_sensors_health_extended = mavlink_msg_sys_status_get_onboard_control_sensors_health_extended(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_SYS_STATUS_LEN? msg->len : MAVLINK_MSG_ID_SYS_STATUS_LEN; memset(sys_status, 0, MAVLINK_MSG_ID_SYS_STATUS_LEN); diff --git a/common/mavlink_msg_time_estimate_to_target.h b/common/mavlink_msg_time_estimate_to_target.h deleted file mode 100644 index a9d6ece51..000000000 --- a/common/mavlink_msg_time_estimate_to_target.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -// MESSAGE TIME_ESTIMATE_TO_TARGET PACKING - -#define MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET 380 - - -typedef struct __mavlink_time_estimate_to_target_t { - int32_t safe_return; /*< [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available.*/ - int32_t land; /*< [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available.*/ - int32_t mission_next_item; /*< [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available.*/ - int32_t mission_end; /*< [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available.*/ - int32_t commanded_action; /*< [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available.*/ -} mavlink_time_estimate_to_target_t; - -#define MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN 20 -#define MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN 20 -#define MAVLINK_MSG_ID_380_LEN 20 -#define MAVLINK_MSG_ID_380_MIN_LEN 20 - -#define MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC 232 -#define MAVLINK_MSG_ID_380_CRC 232 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET { \ - 380, \ - "TIME_ESTIMATE_TO_TARGET", \ - 5, \ - { { "safe_return", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_time_estimate_to_target_t, safe_return) }, \ - { "land", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_time_estimate_to_target_t, land) }, \ - { "mission_next_item", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_time_estimate_to_target_t, mission_next_item) }, \ - { "mission_end", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_time_estimate_to_target_t, mission_end) }, \ - { "commanded_action", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_time_estimate_to_target_t, commanded_action) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET { \ - "TIME_ESTIMATE_TO_TARGET", \ - 5, \ - { { "safe_return", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_time_estimate_to_target_t, safe_return) }, \ - { "land", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_time_estimate_to_target_t, land) }, \ - { "mission_next_item", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_time_estimate_to_target_t, mission_next_item) }, \ - { "mission_end", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_time_estimate_to_target_t, mission_end) }, \ - { "commanded_action", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_time_estimate_to_target_t, commanded_action) }, \ - } \ -} -#endif - -/** - * @brief Pack a time_estimate_to_target message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param safe_return [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - * @param land [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - * @param mission_next_item [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - * @param mission_end [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - * @param commanded_action [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - int32_t safe_return, int32_t land, int32_t mission_next_item, int32_t mission_end, int32_t commanded_action) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN]; - _mav_put_int32_t(buf, 0, safe_return); - _mav_put_int32_t(buf, 4, land); - _mav_put_int32_t(buf, 8, mission_next_item); - _mav_put_int32_t(buf, 12, mission_end); - _mav_put_int32_t(buf, 16, commanded_action); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#else - mavlink_time_estimate_to_target_t packet; - packet.safe_return = safe_return; - packet.land = land; - packet.mission_next_item = mission_next_item; - packet.mission_end = mission_end; - packet.commanded_action = commanded_action; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -} - -/** - * @brief Pack a time_estimate_to_target message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param safe_return [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - * @param land [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - * @param mission_next_item [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - * @param mission_end [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - * @param commanded_action [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - int32_t safe_return, int32_t land, int32_t mission_next_item, int32_t mission_end, int32_t commanded_action) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN]; - _mav_put_int32_t(buf, 0, safe_return); - _mav_put_int32_t(buf, 4, land); - _mav_put_int32_t(buf, 8, mission_next_item); - _mav_put_int32_t(buf, 12, mission_end); - _mav_put_int32_t(buf, 16, commanded_action); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#else - mavlink_time_estimate_to_target_t packet; - packet.safe_return = safe_return; - packet.land = land; - packet.mission_next_item = mission_next_item; - packet.mission_end = mission_end; - packet.commanded_action = commanded_action; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#endif -} - -/** - * @brief Pack a time_estimate_to_target message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param safe_return [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - * @param land [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - * @param mission_next_item [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - * @param mission_end [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - * @param commanded_action [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - int32_t safe_return,int32_t land,int32_t mission_next_item,int32_t mission_end,int32_t commanded_action) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN]; - _mav_put_int32_t(buf, 0, safe_return); - _mav_put_int32_t(buf, 4, land); - _mav_put_int32_t(buf, 8, mission_next_item); - _mav_put_int32_t(buf, 12, mission_end); - _mav_put_int32_t(buf, 16, commanded_action); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#else - mavlink_time_estimate_to_target_t packet; - packet.safe_return = safe_return; - packet.land = land; - packet.mission_next_item = mission_next_item; - packet.mission_end = mission_end; - packet.commanded_action = commanded_action; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -} - -/** - * @brief Encode a time_estimate_to_target struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param time_estimate_to_target C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_time_estimate_to_target_t* time_estimate_to_target) -{ - return mavlink_msg_time_estimate_to_target_pack(system_id, component_id, msg, time_estimate_to_target->safe_return, time_estimate_to_target->land, time_estimate_to_target->mission_next_item, time_estimate_to_target->mission_end, time_estimate_to_target->commanded_action); -} - -/** - * @brief Encode a time_estimate_to_target struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_estimate_to_target C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_time_estimate_to_target_t* time_estimate_to_target) -{ - return mavlink_msg_time_estimate_to_target_pack_chan(system_id, component_id, chan, msg, time_estimate_to_target->safe_return, time_estimate_to_target->land, time_estimate_to_target->mission_next_item, time_estimate_to_target->mission_end, time_estimate_to_target->commanded_action); -} - -/** - * @brief Encode a time_estimate_to_target struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param time_estimate_to_target C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_time_estimate_to_target_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_time_estimate_to_target_t* time_estimate_to_target) -{ - return mavlink_msg_time_estimate_to_target_pack_status(system_id, component_id, _status, msg, time_estimate_to_target->safe_return, time_estimate_to_target->land, time_estimate_to_target->mission_next_item, time_estimate_to_target->mission_end, time_estimate_to_target->commanded_action); -} - -/** - * @brief Send a time_estimate_to_target message - * @param chan MAVLink channel to send the message - * - * @param safe_return [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - * @param land [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - * @param mission_next_item [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - * @param mission_end [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - * @param commanded_action [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_time_estimate_to_target_send(mavlink_channel_t chan, int32_t safe_return, int32_t land, int32_t mission_next_item, int32_t mission_end, int32_t commanded_action) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN]; - _mav_put_int32_t(buf, 0, safe_return); - _mav_put_int32_t(buf, 4, land); - _mav_put_int32_t(buf, 8, mission_next_item); - _mav_put_int32_t(buf, 12, mission_end); - _mav_put_int32_t(buf, 16, commanded_action); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET, buf, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#else - mavlink_time_estimate_to_target_t packet; - packet.safe_return = safe_return; - packet.land = land; - packet.mission_next_item = mission_next_item; - packet.mission_end = mission_end; - packet.commanded_action = commanded_action; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET, (const char *)&packet, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#endif -} - -/** - * @brief Send a time_estimate_to_target message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_time_estimate_to_target_send_struct(mavlink_channel_t chan, const mavlink_time_estimate_to_target_t* time_estimate_to_target) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_time_estimate_to_target_send(chan, time_estimate_to_target->safe_return, time_estimate_to_target->land, time_estimate_to_target->mission_next_item, time_estimate_to_target->mission_end, time_estimate_to_target->commanded_action); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET, (const char *)time_estimate_to_target, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#endif -} - -#if MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_time_estimate_to_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t safe_return, int32_t land, int32_t mission_next_item, int32_t mission_end, int32_t commanded_action) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int32_t(buf, 0, safe_return); - _mav_put_int32_t(buf, 4, land); - _mav_put_int32_t(buf, 8, mission_next_item); - _mav_put_int32_t(buf, 12, mission_end); - _mav_put_int32_t(buf, 16, commanded_action); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET, buf, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#else - mavlink_time_estimate_to_target_t *packet = (mavlink_time_estimate_to_target_t *)msgbuf; - packet->safe_return = safe_return; - packet->land = land; - packet->mission_next_item = mission_next_item; - packet->mission_end = mission_end; - packet->commanded_action = commanded_action; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET, (const char *)packet, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_CRC); -#endif -} -#endif - -#endif - -// MESSAGE TIME_ESTIMATE_TO_TARGET UNPACKING - - -/** - * @brief Get field safe_return from time_estimate_to_target message - * - * @return [s] Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - */ -static inline int32_t mavlink_msg_time_estimate_to_target_get_safe_return(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 0); -} - -/** - * @brief Get field land from time_estimate_to_target message - * - * @return [s] Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - */ -static inline int32_t mavlink_msg_time_estimate_to_target_get_land(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 4); -} - -/** - * @brief Get field mission_next_item from time_estimate_to_target message - * - * @return [s] Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - */ -static inline int32_t mavlink_msg_time_estimate_to_target_get_mission_next_item(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Get field mission_end from time_estimate_to_target message - * - * @return [s] Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - */ -static inline int32_t mavlink_msg_time_estimate_to_target_get_mission_end(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field commanded_action from time_estimate_to_target message - * - * @return [s] Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - */ -static inline int32_t mavlink_msg_time_estimate_to_target_get_commanded_action(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 16); -} - -/** - * @brief Decode a time_estimate_to_target message into a struct - * - * @param msg The message to decode - * @param time_estimate_to_target C-struct to decode the message contents into - */ -static inline void mavlink_msg_time_estimate_to_target_decode(const mavlink_message_t* msg, mavlink_time_estimate_to_target_t* time_estimate_to_target) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - time_estimate_to_target->safe_return = mavlink_msg_time_estimate_to_target_get_safe_return(msg); - time_estimate_to_target->land = mavlink_msg_time_estimate_to_target_get_land(msg); - time_estimate_to_target->mission_next_item = mavlink_msg_time_estimate_to_target_get_mission_next_item(msg); - time_estimate_to_target->mission_end = mavlink_msg_time_estimate_to_target_get_mission_end(msg); - time_estimate_to_target->commanded_action = mavlink_msg_time_estimate_to_target_get_commanded_action(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN? msg->len : MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN; - memset(time_estimate_to_target, 0, MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_LEN); - memcpy(time_estimate_to_target, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_timesync.h b/common/mavlink_msg_timesync.h index 0f8ec960d..f6d7d434d 100644 --- a/common/mavlink_msg_timesync.h +++ b/common/mavlink_msg_timesync.h @@ -5,15 +5,13 @@ typedef struct __mavlink_timesync_t { - int64_t tc1; /*< [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component.*/ - int64_t ts1; /*< [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response).*/ - uint8_t target_system; /*< Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component.*/ - uint8_t target_component; /*< Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component.*/ + int64_t tc1; /*< Time sync timestamp 1*/ + int64_t ts1; /*< Time sync timestamp 2*/ } mavlink_timesync_t; -#define MAVLINK_MSG_ID_TIMESYNC_LEN 18 +#define MAVLINK_MSG_ID_TIMESYNC_LEN 16 #define MAVLINK_MSG_ID_TIMESYNC_MIN_LEN 16 -#define MAVLINK_MSG_ID_111_LEN 18 +#define MAVLINK_MSG_ID_111_LEN 16 #define MAVLINK_MSG_ID_111_MIN_LEN 16 #define MAVLINK_MSG_ID_TIMESYNC_CRC 34 @@ -25,21 +23,17 @@ typedef struct __mavlink_timesync_t { #define MAVLINK_MESSAGE_INFO_TIMESYNC { \ 111, \ "TIMESYNC", \ - 4, \ + 2, \ { { "tc1", NULL, MAVLINK_TYPE_INT64_T, 0, 0, offsetof(mavlink_timesync_t, tc1) }, \ { "ts1", NULL, MAVLINK_TYPE_INT64_T, 0, 8, offsetof(mavlink_timesync_t, ts1) }, \ - { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_timesync_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_timesync_t, target_component) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_TIMESYNC { \ "TIMESYNC", \ - 4, \ + 2, \ { { "tc1", NULL, MAVLINK_TYPE_INT64_T, 0, 0, offsetof(mavlink_timesync_t, tc1) }, \ { "ts1", NULL, MAVLINK_TYPE_INT64_T, 0, 8, offsetof(mavlink_timesync_t, ts1) }, \ - { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_timesync_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_timesync_t, target_component) }, \ } \ } #endif @@ -50,29 +44,23 @@ typedef struct __mavlink_timesync_t { * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * - * @param tc1 [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. - * @param ts1 [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response). - * @param target_system Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - * @param target_component Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. + * @param tc1 Time sync timestamp 1 + * @param ts1 Time sync timestamp 2 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_timesync_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - int64_t tc1, int64_t ts1, uint8_t target_system, uint8_t target_component) + int64_t tc1, int64_t ts1) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TIMESYNC_LEN]; _mav_put_int64_t(buf, 0, tc1); _mav_put_int64_t(buf, 8, ts1); - _mav_put_uint8_t(buf, 16, target_system); - _mav_put_uint8_t(buf, 17, target_component); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIMESYNC_LEN); #else mavlink_timesync_t packet; packet.tc1 = tc1; packet.ts1 = ts1; - packet.target_system = target_system; - packet.target_component = target_component; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIMESYNC_LEN); #endif @@ -88,29 +76,23 @@ static inline uint16_t mavlink_msg_timesync_pack(uint8_t system_id, uint8_t comp * @param status MAVLink status structure * @param msg The MAVLink message to compress the data into * - * @param tc1 [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. - * @param ts1 [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response). - * @param target_system Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - * @param target_component Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. + * @param tc1 Time sync timestamp 1 + * @param ts1 Time sync timestamp 2 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_timesync_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - int64_t tc1, int64_t ts1, uint8_t target_system, uint8_t target_component) + int64_t tc1, int64_t ts1) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TIMESYNC_LEN]; _mav_put_int64_t(buf, 0, tc1); _mav_put_int64_t(buf, 8, ts1); - _mav_put_uint8_t(buf, 16, target_system); - _mav_put_uint8_t(buf, 17, target_component); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIMESYNC_LEN); #else mavlink_timesync_t packet; packet.tc1 = tc1; packet.ts1 = ts1; - packet.target_system = target_system; - packet.target_component = target_component; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIMESYNC_LEN); #endif @@ -129,30 +111,24 @@ static inline uint16_t mavlink_msg_timesync_pack_status(uint8_t system_id, uint8 * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into - * @param tc1 [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. - * @param ts1 [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response). - * @param target_system Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - * @param target_component Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. + * @param tc1 Time sync timestamp 1 + * @param ts1 Time sync timestamp 2 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_timesync_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - int64_t tc1,int64_t ts1,uint8_t target_system,uint8_t target_component) + int64_t tc1,int64_t ts1) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TIMESYNC_LEN]; _mav_put_int64_t(buf, 0, tc1); _mav_put_int64_t(buf, 8, ts1); - _mav_put_uint8_t(buf, 16, target_system); - _mav_put_uint8_t(buf, 17, target_component); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TIMESYNC_LEN); #else mavlink_timesync_t packet; packet.tc1 = tc1; packet.ts1 = ts1; - packet.target_system = target_system; - packet.target_component = target_component; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TIMESYNC_LEN); #endif @@ -171,7 +147,7 @@ static inline uint16_t mavlink_msg_timesync_pack_chan(uint8_t system_id, uint8_t */ static inline uint16_t mavlink_msg_timesync_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_timesync_t* timesync) { - return mavlink_msg_timesync_pack(system_id, component_id, msg, timesync->tc1, timesync->ts1, timesync->target_system, timesync->target_component); + return mavlink_msg_timesync_pack(system_id, component_id, msg, timesync->tc1, timesync->ts1); } /** @@ -185,7 +161,7 @@ static inline uint16_t mavlink_msg_timesync_encode(uint8_t system_id, uint8_t co */ static inline uint16_t mavlink_msg_timesync_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_timesync_t* timesync) { - return mavlink_msg_timesync_pack_chan(system_id, component_id, chan, msg, timesync->tc1, timesync->ts1, timesync->target_system, timesync->target_component); + return mavlink_msg_timesync_pack_chan(system_id, component_id, chan, msg, timesync->tc1, timesync->ts1); } /** @@ -199,36 +175,30 @@ static inline uint16_t mavlink_msg_timesync_encode_chan(uint8_t system_id, uint8 */ static inline uint16_t mavlink_msg_timesync_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_timesync_t* timesync) { - return mavlink_msg_timesync_pack_status(system_id, component_id, _status, msg, timesync->tc1, timesync->ts1, timesync->target_system, timesync->target_component); + return mavlink_msg_timesync_pack_status(system_id, component_id, _status, msg, timesync->tc1, timesync->ts1); } /** * @brief Send a timesync message * @param chan MAVLink channel to send the message * - * @param tc1 [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. - * @param ts1 [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response). - * @param target_system Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - * @param target_component Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. + * @param tc1 Time sync timestamp 1 + * @param ts1 Time sync timestamp 2 */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_timesync_send(mavlink_channel_t chan, int64_t tc1, int64_t ts1, uint8_t target_system, uint8_t target_component) +static inline void mavlink_msg_timesync_send(mavlink_channel_t chan, int64_t tc1, int64_t ts1) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_TIMESYNC_LEN]; _mav_put_int64_t(buf, 0, tc1); _mav_put_int64_t(buf, 8, ts1); - _mav_put_uint8_t(buf, 16, target_system); - _mav_put_uint8_t(buf, 17, target_component); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIMESYNC, buf, MAVLINK_MSG_ID_TIMESYNC_MIN_LEN, MAVLINK_MSG_ID_TIMESYNC_LEN, MAVLINK_MSG_ID_TIMESYNC_CRC); #else mavlink_timesync_t packet; packet.tc1 = tc1; packet.ts1 = ts1; - packet.target_system = target_system; - packet.target_component = target_component; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIMESYNC, (const char *)&packet, MAVLINK_MSG_ID_TIMESYNC_MIN_LEN, MAVLINK_MSG_ID_TIMESYNC_LEN, MAVLINK_MSG_ID_TIMESYNC_CRC); #endif @@ -242,7 +212,7 @@ static inline void mavlink_msg_timesync_send(mavlink_channel_t chan, int64_t tc1 static inline void mavlink_msg_timesync_send_struct(mavlink_channel_t chan, const mavlink_timesync_t* timesync) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_timesync_send(chan, timesync->tc1, timesync->ts1, timesync->target_system, timesync->target_component); + mavlink_msg_timesync_send(chan, timesync->tc1, timesync->ts1); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIMESYNC, (const char *)timesync, MAVLINK_MSG_ID_TIMESYNC_MIN_LEN, MAVLINK_MSG_ID_TIMESYNC_LEN, MAVLINK_MSG_ID_TIMESYNC_CRC); #endif @@ -256,22 +226,18 @@ static inline void mavlink_msg_timesync_send_struct(mavlink_channel_t chan, cons is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_timesync_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int64_t tc1, int64_t ts1, uint8_t target_system, uint8_t target_component) +static inline void mavlink_msg_timesync_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int64_t tc1, int64_t ts1) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_int64_t(buf, 0, tc1); _mav_put_int64_t(buf, 8, ts1); - _mav_put_uint8_t(buf, 16, target_system); - _mav_put_uint8_t(buf, 17, target_component); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIMESYNC, buf, MAVLINK_MSG_ID_TIMESYNC_MIN_LEN, MAVLINK_MSG_ID_TIMESYNC_LEN, MAVLINK_MSG_ID_TIMESYNC_CRC); #else mavlink_timesync_t *packet = (mavlink_timesync_t *)msgbuf; packet->tc1 = tc1; packet->ts1 = ts1; - packet->target_system = target_system; - packet->target_component = target_component; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TIMESYNC, (const char *)packet, MAVLINK_MSG_ID_TIMESYNC_MIN_LEN, MAVLINK_MSG_ID_TIMESYNC_LEN, MAVLINK_MSG_ID_TIMESYNC_CRC); #endif @@ -286,7 +252,7 @@ static inline void mavlink_msg_timesync_send_buf(mavlink_message_t *msgbuf, mavl /** * @brief Get field tc1 from timesync message * - * @return [ns] Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. + * @return Time sync timestamp 1 */ static inline int64_t mavlink_msg_timesync_get_tc1(const mavlink_message_t* msg) { @@ -296,33 +262,13 @@ static inline int64_t mavlink_msg_timesync_get_tc1(const mavlink_message_t* msg) /** * @brief Get field ts1 from timesync message * - * @return [ns] Time sync timestamp 2. Timestamp of syncing component (mirrored in response). + * @return Time sync timestamp 2 */ static inline int64_t mavlink_msg_timesync_get_ts1(const mavlink_message_t* msg) { return _MAV_RETURN_int64_t(msg, 8); } -/** - * @brief Get field target_system from timesync message - * - * @return Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - */ -static inline uint8_t mavlink_msg_timesync_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 16); -} - -/** - * @brief Get field target_component from timesync message - * - * @return Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. - */ -static inline uint8_t mavlink_msg_timesync_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 17); -} - /** * @brief Decode a timesync message into a struct * @@ -334,8 +280,6 @@ static inline void mavlink_msg_timesync_decode(const mavlink_message_t* msg, mav #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS timesync->tc1 = mavlink_msg_timesync_get_tc1(msg); timesync->ts1 = mavlink_msg_timesync_get_ts1(msg); - timesync->target_system = mavlink_msg_timesync_get_target_system(msg); - timesync->target_component = mavlink_msg_timesync_get_target_component(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_TIMESYNC_LEN? msg->len : MAVLINK_MSG_ID_TIMESYNC_LEN; memset(timesync, 0, MAVLINK_MSG_ID_TIMESYNC_LEN); diff --git a/common/mavlink_msg_trajectory_representation_bezier.h b/common/mavlink_msg_trajectory_representation_bezier.h deleted file mode 100644 index dafb2e208..000000000 --- a/common/mavlink_msg_trajectory_representation_bezier.h +++ /dev/null @@ -1,422 +0,0 @@ -#pragma once -// MESSAGE TRAJECTORY_REPRESENTATION_BEZIER PACKING - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER 333 - - -typedef struct __mavlink_trajectory_representation_bezier_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - float pos_x[5]; /*< [m] X-coordinate of bezier control points. Set to NaN if not being used*/ - float pos_y[5]; /*< [m] Y-coordinate of bezier control points. Set to NaN if not being used*/ - float pos_z[5]; /*< [m] Z-coordinate of bezier control points. Set to NaN if not being used*/ - float delta[5]; /*< [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated*/ - float pos_yaw[5]; /*< [rad] Yaw. Set to NaN for unchanged*/ - uint8_t valid_points; /*< Number of valid control points (up-to 5 points are possible)*/ -} mavlink_trajectory_representation_bezier_t; - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN 109 -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN 109 -#define MAVLINK_MSG_ID_333_LEN 109 -#define MAVLINK_MSG_ID_333_MIN_LEN 109 - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC 231 -#define MAVLINK_MSG_ID_333_CRC 231 - -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_X_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_Y_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_Z_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_DELTA_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_BEZIER_FIELD_POS_YAW_LEN 5 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER { \ - 333, \ - "TRAJECTORY_REPRESENTATION_BEZIER", \ - 7, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_bezier_t, time_usec) }, \ - { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_trajectory_representation_bezier_t, valid_points) }, \ - { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_bezier_t, pos_x) }, \ - { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_bezier_t, pos_y) }, \ - { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_bezier_t, pos_z) }, \ - { "delta", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_bezier_t, delta) }, \ - { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_bezier_t, pos_yaw) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER { \ - "TRAJECTORY_REPRESENTATION_BEZIER", \ - 7, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_bezier_t, time_usec) }, \ - { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 108, offsetof(mavlink_trajectory_representation_bezier_t, valid_points) }, \ - { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_bezier_t, pos_x) }, \ - { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_bezier_t, pos_y) }, \ - { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_bezier_t, pos_z) }, \ - { "delta", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_bezier_t, delta) }, \ - { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_bezier_t, pos_yaw) }, \ - } \ -} -#endif - -/** - * @brief Pack a trajectory_representation_bezier message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid control points (up-to 5 points are possible) - * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used - * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used - * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used - * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - * @param pos_yaw [rad] Yaw. Set to NaN for unchanged - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *delta, const float *pos_yaw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 108, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, delta, 5); - _mav_put_float_array(buf, 88, pos_yaw, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#else - mavlink_trajectory_representation_bezier_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.delta, delta, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -} - -/** - * @brief Pack a trajectory_representation_bezier message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid control points (up-to 5 points are possible) - * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used - * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used - * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used - * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - * @param pos_yaw [rad] Yaw. Set to NaN for unchanged - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *delta, const float *pos_yaw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 108, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, delta, 5); - _mav_put_float_array(buf, 88, pos_yaw, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#else - mavlink_trajectory_representation_bezier_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.delta, delta, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#endif -} - -/** - * @brief Pack a trajectory_representation_bezier message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid control points (up-to 5 points are possible) - * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used - * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used - * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used - * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - * @param pos_yaw [rad] Yaw. Set to NaN for unchanged - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t time_usec,uint8_t valid_points,const float *pos_x,const float *pos_y,const float *pos_z,const float *delta,const float *pos_yaw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 108, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, delta, 5); - _mav_put_float_array(buf, 88, pos_yaw, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#else - mavlink_trajectory_representation_bezier_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.delta, delta, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -} - -/** - * @brief Encode a trajectory_representation_bezier struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_bezier C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier) -{ - return mavlink_msg_trajectory_representation_bezier_pack(system_id, component_id, msg, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw); -} - -/** - * @brief Encode a trajectory_representation_bezier struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_bezier C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier) -{ - return mavlink_msg_trajectory_representation_bezier_pack_chan(system_id, component_id, chan, msg, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw); -} - -/** - * @brief Encode a trajectory_representation_bezier struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_bezier C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier) -{ - return mavlink_msg_trajectory_representation_bezier_pack_status(system_id, component_id, _status, msg, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw); -} - -/** - * @brief Send a trajectory_representation_bezier message - * @param chan MAVLink channel to send the message - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid control points (up-to 5 points are possible) - * @param pos_x [m] X-coordinate of bezier control points. Set to NaN if not being used - * @param pos_y [m] Y-coordinate of bezier control points. Set to NaN if not being used - * @param pos_z [m] Z-coordinate of bezier control points. Set to NaN if not being used - * @param delta [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - * @param pos_yaw [rad] Yaw. Set to NaN for unchanged - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_trajectory_representation_bezier_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *delta, const float *pos_yaw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 108, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, delta, 5); - _mav_put_float_array(buf, 88, pos_yaw, 5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#else - mavlink_trajectory_representation_bezier_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.delta, delta, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)&packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#endif -} - -/** - * @brief Send a trajectory_representation_bezier message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_trajectory_representation_bezier_send_struct(mavlink_channel_t chan, const mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_trajectory_representation_bezier_send(chan, trajectory_representation_bezier->time_usec, trajectory_representation_bezier->valid_points, trajectory_representation_bezier->pos_x, trajectory_representation_bezier->pos_y, trajectory_representation_bezier->pos_z, trajectory_representation_bezier->delta, trajectory_representation_bezier->pos_yaw); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)trajectory_representation_bezier, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#endif -} - -#if MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_trajectory_representation_bezier_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *delta, const float *pos_yaw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 108, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, delta, 5); - _mav_put_float_array(buf, 88, pos_yaw, 5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#else - mavlink_trajectory_representation_bezier_t *packet = (mavlink_trajectory_representation_bezier_t *)msgbuf; - packet->time_usec = time_usec; - packet->valid_points = valid_points; - mav_array_memcpy(packet->pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet->pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet->pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet->delta, delta, sizeof(float)*5); - mav_array_memcpy(packet->pos_yaw, pos_yaw, sizeof(float)*5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER, (const char *)packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_CRC); -#endif -} -#endif - -#endif - -// MESSAGE TRAJECTORY_REPRESENTATION_BEZIER UNPACKING - - -/** - * @brief Get field time_usec from trajectory_representation_bezier message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_trajectory_representation_bezier_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field valid_points from trajectory_representation_bezier message - * - * @return Number of valid control points (up-to 5 points are possible) - */ -static inline uint8_t mavlink_msg_trajectory_representation_bezier_get_valid_points(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 108); -} - -/** - * @brief Get field pos_x from trajectory_representation_bezier message - * - * @return [m] X-coordinate of bezier control points. Set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_x(const mavlink_message_t* msg, float *pos_x) -{ - return _MAV_RETURN_float_array(msg, pos_x, 5, 8); -} - -/** - * @brief Get field pos_y from trajectory_representation_bezier message - * - * @return [m] Y-coordinate of bezier control points. Set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_y(const mavlink_message_t* msg, float *pos_y) -{ - return _MAV_RETURN_float_array(msg, pos_y, 5, 28); -} - -/** - * @brief Get field pos_z from trajectory_representation_bezier message - * - * @return [m] Z-coordinate of bezier control points. Set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_z(const mavlink_message_t* msg, float *pos_z) -{ - return _MAV_RETURN_float_array(msg, pos_z, 5, 48); -} - -/** - * @brief Get field delta from trajectory_representation_bezier message - * - * @return [s] Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_delta(const mavlink_message_t* msg, float *delta) -{ - return _MAV_RETURN_float_array(msg, delta, 5, 68); -} - -/** - * @brief Get field pos_yaw from trajectory_representation_bezier message - * - * @return [rad] Yaw. Set to NaN for unchanged - */ -static inline uint16_t mavlink_msg_trajectory_representation_bezier_get_pos_yaw(const mavlink_message_t* msg, float *pos_yaw) -{ - return _MAV_RETURN_float_array(msg, pos_yaw, 5, 88); -} - -/** - * @brief Decode a trajectory_representation_bezier message into a struct - * - * @param msg The message to decode - * @param trajectory_representation_bezier C-struct to decode the message contents into - */ -static inline void mavlink_msg_trajectory_representation_bezier_decode(const mavlink_message_t* msg, mavlink_trajectory_representation_bezier_t* trajectory_representation_bezier) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - trajectory_representation_bezier->time_usec = mavlink_msg_trajectory_representation_bezier_get_time_usec(msg); - mavlink_msg_trajectory_representation_bezier_get_pos_x(msg, trajectory_representation_bezier->pos_x); - mavlink_msg_trajectory_representation_bezier_get_pos_y(msg, trajectory_representation_bezier->pos_y); - mavlink_msg_trajectory_representation_bezier_get_pos_z(msg, trajectory_representation_bezier->pos_z); - mavlink_msg_trajectory_representation_bezier_get_delta(msg, trajectory_representation_bezier->delta); - mavlink_msg_trajectory_representation_bezier_get_pos_yaw(msg, trajectory_representation_bezier->pos_yaw); - trajectory_representation_bezier->valid_points = mavlink_msg_trajectory_representation_bezier_get_valid_points(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN? msg->len : MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN; - memset(trajectory_representation_bezier, 0, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_LEN); - memcpy(trajectory_representation_bezier, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_trajectory_representation_waypoints.h b/common/mavlink_msg_trajectory_representation_waypoints.h deleted file mode 100644 index 4966e4c58..000000000 --- a/common/mavlink_msg_trajectory_representation_waypoints.h +++ /dev/null @@ -1,625 +0,0 @@ -#pragma once -// MESSAGE TRAJECTORY_REPRESENTATION_WAYPOINTS PACKING - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS 332 - - -typedef struct __mavlink_trajectory_representation_waypoints_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - float pos_x[5]; /*< [m] X-coordinate of waypoint, set to NaN if not being used*/ - float pos_y[5]; /*< [m] Y-coordinate of waypoint, set to NaN if not being used*/ - float pos_z[5]; /*< [m] Z-coordinate of waypoint, set to NaN if not being used*/ - float vel_x[5]; /*< [m/s] X-velocity of waypoint, set to NaN if not being used*/ - float vel_y[5]; /*< [m/s] Y-velocity of waypoint, set to NaN if not being used*/ - float vel_z[5]; /*< [m/s] Z-velocity of waypoint, set to NaN if not being used*/ - float acc_x[5]; /*< [m/s/s] X-acceleration of waypoint, set to NaN if not being used*/ - float acc_y[5]; /*< [m/s/s] Y-acceleration of waypoint, set to NaN if not being used*/ - float acc_z[5]; /*< [m/s/s] Z-acceleration of waypoint, set to NaN if not being used*/ - float pos_yaw[5]; /*< [rad] Yaw angle, set to NaN if not being used*/ - float vel_yaw[5]; /*< [rad/s] Yaw rate, set to NaN if not being used*/ - uint16_t command[5]; /*< MAV_CMD command id of waypoint, set to UINT16_MAX if not being used.*/ - uint8_t valid_points; /*< Number of valid points (up-to 5 waypoints are possible)*/ -} mavlink_trajectory_representation_waypoints_t; - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN 239 -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN 239 -#define MAVLINK_MSG_ID_332_LEN 239 -#define MAVLINK_MSG_ID_332_MIN_LEN 239 - -#define MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC 236 -#define MAVLINK_MSG_ID_332_CRC 236 - -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_X_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_Y_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_Z_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_VEL_X_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_VEL_Y_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_VEL_Z_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_ACC_X_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_ACC_Y_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_ACC_Z_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_POS_YAW_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_VEL_YAW_LEN 5 -#define MAVLINK_MSG_TRAJECTORY_REPRESENTATION_WAYPOINTS_FIELD_COMMAND_LEN 5 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS { \ - 332, \ - "TRAJECTORY_REPRESENTATION_WAYPOINTS", \ - 14, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \ - { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 238, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \ - { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \ - { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \ - { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \ - { "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \ - { "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \ - { "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 108, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \ - { "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 128, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \ - { "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 148, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \ - { "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 168, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \ - { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 188, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \ - { "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 208, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \ - { "command", NULL, MAVLINK_TYPE_UINT16_T, 5, 228, offsetof(mavlink_trajectory_representation_waypoints_t, command) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS { \ - "TRAJECTORY_REPRESENTATION_WAYPOINTS", \ - 14, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_trajectory_representation_waypoints_t, time_usec) }, \ - { "valid_points", NULL, MAVLINK_TYPE_UINT8_T, 0, 238, offsetof(mavlink_trajectory_representation_waypoints_t, valid_points) }, \ - { "pos_x", NULL, MAVLINK_TYPE_FLOAT, 5, 8, offsetof(mavlink_trajectory_representation_waypoints_t, pos_x) }, \ - { "pos_y", NULL, MAVLINK_TYPE_FLOAT, 5, 28, offsetof(mavlink_trajectory_representation_waypoints_t, pos_y) }, \ - { "pos_z", NULL, MAVLINK_TYPE_FLOAT, 5, 48, offsetof(mavlink_trajectory_representation_waypoints_t, pos_z) }, \ - { "vel_x", NULL, MAVLINK_TYPE_FLOAT, 5, 68, offsetof(mavlink_trajectory_representation_waypoints_t, vel_x) }, \ - { "vel_y", NULL, MAVLINK_TYPE_FLOAT, 5, 88, offsetof(mavlink_trajectory_representation_waypoints_t, vel_y) }, \ - { "vel_z", NULL, MAVLINK_TYPE_FLOAT, 5, 108, offsetof(mavlink_trajectory_representation_waypoints_t, vel_z) }, \ - { "acc_x", NULL, MAVLINK_TYPE_FLOAT, 5, 128, offsetof(mavlink_trajectory_representation_waypoints_t, acc_x) }, \ - { "acc_y", NULL, MAVLINK_TYPE_FLOAT, 5, 148, offsetof(mavlink_trajectory_representation_waypoints_t, acc_y) }, \ - { "acc_z", NULL, MAVLINK_TYPE_FLOAT, 5, 168, offsetof(mavlink_trajectory_representation_waypoints_t, acc_z) }, \ - { "pos_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 188, offsetof(mavlink_trajectory_representation_waypoints_t, pos_yaw) }, \ - { "vel_yaw", NULL, MAVLINK_TYPE_FLOAT, 5, 208, offsetof(mavlink_trajectory_representation_waypoints_t, vel_yaw) }, \ - { "command", NULL, MAVLINK_TYPE_UINT16_T, 5, 228, offsetof(mavlink_trajectory_representation_waypoints_t, command) }, \ - } \ -} -#endif - -/** - * @brief Pack a trajectory_representation_waypoints message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid points (up-to 5 waypoints are possible) - * @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used - * @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used - * @param pos_z [m] Z-coordinate of waypoint, set to NaN if not being used - * @param vel_x [m/s] X-velocity of waypoint, set to NaN if not being used - * @param vel_y [m/s] Y-velocity of waypoint, set to NaN if not being used - * @param vel_z [m/s] Z-velocity of waypoint, set to NaN if not being used - * @param acc_x [m/s/s] X-acceleration of waypoint, set to NaN if not being used - * @param acc_y [m/s/s] Y-acceleration of waypoint, set to NaN if not being used - * @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used - * @param pos_yaw [rad] Yaw angle, set to NaN if not being used - * @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used - * @param command MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 238, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, vel_x, 5); - _mav_put_float_array(buf, 88, vel_y, 5); - _mav_put_float_array(buf, 108, vel_z, 5); - _mav_put_float_array(buf, 128, acc_x, 5); - _mav_put_float_array(buf, 148, acc_y, 5); - _mav_put_float_array(buf, 168, acc_z, 5); - _mav_put_float_array(buf, 188, pos_yaw, 5); - _mav_put_float_array(buf, 208, vel_yaw, 5); - _mav_put_uint16_t_array(buf, 228, command, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#else - mavlink_trajectory_representation_waypoints_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.vel_x, vel_x, sizeof(float)*5); - mav_array_memcpy(packet.vel_y, vel_y, sizeof(float)*5); - mav_array_memcpy(packet.vel_z, vel_z, sizeof(float)*5); - mav_array_memcpy(packet.acc_x, acc_x, sizeof(float)*5); - mav_array_memcpy(packet.acc_y, acc_y, sizeof(float)*5); - mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -} - -/** - * @brief Pack a trajectory_representation_waypoints message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid points (up-to 5 waypoints are possible) - * @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used - * @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used - * @param pos_z [m] Z-coordinate of waypoint, set to NaN if not being used - * @param vel_x [m/s] X-velocity of waypoint, set to NaN if not being used - * @param vel_y [m/s] Y-velocity of waypoint, set to NaN if not being used - * @param vel_z [m/s] Z-velocity of waypoint, set to NaN if not being used - * @param acc_x [m/s/s] X-acceleration of waypoint, set to NaN if not being used - * @param acc_y [m/s/s] Y-acceleration of waypoint, set to NaN if not being used - * @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used - * @param pos_yaw [rad] Yaw angle, set to NaN if not being used - * @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used - * @param command MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 238, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, vel_x, 5); - _mav_put_float_array(buf, 88, vel_y, 5); - _mav_put_float_array(buf, 108, vel_z, 5); - _mav_put_float_array(buf, 128, acc_x, 5); - _mav_put_float_array(buf, 148, acc_y, 5); - _mav_put_float_array(buf, 168, acc_z, 5); - _mav_put_float_array(buf, 188, pos_yaw, 5); - _mav_put_float_array(buf, 208, vel_yaw, 5); - _mav_put_uint16_t_array(buf, 228, command, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#else - mavlink_trajectory_representation_waypoints_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.vel_x, vel_x, sizeof(float)*5); - mav_array_memcpy(packet.vel_y, vel_y, sizeof(float)*5); - mav_array_memcpy(packet.vel_z, vel_z, sizeof(float)*5); - mav_array_memcpy(packet.acc_x, acc_x, sizeof(float)*5); - mav_array_memcpy(packet.acc_y, acc_y, sizeof(float)*5); - mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#endif -} - -/** - * @brief Pack a trajectory_representation_waypoints message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid points (up-to 5 waypoints are possible) - * @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used - * @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used - * @param pos_z [m] Z-coordinate of waypoint, set to NaN if not being used - * @param vel_x [m/s] X-velocity of waypoint, set to NaN if not being used - * @param vel_y [m/s] Y-velocity of waypoint, set to NaN if not being used - * @param vel_z [m/s] Z-velocity of waypoint, set to NaN if not being used - * @param acc_x [m/s/s] X-acceleration of waypoint, set to NaN if not being used - * @param acc_y [m/s/s] Y-acceleration of waypoint, set to NaN if not being used - * @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used - * @param pos_yaw [rad] Yaw angle, set to NaN if not being used - * @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used - * @param command MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t time_usec,uint8_t valid_points,const float *pos_x,const float *pos_y,const float *pos_z,const float *vel_x,const float *vel_y,const float *vel_z,const float *acc_x,const float *acc_y,const float *acc_z,const float *pos_yaw,const float *vel_yaw,const uint16_t *command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 238, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, vel_x, 5); - _mav_put_float_array(buf, 88, vel_y, 5); - _mav_put_float_array(buf, 108, vel_z, 5); - _mav_put_float_array(buf, 128, acc_x, 5); - _mav_put_float_array(buf, 148, acc_y, 5); - _mav_put_float_array(buf, 168, acc_z, 5); - _mav_put_float_array(buf, 188, pos_yaw, 5); - _mav_put_float_array(buf, 208, vel_yaw, 5); - _mav_put_uint16_t_array(buf, 228, command, 5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#else - mavlink_trajectory_representation_waypoints_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.vel_x, vel_x, sizeof(float)*5); - mav_array_memcpy(packet.vel_y, vel_y, sizeof(float)*5); - mav_array_memcpy(packet.vel_z, vel_z, sizeof(float)*5); - mav_array_memcpy(packet.acc_x, acc_x, sizeof(float)*5); - mav_array_memcpy(packet.acc_y, acc_y, sizeof(float)*5); - mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -} - -/** - * @brief Encode a trajectory_representation_waypoints struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_waypoints C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints) -{ - return mavlink_msg_trajectory_representation_waypoints_pack(system_id, component_id, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command); -} - -/** - * @brief Encode a trajectory_representation_waypoints struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_waypoints C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints) -{ - return mavlink_msg_trajectory_representation_waypoints_pack_chan(system_id, component_id, chan, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command); -} - -/** - * @brief Encode a trajectory_representation_waypoints struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param trajectory_representation_waypoints C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints) -{ - return mavlink_msg_trajectory_representation_waypoints_pack_status(system_id, component_id, _status, msg, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command); -} - -/** - * @brief Send a trajectory_representation_waypoints message - * @param chan MAVLink channel to send the message - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param valid_points Number of valid points (up-to 5 waypoints are possible) - * @param pos_x [m] X-coordinate of waypoint, set to NaN if not being used - * @param pos_y [m] Y-coordinate of waypoint, set to NaN if not being used - * @param pos_z [m] Z-coordinate of waypoint, set to NaN if not being used - * @param vel_x [m/s] X-velocity of waypoint, set to NaN if not being used - * @param vel_y [m/s] Y-velocity of waypoint, set to NaN if not being used - * @param vel_z [m/s] Z-velocity of waypoint, set to NaN if not being used - * @param acc_x [m/s/s] X-acceleration of waypoint, set to NaN if not being used - * @param acc_y [m/s/s] Y-acceleration of waypoint, set to NaN if not being used - * @param acc_z [m/s/s] Z-acceleration of waypoint, set to NaN if not being used - * @param pos_yaw [rad] Yaw angle, set to NaN if not being used - * @param vel_yaw [rad/s] Yaw rate, set to NaN if not being used - * @param command MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_trajectory_representation_waypoints_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 238, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, vel_x, 5); - _mav_put_float_array(buf, 88, vel_y, 5); - _mav_put_float_array(buf, 108, vel_z, 5); - _mav_put_float_array(buf, 128, acc_x, 5); - _mav_put_float_array(buf, 148, acc_y, 5); - _mav_put_float_array(buf, 168, acc_z, 5); - _mav_put_float_array(buf, 188, pos_yaw, 5); - _mav_put_float_array(buf, 208, vel_yaw, 5); - _mav_put_uint16_t_array(buf, 228, command, 5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#else - mavlink_trajectory_representation_waypoints_t packet; - packet.time_usec = time_usec; - packet.valid_points = valid_points; - mav_array_memcpy(packet.pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet.pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet.pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet.vel_x, vel_x, sizeof(float)*5); - mav_array_memcpy(packet.vel_y, vel_y, sizeof(float)*5); - mav_array_memcpy(packet.vel_z, vel_z, sizeof(float)*5); - mav_array_memcpy(packet.acc_x, acc_x, sizeof(float)*5); - mav_array_memcpy(packet.acc_y, acc_y, sizeof(float)*5); - mav_array_memcpy(packet.acc_z, acc_z, sizeof(float)*5); - mav_array_memcpy(packet.pos_yaw, pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet.vel_yaw, vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet.command, command, sizeof(uint16_t)*5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)&packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#endif -} - -/** - * @brief Send a trajectory_representation_waypoints message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_trajectory_representation_waypoints_send_struct(mavlink_channel_t chan, const mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_trajectory_representation_waypoints_send(chan, trajectory_representation_waypoints->time_usec, trajectory_representation_waypoints->valid_points, trajectory_representation_waypoints->pos_x, trajectory_representation_waypoints->pos_y, trajectory_representation_waypoints->pos_z, trajectory_representation_waypoints->vel_x, trajectory_representation_waypoints->vel_y, trajectory_representation_waypoints->vel_z, trajectory_representation_waypoints->acc_x, trajectory_representation_waypoints->acc_y, trajectory_representation_waypoints->acc_z, trajectory_representation_waypoints->pos_yaw, trajectory_representation_waypoints->vel_yaw, trajectory_representation_waypoints->command); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)trajectory_representation_waypoints, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_trajectory_representation_waypoints_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t valid_points, const float *pos_x, const float *pos_y, const float *pos_z, const float *vel_x, const float *vel_y, const float *vel_z, const float *acc_x, const float *acc_y, const float *acc_z, const float *pos_yaw, const float *vel_yaw, const uint16_t *command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint8_t(buf, 238, valid_points); - _mav_put_float_array(buf, 8, pos_x, 5); - _mav_put_float_array(buf, 28, pos_y, 5); - _mav_put_float_array(buf, 48, pos_z, 5); - _mav_put_float_array(buf, 68, vel_x, 5); - _mav_put_float_array(buf, 88, vel_y, 5); - _mav_put_float_array(buf, 108, vel_z, 5); - _mav_put_float_array(buf, 128, acc_x, 5); - _mav_put_float_array(buf, 148, acc_y, 5); - _mav_put_float_array(buf, 168, acc_z, 5); - _mav_put_float_array(buf, 188, pos_yaw, 5); - _mav_put_float_array(buf, 208, vel_yaw, 5); - _mav_put_uint16_t_array(buf, 228, command, 5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, buf, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#else - mavlink_trajectory_representation_waypoints_t *packet = (mavlink_trajectory_representation_waypoints_t *)msgbuf; - packet->time_usec = time_usec; - packet->valid_points = valid_points; - mav_array_memcpy(packet->pos_x, pos_x, sizeof(float)*5); - mav_array_memcpy(packet->pos_y, pos_y, sizeof(float)*5); - mav_array_memcpy(packet->pos_z, pos_z, sizeof(float)*5); - mav_array_memcpy(packet->vel_x, vel_x, sizeof(float)*5); - mav_array_memcpy(packet->vel_y, vel_y, sizeof(float)*5); - mav_array_memcpy(packet->vel_z, vel_z, sizeof(float)*5); - mav_array_memcpy(packet->acc_x, acc_x, sizeof(float)*5); - mav_array_memcpy(packet->acc_y, acc_y, sizeof(float)*5); - mav_array_memcpy(packet->acc_z, acc_z, sizeof(float)*5); - mav_array_memcpy(packet->pos_yaw, pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet->vel_yaw, vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet->command, command, sizeof(uint16_t)*5); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS, (const char *)packet, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE TRAJECTORY_REPRESENTATION_WAYPOINTS UNPACKING - - -/** - * @brief Get field time_usec from trajectory_representation_waypoints message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_trajectory_representation_waypoints_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field valid_points from trajectory_representation_waypoints message - * - * @return Number of valid points (up-to 5 waypoints are possible) - */ -static inline uint8_t mavlink_msg_trajectory_representation_waypoints_get_valid_points(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 238); -} - -/** - * @brief Get field pos_x from trajectory_representation_waypoints message - * - * @return [m] X-coordinate of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_x(const mavlink_message_t* msg, float *pos_x) -{ - return _MAV_RETURN_float_array(msg, pos_x, 5, 8); -} - -/** - * @brief Get field pos_y from trajectory_representation_waypoints message - * - * @return [m] Y-coordinate of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_y(const mavlink_message_t* msg, float *pos_y) -{ - return _MAV_RETURN_float_array(msg, pos_y, 5, 28); -} - -/** - * @brief Get field pos_z from trajectory_representation_waypoints message - * - * @return [m] Z-coordinate of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_z(const mavlink_message_t* msg, float *pos_z) -{ - return _MAV_RETURN_float_array(msg, pos_z, 5, 48); -} - -/** - * @brief Get field vel_x from trajectory_representation_waypoints message - * - * @return [m/s] X-velocity of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_x(const mavlink_message_t* msg, float *vel_x) -{ - return _MAV_RETURN_float_array(msg, vel_x, 5, 68); -} - -/** - * @brief Get field vel_y from trajectory_representation_waypoints message - * - * @return [m/s] Y-velocity of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_y(const mavlink_message_t* msg, float *vel_y) -{ - return _MAV_RETURN_float_array(msg, vel_y, 5, 88); -} - -/** - * @brief Get field vel_z from trajectory_representation_waypoints message - * - * @return [m/s] Z-velocity of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_z(const mavlink_message_t* msg, float *vel_z) -{ - return _MAV_RETURN_float_array(msg, vel_z, 5, 108); -} - -/** - * @brief Get field acc_x from trajectory_representation_waypoints message - * - * @return [m/s/s] X-acceleration of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_x(const mavlink_message_t* msg, float *acc_x) -{ - return _MAV_RETURN_float_array(msg, acc_x, 5, 128); -} - -/** - * @brief Get field acc_y from trajectory_representation_waypoints message - * - * @return [m/s/s] Y-acceleration of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_y(const mavlink_message_t* msg, float *acc_y) -{ - return _MAV_RETURN_float_array(msg, acc_y, 5, 148); -} - -/** - * @brief Get field acc_z from trajectory_representation_waypoints message - * - * @return [m/s/s] Z-acceleration of waypoint, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_acc_z(const mavlink_message_t* msg, float *acc_z) -{ - return _MAV_RETURN_float_array(msg, acc_z, 5, 168); -} - -/** - * @brief Get field pos_yaw from trajectory_representation_waypoints message - * - * @return [rad] Yaw angle, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_pos_yaw(const mavlink_message_t* msg, float *pos_yaw) -{ - return _MAV_RETURN_float_array(msg, pos_yaw, 5, 188); -} - -/** - * @brief Get field vel_yaw from trajectory_representation_waypoints message - * - * @return [rad/s] Yaw rate, set to NaN if not being used - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_vel_yaw(const mavlink_message_t* msg, float *vel_yaw) -{ - return _MAV_RETURN_float_array(msg, vel_yaw, 5, 208); -} - -/** - * @brief Get field command from trajectory_representation_waypoints message - * - * @return MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - */ -static inline uint16_t mavlink_msg_trajectory_representation_waypoints_get_command(const mavlink_message_t* msg, uint16_t *command) -{ - return _MAV_RETURN_uint16_t_array(msg, command, 5, 228); -} - -/** - * @brief Decode a trajectory_representation_waypoints message into a struct - * - * @param msg The message to decode - * @param trajectory_representation_waypoints C-struct to decode the message contents into - */ -static inline void mavlink_msg_trajectory_representation_waypoints_decode(const mavlink_message_t* msg, mavlink_trajectory_representation_waypoints_t* trajectory_representation_waypoints) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - trajectory_representation_waypoints->time_usec = mavlink_msg_trajectory_representation_waypoints_get_time_usec(msg); - mavlink_msg_trajectory_representation_waypoints_get_pos_x(msg, trajectory_representation_waypoints->pos_x); - mavlink_msg_trajectory_representation_waypoints_get_pos_y(msg, trajectory_representation_waypoints->pos_y); - mavlink_msg_trajectory_representation_waypoints_get_pos_z(msg, trajectory_representation_waypoints->pos_z); - mavlink_msg_trajectory_representation_waypoints_get_vel_x(msg, trajectory_representation_waypoints->vel_x); - mavlink_msg_trajectory_representation_waypoints_get_vel_y(msg, trajectory_representation_waypoints->vel_y); - mavlink_msg_trajectory_representation_waypoints_get_vel_z(msg, trajectory_representation_waypoints->vel_z); - mavlink_msg_trajectory_representation_waypoints_get_acc_x(msg, trajectory_representation_waypoints->acc_x); - mavlink_msg_trajectory_representation_waypoints_get_acc_y(msg, trajectory_representation_waypoints->acc_y); - mavlink_msg_trajectory_representation_waypoints_get_acc_z(msg, trajectory_representation_waypoints->acc_z); - mavlink_msg_trajectory_representation_waypoints_get_pos_yaw(msg, trajectory_representation_waypoints->pos_yaw); - mavlink_msg_trajectory_representation_waypoints_get_vel_yaw(msg, trajectory_representation_waypoints->vel_yaw); - mavlink_msg_trajectory_representation_waypoints_get_command(msg, trajectory_representation_waypoints->command); - trajectory_representation_waypoints->valid_points = mavlink_msg_trajectory_representation_waypoints_get_valid_points(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN? msg->len : MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN; - memset(trajectory_representation_waypoints, 0, MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_LEN); - memcpy(trajectory_representation_waypoints, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/common/mavlink_msg_uavcan_node_info.h b/common/mavlink_msg_uavcan_node_info.h index c5b00a997..16f13137d 100644 --- a/common/mavlink_msg_uavcan_node_info.h +++ b/common/mavlink_msg_uavcan_node_info.h @@ -7,7 +7,7 @@ typedef struct __mavlink_uavcan_node_info_t { uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ uint32_t uptime_sec; /*< [s] Time since the start-up of the node.*/ - uint32_t sw_vcs_commit; /*< Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown.*/ + uint32_t sw_vcs_commit; /*< Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.*/ char name[80]; /*< Node name string. For example, "sapog.px4.io".*/ uint8_t hw_version_major; /*< Hardware major version number.*/ uint8_t hw_version_minor; /*< Hardware minor version number.*/ @@ -74,7 +74,7 @@ typedef struct __mavlink_uavcan_node_info_t { * @param hw_unique_id Hardware unique 128-bit ID. * @param sw_version_major Software major version number. * @param sw_version_minor Software minor version number. - * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. + * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavcan_node_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -125,7 +125,7 @@ static inline uint16_t mavlink_msg_uavcan_node_info_pack(uint8_t system_id, uint * @param hw_unique_id Hardware unique 128-bit ID. * @param sw_version_major Software major version number. * @param sw_version_minor Software minor version number. - * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. + * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavcan_node_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -179,7 +179,7 @@ static inline uint16_t mavlink_msg_uavcan_node_info_pack_status(uint8_t system_i * @param hw_unique_id Hardware unique 128-bit ID. * @param sw_version_major Software major version number. * @param sw_version_minor Software minor version number. - * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. + * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavcan_node_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -269,7 +269,7 @@ static inline uint16_t mavlink_msg_uavcan_node_info_encode_status(uint8_t system * @param hw_unique_id Hardware unique 128-bit ID. * @param sw_version_major Software major version number. * @param sw_version_minor Software minor version number. - * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. + * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -442,7 +442,7 @@ static inline uint8_t mavlink_msg_uavcan_node_info_get_sw_version_minor(const ma /** * @brief Get field sw_vcs_commit from uavcan_node_info message * - * @return Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. + * @return Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown. */ static inline uint32_t mavlink_msg_uavcan_node_info_get_sw_vcs_commit(const mavlink_message_t* msg) { diff --git a/common/mavlink_msg_video_stream_information.h b/common/mavlink_msg_video_stream_information.h index e40f1f942..91d6ab2b3 100644 --- a/common/mavlink_msg_video_stream_information.h +++ b/common/mavlink_msg_video_stream_information.h @@ -17,12 +17,11 @@ typedef struct __mavlink_video_stream_information_t { uint8_t type; /*< Type of stream.*/ char name[32]; /*< Stream name.*/ char uri[160]; /*< Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to).*/ - uint8_t encoding; /*< Encoding of stream.*/ } mavlink_video_stream_information_t; -#define MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN 214 +#define MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN 213 #define MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN 213 -#define MAVLINK_MSG_ID_269_LEN 214 +#define MAVLINK_MSG_ID_269_LEN 213 #define MAVLINK_MSG_ID_269_MIN_LEN 213 #define MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC 109 @@ -35,7 +34,7 @@ typedef struct __mavlink_video_stream_information_t { #define MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION { \ 269, \ "VIDEO_STREAM_INFORMATION", \ - 13, \ + 12, \ { { "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_video_stream_information_t, stream_id) }, \ { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_video_stream_information_t, count) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_video_stream_information_t, type) }, \ @@ -48,13 +47,12 @@ typedef struct __mavlink_video_stream_information_t { { "hfov", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_video_stream_information_t, hfov) }, \ { "name", NULL, MAVLINK_TYPE_CHAR, 32, 21, offsetof(mavlink_video_stream_information_t, name) }, \ { "uri", NULL, MAVLINK_TYPE_CHAR, 160, 53, offsetof(mavlink_video_stream_information_t, uri) }, \ - { "encoding", NULL, MAVLINK_TYPE_UINT8_T, 0, 213, offsetof(mavlink_video_stream_information_t, encoding) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION { \ "VIDEO_STREAM_INFORMATION", \ - 13, \ + 12, \ { { "stream_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_video_stream_information_t, stream_id) }, \ { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_video_stream_information_t, count) }, \ { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_video_stream_information_t, type) }, \ @@ -67,7 +65,6 @@ typedef struct __mavlink_video_stream_information_t { { "hfov", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_video_stream_information_t, hfov) }, \ { "name", NULL, MAVLINK_TYPE_CHAR, 32, 21, offsetof(mavlink_video_stream_information_t, name) }, \ { "uri", NULL, MAVLINK_TYPE_CHAR, 160, 53, offsetof(mavlink_video_stream_information_t, uri) }, \ - { "encoding", NULL, MAVLINK_TYPE_UINT8_T, 0, 213, offsetof(mavlink_video_stream_information_t, encoding) }, \ } \ } #endif @@ -90,11 +87,10 @@ typedef struct __mavlink_video_stream_information_t { * @param hfov [deg] Horizontal Field of view. * @param name Stream name. * @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - * @param encoding Encoding of stream. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_video_stream_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri, uint8_t encoding) + uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN]; @@ -108,7 +104,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack(uint8_t system_ _mav_put_uint8_t(buf, 18, stream_id); _mav_put_uint8_t(buf, 19, count); _mav_put_uint8_t(buf, 20, type); - _mav_put_uint8_t(buf, 213, encoding); _mav_put_char_array(buf, 21, name, 32); _mav_put_char_array(buf, 53, uri, 160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -124,7 +119,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack(uint8_t system_ packet.stream_id = stream_id; packet.count = count; packet.type = type; - packet.encoding = encoding; mav_array_memcpy(packet.name, name, sizeof(char)*32); mav_array_memcpy(packet.uri, uri, sizeof(char)*160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -153,11 +147,10 @@ static inline uint16_t mavlink_msg_video_stream_information_pack(uint8_t system_ * @param hfov [deg] Horizontal Field of view. * @param name Stream name. * @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - * @param encoding Encoding of stream. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_video_stream_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri, uint8_t encoding) + uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN]; @@ -171,7 +164,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_status(uint8_t _mav_put_uint8_t(buf, 18, stream_id); _mav_put_uint8_t(buf, 19, count); _mav_put_uint8_t(buf, 20, type); - _mav_put_uint8_t(buf, 213, encoding); _mav_put_char_array(buf, 21, name, 32); _mav_put_char_array(buf, 53, uri, 160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -187,7 +179,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_status(uint8_t packet.stream_id = stream_id; packet.count = count; packet.type = type; - packet.encoding = encoding; mav_array_memcpy(packet.name, name, sizeof(char)*32); mav_array_memcpy(packet.uri, uri, sizeof(char)*160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -219,12 +210,11 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_status(uint8_t * @param hfov [deg] Horizontal Field of view. * @param name Stream name. * @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - * @param encoding Encoding of stream. * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_video_stream_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - uint8_t stream_id,uint8_t count,uint8_t type,uint16_t flags,float framerate,uint16_t resolution_h,uint16_t resolution_v,uint32_t bitrate,uint16_t rotation,uint16_t hfov,const char *name,const char *uri,uint8_t encoding) + uint8_t stream_id,uint8_t count,uint8_t type,uint16_t flags,float framerate,uint16_t resolution_h,uint16_t resolution_v,uint32_t bitrate,uint16_t rotation,uint16_t hfov,const char *name,const char *uri) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN]; @@ -238,7 +228,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_chan(uint8_t sy _mav_put_uint8_t(buf, 18, stream_id); _mav_put_uint8_t(buf, 19, count); _mav_put_uint8_t(buf, 20, type); - _mav_put_uint8_t(buf, 213, encoding); _mav_put_char_array(buf, 21, name, 32); _mav_put_char_array(buf, 53, uri, 160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -254,7 +243,6 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_chan(uint8_t sy packet.stream_id = stream_id; packet.count = count; packet.type = type; - packet.encoding = encoding; mav_array_memcpy(packet.name, name, sizeof(char)*32); mav_array_memcpy(packet.uri, uri, sizeof(char)*160); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); @@ -274,7 +262,7 @@ static inline uint16_t mavlink_msg_video_stream_information_pack_chan(uint8_t sy */ static inline uint16_t mavlink_msg_video_stream_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_video_stream_information_t* video_stream_information) { - return mavlink_msg_video_stream_information_pack(system_id, component_id, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri, video_stream_information->encoding); + return mavlink_msg_video_stream_information_pack(system_id, component_id, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri); } /** @@ -288,7 +276,7 @@ static inline uint16_t mavlink_msg_video_stream_information_encode(uint8_t syste */ static inline uint16_t mavlink_msg_video_stream_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_video_stream_information_t* video_stream_information) { - return mavlink_msg_video_stream_information_pack_chan(system_id, component_id, chan, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri, video_stream_information->encoding); + return mavlink_msg_video_stream_information_pack_chan(system_id, component_id, chan, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri); } /** @@ -302,7 +290,7 @@ static inline uint16_t mavlink_msg_video_stream_information_encode_chan(uint8_t */ static inline uint16_t mavlink_msg_video_stream_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_video_stream_information_t* video_stream_information) { - return mavlink_msg_video_stream_information_pack_status(system_id, component_id, _status, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri, video_stream_information->encoding); + return mavlink_msg_video_stream_information_pack_status(system_id, component_id, _status, msg, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri); } /** @@ -321,11 +309,10 @@ static inline uint16_t mavlink_msg_video_stream_information_encode_status(uint8_ * @param hfov [deg] Horizontal Field of view. * @param name Stream name. * @param uri Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - * @param encoding Encoding of stream. */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_video_stream_information_send(mavlink_channel_t chan, uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri, uint8_t encoding) +static inline void mavlink_msg_video_stream_information_send(mavlink_channel_t chan, uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN]; @@ -339,7 +326,6 @@ static inline void mavlink_msg_video_stream_information_send(mavlink_channel_t c _mav_put_uint8_t(buf, 18, stream_id); _mav_put_uint8_t(buf, 19, count); _mav_put_uint8_t(buf, 20, type); - _mav_put_uint8_t(buf, 213, encoding); _mav_put_char_array(buf, 21, name, 32); _mav_put_char_array(buf, 53, uri, 160); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION, buf, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC); @@ -355,7 +341,6 @@ static inline void mavlink_msg_video_stream_information_send(mavlink_channel_t c packet.stream_id = stream_id; packet.count = count; packet.type = type; - packet.encoding = encoding; mav_array_memcpy(packet.name, name, sizeof(char)*32); mav_array_memcpy(packet.uri, uri, sizeof(char)*160); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION, (const char *)&packet, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC); @@ -370,7 +355,7 @@ static inline void mavlink_msg_video_stream_information_send(mavlink_channel_t c static inline void mavlink_msg_video_stream_information_send_struct(mavlink_channel_t chan, const mavlink_video_stream_information_t* video_stream_information) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_video_stream_information_send(chan, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri, video_stream_information->encoding); + mavlink_msg_video_stream_information_send(chan, video_stream_information->stream_id, video_stream_information->count, video_stream_information->type, video_stream_information->flags, video_stream_information->framerate, video_stream_information->resolution_h, video_stream_information->resolution_v, video_stream_information->bitrate, video_stream_information->rotation, video_stream_information->hfov, video_stream_information->name, video_stream_information->uri); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION, (const char *)video_stream_information, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC); #endif @@ -384,7 +369,7 @@ static inline void mavlink_msg_video_stream_information_send_struct(mavlink_chan is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_video_stream_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri, uint8_t encoding) +static inline void mavlink_msg_video_stream_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t stream_id, uint8_t count, uint8_t type, uint16_t flags, float framerate, uint16_t resolution_h, uint16_t resolution_v, uint32_t bitrate, uint16_t rotation, uint16_t hfov, const char *name, const char *uri) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; @@ -398,7 +383,6 @@ static inline void mavlink_msg_video_stream_information_send_buf(mavlink_message _mav_put_uint8_t(buf, 18, stream_id); _mav_put_uint8_t(buf, 19, count); _mav_put_uint8_t(buf, 20, type); - _mav_put_uint8_t(buf, 213, encoding); _mav_put_char_array(buf, 21, name, 32); _mav_put_char_array(buf, 53, uri, 160); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION, buf, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC); @@ -414,7 +398,6 @@ static inline void mavlink_msg_video_stream_information_send_buf(mavlink_message packet->stream_id = stream_id; packet->count = count; packet->type = type; - packet->encoding = encoding; mav_array_memcpy(packet->name, name, sizeof(char)*32); mav_array_memcpy(packet->uri, uri, sizeof(char)*160); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION, (const char *)packet, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_CRC); @@ -547,16 +530,6 @@ static inline uint16_t mavlink_msg_video_stream_information_get_uri(const mavlin return _MAV_RETURN_char_array(msg, uri, 160, 53); } -/** - * @brief Get field encoding from video_stream_information message - * - * @return Encoding of stream. - */ -static inline uint8_t mavlink_msg_video_stream_information_get_encoding(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 213); -} - /** * @brief Decode a video_stream_information message into a struct * @@ -578,7 +551,6 @@ static inline void mavlink_msg_video_stream_information_decode(const mavlink_mes video_stream_information->type = mavlink_msg_video_stream_information_get_type(msg); mavlink_msg_video_stream_information_get_name(msg, video_stream_information->name); mavlink_msg_video_stream_information_get_uri(msg, video_stream_information->uri); - video_stream_information->encoding = mavlink_msg_video_stream_information_get_encoding(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN; memset(video_stream_information, 0, MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION_LEN); diff --git a/common/mavlink_msg_wifi_config_ap.h b/common/mavlink_msg_wifi_config_ap.h index 37daa7c54..91676ec88 100644 --- a/common/mavlink_msg_wifi_config_ap.h +++ b/common/mavlink_msg_wifi_config_ap.h @@ -7,13 +7,11 @@ typedef struct __mavlink_wifi_config_ap_t { char ssid[32]; /*< Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response.*/ char password[64]; /*< Password. Blank for an open AP. MD5 hash when message is sent back as a response.*/ - int8_t mode; /*< WiFi Mode.*/ - int8_t response; /*< Message acceptance response (sent back to GS).*/ } mavlink_wifi_config_ap_t; -#define MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN 98 +#define MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN 96 #define MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN 96 -#define MAVLINK_MSG_ID_299_LEN 98 +#define MAVLINK_MSG_ID_299_LEN 96 #define MAVLINK_MSG_ID_299_MIN_LEN 96 #define MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC 19 @@ -26,21 +24,17 @@ typedef struct __mavlink_wifi_config_ap_t { #define MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP { \ 299, \ "WIFI_CONFIG_AP", \ - 4, \ + 2, \ { { "ssid", NULL, MAVLINK_TYPE_CHAR, 32, 0, offsetof(mavlink_wifi_config_ap_t, ssid) }, \ { "password", NULL, MAVLINK_TYPE_CHAR, 64, 32, offsetof(mavlink_wifi_config_ap_t, password) }, \ - { "mode", NULL, MAVLINK_TYPE_INT8_T, 0, 96, offsetof(mavlink_wifi_config_ap_t, mode) }, \ - { "response", NULL, MAVLINK_TYPE_INT8_T, 0, 97, offsetof(mavlink_wifi_config_ap_t, response) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP { \ "WIFI_CONFIG_AP", \ - 4, \ + 2, \ { { "ssid", NULL, MAVLINK_TYPE_CHAR, 32, 0, offsetof(mavlink_wifi_config_ap_t, ssid) }, \ { "password", NULL, MAVLINK_TYPE_CHAR, 64, 32, offsetof(mavlink_wifi_config_ap_t, password) }, \ - { "mode", NULL, MAVLINK_TYPE_INT8_T, 0, 96, offsetof(mavlink_wifi_config_ap_t, mode) }, \ - { "response", NULL, MAVLINK_TYPE_INT8_T, 0, 97, offsetof(mavlink_wifi_config_ap_t, response) }, \ } \ } #endif @@ -53,24 +47,20 @@ typedef struct __mavlink_wifi_config_ap_t { * * @param ssid Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response. * @param password Password. Blank for an open AP. MD5 hash when message is sent back as a response. - * @param mode WiFi Mode. - * @param response Message acceptance response (sent back to GS). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wifi_config_ap_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - const char *ssid, const char *password, int8_t mode, int8_t response) + const char *ssid, const char *password) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN]; - _mav_put_int8_t(buf, 96, mode); - _mav_put_int8_t(buf, 97, response); + _mav_put_char_array(buf, 0, ssid, 32); _mav_put_char_array(buf, 32, password, 64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); #else mavlink_wifi_config_ap_t packet; - packet.mode = mode; - packet.response = response; + mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); mav_array_memcpy(packet.password, password, sizeof(char)*64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); @@ -89,24 +79,20 @@ static inline uint16_t mavlink_msg_wifi_config_ap_pack(uint8_t system_id, uint8_ * * @param ssid Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response. * @param password Password. Blank for an open AP. MD5 hash when message is sent back as a response. - * @param mode WiFi Mode. - * @param response Message acceptance response (sent back to GS). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wifi_config_ap_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - const char *ssid, const char *password, int8_t mode, int8_t response) + const char *ssid, const char *password) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN]; - _mav_put_int8_t(buf, 96, mode); - _mav_put_int8_t(buf, 97, response); + _mav_put_char_array(buf, 0, ssid, 32); _mav_put_char_array(buf, 32, password, 64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); #else mavlink_wifi_config_ap_t packet; - packet.mode = mode; - packet.response = response; + mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); mav_array_memcpy(packet.password, password, sizeof(char)*64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); @@ -128,25 +114,21 @@ static inline uint16_t mavlink_msg_wifi_config_ap_pack_status(uint8_t system_id, * @param msg The MAVLink message to compress the data into * @param ssid Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response. * @param password Password. Blank for an open AP. MD5 hash when message is sent back as a response. - * @param mode WiFi Mode. - * @param response Message acceptance response (sent back to GS). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wifi_config_ap_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, - const char *ssid,const char *password,int8_t mode,int8_t response) + const char *ssid,const char *password) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN]; - _mav_put_int8_t(buf, 96, mode); - _mav_put_int8_t(buf, 97, response); + _mav_put_char_array(buf, 0, ssid, 32); _mav_put_char_array(buf, 32, password, 64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); #else mavlink_wifi_config_ap_t packet; - packet.mode = mode; - packet.response = response; + mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); mav_array_memcpy(packet.password, password, sizeof(char)*64); memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); @@ -166,7 +148,7 @@ static inline uint16_t mavlink_msg_wifi_config_ap_pack_chan(uint8_t system_id, u */ static inline uint16_t mavlink_msg_wifi_config_ap_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_wifi_config_ap_t* wifi_config_ap) { - return mavlink_msg_wifi_config_ap_pack(system_id, component_id, msg, wifi_config_ap->ssid, wifi_config_ap->password, wifi_config_ap->mode, wifi_config_ap->response); + return mavlink_msg_wifi_config_ap_pack(system_id, component_id, msg, wifi_config_ap->ssid, wifi_config_ap->password); } /** @@ -180,7 +162,7 @@ static inline uint16_t mavlink_msg_wifi_config_ap_encode(uint8_t system_id, uint */ static inline uint16_t mavlink_msg_wifi_config_ap_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_wifi_config_ap_t* wifi_config_ap) { - return mavlink_msg_wifi_config_ap_pack_chan(system_id, component_id, chan, msg, wifi_config_ap->ssid, wifi_config_ap->password, wifi_config_ap->mode, wifi_config_ap->response); + return mavlink_msg_wifi_config_ap_pack_chan(system_id, component_id, chan, msg, wifi_config_ap->ssid, wifi_config_ap->password); } /** @@ -194,7 +176,7 @@ static inline uint16_t mavlink_msg_wifi_config_ap_encode_chan(uint8_t system_id, */ static inline uint16_t mavlink_msg_wifi_config_ap_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_wifi_config_ap_t* wifi_config_ap) { - return mavlink_msg_wifi_config_ap_pack_status(system_id, component_id, _status, msg, wifi_config_ap->ssid, wifi_config_ap->password, wifi_config_ap->mode, wifi_config_ap->response); + return mavlink_msg_wifi_config_ap_pack_status(system_id, component_id, _status, msg, wifi_config_ap->ssid, wifi_config_ap->password); } /** @@ -203,24 +185,20 @@ static inline uint16_t mavlink_msg_wifi_config_ap_encode_status(uint8_t system_i * * @param ssid Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response. * @param password Password. Blank for an open AP. MD5 hash when message is sent back as a response. - * @param mode WiFi Mode. - * @param response Message acceptance response (sent back to GS). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS -static inline void mavlink_msg_wifi_config_ap_send(mavlink_channel_t chan, const char *ssid, const char *password, int8_t mode, int8_t response) +static inline void mavlink_msg_wifi_config_ap_send(mavlink_channel_t chan, const char *ssid, const char *password) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN]; - _mav_put_int8_t(buf, 96, mode); - _mav_put_int8_t(buf, 97, response); + _mav_put_char_array(buf, 0, ssid, 32); _mav_put_char_array(buf, 32, password, 64); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_CONFIG_AP, buf, MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC); #else mavlink_wifi_config_ap_t packet; - packet.mode = mode; - packet.response = response; + mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); mav_array_memcpy(packet.password, password, sizeof(char)*64); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_CONFIG_AP, (const char *)&packet, MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC); @@ -235,7 +213,7 @@ static inline void mavlink_msg_wifi_config_ap_send(mavlink_channel_t chan, const static inline void mavlink_msg_wifi_config_ap_send_struct(mavlink_channel_t chan, const mavlink_wifi_config_ap_t* wifi_config_ap) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_wifi_config_ap_send(chan, wifi_config_ap->ssid, wifi_config_ap->password, wifi_config_ap->mode, wifi_config_ap->response); + mavlink_msg_wifi_config_ap_send(chan, wifi_config_ap->ssid, wifi_config_ap->password); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_CONFIG_AP, (const char *)wifi_config_ap, MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC); #endif @@ -249,19 +227,17 @@ static inline void mavlink_msg_wifi_config_ap_send_struct(mavlink_channel_t chan is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ -static inline void mavlink_msg_wifi_config_ap_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const char *ssid, const char *password, int8_t mode, int8_t response) +static inline void mavlink_msg_wifi_config_ap_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const char *ssid, const char *password) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; - _mav_put_int8_t(buf, 96, mode); - _mav_put_int8_t(buf, 97, response); + _mav_put_char_array(buf, 0, ssid, 32); _mav_put_char_array(buf, 32, password, 64); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_CONFIG_AP, buf, MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC); #else mavlink_wifi_config_ap_t *packet = (mavlink_wifi_config_ap_t *)msgbuf; - packet->mode = mode; - packet->response = response; + mav_array_memcpy(packet->ssid, ssid, sizeof(char)*32); mav_array_memcpy(packet->password, password, sizeof(char)*64); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_CONFIG_AP, (const char *)packet, MAVLINK_MSG_ID_WIFI_CONFIG_AP_MIN_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN, MAVLINK_MSG_ID_WIFI_CONFIG_AP_CRC); @@ -294,26 +270,6 @@ static inline uint16_t mavlink_msg_wifi_config_ap_get_password(const mavlink_mes return _MAV_RETURN_char_array(msg, password, 64, 32); } -/** - * @brief Get field mode from wifi_config_ap message - * - * @return WiFi Mode. - */ -static inline int8_t mavlink_msg_wifi_config_ap_get_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int8_t(msg, 96); -} - -/** - * @brief Get field response from wifi_config_ap message - * - * @return Message acceptance response (sent back to GS). - */ -static inline int8_t mavlink_msg_wifi_config_ap_get_response(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int8_t(msg, 97); -} - /** * @brief Decode a wifi_config_ap message into a struct * @@ -325,8 +281,6 @@ static inline void mavlink_msg_wifi_config_ap_decode(const mavlink_message_t* ms #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS mavlink_msg_wifi_config_ap_get_ssid(msg, wifi_config_ap->ssid); mavlink_msg_wifi_config_ap_get_password(msg, wifi_config_ap->password); - wifi_config_ap->mode = mavlink_msg_wifi_config_ap_get_mode(msg); - wifi_config_ap->response = mavlink_msg_wifi_config_ap_get_response(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN? msg->len : MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN; memset(wifi_config_ap, 0, MAVLINK_MSG_ID_WIFI_CONFIG_AP_LEN); diff --git a/common/mavlink_msg_wind_cov.h b/common/mavlink_msg_wind_cov.h index d2a11140d..094f8ab7f 100644 --- a/common/mavlink_msg_wind_cov.h +++ b/common/mavlink_msg_wind_cov.h @@ -6,14 +6,14 @@ typedef struct __mavlink_wind_cov_t { uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - float wind_x; /*< [m/s] Wind in North (NED) direction (NAN if unknown)*/ - float wind_y; /*< [m/s] Wind in East (NED) direction (NAN if unknown)*/ - float wind_z; /*< [m/s] Wind in down (NED) direction (NAN if unknown)*/ - float var_horiz; /*< [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)*/ - float var_vert; /*< [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)*/ - float wind_alt; /*< [m] Altitude (MSL) that this measurement was taken at (NAN if unknown)*/ - float horiz_accuracy; /*< [m/s] Horizontal speed 1-STD accuracy (0 if unknown)*/ - float vert_accuracy; /*< [m/s] Vertical speed 1-STD accuracy (0 if unknown)*/ + float wind_x; /*< [m/s] Wind in X (NED) direction*/ + float wind_y; /*< [m/s] Wind in Y (NED) direction*/ + float wind_z; /*< [m/s] Wind in Z (NED) direction*/ + float var_horiz; /*< [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate.*/ + float var_vert; /*< [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate.*/ + float wind_alt; /*< [m] Altitude (MSL) that this measurement was taken at*/ + float horiz_accuracy; /*< [m] Horizontal speed 1-STD accuracy*/ + float vert_accuracy; /*< [m] Vertical speed 1-STD accuracy*/ } mavlink_wind_cov_t; #define MAVLINK_MSG_ID_WIND_COV_LEN 40 @@ -66,14 +66,14 @@ typedef struct __mavlink_wind_cov_t { * @param msg The MAVLink message to compress the data into * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param wind_x [m/s] Wind in North (NED) direction (NAN if unknown) - * @param wind_y [m/s] Wind in East (NED) direction (NAN if unknown) - * @param wind_z [m/s] Wind in down (NED) direction (NAN if unknown) - * @param var_horiz [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param var_vert [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param wind_alt [m] Altitude (MSL) that this measurement was taken at (NAN if unknown) - * @param horiz_accuracy [m/s] Horizontal speed 1-STD accuracy (0 if unknown) - * @param vert_accuracy [m/s] Vertical speed 1-STD accuracy (0 if unknown) + * @param wind_x [m/s] Wind in X (NED) direction + * @param wind_y [m/s] Wind in Y (NED) direction + * @param wind_z [m/s] Wind in Z (NED) direction + * @param var_horiz [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate. + * @param var_vert [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate. + * @param wind_alt [m] Altitude (MSL) that this measurement was taken at + * @param horiz_accuracy [m] Horizontal speed 1-STD accuracy + * @param vert_accuracy [m] Vertical speed 1-STD accuracy * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wind_cov_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -119,14 +119,14 @@ static inline uint16_t mavlink_msg_wind_cov_pack(uint8_t system_id, uint8_t comp * @param msg The MAVLink message to compress the data into * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param wind_x [m/s] Wind in North (NED) direction (NAN if unknown) - * @param wind_y [m/s] Wind in East (NED) direction (NAN if unknown) - * @param wind_z [m/s] Wind in down (NED) direction (NAN if unknown) - * @param var_horiz [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param var_vert [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param wind_alt [m] Altitude (MSL) that this measurement was taken at (NAN if unknown) - * @param horiz_accuracy [m/s] Horizontal speed 1-STD accuracy (0 if unknown) - * @param vert_accuracy [m/s] Vertical speed 1-STD accuracy (0 if unknown) + * @param wind_x [m/s] Wind in X (NED) direction + * @param wind_y [m/s] Wind in Y (NED) direction + * @param wind_z [m/s] Wind in Z (NED) direction + * @param var_horiz [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate. + * @param var_vert [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate. + * @param wind_alt [m] Altitude (MSL) that this measurement was taken at + * @param horiz_accuracy [m] Horizontal speed 1-STD accuracy + * @param vert_accuracy [m] Vertical speed 1-STD accuracy * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wind_cov_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -175,14 +175,14 @@ static inline uint16_t mavlink_msg_wind_cov_pack_status(uint8_t system_id, uint8 * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param wind_x [m/s] Wind in North (NED) direction (NAN if unknown) - * @param wind_y [m/s] Wind in East (NED) direction (NAN if unknown) - * @param wind_z [m/s] Wind in down (NED) direction (NAN if unknown) - * @param var_horiz [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param var_vert [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param wind_alt [m] Altitude (MSL) that this measurement was taken at (NAN if unknown) - * @param horiz_accuracy [m/s] Horizontal speed 1-STD accuracy (0 if unknown) - * @param vert_accuracy [m/s] Vertical speed 1-STD accuracy (0 if unknown) + * @param wind_x [m/s] Wind in X (NED) direction + * @param wind_y [m/s] Wind in Y (NED) direction + * @param wind_z [m/s] Wind in Z (NED) direction + * @param var_horiz [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate. + * @param var_vert [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate. + * @param wind_alt [m] Altitude (MSL) that this measurement was taken at + * @param horiz_accuracy [m] Horizontal speed 1-STD accuracy + * @param vert_accuracy [m] Vertical speed 1-STD accuracy * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_wind_cov_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -267,14 +267,14 @@ static inline uint16_t mavlink_msg_wind_cov_encode_status(uint8_t system_id, uin * @param chan MAVLink channel to send the message * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param wind_x [m/s] Wind in North (NED) direction (NAN if unknown) - * @param wind_y [m/s] Wind in East (NED) direction (NAN if unknown) - * @param wind_z [m/s] Wind in down (NED) direction (NAN if unknown) - * @param var_horiz [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param var_vert [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - * @param wind_alt [m] Altitude (MSL) that this measurement was taken at (NAN if unknown) - * @param horiz_accuracy [m/s] Horizontal speed 1-STD accuracy (0 if unknown) - * @param vert_accuracy [m/s] Vertical speed 1-STD accuracy (0 if unknown) + * @param wind_x [m/s] Wind in X (NED) direction + * @param wind_y [m/s] Wind in Y (NED) direction + * @param wind_z [m/s] Wind in Z (NED) direction + * @param var_horiz [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate. + * @param var_vert [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate. + * @param wind_alt [m] Altitude (MSL) that this measurement was taken at + * @param horiz_accuracy [m] Horizontal speed 1-STD accuracy + * @param vert_accuracy [m] Vertical speed 1-STD accuracy */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -381,7 +381,7 @@ static inline uint64_t mavlink_msg_wind_cov_get_time_usec(const mavlink_message_ /** * @brief Get field wind_x from wind_cov message * - * @return [m/s] Wind in North (NED) direction (NAN if unknown) + * @return [m/s] Wind in X (NED) direction */ static inline float mavlink_msg_wind_cov_get_wind_x(const mavlink_message_t* msg) { @@ -391,7 +391,7 @@ static inline float mavlink_msg_wind_cov_get_wind_x(const mavlink_message_t* msg /** * @brief Get field wind_y from wind_cov message * - * @return [m/s] Wind in East (NED) direction (NAN if unknown) + * @return [m/s] Wind in Y (NED) direction */ static inline float mavlink_msg_wind_cov_get_wind_y(const mavlink_message_t* msg) { @@ -401,7 +401,7 @@ static inline float mavlink_msg_wind_cov_get_wind_y(const mavlink_message_t* msg /** * @brief Get field wind_z from wind_cov message * - * @return [m/s] Wind in down (NED) direction (NAN if unknown) + * @return [m/s] Wind in Z (NED) direction */ static inline float mavlink_msg_wind_cov_get_wind_z(const mavlink_message_t* msg) { @@ -411,7 +411,7 @@ static inline float mavlink_msg_wind_cov_get_wind_z(const mavlink_message_t* msg /** * @brief Get field var_horiz from wind_cov message * - * @return [m/s] Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) + * @return [m/s] Variability of the wind in XY. RMS of a 1 Hz lowpassed wind estimate. */ static inline float mavlink_msg_wind_cov_get_var_horiz(const mavlink_message_t* msg) { @@ -421,7 +421,7 @@ static inline float mavlink_msg_wind_cov_get_var_horiz(const mavlink_message_t* /** * @brief Get field var_vert from wind_cov message * - * @return [m/s] Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) + * @return [m/s] Variability of the wind in Z. RMS of a 1 Hz lowpassed wind estimate. */ static inline float mavlink_msg_wind_cov_get_var_vert(const mavlink_message_t* msg) { @@ -431,7 +431,7 @@ static inline float mavlink_msg_wind_cov_get_var_vert(const mavlink_message_t* m /** * @brief Get field wind_alt from wind_cov message * - * @return [m] Altitude (MSL) that this measurement was taken at (NAN if unknown) + * @return [m] Altitude (MSL) that this measurement was taken at */ static inline float mavlink_msg_wind_cov_get_wind_alt(const mavlink_message_t* msg) { @@ -441,7 +441,7 @@ static inline float mavlink_msg_wind_cov_get_wind_alt(const mavlink_message_t* m /** * @brief Get field horiz_accuracy from wind_cov message * - * @return [m/s] Horizontal speed 1-STD accuracy (0 if unknown) + * @return [m] Horizontal speed 1-STD accuracy */ static inline float mavlink_msg_wind_cov_get_horiz_accuracy(const mavlink_message_t* msg) { @@ -451,7 +451,7 @@ static inline float mavlink_msg_wind_cov_get_horiz_accuracy(const mavlink_messag /** * @brief Get field vert_accuracy from wind_cov message * - * @return [m/s] Vertical speed 1-STD accuracy (0 if unknown) + * @return [m] Vertical speed 1-STD accuracy */ static inline float mavlink_msg_wind_cov_get_vert_accuracy(const mavlink_message_t* msg) { diff --git a/common/testsuite.h b/common/testsuite.h index 84d5c20b2..a807c3e7c 100644 --- a/common/testsuite.h +++ b/common/testsuite.h @@ -12,17 +12,17 @@ extern "C" { #ifndef MAVLINK_TEST_ALL #define MAVLINK_TEST_ALL -static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_minimal(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) { - mavlink_test_standard(system_id, component_id, last_msg); + mavlink_test_minimal(system_id, component_id, last_msg); mavlink_test_common(system_id, component_id, last_msg); } #endif -#include "../standard/testsuite.h" +#include "../minimal/testsuite.h" static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) @@ -37,7 +37,7 @@ static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mav uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_sys_status_t packet_in = { - 963497464,963497672,963497880,17859,17963,18067,18171,18275,18379,18483,18587,18691,223,963499076,963499284,963499492 + 963497464,963497672,963497880,17859,17963,18067,18171,18275,18379,18483,18587,18691,223 }; mavlink_sys_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -54,9 +54,6 @@ static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mav packet1.errors_count3 = packet_in.errors_count3; packet1.errors_count4 = packet_in.errors_count4; packet1.battery_remaining = packet_in.battery_remaining; - packet1.onboard_control_sensors_present_extended = packet_in.onboard_control_sensors_present_extended; - packet1.onboard_control_sensors_enabled_extended = packet_in.onboard_control_sensors_enabled_extended; - packet1.onboard_control_sensors_health_extended = packet_in.onboard_control_sensors_health_extended; #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 @@ -71,12 +68,12 @@ static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mav MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_sys_status_pack(system_id, component_id, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 , packet1.onboard_control_sensors_present_extended , packet1.onboard_control_sensors_enabled_extended , packet1.onboard_control_sensors_health_extended ); + mavlink_msg_sys_status_pack(system_id, component_id, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 ); mavlink_msg_sys_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_sys_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 , packet1.onboard_control_sensors_present_extended , packet1.onboard_control_sensors_enabled_extended , packet1.onboard_control_sensors_health_extended ); + mavlink_msg_sys_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 ); mavlink_msg_sys_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -89,7 +86,7 @@ static void mavlink_test_sys_status(uint8_t system_id, uint8_t component_id, mav MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_sys_status_send(MAVLINK_COMM_1 , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 , packet1.onboard_control_sensors_present_extended , packet1.onboard_control_sensors_enabled_extended , packet1.onboard_control_sensors_health_extended ); + mavlink_msg_sys_status_send(MAVLINK_COMM_1 , packet1.onboard_control_sensors_present , packet1.onboard_control_sensors_enabled , packet1.onboard_control_sensors_health , packet1.load , packet1.voltage_battery , packet1.current_battery , packet1.battery_remaining , packet1.drop_rate_comm , packet1.errors_comm , packet1.errors_count1 , packet1.errors_count2 , packet1.errors_count3 , packet1.errors_count4 ); mavlink_msg_sys_status_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -403,75 +400,6 @@ static void mavlink_test_auth_key(uint8_t system_id, uint8_t component_id, mavli #endif } -static void mavlink_test_link_node_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_LINK_NODE_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_link_node_status_t packet_in = { - 93372036854775807ULL,963497880,963498088,963498296,963498504,963498712,18691,18795,18899,235,46 - }; - mavlink_link_node_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.timestamp = packet_in.timestamp; - packet1.tx_rate = packet_in.tx_rate; - packet1.rx_rate = packet_in.rx_rate; - packet1.messages_sent = packet_in.messages_sent; - packet1.messages_received = packet_in.messages_received; - packet1.messages_lost = packet_in.messages_lost; - packet1.rx_parse_err = packet_in.rx_parse_err; - packet1.tx_overflows = packet_in.tx_overflows; - packet1.rx_overflows = packet_in.rx_overflows; - packet1.tx_buf = packet_in.tx_buf; - packet1.rx_buf = packet_in.rx_buf; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_LINK_NODE_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_link_node_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_link_node_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_link_node_status_pack(system_id, component_id, &msg , packet1.timestamp , packet1.tx_buf , packet1.rx_buf , packet1.tx_rate , packet1.rx_rate , packet1.rx_parse_err , packet1.tx_overflows , packet1.rx_overflows , packet1.messages_sent , packet1.messages_received , packet1.messages_lost ); - mavlink_msg_link_node_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_link_node_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.tx_buf , packet1.rx_buf , packet1.tx_rate , packet1.rx_rate , packet1.rx_parse_err , packet1.tx_overflows , packet1.rx_overflows , packet1.messages_sent , packet1.messages_received , packet1.messages_lost ); - mavlink_msg_link_node_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_COMMAND_CANCEL >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_command_cancel_t packet_in = { - 17235,139,206 - }; - mavlink_command_cancel_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.command = packet_in.command; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_COMMAND_CANCEL_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_command_cancel_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_command_cancel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_command_cancel_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.command ); - mavlink_msg_command_cancel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_command_cancel_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.command ); - mavlink_msg_command_cancel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { @@ -3872,12 +3733,12 @@ static void mavlink_test_set_attitude_target(uint8_t system_id, uint8_t componen MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_attitude_target_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust , packet1.thrust_body ); + mavlink_msg_set_attitude_target_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust ); mavlink_msg_set_attitude_target_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust , packet1.thrust_body ); + mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust ); mavlink_msg_set_attitude_target_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -3890,7 +3751,7 @@ static void mavlink_test_set_attitude_target(uint8_t system_id, uint8_t componen MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_attitude_target_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust , packet1.thrust_body ); + mavlink_msg_set_attitude_target_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.target_system , packet1.target_component , packet1.type_mask , packet1.q , packet1.body_roll_rate , packet1.body_pitch_rate , packet1.body_yaw_rate , packet1.thrust ); mavlink_msg_set_attitude_target_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -5369,14 +5230,12 @@ static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavli uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_timesync_t packet_in = { - 93372036854775807LL,93372036854776311LL,53,120 + 93372036854775807LL,93372036854776311LL }; mavlink_timesync_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); packet1.tc1 = packet_in.tc1; packet1.ts1 = packet_in.ts1; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 @@ -5391,12 +5250,12 @@ static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavli MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_timesync_pack(system_id, component_id, &msg , packet1.tc1 , packet1.ts1 , packet1.target_system , packet1.target_component ); + mavlink_msg_timesync_pack(system_id, component_id, &msg , packet1.tc1 , packet1.ts1 ); mavlink_msg_timesync_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_timesync_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.tc1 , packet1.ts1 , packet1.target_system , packet1.target_component ); + mavlink_msg_timesync_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.tc1 , packet1.ts1 ); mavlink_msg_timesync_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -5409,7 +5268,7 @@ static void mavlink_test_timesync(uint8_t system_id, uint8_t component_id, mavli MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_timesync_send(MAVLINK_COMM_1 , packet1.tc1 , packet1.ts1 , packet1.target_system , packet1.target_component ); + mavlink_msg_timesync_send(MAVLINK_COMM_1 , packet1.tc1 , packet1.ts1 ); mavlink_msg_timesync_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -6346,7 +6205,7 @@ static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_serial_control_t packet_in = { - 963497464,17443,151,218,29,{ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 },178,245 + 963497464,17443,151,218,29,{ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165 } }; mavlink_serial_control_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -6355,8 +6214,6 @@ static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, packet1.device = packet_in.device; packet1.flags = packet_in.flags; packet1.count = packet_in.count; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*70); @@ -6372,12 +6229,12 @@ static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_control_pack(system_id, component_id, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data , packet1.target_system , packet1.target_component ); + mavlink_msg_serial_control_pack(system_id, component_id, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data ); mavlink_msg_serial_control_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data , packet1.target_system , packet1.target_component ); + mavlink_msg_serial_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data ); mavlink_msg_serial_control_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -6390,7 +6247,7 @@ static void mavlink_test_serial_control(uint8_t system_id, uint8_t component_id, MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_control_send(MAVLINK_COMM_1 , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data , packet1.target_system , packet1.target_component ); + mavlink_msg_serial_control_send(MAVLINK_COMM_1 , packet1.device , packet1.flags , packet1.timeout , packet1.baudrate , packet1.count , packet1.data ); mavlink_msg_serial_control_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9602,7 +9459,7 @@ static void mavlink_test_camera_information(uint8_t system_id, uint8_t component uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_camera_information_t packet_in = { - 963497464,963497672,73.0,101.0,129.0,963498504,18483,18587,18691,{ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254 },{ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 },159,"RSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",134,201 + 963497464,963497672,73.0,101.0,129.0,963498504,18483,18587,18691,{ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254 },{ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 },159,"RSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",134 }; mavlink_camera_information_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -9617,7 +9474,6 @@ static void mavlink_test_camera_information(uint8_t system_id, uint8_t component packet1.cam_definition_version = packet_in.cam_definition_version; packet1.lens_id = packet_in.lens_id; packet1.gimbal_device_id = packet_in.gimbal_device_id; - packet1.camera_device_id = packet_in.camera_device_id; mav_array_memcpy(packet1.vendor_name, packet_in.vendor_name, sizeof(uint8_t)*32); mav_array_memcpy(packet1.model_name, packet_in.model_name, sizeof(uint8_t)*32); @@ -9635,12 +9491,12 @@ static void mavlink_test_camera_information(uint8_t system_id, uint8_t component MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_camera_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id , packet1.camera_device_id ); + mavlink_msg_camera_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id ); mavlink_msg_camera_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_camera_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id , packet1.camera_device_id ); + mavlink_msg_camera_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id ); mavlink_msg_camera_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9653,7 +9509,7 @@ static void mavlink_test_camera_information(uint8_t system_id, uint8_t component MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_camera_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id , packet1.camera_device_id ); + mavlink_msg_camera_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.vendor_name , packet1.model_name , packet1.firmware_version , packet1.focal_length , packet1.sensor_size_h , packet1.sensor_size_v , packet1.resolution_h , packet1.resolution_v , packet1.lens_id , packet1.flags , packet1.cam_definition_version , packet1.cam_definition_uri , packet1.gimbal_device_id ); mavlink_msg_camera_information_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9737,7 +9593,7 @@ static void mavlink_test_storage_information(uint8_t system_id, uint8_t componen uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_storage_information_t packet_in = { - 963497464,45.0,73.0,101.0,129.0,157.0,77,144,211,22,"CDEFGHIJKLMNOPQRSTUVWXYZABCDEFG",185 + 963497464,45.0,73.0,101.0,129.0,157.0,77,144,211,22,"CDEFGHIJKLMNOPQRSTUVWXYZABCDEFG" }; mavlink_storage_information_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -9751,7 +9607,6 @@ static void mavlink_test_storage_information(uint8_t system_id, uint8_t componen packet1.storage_count = packet_in.storage_count; packet1.status = packet_in.status; packet1.type = packet_in.type; - packet1.storage_usage = packet_in.storage_usage; mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*32); @@ -9767,12 +9622,12 @@ static void mavlink_test_storage_information(uint8_t system_id, uint8_t componen MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_storage_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name , packet1.storage_usage ); + mavlink_msg_storage_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name ); mavlink_msg_storage_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_storage_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name , packet1.storage_usage ); + mavlink_msg_storage_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name ); mavlink_msg_storage_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9785,7 +9640,7 @@ static void mavlink_test_storage_information(uint8_t system_id, uint8_t componen MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_storage_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name , packet1.storage_usage ); + mavlink_msg_storage_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.storage_id , packet1.storage_count , packet1.status , packet1.total_capacity , packet1.used_capacity , packet1.available_capacity , packet1.read_speed , packet1.write_speed , packet1.type , packet1.name ); mavlink_msg_storage_information_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9941,7 +9796,7 @@ static void mavlink_test_flight_information(uint8_t system_id, uint8_t component uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_flight_information_t packet_in = { - 93372036854775807ULL,93372036854776311ULL,93372036854776815ULL,963498712,963498920 + 93372036854775807ULL,93372036854776311ULL,93372036854776815ULL,963498712 }; mavlink_flight_information_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -9949,7 +9804,6 @@ static void mavlink_test_flight_information(uint8_t system_id, uint8_t component packet1.takeoff_time_utc = packet_in.takeoff_time_utc; packet1.flight_uuid = packet_in.flight_uuid; packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.landing_time = packet_in.landing_time; #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 @@ -9964,12 +9818,12 @@ static void mavlink_test_flight_information(uint8_t system_id, uint8_t component MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flight_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid , packet1.landing_time ); + mavlink_msg_flight_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid ); mavlink_msg_flight_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flight_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid , packet1.landing_time ); + mavlink_msg_flight_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid ); mavlink_msg_flight_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -9982,7 +9836,7 @@ static void mavlink_test_flight_information(uint8_t system_id, uint8_t component MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flight_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid , packet1.landing_time ); + mavlink_msg_flight_information_send(MAVLINK_COMM_1 , packet1.time_boot_ms , packet1.arming_time_utc , packet1.takeoff_time_utc , packet1.flight_uuid ); mavlink_msg_flight_information_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -10256,7 +10110,7 @@ static void mavlink_test_video_stream_information(uint8_t system_id, uint8_t com uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; mavlink_video_stream_information_t packet_in = { - 17.0,963497672,17651,17755,17859,17963,18067,187,254,65,"VWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ","BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD",196 + 17.0,963497672,17651,17755,17859,17963,18067,187,254,65,"VWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ","BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD" }; mavlink_video_stream_information_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); @@ -10270,7 +10124,6 @@ static void mavlink_test_video_stream_information(uint8_t system_id, uint8_t com packet1.stream_id = packet_in.stream_id; packet1.count = packet_in.count; packet1.type = packet_in.type; - packet1.encoding = packet_in.encoding; mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*32); mav_array_memcpy(packet1.uri, packet_in.uri, sizeof(char)*160); @@ -10287,12 +10140,12 @@ static void mavlink_test_video_stream_information(uint8_t system_id, uint8_t com MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_video_stream_information_pack(system_id, component_id, &msg , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri , packet1.encoding ); + mavlink_msg_video_stream_information_pack(system_id, component_id, &msg , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri ); mavlink_msg_video_stream_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_video_stream_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri , packet1.encoding ); + mavlink_msg_video_stream_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri ); mavlink_msg_video_stream_information_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -10305,7 +10158,7 @@ static void mavlink_test_video_stream_information(uint8_t system_id, uint8_t com MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_video_stream_information_send(MAVLINK_COMM_1 , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri , packet1.encoding ); + mavlink_msg_video_stream_information_send(MAVLINK_COMM_1 , packet1.stream_id , packet1.count , packet1.type , packet1.flags , packet1.framerate , packet1.resolution_h , packet1.resolution_v , packet1.bitrate , packet1.rotation , packet1.hfov , packet1.name , packet1.uri ); mavlink_msg_video_stream_information_decode(last_msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); @@ -11198,136 +11051,6 @@ static void mavlink_test_gimbal_manager_set_manual_control(uint8_t system_id, ui #endif } -static void mavlink_test_esc_info(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_INFO >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_esc_info_t packet_in = { - 93372036854775807ULL,{ 963497880, 963497881, 963497882, 963497883 },18483,{ 18587, 18588, 18589, 18590 },{ 19003, 19004, 19005, 19006 },3,70,137,204 - }; - mavlink_esc_info_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.counter = packet_in.counter; - packet1.index = packet_in.index; - packet1.count = packet_in.count; - packet1.connection_type = packet_in.connection_type; - packet1.info = packet_in.info; - - mav_array_memcpy(packet1.error_count, packet_in.error_count, sizeof(uint32_t)*4); - mav_array_memcpy(packet1.failure_flags, packet_in.failure_flags, sizeof(uint16_t)*4); - mav_array_memcpy(packet1.temperature, packet_in.temperature, sizeof(int16_t)*4); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ESC_INFO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_INFO_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_info_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_esc_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_info_pack(system_id, component_id, &msg , packet1.index , packet1.time_usec , packet1.counter , packet1.count , packet1.connection_type , packet1.info , packet1.failure_flags , packet1.error_count , packet1.temperature ); - mavlink_msg_esc_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_info_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.index , packet1.time_usec , packet1.counter , packet1.count , packet1.connection_type , packet1.info , packet1.failure_flags , packet1.error_count , packet1.temperature ); - mavlink_msg_esc_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ESC_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_esc_status_t packet_in = { - 93372036854775807ULL,{ 963497880, 963497881, 963497882, 963497883 },{ 185.0, 186.0, 187.0, 188.0 },{ 297.0, 298.0, 299.0, 300.0 },173 - }; - mavlink_esc_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.index = packet_in.index; - - mav_array_memcpy(packet1.rpm, packet_in.rpm, sizeof(int32_t)*4); - mav_array_memcpy(packet1.voltage, packet_in.voltage, sizeof(float)*4); - mav_array_memcpy(packet1.current, packet_in.current, sizeof(float)*4); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ESC_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_esc_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_status_pack(system_id, component_id, &msg , packet1.index , packet1.time_usec , packet1.rpm , packet1.voltage , packet1.current ); - mavlink_msg_esc_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_esc_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.index , packet1.time_usec , packet1.rpm , packet1.voltage , packet1.current ); - mavlink_msg_esc_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ISBD_LINK_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_trajectory_representation_waypoints_t packet_in = { - 93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0, 77.0 },{ 213.0, 214.0, 215.0, 216.0, 217.0 },{ 353.0, 354.0, 355.0, 356.0, 357.0 },{ 493.0, 494.0, 495.0, 496.0, 497.0 },{ 633.0, 634.0, 635.0, 636.0, 637.0 },{ 773.0, 774.0, 775.0, 776.0, 777.0 },{ 913.0, 914.0, 915.0, 916.0, 917.0 },{ 1053.0, 1054.0, 1055.0, 1056.0, 1057.0 },{ 1193.0, 1194.0, 1195.0, 1196.0, 1197.0 },{ 1333.0, 1334.0, 1335.0, 1336.0, 1337.0 },{ 1473.0, 1474.0, 1475.0, 1476.0, 1477.0 },{ 29091, 29092, 29093, 29094, 29095 },79 + mavlink_isbd_link_status_t packet_in = { + 93372036854775807ULL,93372036854776311ULL,18067,18171,65,132,199,10 }; - mavlink_trajectory_representation_waypoints_t packet1, packet2; + mavlink_isbd_link_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.valid_points = packet_in.valid_points; + packet1.timestamp = packet_in.timestamp; + packet1.last_heartbeat = packet_in.last_heartbeat; + packet1.failed_sessions = packet_in.failed_sessions; + packet1.successful_sessions = packet_in.successful_sessions; + packet1.signal_quality = packet_in.signal_quality; + packet1.ring_pending = packet_in.ring_pending; + packet1.tx_session_pending = packet_in.tx_session_pending; + packet1.rx_session_pending = packet_in.rx_session_pending; - mav_array_memcpy(packet1.pos_x, packet_in.pos_x, sizeof(float)*5); - mav_array_memcpy(packet1.pos_y, packet_in.pos_y, sizeof(float)*5); - mav_array_memcpy(packet1.pos_z, packet_in.pos_z, sizeof(float)*5); - mav_array_memcpy(packet1.vel_x, packet_in.vel_x, sizeof(float)*5); - mav_array_memcpy(packet1.vel_y, packet_in.vel_y, sizeof(float)*5); - mav_array_memcpy(packet1.vel_z, packet_in.vel_z, sizeof(float)*5); - mav_array_memcpy(packet1.acc_x, packet_in.acc_x, sizeof(float)*5); - mav_array_memcpy(packet1.acc_y, packet_in.acc_y, sizeof(float)*5); - mav_array_memcpy(packet1.acc_z, packet_in.acc_z, sizeof(float)*5); - mav_array_memcpy(packet1.pos_yaw, packet_in.pos_yaw, sizeof(float)*5); - mav_array_memcpy(packet1.vel_yaw, packet_in.vel_yaw, sizeof(float)*5); - mav_array_memcpy(packet1.command, packet_in.command, sizeof(uint16_t)*5); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS_MIN_LEN); + memset(MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_waypoints_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_trajectory_representation_waypoints_decode(&msg, &packet2); + mavlink_msg_isbd_link_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_isbd_link_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_waypoints_pack(system_id, component_id, &msg , packet1.time_usec , packet1.valid_points , packet1.pos_x , packet1.pos_y , packet1.pos_z , packet1.vel_x , packet1.vel_y , packet1.vel_z , packet1.acc_x , packet1.acc_y , packet1.acc_z , packet1.pos_yaw , packet1.vel_yaw , packet1.command ); - mavlink_msg_trajectory_representation_waypoints_decode(&msg, &packet2); + mavlink_msg_isbd_link_status_pack(system_id, component_id, &msg , packet1.timestamp , packet1.last_heartbeat , packet1.failed_sessions , packet1.successful_sessions , packet1.signal_quality , packet1.ring_pending , packet1.tx_session_pending , packet1.rx_session_pending ); + mavlink_msg_isbd_link_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_waypoints_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.valid_points , packet1.pos_x , packet1.pos_y , packet1.pos_z , packet1.vel_x , packet1.vel_y , packet1.vel_z , packet1.acc_x , packet1.acc_y , packet1.acc_z , packet1.pos_yaw , packet1.vel_yaw , packet1.command ); - mavlink_msg_trajectory_representation_waypoints_decode(&msg, &packet2); + mavlink_msg_isbd_link_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.last_heartbeat , packet1.failed_sessions , packet1.successful_sessions , packet1.signal_quality , packet1.ring_pending , packet1.tx_session_pending , packet1.rx_session_pending ); + mavlink_msg_isbd_link_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -12107,64 +11822,59 @@ static void mavlink_test_trajectory_representation_waypoints(uint8_t system_id, for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RAW_RPM >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_trajectory_representation_bezier_t packet_in = { - 93372036854775807ULL,{ 73.0, 74.0, 75.0, 76.0, 77.0 },{ 213.0, 214.0, 215.0, 216.0, 217.0 },{ 353.0, 354.0, 355.0, 356.0, 357.0 },{ 493.0, 494.0, 495.0, 496.0, 497.0 },{ 633.0, 634.0, 635.0, 636.0, 637.0 },73 + mavlink_raw_rpm_t packet_in = { + 17.0,17 }; - mavlink_trajectory_representation_bezier_t packet1, packet2; + mavlink_raw_rpm_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.valid_points = packet_in.valid_points; + packet1.frequency = packet_in.frequency; + packet1.index = packet_in.index; - mav_array_memcpy(packet1.pos_x, packet_in.pos_x, sizeof(float)*5); - mav_array_memcpy(packet1.pos_y, packet_in.pos_y, sizeof(float)*5); - mav_array_memcpy(packet1.pos_z, packet_in.pos_z, sizeof(float)*5); - mav_array_memcpy(packet1.delta, packet_in.delta, sizeof(float)*5); - mav_array_memcpy(packet1.pos_yaw, packet_in.pos_yaw, sizeof(float)*5); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER_MIN_LEN); + memset(MAVLINK_MSG_ID_RAW_RPM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RAW_RPM_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_bezier_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_trajectory_representation_bezier_decode(&msg, &packet2); + mavlink_msg_raw_rpm_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_raw_rpm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_bezier_pack(system_id, component_id, &msg , packet1.time_usec , packet1.valid_points , packet1.pos_x , packet1.pos_y , packet1.pos_z , packet1.delta , packet1.pos_yaw ); - mavlink_msg_trajectory_representation_bezier_decode(&msg, &packet2); + mavlink_msg_raw_rpm_pack(system_id, component_id, &msg , packet1.index , packet1.frequency ); + mavlink_msg_raw_rpm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_trajectory_representation_bezier_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.valid_points , packet1.pos_x , packet1.pos_y , packet1.pos_z , packet1.delta , packet1.pos_yaw ); - mavlink_msg_trajectory_representation_bezier_decode(&msg, &packet2); + mavlink_msg_raw_rpm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.index , packet1.frequency ); + mavlink_msg_raw_rpm_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -12172,1124 +11882,75 @@ static void mavlink_test_trajectory_representation_bezier(uint8_t system_id, uin for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CELLULAR_STATUS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UTM_GLOBAL_POSITION >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_cellular_status_t packet_in = { - 17235,17339,17443,151,218,29,96 + mavlink_utm_global_position_t packet_in = { + 93372036854775807ULL,963497880,963498088,963498296,963498504,963498712,963498920,963499128,19107,19211,19315,19419,19523,19627,19731,{ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },209,20 }; - mavlink_cellular_status_t packet1, packet2; + mavlink_utm_global_position_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.mcc = packet_in.mcc; - packet1.mnc = packet_in.mnc; - packet1.lac = packet_in.lac; - packet1.status = packet_in.status; - packet1.failure_reason = packet_in.failure_reason; - packet1.type = packet_in.type; - packet1.quality = packet_in.quality; + packet1.time = packet_in.time; + packet1.lat = packet_in.lat; + packet1.lon = packet_in.lon; + packet1.alt = packet_in.alt; + packet1.relative_alt = packet_in.relative_alt; + packet1.next_lat = packet_in.next_lat; + packet1.next_lon = packet_in.next_lon; + packet1.next_alt = packet_in.next_alt; + packet1.vx = packet_in.vx; + packet1.vy = packet_in.vy; + packet1.vz = packet_in.vz; + packet1.h_acc = packet_in.h_acc; + packet1.v_acc = packet_in.v_acc; + packet1.vel_acc = packet_in.vel_acc; + packet1.update_rate = packet_in.update_rate; + packet1.flight_state = packet_in.flight_state; + packet1.flags = packet_in.flags; + mav_array_memcpy(packet1.uas_id, packet_in.uas_id, sizeof(uint8_t)*18); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN); + memset(MAVLINK_MSG_ID_UTM_GLOBAL_POSITION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UTM_GLOBAL_POSITION_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_cellular_status_decode(&msg, &packet2); + mavlink_msg_utm_global_position_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_utm_global_position_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_status_pack(system_id, component_id, &msg , packet1.status , packet1.failure_reason , packet1.type , packet1.quality , packet1.mcc , packet1.mnc , packet1.lac ); - mavlink_msg_cellular_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.failure_reason , packet1.type , packet1.quality , packet1.mcc , packet1.mnc , packet1.lac ); - mavlink_msg_cellular_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ISBD_LINK_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_isbd_link_status_t packet_in = { - 93372036854775807ULL,93372036854776311ULL,18067,18171,65,132,199,10 - }; - mavlink_isbd_link_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.timestamp = packet_in.timestamp; - packet1.last_heartbeat = packet_in.last_heartbeat; - packet1.failed_sessions = packet_in.failed_sessions; - packet1.successful_sessions = packet_in.successful_sessions; - packet1.signal_quality = packet_in.signal_quality; - packet1.ring_pending = packet_in.ring_pending; - packet1.tx_session_pending = packet_in.tx_session_pending; - packet1.rx_session_pending = packet_in.rx_session_pending; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_isbd_link_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_isbd_link_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_isbd_link_status_pack(system_id, component_id, &msg , packet1.timestamp , packet1.last_heartbeat , packet1.failed_sessions , packet1.successful_sessions , packet1.signal_quality , packet1.ring_pending , packet1.tx_session_pending , packet1.rx_session_pending ); - mavlink_msg_isbd_link_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_isbd_link_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.last_heartbeat , packet1.failed_sessions , packet1.successful_sessions , packet1.signal_quality , packet1.ring_pending , packet1.tx_session_pending , packet1.rx_session_pending ); - mavlink_msg_isbd_link_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CELLULAR_CONFIG >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_cellular_config_t packet_in = { - 5,72,"CDEFGHIJKLMNOPQ","STUVWXYZABCDEFG","IJKLMNOPQRSTUVWXYZABCDEFGHIJKLM","OPQRSTUVWXYZABC",123,190 - }; - mavlink_cellular_config_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.enable_lte = packet_in.enable_lte; - packet1.enable_pin = packet_in.enable_pin; - packet1.roaming = packet_in.roaming; - packet1.response = packet_in.response; - - mav_array_memcpy(packet1.pin, packet_in.pin, sizeof(char)*16); - mav_array_memcpy(packet1.new_pin, packet_in.new_pin, sizeof(char)*16); - mav_array_memcpy(packet1.apn, packet_in.apn, sizeof(char)*32); - mav_array_memcpy(packet1.puk, packet_in.puk, sizeof(char)*16); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_config_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_cellular_config_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_config_pack(system_id, component_id, &msg , packet1.enable_lte , packet1.enable_pin , packet1.pin , packet1.new_pin , packet1.apn , packet1.puk , packet1.roaming , packet1.response ); - mavlink_msg_cellular_config_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_cellular_config_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.enable_lte , packet1.enable_pin , packet1.pin , packet1.new_pin , packet1.apn , packet1.puk , packet1.roaming , packet1.response ); - mavlink_msg_cellular_config_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RAW_RPM >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_raw_rpm_t packet_in = { - 17.0,17 - }; - mavlink_raw_rpm_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.frequency = packet_in.frequency; - packet1.index = packet_in.index; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_RAW_RPM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RAW_RPM_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_raw_rpm_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_raw_rpm_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_raw_rpm_pack(system_id, component_id, &msg , packet1.index , packet1.frequency ); - mavlink_msg_raw_rpm_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_raw_rpm_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.index , packet1.frequency ); - mavlink_msg_raw_rpm_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UTM_GLOBAL_POSITION >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_utm_global_position_t packet_in = { - 93372036854775807ULL,963497880,963498088,963498296,963498504,963498712,963498920,963499128,19107,19211,19315,19419,19523,19627,19731,{ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },209,20 - }; - mavlink_utm_global_position_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time = packet_in.time; - packet1.lat = packet_in.lat; - packet1.lon = packet_in.lon; - packet1.alt = packet_in.alt; - packet1.relative_alt = packet_in.relative_alt; - packet1.next_lat = packet_in.next_lat; - packet1.next_lon = packet_in.next_lon; - packet1.next_alt = packet_in.next_alt; - packet1.vx = packet_in.vx; - packet1.vy = packet_in.vy; - packet1.vz = packet_in.vz; - packet1.h_acc = packet_in.h_acc; - packet1.v_acc = packet_in.v_acc; - packet1.vel_acc = packet_in.vel_acc; - packet1.update_rate = packet_in.update_rate; - packet1.flight_state = packet_in.flight_state; - packet1.flags = packet_in.flags; - - mav_array_memcpy(packet1.uas_id, packet_in.uas_id, sizeof(uint8_t)*18); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_UTM_GLOBAL_POSITION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UTM_GLOBAL_POSITION_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_utm_global_position_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_utm_global_position_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_utm_global_position_pack(system_id, component_id, &msg , packet1.time , packet1.uas_id , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.h_acc , packet1.v_acc , packet1.vel_acc , packet1.next_lat , packet1.next_lon , packet1.next_alt , packet1.update_rate , packet1.flight_state , packet1.flags ); - mavlink_msg_utm_global_position_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_utm_global_position_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time , packet1.uas_id , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.h_acc , packet1.v_acc , packet1.vel_acc , packet1.next_lat , packet1.next_lon , packet1.next_alt , packet1.update_rate , packet1.flight_state , packet1.flags ); - mavlink_msg_utm_global_position_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_debug_float_array_t packet_in = { - 93372036854775807ULL,17651,"KLMNOPQRS",{ 157.0, 158.0, 159.0, 160.0, 161.0, 162.0, 163.0, 164.0, 165.0, 166.0, 167.0, 168.0, 169.0, 170.0, 171.0, 172.0, 173.0, 174.0, 175.0, 176.0, 177.0, 178.0, 179.0, 180.0, 181.0, 182.0, 183.0, 184.0, 185.0, 186.0, 187.0, 188.0, 189.0, 190.0, 191.0, 192.0, 193.0, 194.0, 195.0, 196.0, 197.0, 198.0, 199.0, 200.0, 201.0, 202.0, 203.0, 204.0, 205.0, 206.0, 207.0, 208.0, 209.0, 210.0, 211.0, 212.0, 213.0, 214.0 } - }; - mavlink_debug_float_array_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.array_id = packet_in.array_id; - - mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10); - mav_array_memcpy(packet1.data, packet_in.data, sizeof(float)*58); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_debug_float_array_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_debug_float_array_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_debug_float_array_pack(system_id, component_id, &msg , packet1.time_usec , packet1.name , packet1.array_id , packet1.data ); - mavlink_msg_debug_float_array_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_debug_float_array_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.name , packet1.array_id , packet1.data ); - mavlink_msg_debug_float_array_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_orbit_execution_status_t packet_in = { - 93372036854775807ULL,73.0,963498088,963498296,157.0,77 - }; - mavlink_orbit_execution_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.radius = packet_in.radius; - packet1.x = packet_in.x; - packet1.y = packet_in.y; - packet1.z = packet_in.z; - packet1.frame = packet_in.frame; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_orbit_execution_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_orbit_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_orbit_execution_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.radius , packet1.frame , packet1.x , packet1.y , packet1.z ); - mavlink_msg_orbit_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_orbit_execution_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.radius , packet1.frame , packet1.x , packet1.y , packet1.z ); - mavlink_msg_orbit_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BATTERY_INFO >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_battery_info_t packet_in = { - 17.0,45.0,73.0,101.0,129.0,157.0,185.0,213.0,241.0,269.0,19315,19419,137,204,15,82,149,"XYZABCDE","GHIJKLMNOPQRSTUVWXYZABCDEFGHIJK","MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI" - }; - mavlink_battery_info_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.discharge_minimum_voltage = packet_in.discharge_minimum_voltage; - packet1.charging_minimum_voltage = packet_in.charging_minimum_voltage; - packet1.resting_minimum_voltage = packet_in.resting_minimum_voltage; - packet1.charging_maximum_voltage = packet_in.charging_maximum_voltage; - packet1.charging_maximum_current = packet_in.charging_maximum_current; - packet1.nominal_voltage = packet_in.nominal_voltage; - packet1.discharge_maximum_current = packet_in.discharge_maximum_current; - packet1.discharge_maximum_burst_current = packet_in.discharge_maximum_burst_current; - packet1.design_capacity = packet_in.design_capacity; - packet1.full_charge_capacity = packet_in.full_charge_capacity; - packet1.cycle_count = packet_in.cycle_count; - packet1.weight = packet_in.weight; - packet1.id = packet_in.id; - packet1.battery_function = packet_in.battery_function; - packet1.type = packet_in.type; - packet1.state_of_health = packet_in.state_of_health; - packet1.cells_in_series = packet_in.cells_in_series; - - mav_array_memcpy(packet1.manufacture_date, packet_in.manufacture_date, sizeof(char)*9); - mav_array_memcpy(packet1.serial_number, packet_in.serial_number, sizeof(char)*32); - mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*50); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BATTERY_INFO_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_info_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_battery_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_info_pack(system_id, component_id, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.state_of_health , packet1.cells_in_series , packet1.cycle_count , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage , packet1.charging_maximum_voltage , packet1.charging_maximum_current , packet1.nominal_voltage , packet1.discharge_maximum_current , packet1.discharge_maximum_burst_current , packet1.design_capacity , packet1.full_charge_capacity , packet1.manufacture_date , packet1.serial_number , packet1.name ); - mavlink_msg_battery_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_info_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.state_of_health , packet1.cells_in_series , packet1.cycle_count , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage , packet1.charging_maximum_voltage , packet1.charging_maximum_current , packet1.nominal_voltage , packet1.discharge_maximum_current , packet1.discharge_maximum_burst_current , packet1.design_capacity , packet1.full_charge_capacity , packet1.manufacture_date , packet1.serial_number , packet1.name ); - mavlink_msg_battery_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GENERATOR_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_generator_status_t packet_in = { - 93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,963498920,963499128,19107,19211,19315 - }; - mavlink_generator_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.status = packet_in.status; - packet1.battery_current = packet_in.battery_current; - packet1.load_current = packet_in.load_current; - packet1.power_generated = packet_in.power_generated; - packet1.bus_voltage = packet_in.bus_voltage; - packet1.bat_current_setpoint = packet_in.bat_current_setpoint; - packet1.runtime = packet_in.runtime; - packet1.time_until_maintenance = packet_in.time_until_maintenance; - packet1.generator_speed = packet_in.generator_speed; - packet1.rectifier_temperature = packet_in.rectifier_temperature; - packet1.generator_temperature = packet_in.generator_temperature; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_generator_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_generator_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_generator_status_pack(system_id, component_id, &msg , packet1.status , packet1.generator_speed , packet1.battery_current , packet1.load_current , packet1.power_generated , packet1.bus_voltage , packet1.rectifier_temperature , packet1.bat_current_setpoint , packet1.generator_temperature , packet1.runtime , packet1.time_until_maintenance ); - mavlink_msg_generator_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_generator_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.generator_speed , packet1.battery_current , packet1.load_current , packet1.power_generated , packet1.bus_voltage , packet1.rectifier_temperature , packet1.bat_current_setpoint , packet1.generator_temperature , packet1.runtime , packet1.time_until_maintenance ); - mavlink_msg_generator_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_actuator_output_status_t packet_in = { - 93372036854775807ULL,963497880,{ 101.0, 102.0, 103.0, 104.0, 105.0, 106.0, 107.0, 108.0, 109.0, 110.0, 111.0, 112.0, 113.0, 114.0, 115.0, 116.0, 117.0, 118.0, 119.0, 120.0, 121.0, 122.0, 123.0, 124.0, 125.0, 126.0, 127.0, 128.0, 129.0, 130.0, 131.0, 132.0 } - }; - mavlink_actuator_output_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.active = packet_in.active; - - mav_array_memcpy(packet1.actuator, packet_in.actuator, sizeof(float)*32); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_actuator_output_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_actuator_output_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_actuator_output_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.active , packet1.actuator ); - mavlink_msg_actuator_output_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_actuator_output_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.active , packet1.actuator ); - mavlink_msg_actuator_output_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_time_estimate_to_target_t packet_in = { - 963497464,963497672,963497880,963498088,963498296 - }; - mavlink_time_estimate_to_target_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.safe_return = packet_in.safe_return; - packet1.land = packet_in.land; - packet1.mission_next_item = packet_in.mission_next_item; - packet1.mission_end = packet_in.mission_end; - packet1.commanded_action = packet_in.commanded_action; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_time_estimate_to_target_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_time_estimate_to_target_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_time_estimate_to_target_pack(system_id, component_id, &msg , packet1.safe_return , packet1.land , packet1.mission_next_item , packet1.mission_end , packet1.commanded_action ); - mavlink_msg_time_estimate_to_target_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_time_estimate_to_target_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.safe_return , packet1.land , packet1.mission_next_item , packet1.mission_end , packet1.commanded_action ); - mavlink_msg_time_estimate_to_target_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TUNNEL >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_tunnel_t packet_in = { - 17235,139,206,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211 } - }; - mavlink_tunnel_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.payload_type = packet_in.payload_type; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.payload_length = packet_in.payload_length; - - mav_array_memcpy(packet1.payload, packet_in.payload, sizeof(uint8_t)*128); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_TUNNEL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TUNNEL_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_tunnel_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_tunnel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_tunnel_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.payload_type , packet1.payload_length , packet1.payload ); - mavlink_msg_tunnel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_tunnel_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.payload_type , packet1.payload_length , packet1.payload ); - mavlink_msg_tunnel_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CAN_FRAME >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_can_frame_t packet_in = { - 963497464,17,84,151,218,{ 29, 30, 31, 32, 33, 34, 35, 36 } - }; - mavlink_can_frame_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.id = packet_in.id; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.bus = packet_in.bus; - packet1.len = packet_in.len; - - mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*8); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_CAN_FRAME_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CAN_FRAME_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_can_frame_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_can_frame_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_can_frame_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.bus , packet1.len , packet1.id , packet1.data ); - mavlink_msg_can_frame_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_can_frame_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.bus , packet1.len , packet1.id , packet1.data ); - mavlink_msg_can_frame_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_onboard_computer_status_t packet_in = { - 93372036854775807ULL,963497880,963498088,963498296,{ 963498504, 963498505, 963498506, 963498507 },{ 963499336, 963499337, 963499338, 963499339 },{ 963500168, 963500169, 963500170, 963500171 },{ 963501000, 963501001, 963501002, 963501003, 963501004, 963501005 },{ 963502248, 963502249, 963502250, 963502251, 963502252, 963502253 },{ 963503496, 963503497, 963503498, 963503499, 963503500, 963503501 },{ 963504744, 963504745, 963504746, 963504747, 963504748, 963504749 },{ 963505992, 963505993, 963505994, 963505995, 963505996, 963505997 },{ 27011, 27012, 27013, 27014 },81,{ 148, 149, 150, 151, 152, 153, 154, 155 },{ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181 },{ 74, 75, 76, 77 },{ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 },244,{ 55, 56, 57, 58, 59, 60, 61, 62 } - }; - mavlink_onboard_computer_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.uptime = packet_in.uptime; - packet1.ram_usage = packet_in.ram_usage; - packet1.ram_total = packet_in.ram_total; - packet1.type = packet_in.type; - packet1.temperature_board = packet_in.temperature_board; - - mav_array_memcpy(packet1.storage_type, packet_in.storage_type, sizeof(uint32_t)*4); - mav_array_memcpy(packet1.storage_usage, packet_in.storage_usage, sizeof(uint32_t)*4); - mav_array_memcpy(packet1.storage_total, packet_in.storage_total, sizeof(uint32_t)*4); - mav_array_memcpy(packet1.link_type, packet_in.link_type, sizeof(uint32_t)*6); - mav_array_memcpy(packet1.link_tx_rate, packet_in.link_tx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet1.link_rx_rate, packet_in.link_rx_rate, sizeof(uint32_t)*6); - mav_array_memcpy(packet1.link_tx_max, packet_in.link_tx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet1.link_rx_max, packet_in.link_rx_max, sizeof(uint32_t)*6); - mav_array_memcpy(packet1.fan_speed, packet_in.fan_speed, sizeof(int16_t)*4); - mav_array_memcpy(packet1.cpu_cores, packet_in.cpu_cores, sizeof(uint8_t)*8); - mav_array_memcpy(packet1.cpu_combined, packet_in.cpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet1.gpu_cores, packet_in.gpu_cores, sizeof(uint8_t)*4); - mav_array_memcpy(packet1.gpu_combined, packet_in.gpu_combined, sizeof(uint8_t)*10); - mav_array_memcpy(packet1.temperature_core, packet_in.temperature_core, sizeof(int8_t)*8); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_onboard_computer_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_onboard_computer_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_onboard_computer_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.uptime , packet1.type , packet1.cpu_cores , packet1.cpu_combined , packet1.gpu_cores , packet1.gpu_combined , packet1.temperature_board , packet1.temperature_core , packet1.fan_speed , packet1.ram_usage , packet1.ram_total , packet1.storage_type , packet1.storage_usage , packet1.storage_total , packet1.link_type , packet1.link_tx_rate , packet1.link_rx_rate , packet1.link_tx_max , packet1.link_rx_max ); - mavlink_msg_onboard_computer_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_onboard_computer_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.uptime , packet1.type , packet1.cpu_cores , packet1.cpu_combined , packet1.gpu_cores , packet1.gpu_combined , packet1.temperature_board , packet1.temperature_core , packet1.fan_speed , packet1.ram_usage , packet1.ram_total , packet1.storage_type , packet1.storage_usage , packet1.storage_total , packet1.link_type , packet1.link_tx_rate , packet1.link_rx_rate , packet1.link_tx_max , packet1.link_rx_max ); - mavlink_msg_onboard_computer_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_COMPONENT_INFORMATION >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_component_information_t packet_in = { - 963497464,963497672,963497880,"MNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG","IJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC" - }; - mavlink_component_information_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.general_metadata_file_crc = packet_in.general_metadata_file_crc; - packet1.peripherals_metadata_file_crc = packet_in.peripherals_metadata_file_crc; - - mav_array_memcpy(packet1.general_metadata_uri, packet_in.general_metadata_uri, sizeof(char)*100); - mav_array_memcpy(packet1.peripherals_metadata_uri, packet_in.peripherals_metadata_uri, sizeof(char)*100); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_component_information_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.general_metadata_file_crc , packet1.general_metadata_uri , packet1.peripherals_metadata_file_crc , packet1.peripherals_metadata_uri ); - mavlink_msg_component_information_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.general_metadata_file_crc , packet1.general_metadata_uri , packet1.peripherals_metadata_file_crc , packet1.peripherals_metadata_uri ); - mavlink_msg_component_information_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_component_information_basic_t packet_in = { - 93372036854775807ULL,963497880,963498088,"QRSTUVWXYZABCDEFGHIJKLMNOPQRSTU","WXYZABCDEFGHIJKLMNOPQRSTUVWXYZA","CDEFGHIJKLMNOPQRSTUVWXY","ABCDEFGHIJKLMNOPQRSTUVW","YZABCDEFGHIJKLMNOPQRSTUVWXYZABC" - }; - mavlink_component_information_basic_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.capabilities = packet_in.capabilities; - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.time_manufacture_s = packet_in.time_manufacture_s; - - mav_array_memcpy(packet1.vendor_name, packet_in.vendor_name, sizeof(char)*32); - mav_array_memcpy(packet1.model_name, packet_in.model_name, sizeof(char)*32); - mav_array_memcpy(packet1.software_version, packet_in.software_version, sizeof(char)*24); - mav_array_memcpy(packet1.hardware_version, packet_in.hardware_version, sizeof(char)*24); - mav_array_memcpy(packet1.serial_number, packet_in.serial_number, sizeof(char)*32); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_basic_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_component_information_basic_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_basic_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.capabilities , packet1.time_manufacture_s , packet1.vendor_name , packet1.model_name , packet1.software_version , packet1.hardware_version , packet1.serial_number ); - mavlink_msg_component_information_basic_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_information_basic_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.capabilities , packet1.time_manufacture_s , packet1.vendor_name , packet1.model_name , packet1.software_version , packet1.hardware_version , packet1.serial_number ); - mavlink_msg_component_information_basic_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_COMPONENT_METADATA >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_component_metadata_t packet_in = { - 963497464,963497672,"IJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC" - }; - mavlink_component_metadata_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.file_crc = packet_in.file_crc; - - mav_array_memcpy(packet1.uri, packet_in.uri, sizeof(char)*100); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_COMPONENT_METADATA_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_metadata_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_component_metadata_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_metadata_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.file_crc , packet1.uri ); - mavlink_msg_component_metadata_decode(&msg, &packet2); + mavlink_msg_utm_global_position_pack(system_id, component_id, &msg , packet1.time , packet1.uas_id , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.h_acc , packet1.v_acc , packet1.vel_acc , packet1.next_lat , packet1.next_lon , packet1.next_alt , packet1.update_rate , packet1.flight_state , packet1.flags ); + mavlink_msg_utm_global_position_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_component_metadata_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.file_crc , packet1.uri ); - mavlink_msg_component_metadata_decode(&msg, &packet2); + mavlink_msg_utm_global_position_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time , packet1.uas_id , packet1.lat , packet1.lon , packet1.alt , packet1.relative_alt , packet1.vx , packet1.vy , packet1.vz , packet1.h_acc , packet1.v_acc , packet1.vel_acc , packet1.next_lat , packet1.next_lon , packet1.next_alt , packet1.update_rate , packet1.flight_state , packet1.flags ); + mavlink_msg_utm_global_position_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13297,61 +11958,61 @@ static void mavlink_test_component_metadata(uint8_t system_id, uint8_t component for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PLAY_TUNE_V2 >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_play_tune_v2_t packet_in = { - 963497464,17,84,"GHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRS" + mavlink_debug_float_array_t packet_in = { + 93372036854775807ULL,17651,"KLMNOPQRS",{ 157.0, 158.0, 159.0, 160.0, 161.0, 162.0, 163.0, 164.0, 165.0, 166.0, 167.0, 168.0, 169.0, 170.0, 171.0, 172.0, 173.0, 174.0, 175.0, 176.0, 177.0, 178.0, 179.0, 180.0, 181.0, 182.0, 183.0, 184.0, 185.0, 186.0, 187.0, 188.0, 189.0, 190.0, 191.0, 192.0, 193.0, 194.0, 195.0, 196.0, 197.0, 198.0, 199.0, 200.0, 201.0, 202.0, 203.0, 204.0, 205.0, 206.0, 207.0, 208.0, 209.0, 210.0, 211.0, 212.0, 213.0, 214.0 } }; - mavlink_play_tune_v2_t packet1, packet2; + mavlink_debug_float_array_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.format = packet_in.format; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; + packet1.time_usec = packet_in.time_usec; + packet1.array_id = packet_in.array_id; - mav_array_memcpy(packet1.tune, packet_in.tune, sizeof(char)*248); + mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*10); + mav_array_memcpy(packet1.data, packet_in.data, sizeof(float)*58); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PLAY_TUNE_V2_MIN_LEN); + memset(MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_play_tune_v2_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_play_tune_v2_decode(&msg, &packet2); + mavlink_msg_debug_float_array_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_debug_float_array_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_play_tune_v2_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.format , packet1.tune ); - mavlink_msg_play_tune_v2_decode(&msg, &packet2); + mavlink_msg_debug_float_array_pack(system_id, component_id, &msg , packet1.time_usec , packet1.name , packet1.array_id , packet1.data ); + mavlink_msg_debug_float_array_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_play_tune_v2_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.format , packet1.tune ); - mavlink_msg_play_tune_v2_decode(&msg, &packet2); + mavlink_msg_debug_float_array_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.name , packet1.array_id , packet1.data ); + mavlink_msg_debug_float_array_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13359,60 +12020,74 @@ static void mavlink_test_play_tune_v2(uint8_t system_id, uint8_t component_id, m for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SUPPORTED_TUNES >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SMART_BATTERY_INFO >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_supported_tunes_t packet_in = { - 963497464,17,84 + mavlink_smart_battery_info_t packet_in = { + 963497464,963497672,17651,17755,17859,17963,18067,187,254,65,"VWXYZABCDEFGHIJ","LMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH",21759,80,963502144,963502352,"UVWXYZABCD" }; - mavlink_supported_tunes_t packet1, packet2; + mavlink_smart_battery_info_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.format = packet_in.format; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; + packet1.capacity_full_specification = packet_in.capacity_full_specification; + packet1.capacity_full = packet_in.capacity_full; + packet1.cycle_count = packet_in.cycle_count; + packet1.weight = packet_in.weight; + packet1.discharge_minimum_voltage = packet_in.discharge_minimum_voltage; + packet1.charging_minimum_voltage = packet_in.charging_minimum_voltage; + packet1.resting_minimum_voltage = packet_in.resting_minimum_voltage; + packet1.id = packet_in.id; + packet1.battery_function = packet_in.battery_function; + packet1.type = packet_in.type; + packet1.charging_maximum_voltage = packet_in.charging_maximum_voltage; + packet1.cells_in_series = packet_in.cells_in_series; + packet1.discharge_maximum_current = packet_in.discharge_maximum_current; + packet1.discharge_maximum_burst_current = packet_in.discharge_maximum_burst_current; + mav_array_memcpy(packet1.serial_number, packet_in.serial_number, sizeof(char)*16); + mav_array_memcpy(packet1.device_name, packet_in.device_name, sizeof(char)*50); + mav_array_memcpy(packet1.manufacture_date, packet_in.manufacture_date, sizeof(char)*11); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SUPPORTED_TUNES_MIN_LEN); + memset(MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SMART_BATTERY_INFO_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_supported_tunes_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_supported_tunes_decode(&msg, &packet2); + mavlink_msg_smart_battery_info_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_smart_battery_info_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_supported_tunes_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.format ); - mavlink_msg_supported_tunes_decode(&msg, &packet2); + mavlink_msg_smart_battery_info_pack(system_id, component_id, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.capacity_full_specification , packet1.capacity_full , packet1.cycle_count , packet1.serial_number , packet1.device_name , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage , packet1.charging_maximum_voltage , packet1.cells_in_series , packet1.discharge_maximum_current , packet1.discharge_maximum_burst_current , packet1.manufacture_date ); + mavlink_msg_smart_battery_info_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_supported_tunes_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.format ); - mavlink_msg_supported_tunes_decode(&msg, &packet2); + mavlink_msg_smart_battery_info_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.battery_function , packet1.type , packet1.capacity_full_specification , packet1.capacity_full , packet1.cycle_count , packet1.serial_number , packet1.device_name , packet1.weight , packet1.discharge_minimum_voltage , packet1.charging_minimum_voltage , packet1.resting_minimum_voltage , packet1.charging_maximum_voltage , packet1.cells_in_series , packet1.discharge_maximum_current , packet1.discharge_maximum_burst_current , packet1.manufacture_date ); + mavlink_msg_smart_battery_info_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13420,64 +12095,68 @@ static void mavlink_test_supported_tunes(uint8_t system_id, uint8_t component_id for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_EVENT >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GENERATOR_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_event_t packet_in = { - 963497464,963497672,17651,163,230,41,{ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147 } + mavlink_generator_status_t packet_in = { + 93372036854775807ULL,73.0,101.0,129.0,157.0,185.0,963498920,963499128,19107,19211,19315 }; - mavlink_event_t packet1, packet2; + mavlink_generator_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.id = packet_in.id; - packet1.event_time_boot_ms = packet_in.event_time_boot_ms; - packet1.sequence = packet_in.sequence; - packet1.destination_component = packet_in.destination_component; - packet1.destination_system = packet_in.destination_system; - packet1.log_levels = packet_in.log_levels; + packet1.status = packet_in.status; + packet1.battery_current = packet_in.battery_current; + packet1.load_current = packet_in.load_current; + packet1.power_generated = packet_in.power_generated; + packet1.bus_voltage = packet_in.bus_voltage; + packet1.bat_current_setpoint = packet_in.bat_current_setpoint; + packet1.runtime = packet_in.runtime; + packet1.time_until_maintenance = packet_in.time_until_maintenance; + packet1.generator_speed = packet_in.generator_speed; + packet1.rectifier_temperature = packet_in.rectifier_temperature; + packet1.generator_temperature = packet_in.generator_temperature; - mav_array_memcpy(packet1.arguments, packet_in.arguments, sizeof(uint8_t)*40); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_EVENT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_EVENT_MIN_LEN); + memset(MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GENERATOR_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_event_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_event_decode(&msg, &packet2); + mavlink_msg_generator_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_generator_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_event_pack(system_id, component_id, &msg , packet1.destination_component , packet1.destination_system , packet1.id , packet1.event_time_boot_ms , packet1.sequence , packet1.log_levels , packet1.arguments ); - mavlink_msg_event_decode(&msg, &packet2); + mavlink_msg_generator_status_pack(system_id, component_id, &msg , packet1.status , packet1.generator_speed , packet1.battery_current , packet1.load_current , packet1.power_generated , packet1.bus_voltage , packet1.rectifier_temperature , packet1.bat_current_setpoint , packet1.generator_temperature , packet1.runtime , packet1.time_until_maintenance ); + mavlink_msg_generator_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_event_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.destination_component , packet1.destination_system , packet1.id , packet1.event_time_boot_ms , packet1.sequence , packet1.log_levels , packet1.arguments ); - mavlink_msg_event_decode(&msg, &packet2); + mavlink_msg_generator_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.generator_speed , packet1.battery_current , packet1.load_current , packet1.power_generated , packet1.bus_voltage , packet1.rectifier_temperature , packet1.bat_current_setpoint , packet1.generator_temperature , packet1.runtime , packet1.time_until_maintenance ); + mavlink_msg_generator_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13485,59 +12164,60 @@ static void mavlink_test_event(uint8_t system_id, uint8_t component_id, mavlink_ for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_current_event_sequence_t packet_in = { - 17235,139 + mavlink_actuator_output_status_t packet_in = { + 93372036854775807ULL,963497880,{ 101.0, 102.0, 103.0, 104.0, 105.0, 106.0, 107.0, 108.0, 109.0, 110.0, 111.0, 112.0, 113.0, 114.0, 115.0, 116.0, 117.0, 118.0, 119.0, 120.0, 121.0, 122.0, 123.0, 124.0, 125.0, 126.0, 127.0, 128.0, 129.0, 130.0, 131.0, 132.0 } }; - mavlink_current_event_sequence_t packet1, packet2; + mavlink_actuator_output_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.sequence = packet_in.sequence; - packet1.flags = packet_in.flags; + packet1.time_usec = packet_in.time_usec; + packet1.active = packet_in.active; + mav_array_memcpy(packet1.actuator, packet_in.actuator, sizeof(float)*32); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE_MIN_LEN); + memset(MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_event_sequence_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_current_event_sequence_decode(&msg, &packet2); + mavlink_msg_actuator_output_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_actuator_output_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_event_sequence_pack(system_id, component_id, &msg , packet1.sequence , packet1.flags ); - mavlink_msg_current_event_sequence_decode(&msg, &packet2); + mavlink_msg_actuator_output_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.active , packet1.actuator ); + mavlink_msg_actuator_output_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_event_sequence_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sequence , packet1.flags ); - mavlink_msg_current_event_sequence_decode(&msg, &packet2); + mavlink_msg_actuator_output_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.active , packet1.actuator ); + mavlink_msg_actuator_output_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13545,61 +12225,60 @@ static void mavlink_test_current_event_sequence(uint8_t system_id, uint8_t compo for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_REQUEST_EVENT >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RELAY_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_request_event_t packet_in = { - 17235,17339,17,84 + mavlink_relay_status_t packet_in = { + 963497464,17443,17547 }; - mavlink_request_event_t packet1, packet2; + mavlink_relay_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.first_sequence = packet_in.first_sequence; - packet1.last_sequence = packet_in.last_sequence; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; + packet1.time_boot_ms = packet_in.time_boot_ms; + packet1.on = packet_in.on; + packet1.present = packet_in.present; #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_REQUEST_EVENT_MIN_LEN); + memset(MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RELAY_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_request_event_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_request_event_decode(&msg, &packet2); + mavlink_msg_relay_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_relay_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_request_event_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.first_sequence , packet1.last_sequence ); - mavlink_msg_request_event_decode(&msg, &packet2); + mavlink_msg_relay_status_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.on , packet1.present ); + mavlink_msg_relay_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_request_event_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.first_sequence , packet1.last_sequence ); - mavlink_msg_request_event_decode(&msg, &packet2); + mavlink_msg_relay_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.on , packet1.present ); + mavlink_msg_relay_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13607,62 +12286,62 @@ static void mavlink_test_request_event(uint8_t system_id, uint8_t component_id, for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TUNNEL >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_response_event_error_t packet_in = { - 17235,17339,17,84,151 + mavlink_tunnel_t packet_in = { + 17235,139,206,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211 } }; - mavlink_response_event_error_t packet1, packet2; + mavlink_tunnel_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.sequence = packet_in.sequence; - packet1.sequence_oldest_available = packet_in.sequence_oldest_available; + packet1.payload_type = packet_in.payload_type; packet1.target_system = packet_in.target_system; packet1.target_component = packet_in.target_component; - packet1.reason = packet_in.reason; + packet1.payload_length = packet_in.payload_length; + mav_array_memcpy(packet1.payload, packet_in.payload, sizeof(uint8_t)*128); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR_MIN_LEN); + memset(MAVLINK_MSG_ID_TUNNEL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TUNNEL_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_response_event_error_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_response_event_error_decode(&msg, &packet2); + mavlink_msg_tunnel_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_tunnel_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_response_event_error_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.sequence_oldest_available , packet1.reason ); - mavlink_msg_response_event_error_decode(&msg, &packet2); + mavlink_msg_tunnel_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.payload_type , packet1.payload_length , packet1.payload ); + mavlink_msg_tunnel_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_response_event_error_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.sequence , packet1.sequence_oldest_available , packet1.reason ); - mavlink_msg_response_event_error_decode(&msg, &packet2); + mavlink_msg_tunnel_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.payload_type , packet1.payload_length , packet1.payload ); + mavlink_msg_tunnel_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13670,68 +12349,63 @@ static void mavlink_test_response_event_error(uint8_t system_id, uint8_t compone for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ILLUMINATOR_STATUS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CAN_FRAME >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_illuminator_status_t packet_in = { - 963497464,963497672,73.0,101.0,129.0,157.0,185.0,213.0,101,168,235 + mavlink_can_frame_t packet_in = { + 963497464,17,84,151,218,{ 29, 30, 31, 32, 33, 34, 35, 36 } }; - mavlink_illuminator_status_t packet1, packet2; + mavlink_can_frame_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.uptime_ms = packet_in.uptime_ms; - packet1.error_status = packet_in.error_status; - packet1.brightness = packet_in.brightness; - packet1.strobe_period = packet_in.strobe_period; - packet1.strobe_duty_cycle = packet_in.strobe_duty_cycle; - packet1.temp_c = packet_in.temp_c; - packet1.min_strobe_period = packet_in.min_strobe_period; - packet1.max_strobe_period = packet_in.max_strobe_period; - packet1.enable = packet_in.enable; - packet1.mode_bitmask = packet_in.mode_bitmask; - packet1.mode = packet_in.mode; + packet1.id = packet_in.id; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + packet1.bus = packet_in.bus; + packet1.len = packet_in.len; + mav_array_memcpy(packet1.data, packet_in.data, sizeof(uint8_t)*8); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ILLUMINATOR_STATUS_MIN_LEN); + memset(MAVLINK_MSG_ID_CAN_FRAME_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CAN_FRAME_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_illuminator_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_illuminator_status_decode(&msg, &packet2); + mavlink_msg_can_frame_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_can_frame_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_illuminator_status_pack(system_id, component_id, &msg , packet1.uptime_ms , packet1.enable , packet1.mode_bitmask , packet1.error_status , packet1.mode , packet1.brightness , packet1.strobe_period , packet1.strobe_duty_cycle , packet1.temp_c , packet1.min_strobe_period , packet1.max_strobe_period ); - mavlink_msg_illuminator_status_decode(&msg, &packet2); + mavlink_msg_can_frame_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.bus , packet1.len , packet1.id , packet1.data ); + mavlink_msg_can_frame_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_illuminator_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.uptime_ms , packet1.enable , packet1.mode_bitmask , packet1.error_status , packet1.mode , packet1.brightness , packet1.strobe_period , packet1.strobe_duty_cycle , packet1.temp_c , packet1.min_strobe_period , packet1.max_strobe_period ); - mavlink_msg_illuminator_status_decode(&msg, &packet2); + mavlink_msg_can_frame_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.bus , packet1.len , packet1.id , packet1.data ); + mavlink_msg_can_frame_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -13739,17 +12413,17 @@ static void mavlink_test_illuminator_status(uint8_t system_id, uint8_t component for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_open_drone_id_message_pack_t packet_in = { - 5,72,{ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158 },199,10,{ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 } + mavlink_open_drone_id_arm_status_t packet_in = { + 5,"BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX" }; - mavlink_open_drone_id_message_pack_t packet1, packet2; + mavlink_open_drone_id_arm_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.single_message_size = packet_in.single_message_size; - packet1.msg_pack_size = packet_in.msg_pack_size; + packet1.status = packet_in.status; - mav_array_memcpy(packet1.id_or_mac, packet_in.id_or_mac, sizeof(uint8_t)*20); - mav_array_memcpy(packet1.messages, packet_in.messages, sizeof(uint8_t)*225); + mav_array_memcpy(packet1.error, packet_in.error, sizeof(char)*50); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN); + memset(MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_message_pack_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); + mavlink_msg_open_drone_id_arm_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_message_pack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.id_or_mac , packet1.single_message_size , packet1.msg_pack_size , packet1.messages ); - mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); + mavlink_msg_open_drone_id_arm_status_pack(system_id, component_id, &msg , packet1.status , packet1.error ); + mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_message_pack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.id_or_mac , packet1.single_message_size , packet1.msg_pack_size , packet1.messages ); - mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); + mavlink_msg_open_drone_id_arm_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.error ); + mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -14465,59 +13135,63 @@ static void mavlink_test_open_drone_id_message_pack(uint8_t system_id, uint8_t c for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_open_drone_id_arm_status_t packet_in = { - 5,"BCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX" + mavlink_open_drone_id_message_pack_t packet_in = { + 5,72,{ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158 },199,10,{ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 } }; - mavlink_open_drone_id_arm_status_t packet1, packet2; + mavlink_open_drone_id_message_pack_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.status = packet_in.status; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + packet1.single_message_size = packet_in.single_message_size; + packet1.msg_pack_size = packet_in.msg_pack_size; - mav_array_memcpy(packet1.error, packet_in.error, sizeof(char)*50); + mav_array_memcpy(packet1.id_or_mac, packet_in.id_or_mac, sizeof(uint8_t)*20); + mav_array_memcpy(packet1.messages, packet_in.messages, sizeof(uint8_t)*225); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS_MIN_LEN); + memset(MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_arm_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); + mavlink_msg_open_drone_id_message_pack_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_arm_status_pack(system_id, component_id, &msg , packet1.status , packet1.error ); - mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); + mavlink_msg_open_drone_id_message_pack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.id_or_mac , packet1.single_message_size , packet1.msg_pack_size , packet1.messages ); + mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_open_drone_id_arm_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.status , packet1.error ); - mavlink_msg_open_drone_id_arm_status_decode(&msg, &packet2); + mavlink_msg_open_drone_id_message_pack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.id_or_mac , packet1.single_message_size , packet1.msg_pack_size , packet1.messages ); + mavlink_msg_open_drone_id_message_pack_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -14525,17 +13199,17 @@ static void mavlink_test_open_drone_id_arm_status(uint8_t system_id, uint8_t com for (i=0; imsgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -} - -/** - * @brief Pack a airlink_eye_gs_hole_push_request message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Hole push response type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_request_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); -#else - mavlink_airlink_eye_gs_hole_push_request_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); -#endif -} - -/** - * @brief Pack a airlink_eye_gs_hole_push_request message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param resp_type Hole push response type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); -#else - mavlink_airlink_eye_gs_hole_push_request_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_request struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_request_t* airlink_eye_gs_hole_push_request) -{ - return mavlink_msg_airlink_eye_gs_hole_push_request_pack(system_id, component_id, msg, airlink_eye_gs_hole_push_request->resp_type); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_request struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_request_t* airlink_eye_gs_hole_push_request) -{ - return mavlink_msg_airlink_eye_gs_hole_push_request_pack_chan(system_id, component_id, chan, msg, airlink_eye_gs_hole_push_request->resp_type); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_request struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_request_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_request_t* airlink_eye_gs_hole_push_request) -{ - return mavlink_msg_airlink_eye_gs_hole_push_request_pack_status(system_id, component_id, _status, msg, airlink_eye_gs_hole_push_request->resp_type); -} - -/** - * @brief Send a airlink_eye_gs_hole_push_request message - * @param chan MAVLink channel to send the message - * - * @param resp_type Hole push response type - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_airlink_eye_gs_hole_push_request_send(mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#else - mavlink_airlink_eye_gs_hole_push_request_t packet; - packet.resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#endif -} - -/** - * @brief Send a airlink_eye_gs_hole_push_request message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_request_send_struct(mavlink_channel_t chan, const mavlink_airlink_eye_gs_hole_push_request_t* airlink_eye_gs_hole_push_request) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_airlink_eye_gs_hole_push_request_send(chan, airlink_eye_gs_hole_push_request->resp_type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, (const char *)airlink_eye_gs_hole_push_request, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#else - mavlink_airlink_eye_gs_hole_push_request_t *packet = (mavlink_airlink_eye_gs_hole_push_request_t *)msgbuf; - packet->resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, (const char *)packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AIRLINK_EYE_GS_HOLE_PUSH_REQUEST UNPACKING - - -/** - * @brief Get field resp_type from airlink_eye_gs_hole_push_request message - * - * @return Hole push response type - */ -static inline uint8_t mavlink_msg_airlink_eye_gs_hole_push_request_get_resp_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Decode a airlink_eye_gs_hole_push_request message into a struct - * - * @param msg The message to decode - * @param airlink_eye_gs_hole_push_request C-struct to decode the message contents into - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_request_decode(const mavlink_message_t* msg, mavlink_airlink_eye_gs_hole_push_request_t* airlink_eye_gs_hole_push_request) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - airlink_eye_gs_hole_push_request->resp_type = mavlink_msg_airlink_eye_gs_hole_push_request_get_resp_type(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN? msg->len : MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN; - memset(airlink_eye_gs_hole_push_request, 0, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_LEN); - memcpy(airlink_eye_gs_hole_push_request, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/csAirLink/mavlink_msg_airlink_eye_gs_hole_push_response.h b/csAirLink/mavlink_msg_airlink_eye_gs_hole_push_response.h deleted file mode 100644 index 8205ff442..000000000 --- a/csAirLink/mavlink_msg_airlink_eye_gs_hole_push_response.h +++ /dev/null @@ -1,363 +0,0 @@ -#pragma once -// MESSAGE AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE PACKING - -#define MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE 52003 - - -typedef struct __mavlink_airlink_eye_gs_hole_push_response_t { - uint32_t ip_port; /*< port*/ - uint8_t resp_type; /*< Hole push response type*/ - uint8_t ip_version; /*< ip version*/ - uint8_t ip_address_4[4]; /*< ip 4 address*/ - uint8_t ip_address_6[16]; /*< ip 6 address*/ -} mavlink_airlink_eye_gs_hole_push_response_t; - -#define MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN 26 -#define MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN 26 -#define MAVLINK_MSG_ID_52003_LEN 26 -#define MAVLINK_MSG_ID_52003_MIN_LEN 26 - -#define MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC 166 -#define MAVLINK_MSG_ID_52003_CRC 166 - -#define MAVLINK_MSG_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_FIELD_IP_ADDRESS_4_LEN 4 -#define MAVLINK_MSG_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_FIELD_IP_ADDRESS_6_LEN 16 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE { \ - 52003, \ - "AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE", \ - 5, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, resp_type) }, \ - { "ip_version", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_version) }, \ - { "ip_address_4", NULL, MAVLINK_TYPE_UINT8_T, 4, 6, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_address_4) }, \ - { "ip_address_6", NULL, MAVLINK_TYPE_UINT8_T, 16, 10, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_address_6) }, \ - { "ip_port", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_port) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE { \ - "AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE", \ - 5, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, resp_type) }, \ - { "ip_version", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_version) }, \ - { "ip_address_4", NULL, MAVLINK_TYPE_UINT8_T, 4, 6, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_address_4) }, \ - { "ip_address_6", NULL, MAVLINK_TYPE_UINT8_T, 16, 10, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_address_6) }, \ - { "ip_port", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airlink_eye_gs_hole_push_response_t, ip_port) }, \ - } \ -} -#endif - -/** - * @brief Pack a airlink_eye_gs_hole_push_response message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Hole push response type - * @param ip_version ip version - * @param ip_address_4 ip 4 address - * @param ip_address_6 ip 6 address - * @param ip_port port - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t resp_type, uint8_t ip_version, const uint8_t *ip_address_4, const uint8_t *ip_address_6, uint32_t ip_port) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN]; - _mav_put_uint32_t(buf, 0, ip_port); - _mav_put_uint8_t(buf, 4, resp_type); - _mav_put_uint8_t(buf, 5, ip_version); - _mav_put_uint8_t_array(buf, 6, ip_address_4, 4); - _mav_put_uint8_t_array(buf, 10, ip_address_6, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#else - mavlink_airlink_eye_gs_hole_push_response_t packet; - packet.ip_port = ip_port; - packet.resp_type = resp_type; - packet.ip_version = ip_version; - mav_array_memcpy(packet.ip_address_4, ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet.ip_address_6, ip_address_6, sizeof(uint8_t)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -} - -/** - * @brief Pack a airlink_eye_gs_hole_push_response message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Hole push response type - * @param ip_version ip version - * @param ip_address_4 ip 4 address - * @param ip_address_6 ip 6 address - * @param ip_port port - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t resp_type, uint8_t ip_version, const uint8_t *ip_address_4, const uint8_t *ip_address_6, uint32_t ip_port) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN]; - _mav_put_uint32_t(buf, 0, ip_port); - _mav_put_uint8_t(buf, 4, resp_type); - _mav_put_uint8_t(buf, 5, ip_version); - _mav_put_uint8_t_array(buf, 6, ip_address_4, 4); - _mav_put_uint8_t_array(buf, 10, ip_address_6, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#else - mavlink_airlink_eye_gs_hole_push_response_t packet; - packet.ip_port = ip_port; - packet.resp_type = resp_type; - packet.ip_version = ip_version; - mav_array_memcpy(packet.ip_address_4, ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet.ip_address_6, ip_address_6, sizeof(uint8_t)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#endif -} - -/** - * @brief Pack a airlink_eye_gs_hole_push_response message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param resp_type Hole push response type - * @param ip_version ip version - * @param ip_address_4 ip 4 address - * @param ip_address_6 ip 6 address - * @param ip_port port - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t resp_type,uint8_t ip_version,const uint8_t *ip_address_4,const uint8_t *ip_address_6,uint32_t ip_port) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN]; - _mav_put_uint32_t(buf, 0, ip_port); - _mav_put_uint8_t(buf, 4, resp_type); - _mav_put_uint8_t(buf, 5, ip_version); - _mav_put_uint8_t_array(buf, 6, ip_address_4, 4); - _mav_put_uint8_t_array(buf, 10, ip_address_6, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#else - mavlink_airlink_eye_gs_hole_push_response_t packet; - packet.ip_port = ip_port; - packet.resp_type = resp_type; - packet.ip_version = ip_version; - mav_array_memcpy(packet.ip_address_4, ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet.ip_address_6, ip_address_6, sizeof(uint8_t)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_response struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_response C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_response_t* airlink_eye_gs_hole_push_response) -{ - return mavlink_msg_airlink_eye_gs_hole_push_response_pack(system_id, component_id, msg, airlink_eye_gs_hole_push_response->resp_type, airlink_eye_gs_hole_push_response->ip_version, airlink_eye_gs_hole_push_response->ip_address_4, airlink_eye_gs_hole_push_response->ip_address_6, airlink_eye_gs_hole_push_response->ip_port); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_response struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_response C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_response_t* airlink_eye_gs_hole_push_response) -{ - return mavlink_msg_airlink_eye_gs_hole_push_response_pack_chan(system_id, component_id, chan, msg, airlink_eye_gs_hole_push_response->resp_type, airlink_eye_gs_hole_push_response->ip_version, airlink_eye_gs_hole_push_response->ip_address_4, airlink_eye_gs_hole_push_response->ip_address_6, airlink_eye_gs_hole_push_response->ip_port); -} - -/** - * @brief Encode a airlink_eye_gs_hole_push_response struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_gs_hole_push_response C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airlink_eye_gs_hole_push_response_t* airlink_eye_gs_hole_push_response) -{ - return mavlink_msg_airlink_eye_gs_hole_push_response_pack_status(system_id, component_id, _status, msg, airlink_eye_gs_hole_push_response->resp_type, airlink_eye_gs_hole_push_response->ip_version, airlink_eye_gs_hole_push_response->ip_address_4, airlink_eye_gs_hole_push_response->ip_address_6, airlink_eye_gs_hole_push_response->ip_port); -} - -/** - * @brief Send a airlink_eye_gs_hole_push_response message - * @param chan MAVLink channel to send the message - * - * @param resp_type Hole push response type - * @param ip_version ip version - * @param ip_address_4 ip 4 address - * @param ip_address_6 ip 6 address - * @param ip_port port - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_airlink_eye_gs_hole_push_response_send(mavlink_channel_t chan, uint8_t resp_type, uint8_t ip_version, const uint8_t *ip_address_4, const uint8_t *ip_address_6, uint32_t ip_port) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN]; - _mav_put_uint32_t(buf, 0, ip_port); - _mav_put_uint8_t(buf, 4, resp_type); - _mav_put_uint8_t(buf, 5, ip_version); - _mav_put_uint8_t_array(buf, 6, ip_address_4, 4); - _mav_put_uint8_t_array(buf, 10, ip_address_6, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#else - mavlink_airlink_eye_gs_hole_push_response_t packet; - packet.ip_port = ip_port; - packet.resp_type = resp_type; - packet.ip_version = ip_version; - mav_array_memcpy(packet.ip_address_4, ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet.ip_address_6, ip_address_6, sizeof(uint8_t)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, (const char *)&packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#endif -} - -/** - * @brief Send a airlink_eye_gs_hole_push_response message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_response_send_struct(mavlink_channel_t chan, const mavlink_airlink_eye_gs_hole_push_response_t* airlink_eye_gs_hole_push_response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_airlink_eye_gs_hole_push_response_send(chan, airlink_eye_gs_hole_push_response->resp_type, airlink_eye_gs_hole_push_response->ip_version, airlink_eye_gs_hole_push_response->ip_address_4, airlink_eye_gs_hole_push_response->ip_address_6, airlink_eye_gs_hole_push_response->ip_port); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, (const char *)airlink_eye_gs_hole_push_response, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_response_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t resp_type, uint8_t ip_version, const uint8_t *ip_address_4, const uint8_t *ip_address_6, uint32_t ip_port) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, ip_port); - _mav_put_uint8_t(buf, 4, resp_type); - _mav_put_uint8_t(buf, 5, ip_version); - _mav_put_uint8_t_array(buf, 6, ip_address_4, 4); - _mav_put_uint8_t_array(buf, 10, ip_address_6, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, buf, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#else - mavlink_airlink_eye_gs_hole_push_response_t *packet = (mavlink_airlink_eye_gs_hole_push_response_t *)msgbuf; - packet->ip_port = ip_port; - packet->resp_type = resp_type; - packet->ip_version = ip_version; - mav_array_memcpy(packet->ip_address_4, ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet->ip_address_6, ip_address_6, sizeof(uint8_t)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, (const char *)packet, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE UNPACKING - - -/** - * @brief Get field resp_type from airlink_eye_gs_hole_push_response message - * - * @return Hole push response type - */ -static inline uint8_t mavlink_msg_airlink_eye_gs_hole_push_response_get_resp_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field ip_version from airlink_eye_gs_hole_push_response message - * - * @return ip version - */ -static inline uint8_t mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_version(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field ip_address_4 from airlink_eye_gs_hole_push_response message - * - * @return ip 4 address - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_address_4(const mavlink_message_t* msg, uint8_t *ip_address_4) -{ - return _MAV_RETURN_uint8_t_array(msg, ip_address_4, 4, 6); -} - -/** - * @brief Get field ip_address_6 from airlink_eye_gs_hole_push_response message - * - * @return ip 6 address - */ -static inline uint16_t mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_address_6(const mavlink_message_t* msg, uint8_t *ip_address_6) -{ - return _MAV_RETURN_uint8_t_array(msg, ip_address_6, 16, 10); -} - -/** - * @brief Get field ip_port from airlink_eye_gs_hole_push_response message - * - * @return port - */ -static inline uint32_t mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_port(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Decode a airlink_eye_gs_hole_push_response message into a struct - * - * @param msg The message to decode - * @param airlink_eye_gs_hole_push_response C-struct to decode the message contents into - */ -static inline void mavlink_msg_airlink_eye_gs_hole_push_response_decode(const mavlink_message_t* msg, mavlink_airlink_eye_gs_hole_push_response_t* airlink_eye_gs_hole_push_response) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - airlink_eye_gs_hole_push_response->ip_port = mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_port(msg); - airlink_eye_gs_hole_push_response->resp_type = mavlink_msg_airlink_eye_gs_hole_push_response_get_resp_type(msg); - airlink_eye_gs_hole_push_response->ip_version = mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_version(msg); - mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_address_4(msg, airlink_eye_gs_hole_push_response->ip_address_4); - mavlink_msg_airlink_eye_gs_hole_push_response_get_ip_address_6(msg, airlink_eye_gs_hole_push_response->ip_address_6); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN? msg->len : MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN; - memset(airlink_eye_gs_hole_push_response, 0, MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_LEN); - memcpy(airlink_eye_gs_hole_push_response, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/csAirLink/mavlink_msg_airlink_eye_hp.h b/csAirLink/mavlink_msg_airlink_eye_hp.h deleted file mode 100644 index a98dd33ea..000000000 --- a/csAirLink/mavlink_msg_airlink_eye_hp.h +++ /dev/null @@ -1,260 +0,0 @@ -#pragma once -// MESSAGE AIRLINK_EYE_HP PACKING - -#define MAVLINK_MSG_ID_AIRLINK_EYE_HP 52004 - - -typedef struct __mavlink_airlink_eye_hp_t { - uint8_t resp_type; /*< Hole push response type*/ -} mavlink_airlink_eye_hp_t; - -#define MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN 1 -#define MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN 1 -#define MAVLINK_MSG_ID_52004_LEN 1 -#define MAVLINK_MSG_ID_52004_MIN_LEN 1 - -#define MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC 39 -#define MAVLINK_MSG_ID_52004_CRC 39 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_HP { \ - 52004, \ - "AIRLINK_EYE_HP", \ - 1, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_airlink_eye_hp_t, resp_type) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_HP { \ - "AIRLINK_EYE_HP", \ - 1, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_airlink_eye_hp_t, resp_type) }, \ - } \ -} -#endif - -/** - * @brief Pack a airlink_eye_hp message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Hole push response type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#else - mavlink_airlink_eye_hp_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_HP; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -} - -/** - * @brief Pack a airlink_eye_hp message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Hole push response type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#else - mavlink_airlink_eye_hp_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_HP; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#endif -} - -/** - * @brief Pack a airlink_eye_hp message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param resp_type Hole push response type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#else - mavlink_airlink_eye_hp_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_HP; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -} - -/** - * @brief Encode a airlink_eye_hp struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_hp C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airlink_eye_hp_t* airlink_eye_hp) -{ - return mavlink_msg_airlink_eye_hp_pack(system_id, component_id, msg, airlink_eye_hp->resp_type); -} - -/** - * @brief Encode a airlink_eye_hp struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_hp C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airlink_eye_hp_t* airlink_eye_hp) -{ - return mavlink_msg_airlink_eye_hp_pack_chan(system_id, component_id, chan, msg, airlink_eye_hp->resp_type); -} - -/** - * @brief Encode a airlink_eye_hp struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_hp C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_hp_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airlink_eye_hp_t* airlink_eye_hp) -{ - return mavlink_msg_airlink_eye_hp_pack_status(system_id, component_id, _status, msg, airlink_eye_hp->resp_type); -} - -/** - * @brief Send a airlink_eye_hp message - * @param chan MAVLink channel to send the message - * - * @param resp_type Hole push response type - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_airlink_eye_hp_send(mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP, buf, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#else - mavlink_airlink_eye_hp_t packet; - packet.resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP, (const char *)&packet, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#endif -} - -/** - * @brief Send a airlink_eye_hp message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_airlink_eye_hp_send_struct(mavlink_channel_t chan, const mavlink_airlink_eye_hp_t* airlink_eye_hp) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_airlink_eye_hp_send(chan, airlink_eye_hp->resp_type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP, (const char *)airlink_eye_hp, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_airlink_eye_hp_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP, buf, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#else - mavlink_airlink_eye_hp_t *packet = (mavlink_airlink_eye_hp_t *)msgbuf; - packet->resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_HP, (const char *)packet, MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_HP_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AIRLINK_EYE_HP UNPACKING - - -/** - * @brief Get field resp_type from airlink_eye_hp message - * - * @return Hole push response type - */ -static inline uint8_t mavlink_msg_airlink_eye_hp_get_resp_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Decode a airlink_eye_hp message into a struct - * - * @param msg The message to decode - * @param airlink_eye_hp C-struct to decode the message contents into - */ -static inline void mavlink_msg_airlink_eye_hp_decode(const mavlink_message_t* msg, mavlink_airlink_eye_hp_t* airlink_eye_hp) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - airlink_eye_hp->resp_type = mavlink_msg_airlink_eye_hp_get_resp_type(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN? msg->len : MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN; - memset(airlink_eye_hp, 0, MAVLINK_MSG_ID_AIRLINK_EYE_HP_LEN); - memcpy(airlink_eye_hp, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/csAirLink/mavlink_msg_airlink_eye_turn_init.h b/csAirLink/mavlink_msg_airlink_eye_turn_init.h deleted file mode 100644 index 94e2e70af..000000000 --- a/csAirLink/mavlink_msg_airlink_eye_turn_init.h +++ /dev/null @@ -1,260 +0,0 @@ -#pragma once -// MESSAGE AIRLINK_EYE_TURN_INIT PACKING - -#define MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT 52005 - - -typedef struct __mavlink_airlink_eye_turn_init_t { - uint8_t resp_type; /*< Turn init type*/ -} mavlink_airlink_eye_turn_init_t; - -#define MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN 1 -#define MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN 1 -#define MAVLINK_MSG_ID_52005_LEN 1 -#define MAVLINK_MSG_ID_52005_MIN_LEN 1 - -#define MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC 145 -#define MAVLINK_MSG_ID_52005_CRC 145 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_TURN_INIT { \ - 52005, \ - "AIRLINK_EYE_TURN_INIT", \ - 1, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_airlink_eye_turn_init_t, resp_type) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AIRLINK_EYE_TURN_INIT { \ - "AIRLINK_EYE_TURN_INIT", \ - 1, \ - { { "resp_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_airlink_eye_turn_init_t, resp_type) }, \ - } \ -} -#endif - -/** - * @brief Pack a airlink_eye_turn_init message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Turn init type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#else - mavlink_airlink_eye_turn_init_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -} - -/** - * @brief Pack a airlink_eye_turn_init message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param resp_type Turn init type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#else - mavlink_airlink_eye_turn_init_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#endif -} - -/** - * @brief Pack a airlink_eye_turn_init message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param resp_type Turn init type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#else - mavlink_airlink_eye_turn_init_t packet; - packet.resp_type = resp_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -} - -/** - * @brief Encode a airlink_eye_turn_init struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_turn_init C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airlink_eye_turn_init_t* airlink_eye_turn_init) -{ - return mavlink_msg_airlink_eye_turn_init_pack(system_id, component_id, msg, airlink_eye_turn_init->resp_type); -} - -/** - * @brief Encode a airlink_eye_turn_init struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_turn_init C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airlink_eye_turn_init_t* airlink_eye_turn_init) -{ - return mavlink_msg_airlink_eye_turn_init_pack_chan(system_id, component_id, chan, msg, airlink_eye_turn_init->resp_type); -} - -/** - * @brief Encode a airlink_eye_turn_init struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param airlink_eye_turn_init C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airlink_eye_turn_init_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airlink_eye_turn_init_t* airlink_eye_turn_init) -{ - return mavlink_msg_airlink_eye_turn_init_pack_status(system_id, component_id, _status, msg, airlink_eye_turn_init->resp_type); -} - -/** - * @brief Send a airlink_eye_turn_init message - * @param chan MAVLink channel to send the message - * - * @param resp_type Turn init type - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_airlink_eye_turn_init_send(mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN]; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT, buf, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#else - mavlink_airlink_eye_turn_init_t packet; - packet.resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT, (const char *)&packet, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#endif -} - -/** - * @brief Send a airlink_eye_turn_init message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_airlink_eye_turn_init_send_struct(mavlink_channel_t chan, const mavlink_airlink_eye_turn_init_t* airlink_eye_turn_init) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_airlink_eye_turn_init_send(chan, airlink_eye_turn_init->resp_type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT, (const char *)airlink_eye_turn_init, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_airlink_eye_turn_init_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t resp_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, resp_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT, buf, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#else - mavlink_airlink_eye_turn_init_t *packet = (mavlink_airlink_eye_turn_init_t *)msgbuf; - packet->resp_type = resp_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT, (const char *)packet, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AIRLINK_EYE_TURN_INIT UNPACKING - - -/** - * @brief Get field resp_type from airlink_eye_turn_init message - * - * @return Turn init type - */ -static inline uint8_t mavlink_msg_airlink_eye_turn_init_get_resp_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Decode a airlink_eye_turn_init message into a struct - * - * @param msg The message to decode - * @param airlink_eye_turn_init C-struct to decode the message contents into - */ -static inline void mavlink_msg_airlink_eye_turn_init_decode(const mavlink_message_t* msg, mavlink_airlink_eye_turn_init_t* airlink_eye_turn_init) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - airlink_eye_turn_init->resp_type = mavlink_msg_airlink_eye_turn_init_get_resp_type(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN? msg->len : MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN; - memset(airlink_eye_turn_init, 0, MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_LEN); - memcpy(airlink_eye_turn_init, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/csAirLink/testsuite.h b/csAirLink/testsuite.h index 1fdb2d839..17aaa534e 100644 --- a/csAirLink/testsuite.h +++ b/csAirLink/testsuite.h @@ -144,254 +144,10 @@ static void mavlink_test_airlink_auth_response(uint8_t system_id, uint8_t compon #endif } -static void mavlink_test_airlink_eye_gs_hole_push_request(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_airlink_eye_gs_hole_push_request_t packet_in = { - 5 - }; - mavlink_airlink_eye_gs_hole_push_request_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.resp_type = packet_in.resp_type; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_request_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_airlink_eye_gs_hole_push_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_request_pack(system_id, component_id, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_gs_hole_push_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_gs_hole_push_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_airlink_eye_gs_hole_push_response_t packet_in = { - 963497464,17,84,{ 151, 152, 153, 154 },{ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178 } - }; - mavlink_airlink_eye_gs_hole_push_response_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.ip_port = packet_in.ip_port; - packet1.resp_type = packet_in.resp_type; - packet1.ip_version = packet_in.ip_version; - - mav_array_memcpy(packet1.ip_address_4, packet_in.ip_address_4, sizeof(uint8_t)*4); - mav_array_memcpy(packet1.ip_address_6, packet_in.ip_address_6, sizeof(uint8_t)*16); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_response_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_airlink_eye_gs_hole_push_response_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_response_pack(system_id, component_id, &msg , packet1.resp_type , packet1.ip_version , packet1.ip_address_4 , packet1.ip_address_6 , packet1.ip_port ); - mavlink_msg_airlink_eye_gs_hole_push_response_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_gs_hole_push_response_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.resp_type , packet1.ip_version , packet1.ip_address_4 , packet1.ip_address_6 , packet1.ip_port ); - mavlink_msg_airlink_eye_gs_hole_push_response_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRLINK_EYE_HP >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_airlink_eye_hp_t packet_in = { - 5 - }; - mavlink_airlink_eye_hp_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.resp_type = packet_in.resp_type; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRLINK_EYE_HP_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_hp_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_airlink_eye_hp_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_hp_pack(system_id, component_id, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_hp_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_hp_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_hp_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_airlink_eye_turn_init_t packet_in = { - 5 - }; - mavlink_airlink_eye_turn_init_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.resp_type = packet_in.resp_type; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRLINK_EYE_TURN_INIT_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_turn_init_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_airlink_eye_turn_init_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_turn_init_pack(system_id, component_id, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_turn_init_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airlink_eye_turn_init_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.resp_type ); - mavlink_msg_airlink_eye_turn_init_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; i 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ - MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */ - MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ - MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ - MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ - MAV_CMD_DO_FIGURE_EIGHT=35, /* Fly a figure eight path as defined by the parameters. - Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values. - The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation. - This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED). - Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading). - |Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - NaN: The radius will be set to 2.5 times the minor radius and direction is clockwise. - Must be greater or equal to two times the minor radius for feasible values.| Minor axis radius of the figure eight. Defines the radius of the two circles that make up the figure. Negative value has no effect. - NaN: The radius will be set to the default loiter radius.| Reserved (default:NaN)| Orientation of the figure eight major axis with respect to true north (range: [-pi,pi]). NaN: use default orientation aligned to true north.| Center point latitude/X coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle position, or current center if already loitering.| Center point longitude/Y coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle position, or current center if already loitering.| Center point altitude MSL/Z coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle altitude.| */ - MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ - MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ - MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ - MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ - MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ - MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ - MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ - MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ - MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ - MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ - MAV_CMD_DO_UPGRADE=247, /* Request a target system to start an upgrade of one (or all) of its components. - For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller. - The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation. - Command protocol information: https://mavlink.io/en/services/command.html. |Component id of the component to be upgraded. If set to 0, all components should be upgraded.| 0: Do not reboot component after the action is executed, 1: Reboot component after the action is executed.| Reserved| Reserved| Reserved| Reserved| WIP: upgrade progress report rate (can be used for more granular control).| */ - MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ - MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ - MAV_CMD_DO_SET_STANDARD_MODE=262, /* Enable the specified standard MAVLink mode. - If the mode is not supported the vehicle should ACK with MAV_RESULT_FAILED. - |The mode to set.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GROUP_START=301, /* Define start of a group of mission items. When control reaches this command a GROUP_START message is emitted. - The end of a group is marked using MAV_CMD_GROUP_END with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. |Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GROUP_END=302, /* Define end of a group of mission items. When control reaches this command a GROUP_END message is emitted. - The start of the group is marked is marked using MAV_CMD_GROUP_START with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. |Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_AT_S_PARAM=550, /* Allows setting an AT S command of an SiK radio. - |The radio instance, one-based, 0 for all.| The Sx index, e.g. 3 for S3 which is NETID.| The value to set it to, e.g. default 25 for NETID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_SYS_CMP_ID=610, /* - Set system and component id. - This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id. - Recipients must reject command addressed to broadcast system ID. - |New system ID for target component(s). 0: ignore and reject command (broadcast system ID not allowed).| New component ID for target component(s). 0: ignore (component IDs don't change).| Reboot components after ID change. Any non-zero value triggers the reboot.| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_PARAM_TRANSACTION=900, /* Request to start or end a parameter transaction. Multiple kinds of transport layers can be used to exchange parameters in the transaction (param, param_ext and mavftp). The command response can either be a success/failure or an in progress in case the receiving side takes some time to apply the parameters. |Action to be performed (start, commit, cancel, etc.)| Possible transport layers to set and get parameters via mavlink during a parameter transaction.| Identifier for a specific transaction.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - |Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area. - |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area. - |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined. - |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_ODID_SET_EMERGENCY=12900, /* Used to manually set/unset emergency status for remote id. - This is for compliance with MOC ASTM docs, specifically F358 section 7.7: "Emergency Status Indicator". - The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred. - See https://mavlink.io/en/services/opendroneid.html for more information. - |Set/unset emergency 0: unset, 1: set| Reserved (default:NaN)| Reserved (default:NaN)| Empty| Empty| Empty| Empty| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ - MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ - MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_EXTERNAL_WIND_ESTIMATE=43004, /* Set an external estimate of wind direction and speed. - This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself. - |Horizontal wind speed.| Estimated 1 sigma accuracy of wind speed. Set to NaN if unknown.| Azimuth (relative to true north) from where the wind is blowing.| Estimated 1 sigma accuracy of wind direction. Set to NaN if unknown.| Empty| Empty| Empty| */ - MAV_CMD_ENUM_END=43005, /* | */ -} MAV_CMD; -#endif - -/** @brief These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE. */ -#ifndef HAVE_ENUM_TARGET_ABSOLUTE_SENSOR_CAPABILITY_FLAGS -#define HAVE_ENUM_TARGET_ABSOLUTE_SENSOR_CAPABILITY_FLAGS -typedef enum TARGET_ABSOLUTE_SENSOR_CAPABILITY_FLAGS -{ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION=1, /* | */ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_VELOCITY=2, /* | */ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_ACCELERATION=4, /* | */ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_ATTITUDE=8, /* | */ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_RATES=16, /* | */ - TARGET_ABSOLUTE_SENSOR_CAPABILITY_FLAGS_ENUM_END=17, /* | */ -} TARGET_ABSOLUTE_SENSOR_CAPABILITY_FLAGS; -#endif - -/** @brief The frame of a target observation from an onboard sensor. */ -#ifndef HAVE_ENUM_TARGET_OBS_FRAME -#define HAVE_ENUM_TARGET_OBS_FRAME -typedef enum TARGET_OBS_FRAME -{ - TARGET_OBS_FRAME_LOCAL_NED=0, /* NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth. | */ - TARGET_OBS_FRAME_BODY_FRD=1, /* FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle. | */ - TARGET_OBS_FRAME_LOCAL_OFFSET_NED=2, /* NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle. | */ - TARGET_OBS_FRAME_OTHER=3, /* Other sensor frame for target observations neither in local NED nor in body FRD. | */ - TARGET_OBS_FRAME_ENUM_END=4, /* | */ -} TARGET_OBS_FRAME; -#endif - /** @brief RADIO_RC_CHANNELS flags (bitmask). */ #ifndef HAVE_ENUM_RADIO_RC_CHANNELS_FLAGS #define HAVE_ENUM_RADIO_RC_CHANNELS_FLAGS @@ -591,87 +55,6 @@ typedef enum RADIO_RC_CHANNELS_FLAGS } RADIO_RC_CHANNELS_FLAGS; #endif -/** @brief Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates. */ -#ifndef HAVE_ENUM_MAV_FUEL_TYPE -#define HAVE_ENUM_MAV_FUEL_TYPE -typedef enum MAV_FUEL_TYPE -{ - MAV_FUEL_TYPE_UNKNOWN=0, /* Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1. | */ - MAV_FUEL_TYPE_LIQUID=1, /* A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second. | */ - MAV_FUEL_TYPE_GAS=2, /* A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s). | */ - MAV_FUEL_TYPE_ENUM_END=3, /* | */ -} MAV_FUEL_TYPE; -#endif - -/** @brief Flags indicating errors in a GPS receiver. */ -#ifndef HAVE_ENUM_GPS_SYSTEM_ERROR_FLAGS -#define HAVE_ENUM_GPS_SYSTEM_ERROR_FLAGS -typedef enum GPS_SYSTEM_ERROR_FLAGS -{ - GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS=1, /* There are problems with incoming correction streams. | */ - GPS_SYSTEM_ERROR_CONFIGURATION=2, /* There are problems with the configuration. | */ - GPS_SYSTEM_ERROR_SOFTWARE=4, /* There are problems with the software on the GPS receiver. | */ - GPS_SYSTEM_ERROR_ANTENNA=8, /* There are problems with an antenna connected to the GPS receiver. | */ - GPS_SYSTEM_ERROR_EVENT_CONGESTION=16, /* There are problems handling all incoming events. | */ - GPS_SYSTEM_ERROR_CPU_OVERLOAD=32, /* The GPS receiver CPU is overloaded. | */ - GPS_SYSTEM_ERROR_OUTPUT_CONGESTION=64, /* The GPS receiver is experiencing output congestion. | */ - GPS_SYSTEM_ERROR_FLAGS_ENUM_END=65, /* | */ -} GPS_SYSTEM_ERROR_FLAGS; -#endif - -/** @brief Signal authentication state in a GPS receiver. */ -#ifndef HAVE_ENUM_GPS_AUTHENTICATION_STATE -#define HAVE_ENUM_GPS_AUTHENTICATION_STATE -typedef enum GPS_AUTHENTICATION_STATE -{ - GPS_AUTHENTICATION_STATE_UNKNOWN=0, /* The GPS receiver does not provide GPS signal authentication info. | */ - GPS_AUTHENTICATION_STATE_INITIALIZING=1, /* The GPS receiver is initializing signal authentication. | */ - GPS_AUTHENTICATION_STATE_ERROR=2, /* The GPS receiver encountered an error while initializing signal authentication. | */ - GPS_AUTHENTICATION_STATE_OK=3, /* The GPS receiver has correctly authenticated all signals. | */ - GPS_AUTHENTICATION_STATE_DISABLED=4, /* GPS signal authentication is disabled on the receiver. | */ - GPS_AUTHENTICATION_STATE_ENUM_END=5, /* | */ -} GPS_AUTHENTICATION_STATE; -#endif - -/** @brief Signal jamming state in a GPS receiver. */ -#ifndef HAVE_ENUM_GPS_JAMMING_STATE -#define HAVE_ENUM_GPS_JAMMING_STATE -typedef enum GPS_JAMMING_STATE -{ - GPS_JAMMING_STATE_UNKNOWN=0, /* The GPS receiver does not provide GPS signal jamming info. | */ - GPS_JAMMING_STATE_OK=1, /* The GPS receiver detected no signal jamming. | */ - GPS_JAMMING_STATE_MITIGATED=2, /* The GPS receiver detected and mitigated signal jamming. | */ - GPS_JAMMING_STATE_DETECTED=3, /* The GPS receiver detected signal jamming. | */ - GPS_JAMMING_STATE_ENUM_END=4, /* | */ -} GPS_JAMMING_STATE; -#endif - -/** @brief Signal spoofing state in a GPS receiver. */ -#ifndef HAVE_ENUM_GPS_SPOOFING_STATE -#define HAVE_ENUM_GPS_SPOOFING_STATE -typedef enum GPS_SPOOFING_STATE -{ - GPS_SPOOFING_STATE_UNKNOWN=0, /* The GPS receiver does not provide GPS signal spoofing info. | */ - GPS_SPOOFING_STATE_OK=1, /* The GPS receiver detected no signal spoofing. | */ - GPS_SPOOFING_STATE_MITIGATED=2, /* The GPS receiver detected and mitigated signal spoofing. | */ - GPS_SPOOFING_STATE_DETECTED=3, /* The GPS receiver detected signal spoofing but still has a fix. | */ - GPS_SPOOFING_STATE_ENUM_END=4, /* | */ -} GPS_SPOOFING_STATE; -#endif - -/** @brief State of RAIM processing. */ -#ifndef HAVE_ENUM_GPS_RAIM_STATE -#define HAVE_ENUM_GPS_RAIM_STATE -typedef enum GPS_RAIM_STATE -{ - GPS_RAIM_STATE_UNKNOWN=0, /* RAIM capability is unknown. | */ - GPS_RAIM_STATE_DISABLED=1, /* RAIM is disabled. | */ - GPS_RAIM_STATE_OK=2, /* RAIM integrity check was successful. | */ - GPS_RAIM_STATE_FAILED=3, /* RAIM integrity check failed. | */ - GPS_RAIM_STATE_ENUM_END=4, /* | */ -} GPS_RAIM_STATE; -#endif - // MAVLINK VERSION #ifndef MAVLINK_VERSION @@ -684,31 +67,17 @@ typedef enum GPS_RAIM_STATE #endif // MESSAGE DEFINITIONS -#include "./mavlink_msg_param_ack_transaction.h" +#include "./mavlink_msg_mission_checksum.h" #include "./mavlink_msg_airspeed.h" -#include "./mavlink_msg_wifi_network_info.h" -#include "./mavlink_msg_set_velocity_limits.h" -#include "./mavlink_msg_velocity_limits.h" -#include "./mavlink_msg_figure_eight_execution_status.h" -#include "./mavlink_msg_battery_status_v2.h" -#include "./mavlink_msg_fuel_status.h" -#include "./mavlink_msg_group_start.h" -#include "./mavlink_msg_group_end.h" #include "./mavlink_msg_radio_rc_channels.h" -#include "./mavlink_msg_available_modes.h" -#include "./mavlink_msg_current_mode.h" -#include "./mavlink_msg_available_modes_monitor.h" -#include "./mavlink_msg_gnss_integrity.h" -#include "./mavlink_msg_target_absolute.h" -#include "./mavlink_msg_target_relative.h" // base include -#include "../common/common.h" +#include "../standard/standard.h" #if MAVLINK_DEVELOPMENT_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_ACK_TRANSACTION, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_AIRSPEED, MAVLINK_MESSAGE_INFO_WIFI_NETWORK_INFO, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SET_VELOCITY_LIMITS, MAVLINK_MESSAGE_INFO_VELOCITY_LIMITS, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_FIGURE_EIGHT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_STATUS_V2, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_FUEL_STATUS, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_GROUP_START, MAVLINK_MESSAGE_INFO_GROUP_END, MAVLINK_MESSAGE_INFO_RADIO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_AVAILABLE_MODES, MAVLINK_MESSAGE_INFO_CURRENT_MODE, MAVLINK_MESSAGE_INFO_AVAILABLE_MODES_MONITOR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_GNSS_INTEGRITY, MAVLINK_MESSAGE_INFO_TARGET_ABSOLUTE, MAVLINK_MESSAGE_INFO_TARGET_RELATIVE, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIRSPEED", 295 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AVAILABLE_MODES", 435 }, { "AVAILABLE_MODES_MONITOR", 437 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BATTERY_STATUS_V2", 369 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "CURRENT_MODE", 436 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FIGURE_EIGHT_EXECUTION_STATUS", 361 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FUEL_STATUS", 371 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GNSS_INTEGRITY", 441 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "GROUP_END", 415 }, { "GROUP_START", 414 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_ACK_TRANSACTION", 19 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_RC_CHANNELS", 420 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SET_VELOCITY_LIMITS", 354 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TARGET_ABSOLUTE", 510 }, { "TARGET_RELATIVE", 511 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VELOCITY_LIMITS", 355 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WIFI_NETWORK_INFO", 298 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_MISSION_CHECKSUM, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_AIRSPEED, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_RADIO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIRSPEED", 295 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "CONTROL_SYSTEM_STATE", 146 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CHECKSUM", 53 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO_RC_CHANNELS", 420 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/development/mavlink.h b/development/mavlink.h index efb131162..c708ac1c2 100644 --- a/development/mavlink.h +++ b/development/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH 6744680565482540718 +#define MAVLINK_PRIMARY_XML_HASH 3344276315618478545 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/development/mavlink_msg_available_modes.h b/development/mavlink_msg_available_modes.h deleted file mode 100644 index ee7112f24..000000000 --- a/development/mavlink_msg_available_modes.h +++ /dev/null @@ -1,390 +0,0 @@ -#pragma once -// MESSAGE AVAILABLE_MODES PACKING - -#define MAVLINK_MSG_ID_AVAILABLE_MODES 435 - - -typedef struct __mavlink_available_modes_t { - uint32_t custom_mode; /*< A bitfield for use for autopilot-specific flags*/ - uint32_t properties; /*< Mode properties.*/ - uint8_t number_modes; /*< The total number of available modes for the current vehicle type.*/ - uint8_t mode_index; /*< The current mode index within number_modes, indexed from 1.*/ - uint8_t standard_mode; /*< Standard mode.*/ - char mode_name[35]; /*< Name of custom mode, with null termination character. Should be omitted for standard modes.*/ -} mavlink_available_modes_t; - -#define MAVLINK_MSG_ID_AVAILABLE_MODES_LEN 46 -#define MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN 46 -#define MAVLINK_MSG_ID_435_LEN 46 -#define MAVLINK_MSG_ID_435_MIN_LEN 46 - -#define MAVLINK_MSG_ID_AVAILABLE_MODES_CRC 134 -#define MAVLINK_MSG_ID_435_CRC 134 - -#define MAVLINK_MSG_AVAILABLE_MODES_FIELD_MODE_NAME_LEN 35 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AVAILABLE_MODES { \ - 435, \ - "AVAILABLE_MODES", \ - 6, \ - { { "number_modes", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_available_modes_t, number_modes) }, \ - { "mode_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_available_modes_t, mode_index) }, \ - { "standard_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_available_modes_t, standard_mode) }, \ - { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_available_modes_t, custom_mode) }, \ - { "properties", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_available_modes_t, properties) }, \ - { "mode_name", NULL, MAVLINK_TYPE_CHAR, 35, 11, offsetof(mavlink_available_modes_t, mode_name) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AVAILABLE_MODES { \ - "AVAILABLE_MODES", \ - 6, \ - { { "number_modes", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_available_modes_t, number_modes) }, \ - { "mode_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_available_modes_t, mode_index) }, \ - { "standard_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_available_modes_t, standard_mode) }, \ - { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_available_modes_t, custom_mode) }, \ - { "properties", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_available_modes_t, properties) }, \ - { "mode_name", NULL, MAVLINK_TYPE_CHAR, 35, 11, offsetof(mavlink_available_modes_t, mode_name) }, \ - } \ -} -#endif - -/** - * @brief Pack a available_modes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param number_modes The total number of available modes for the current vehicle type. - * @param mode_index The current mode index within number_modes, indexed from 1. - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param properties Mode properties. - * @param mode_name Name of custom mode, with null termination character. Should be omitted for standard modes. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t number_modes, uint8_t mode_index, uint8_t standard_mode, uint32_t custom_mode, uint32_t properties, const char *mode_name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, properties); - _mav_put_uint8_t(buf, 8, number_modes); - _mav_put_uint8_t(buf, 9, mode_index); - _mav_put_uint8_t(buf, 10, standard_mode); - _mav_put_char_array(buf, 11, mode_name, 35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#else - mavlink_available_modes_t packet; - packet.custom_mode = custom_mode; - packet.properties = properties; - packet.number_modes = number_modes; - packet.mode_index = mode_index; - packet.standard_mode = standard_mode; - mav_array_memcpy(packet.mode_name, mode_name, sizeof(char)*35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -} - -/** - * @brief Pack a available_modes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param number_modes The total number of available modes for the current vehicle type. - * @param mode_index The current mode index within number_modes, indexed from 1. - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param properties Mode properties. - * @param mode_name Name of custom mode, with null termination character. Should be omitted for standard modes. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t number_modes, uint8_t mode_index, uint8_t standard_mode, uint32_t custom_mode, uint32_t properties, const char *mode_name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, properties); - _mav_put_uint8_t(buf, 8, number_modes); - _mav_put_uint8_t(buf, 9, mode_index); - _mav_put_uint8_t(buf, 10, standard_mode); - _mav_put_char_array(buf, 11, mode_name, 35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#else - mavlink_available_modes_t packet; - packet.custom_mode = custom_mode; - packet.properties = properties; - packet.number_modes = number_modes; - packet.mode_index = mode_index; - packet.standard_mode = standard_mode; - mav_array_memcpy(packet.mode_name, mode_name, sizeof(char)*35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#endif -} - -/** - * @brief Pack a available_modes message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param number_modes The total number of available modes for the current vehicle type. - * @param mode_index The current mode index within number_modes, indexed from 1. - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param properties Mode properties. - * @param mode_name Name of custom mode, with null termination character. Should be omitted for standard modes. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t number_modes,uint8_t mode_index,uint8_t standard_mode,uint32_t custom_mode,uint32_t properties,const char *mode_name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, properties); - _mav_put_uint8_t(buf, 8, number_modes); - _mav_put_uint8_t(buf, 9, mode_index); - _mav_put_uint8_t(buf, 10, standard_mode); - _mav_put_char_array(buf, 11, mode_name, 35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#else - mavlink_available_modes_t packet; - packet.custom_mode = custom_mode; - packet.properties = properties; - packet.number_modes = number_modes; - packet.mode_index = mode_index; - packet.standard_mode = standard_mode; - mav_array_memcpy(packet.mode_name, mode_name, sizeof(char)*35); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -} - -/** - * @brief Encode a available_modes struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param available_modes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_available_modes_t* available_modes) -{ - return mavlink_msg_available_modes_pack(system_id, component_id, msg, available_modes->number_modes, available_modes->mode_index, available_modes->standard_mode, available_modes->custom_mode, available_modes->properties, available_modes->mode_name); -} - -/** - * @brief Encode a available_modes struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param available_modes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_available_modes_t* available_modes) -{ - return mavlink_msg_available_modes_pack_chan(system_id, component_id, chan, msg, available_modes->number_modes, available_modes->mode_index, available_modes->standard_mode, available_modes->custom_mode, available_modes->properties, available_modes->mode_name); -} - -/** - * @brief Encode a available_modes struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param available_modes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_available_modes_t* available_modes) -{ - return mavlink_msg_available_modes_pack_status(system_id, component_id, _status, msg, available_modes->number_modes, available_modes->mode_index, available_modes->standard_mode, available_modes->custom_mode, available_modes->properties, available_modes->mode_name); -} - -/** - * @brief Send a available_modes message - * @param chan MAVLink channel to send the message - * - * @param number_modes The total number of available modes for the current vehicle type. - * @param mode_index The current mode index within number_modes, indexed from 1. - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param properties Mode properties. - * @param mode_name Name of custom mode, with null termination character. Should be omitted for standard modes. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_available_modes_send(mavlink_channel_t chan, uint8_t number_modes, uint8_t mode_index, uint8_t standard_mode, uint32_t custom_mode, uint32_t properties, const char *mode_name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, properties); - _mav_put_uint8_t(buf, 8, number_modes); - _mav_put_uint8_t(buf, 9, mode_index); - _mav_put_uint8_t(buf, 10, standard_mode); - _mav_put_char_array(buf, 11, mode_name, 35); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES, buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#else - mavlink_available_modes_t packet; - packet.custom_mode = custom_mode; - packet.properties = properties; - packet.number_modes = number_modes; - packet.mode_index = mode_index; - packet.standard_mode = standard_mode; - mav_array_memcpy(packet.mode_name, mode_name, sizeof(char)*35); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES, (const char *)&packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#endif -} - -/** - * @brief Send a available_modes message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_available_modes_send_struct(mavlink_channel_t chan, const mavlink_available_modes_t* available_modes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_available_modes_send(chan, available_modes->number_modes, available_modes->mode_index, available_modes->standard_mode, available_modes->custom_mode, available_modes->properties, available_modes->mode_name); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES, (const char *)available_modes, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AVAILABLE_MODES_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_available_modes_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t number_modes, uint8_t mode_index, uint8_t standard_mode, uint32_t custom_mode, uint32_t properties, const char *mode_name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, properties); - _mav_put_uint8_t(buf, 8, number_modes); - _mav_put_uint8_t(buf, 9, mode_index); - _mav_put_uint8_t(buf, 10, standard_mode); - _mav_put_char_array(buf, 11, mode_name, 35); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES, buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#else - mavlink_available_modes_t *packet = (mavlink_available_modes_t *)msgbuf; - packet->custom_mode = custom_mode; - packet->properties = properties; - packet->number_modes = number_modes; - packet->mode_index = mode_index; - packet->standard_mode = standard_mode; - mav_array_memcpy(packet->mode_name, mode_name, sizeof(char)*35); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES, (const char *)packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AVAILABLE_MODES UNPACKING - - -/** - * @brief Get field number_modes from available_modes message - * - * @return The total number of available modes for the current vehicle type. - */ -static inline uint8_t mavlink_msg_available_modes_get_number_modes(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field mode_index from available_modes message - * - * @return The current mode index within number_modes, indexed from 1. - */ -static inline uint8_t mavlink_msg_available_modes_get_mode_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 9); -} - -/** - * @brief Get field standard_mode from available_modes message - * - * @return Standard mode. - */ -static inline uint8_t mavlink_msg_available_modes_get_standard_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 10); -} - -/** - * @brief Get field custom_mode from available_modes message - * - * @return A bitfield for use for autopilot-specific flags - */ -static inline uint32_t mavlink_msg_available_modes_get_custom_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field properties from available_modes message - * - * @return Mode properties. - */ -static inline uint32_t mavlink_msg_available_modes_get_properties(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field mode_name from available_modes message - * - * @return Name of custom mode, with null termination character. Should be omitted for standard modes. - */ -static inline uint16_t mavlink_msg_available_modes_get_mode_name(const mavlink_message_t* msg, char *mode_name) -{ - return _MAV_RETURN_char_array(msg, mode_name, 35, 11); -} - -/** - * @brief Decode a available_modes message into a struct - * - * @param msg The message to decode - * @param available_modes C-struct to decode the message contents into - */ -static inline void mavlink_msg_available_modes_decode(const mavlink_message_t* msg, mavlink_available_modes_t* available_modes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - available_modes->custom_mode = mavlink_msg_available_modes_get_custom_mode(msg); - available_modes->properties = mavlink_msg_available_modes_get_properties(msg); - available_modes->number_modes = mavlink_msg_available_modes_get_number_modes(msg); - available_modes->mode_index = mavlink_msg_available_modes_get_mode_index(msg); - available_modes->standard_mode = mavlink_msg_available_modes_get_standard_mode(msg); - mavlink_msg_available_modes_get_mode_name(msg, available_modes->mode_name); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AVAILABLE_MODES_LEN? msg->len : MAVLINK_MSG_ID_AVAILABLE_MODES_LEN; - memset(available_modes, 0, MAVLINK_MSG_ID_AVAILABLE_MODES_LEN); - memcpy(available_modes, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_available_modes_monitor.h b/development/mavlink_msg_available_modes_monitor.h deleted file mode 100644 index 48821cc2a..000000000 --- a/development/mavlink_msg_available_modes_monitor.h +++ /dev/null @@ -1,260 +0,0 @@ -#pragma once -// MESSAGE AVAILABLE_MODES_MONITOR PACKING - -#define MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR 437 - - -typedef struct __mavlink_available_modes_monitor_t { - uint8_t seq; /*< Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically).*/ -} mavlink_available_modes_monitor_t; - -#define MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN 1 -#define MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN 1 -#define MAVLINK_MSG_ID_437_LEN 1 -#define MAVLINK_MSG_ID_437_MIN_LEN 1 - -#define MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC 30 -#define MAVLINK_MSG_ID_437_CRC 30 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AVAILABLE_MODES_MONITOR { \ - 437, \ - "AVAILABLE_MODES_MONITOR", \ - 1, \ - { { "seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_available_modes_monitor_t, seq) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AVAILABLE_MODES_MONITOR { \ - "AVAILABLE_MODES_MONITOR", \ - 1, \ - { { "seq", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_available_modes_monitor_t, seq) }, \ - } \ -} -#endif - -/** - * @brief Pack a available_modes_monitor message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param seq Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_monitor_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN]; - _mav_put_uint8_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#else - mavlink_available_modes_monitor_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -} - -/** - * @brief Pack a available_modes_monitor message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param seq Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_monitor_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN]; - _mav_put_uint8_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#else - mavlink_available_modes_monitor_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#endif -} - -/** - * @brief Pack a available_modes_monitor message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param seq Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_available_modes_monitor_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN]; - _mav_put_uint8_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#else - mavlink_available_modes_monitor_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -} - -/** - * @brief Encode a available_modes_monitor struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param available_modes_monitor C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_monitor_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_available_modes_monitor_t* available_modes_monitor) -{ - return mavlink_msg_available_modes_monitor_pack(system_id, component_id, msg, available_modes_monitor->seq); -} - -/** - * @brief Encode a available_modes_monitor struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param available_modes_monitor C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_monitor_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_available_modes_monitor_t* available_modes_monitor) -{ - return mavlink_msg_available_modes_monitor_pack_chan(system_id, component_id, chan, msg, available_modes_monitor->seq); -} - -/** - * @brief Encode a available_modes_monitor struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param available_modes_monitor C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_available_modes_monitor_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_available_modes_monitor_t* available_modes_monitor) -{ - return mavlink_msg_available_modes_monitor_pack_status(system_id, component_id, _status, msg, available_modes_monitor->seq); -} - -/** - * @brief Send a available_modes_monitor message - * @param chan MAVLink channel to send the message - * - * @param seq Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_available_modes_monitor_send(mavlink_channel_t chan, uint8_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN]; - _mav_put_uint8_t(buf, 0, seq); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR, buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#else - mavlink_available_modes_monitor_t packet; - packet.seq = seq; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR, (const char *)&packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#endif -} - -/** - * @brief Send a available_modes_monitor message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_available_modes_monitor_send_struct(mavlink_channel_t chan, const mavlink_available_modes_monitor_t* available_modes_monitor) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_available_modes_monitor_send(chan, available_modes_monitor->seq); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR, (const char *)available_modes_monitor, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_available_modes_monitor_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, seq); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR, buf, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#else - mavlink_available_modes_monitor_t *packet = (mavlink_available_modes_monitor_t *)msgbuf; - packet->seq = seq; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR, (const char *)packet, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AVAILABLE_MODES_MONITOR UNPACKING - - -/** - * @brief Get field seq from available_modes_monitor message - * - * @return Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - */ -static inline uint8_t mavlink_msg_available_modes_monitor_get_seq(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Decode a available_modes_monitor message into a struct - * - * @param msg The message to decode - * @param available_modes_monitor C-struct to decode the message contents into - */ -static inline void mavlink_msg_available_modes_monitor_decode(const mavlink_message_t* msg, mavlink_available_modes_monitor_t* available_modes_monitor) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - available_modes_monitor->seq = mavlink_msg_available_modes_monitor_get_seq(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN? msg->len : MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN; - memset(available_modes_monitor, 0, MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_LEN); - memcpy(available_modes_monitor, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_battery_status_v2.h b/development/mavlink_msg_battery_status_v2.h deleted file mode 100644 index 1cb39a259..000000000 --- a/development/mavlink_msg_battery_status_v2.h +++ /dev/null @@ -1,456 +0,0 @@ -#pragma once -// MESSAGE BATTERY_STATUS_V2 PACKING - -#define MAVLINK_MSG_ID_BATTERY_STATUS_V2 369 - - -typedef struct __mavlink_battery_status_v2_t { - float voltage; /*< [V] Battery voltage (total). NaN: field not provided.*/ - float current; /*< [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided.*/ - float capacity_consumed; /*< [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL.*/ - float capacity_remaining; /*< [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered.*/ - uint32_t status_flags; /*< Fault, health, readiness, and other status indications.*/ - int16_t temperature; /*< [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided.*/ - uint8_t id; /*< Battery ID*/ - uint8_t percent_remaining; /*< [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided.*/ -} mavlink_battery_status_v2_t; - -#define MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN 24 -#define MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN 24 -#define MAVLINK_MSG_ID_369_LEN 24 -#define MAVLINK_MSG_ID_369_MIN_LEN 24 - -#define MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC 151 -#define MAVLINK_MSG_ID_369_CRC 151 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_BATTERY_STATUS_V2 { \ - 369, \ - "BATTERY_STATUS_V2", \ - 8, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_battery_status_v2_t, id) }, \ - { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_battery_status_v2_t, temperature) }, \ - { "voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_battery_status_v2_t, voltage) }, \ - { "current", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_battery_status_v2_t, current) }, \ - { "capacity_consumed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_battery_status_v2_t, capacity_consumed) }, \ - { "capacity_remaining", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_battery_status_v2_t, capacity_remaining) }, \ - { "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_battery_status_v2_t, percent_remaining) }, \ - { "status_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_battery_status_v2_t, status_flags) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_BATTERY_STATUS_V2 { \ - "BATTERY_STATUS_V2", \ - 8, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_battery_status_v2_t, id) }, \ - { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_battery_status_v2_t, temperature) }, \ - { "voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_battery_status_v2_t, voltage) }, \ - { "current", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_battery_status_v2_t, current) }, \ - { "capacity_consumed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_battery_status_v2_t, capacity_consumed) }, \ - { "capacity_remaining", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_battery_status_v2_t, capacity_remaining) }, \ - { "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_battery_status_v2_t, percent_remaining) }, \ - { "status_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_battery_status_v2_t, status_flags) }, \ - } \ -} -#endif - -/** - * @brief Pack a battery_status_v2 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param id Battery ID - * @param temperature [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - * @param voltage [V] Battery voltage (total). NaN: field not provided. - * @param current [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - * @param capacity_consumed [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - * @param capacity_remaining [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - * @param percent_remaining [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - * @param status_flags Fault, health, readiness, and other status indications. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_status_v2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t id, int16_t temperature, float voltage, float current, float capacity_consumed, float capacity_remaining, uint8_t percent_remaining, uint32_t status_flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN]; - _mav_put_float(buf, 0, voltage); - _mav_put_float(buf, 4, current); - _mav_put_float(buf, 8, capacity_consumed); - _mav_put_float(buf, 12, capacity_remaining); - _mav_put_uint32_t(buf, 16, status_flags); - _mav_put_int16_t(buf, 20, temperature); - _mav_put_uint8_t(buf, 22, id); - _mav_put_uint8_t(buf, 23, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#else - mavlink_battery_status_v2_t packet; - packet.voltage = voltage; - packet.current = current; - packet.capacity_consumed = capacity_consumed; - packet.capacity_remaining = capacity_remaining; - packet.status_flags = status_flags; - packet.temperature = temperature; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_STATUS_V2; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -} - -/** - * @brief Pack a battery_status_v2 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param id Battery ID - * @param temperature [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - * @param voltage [V] Battery voltage (total). NaN: field not provided. - * @param current [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - * @param capacity_consumed [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - * @param capacity_remaining [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - * @param percent_remaining [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - * @param status_flags Fault, health, readiness, and other status indications. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_status_v2_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t id, int16_t temperature, float voltage, float current, float capacity_consumed, float capacity_remaining, uint8_t percent_remaining, uint32_t status_flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN]; - _mav_put_float(buf, 0, voltage); - _mav_put_float(buf, 4, current); - _mav_put_float(buf, 8, capacity_consumed); - _mav_put_float(buf, 12, capacity_remaining); - _mav_put_uint32_t(buf, 16, status_flags); - _mav_put_int16_t(buf, 20, temperature); - _mav_put_uint8_t(buf, 22, id); - _mav_put_uint8_t(buf, 23, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#else - mavlink_battery_status_v2_t packet; - packet.voltage = voltage; - packet.current = current; - packet.capacity_consumed = capacity_consumed; - packet.capacity_remaining = capacity_remaining; - packet.status_flags = status_flags; - packet.temperature = temperature; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_STATUS_V2; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#endif -} - -/** - * @brief Pack a battery_status_v2 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param id Battery ID - * @param temperature [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - * @param voltage [V] Battery voltage (total). NaN: field not provided. - * @param current [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - * @param capacity_consumed [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - * @param capacity_remaining [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - * @param percent_remaining [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - * @param status_flags Fault, health, readiness, and other status indications. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_battery_status_v2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t id,int16_t temperature,float voltage,float current,float capacity_consumed,float capacity_remaining,uint8_t percent_remaining,uint32_t status_flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN]; - _mav_put_float(buf, 0, voltage); - _mav_put_float(buf, 4, current); - _mav_put_float(buf, 8, capacity_consumed); - _mav_put_float(buf, 12, capacity_remaining); - _mav_put_uint32_t(buf, 16, status_flags); - _mav_put_int16_t(buf, 20, temperature); - _mav_put_uint8_t(buf, 22, id); - _mav_put_uint8_t(buf, 23, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#else - mavlink_battery_status_v2_t packet; - packet.voltage = voltage; - packet.current = current; - packet.capacity_consumed = capacity_consumed; - packet.capacity_remaining = capacity_remaining; - packet.status_flags = status_flags; - packet.temperature = temperature; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_BATTERY_STATUS_V2; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -} - -/** - * @brief Encode a battery_status_v2 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param battery_status_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_status_v2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_battery_status_v2_t* battery_status_v2) -{ - return mavlink_msg_battery_status_v2_pack(system_id, component_id, msg, battery_status_v2->id, battery_status_v2->temperature, battery_status_v2->voltage, battery_status_v2->current, battery_status_v2->capacity_consumed, battery_status_v2->capacity_remaining, battery_status_v2->percent_remaining, battery_status_v2->status_flags); -} - -/** - * @brief Encode a battery_status_v2 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param battery_status_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_status_v2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_battery_status_v2_t* battery_status_v2) -{ - return mavlink_msg_battery_status_v2_pack_chan(system_id, component_id, chan, msg, battery_status_v2->id, battery_status_v2->temperature, battery_status_v2->voltage, battery_status_v2->current, battery_status_v2->capacity_consumed, battery_status_v2->capacity_remaining, battery_status_v2->percent_remaining, battery_status_v2->status_flags); -} - -/** - * @brief Encode a battery_status_v2 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param battery_status_v2 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_battery_status_v2_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_battery_status_v2_t* battery_status_v2) -{ - return mavlink_msg_battery_status_v2_pack_status(system_id, component_id, _status, msg, battery_status_v2->id, battery_status_v2->temperature, battery_status_v2->voltage, battery_status_v2->current, battery_status_v2->capacity_consumed, battery_status_v2->capacity_remaining, battery_status_v2->percent_remaining, battery_status_v2->status_flags); -} - -/** - * @brief Send a battery_status_v2 message - * @param chan MAVLink channel to send the message - * - * @param id Battery ID - * @param temperature [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - * @param voltage [V] Battery voltage (total). NaN: field not provided. - * @param current [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - * @param capacity_consumed [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - * @param capacity_remaining [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - * @param percent_remaining [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - * @param status_flags Fault, health, readiness, and other status indications. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_battery_status_v2_send(mavlink_channel_t chan, uint8_t id, int16_t temperature, float voltage, float current, float capacity_consumed, float capacity_remaining, uint8_t percent_remaining, uint32_t status_flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN]; - _mav_put_float(buf, 0, voltage); - _mav_put_float(buf, 4, current); - _mav_put_float(buf, 8, capacity_consumed); - _mav_put_float(buf, 12, capacity_remaining); - _mav_put_uint32_t(buf, 16, status_flags); - _mav_put_int16_t(buf, 20, temperature); - _mav_put_uint8_t(buf, 22, id); - _mav_put_uint8_t(buf, 23, percent_remaining); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2, buf, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#else - mavlink_battery_status_v2_t packet; - packet.voltage = voltage; - packet.current = current; - packet.capacity_consumed = capacity_consumed; - packet.capacity_remaining = capacity_remaining; - packet.status_flags = status_flags; - packet.temperature = temperature; - packet.id = id; - packet.percent_remaining = percent_remaining; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2, (const char *)&packet, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#endif -} - -/** - * @brief Send a battery_status_v2 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_battery_status_v2_send_struct(mavlink_channel_t chan, const mavlink_battery_status_v2_t* battery_status_v2) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_battery_status_v2_send(chan, battery_status_v2->id, battery_status_v2->temperature, battery_status_v2->voltage, battery_status_v2->current, battery_status_v2->capacity_consumed, battery_status_v2->capacity_remaining, battery_status_v2->percent_remaining, battery_status_v2->status_flags); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2, (const char *)battery_status_v2, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#endif -} - -#if MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_battery_status_v2_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, int16_t temperature, float voltage, float current, float capacity_consumed, float capacity_remaining, uint8_t percent_remaining, uint32_t status_flags) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, voltage); - _mav_put_float(buf, 4, current); - _mav_put_float(buf, 8, capacity_consumed); - _mav_put_float(buf, 12, capacity_remaining); - _mav_put_uint32_t(buf, 16, status_flags); - _mav_put_int16_t(buf, 20, temperature); - _mav_put_uint8_t(buf, 22, id); - _mav_put_uint8_t(buf, 23, percent_remaining); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2, buf, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#else - mavlink_battery_status_v2_t *packet = (mavlink_battery_status_v2_t *)msgbuf; - packet->voltage = voltage; - packet->current = current; - packet->capacity_consumed = capacity_consumed; - packet->capacity_remaining = capacity_remaining; - packet->status_flags = status_flags; - packet->temperature = temperature; - packet->id = id; - packet->percent_remaining = percent_remaining; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BATTERY_STATUS_V2, (const char *)packet, MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN, MAVLINK_MSG_ID_BATTERY_STATUS_V2_CRC); -#endif -} -#endif - -#endif - -// MESSAGE BATTERY_STATUS_V2 UNPACKING - - -/** - * @brief Get field id from battery_status_v2 message - * - * @return Battery ID - */ -static inline uint8_t mavlink_msg_battery_status_v2_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 22); -} - -/** - * @brief Get field temperature from battery_status_v2 message - * - * @return [cdegC] Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - */ -static inline int16_t mavlink_msg_battery_status_v2_get_temperature(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 20); -} - -/** - * @brief Get field voltage from battery_status_v2 message - * - * @return [V] Battery voltage (total). NaN: field not provided. - */ -static inline float mavlink_msg_battery_status_v2_get_voltage(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field current from battery_status_v2 message - * - * @return [A] Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - */ -static inline float mavlink_msg_battery_status_v2_get_current(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field capacity_consumed from battery_status_v2 message - * - * @return [Ah] Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - */ -static inline float mavlink_msg_battery_status_v2_get_capacity_consumed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field capacity_remaining from battery_status_v2 message - * - * @return [Ah] Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - */ -static inline float mavlink_msg_battery_status_v2_get_capacity_remaining(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field percent_remaining from battery_status_v2 message - * - * @return [%] Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - */ -static inline uint8_t mavlink_msg_battery_status_v2_get_percent_remaining(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 23); -} - -/** - * @brief Get field status_flags from battery_status_v2 message - * - * @return Fault, health, readiness, and other status indications. - */ -static inline uint32_t mavlink_msg_battery_status_v2_get_status_flags(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 16); -} - -/** - * @brief Decode a battery_status_v2 message into a struct - * - * @param msg The message to decode - * @param battery_status_v2 C-struct to decode the message contents into - */ -static inline void mavlink_msg_battery_status_v2_decode(const mavlink_message_t* msg, mavlink_battery_status_v2_t* battery_status_v2) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - battery_status_v2->voltage = mavlink_msg_battery_status_v2_get_voltage(msg); - battery_status_v2->current = mavlink_msg_battery_status_v2_get_current(msg); - battery_status_v2->capacity_consumed = mavlink_msg_battery_status_v2_get_capacity_consumed(msg); - battery_status_v2->capacity_remaining = mavlink_msg_battery_status_v2_get_capacity_remaining(msg); - battery_status_v2->status_flags = mavlink_msg_battery_status_v2_get_status_flags(msg); - battery_status_v2->temperature = mavlink_msg_battery_status_v2_get_temperature(msg); - battery_status_v2->id = mavlink_msg_battery_status_v2_get_id(msg); - battery_status_v2->percent_remaining = mavlink_msg_battery_status_v2_get_percent_remaining(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN? msg->len : MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN; - memset(battery_status_v2, 0, MAVLINK_MSG_ID_BATTERY_STATUS_V2_LEN); - memcpy(battery_status_v2, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_current_mode.h b/development/mavlink_msg_current_mode.h deleted file mode 100644 index cc19e250c..000000000 --- a/development/mavlink_msg_current_mode.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE CURRENT_MODE PACKING - -#define MAVLINK_MSG_ID_CURRENT_MODE 436 - - -typedef struct __mavlink_current_mode_t { - uint32_t custom_mode; /*< A bitfield for use for autopilot-specific flags*/ - uint32_t intended_custom_mode; /*< The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied*/ - uint8_t standard_mode; /*< Standard mode.*/ -} mavlink_current_mode_t; - -#define MAVLINK_MSG_ID_CURRENT_MODE_LEN 9 -#define MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN 9 -#define MAVLINK_MSG_ID_436_LEN 9 -#define MAVLINK_MSG_ID_436_MIN_LEN 9 - -#define MAVLINK_MSG_ID_CURRENT_MODE_CRC 193 -#define MAVLINK_MSG_ID_436_CRC 193 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_CURRENT_MODE { \ - 436, \ - "CURRENT_MODE", \ - 3, \ - { { "standard_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_current_mode_t, standard_mode) }, \ - { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_current_mode_t, custom_mode) }, \ - { "intended_custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_current_mode_t, intended_custom_mode) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_CURRENT_MODE { \ - "CURRENT_MODE", \ - 3, \ - { { "standard_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_current_mode_t, standard_mode) }, \ - { "custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_current_mode_t, custom_mode) }, \ - { "intended_custom_mode", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_current_mode_t, intended_custom_mode) }, \ - } \ -} -#endif - -/** - * @brief Pack a current_mode message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param intended_custom_mode The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_mode_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t standard_mode, uint32_t custom_mode, uint32_t intended_custom_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_MODE_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, intended_custom_mode); - _mav_put_uint8_t(buf, 8, standard_mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#else - mavlink_current_mode_t packet; - packet.custom_mode = custom_mode; - packet.intended_custom_mode = intended_custom_mode; - packet.standard_mode = standard_mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_MODE; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -} - -/** - * @brief Pack a current_mode message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param intended_custom_mode The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_mode_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t standard_mode, uint32_t custom_mode, uint32_t intended_custom_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_MODE_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, intended_custom_mode); - _mav_put_uint8_t(buf, 8, standard_mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#else - mavlink_current_mode_t packet; - packet.custom_mode = custom_mode; - packet.intended_custom_mode = intended_custom_mode; - packet.standard_mode = standard_mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_MODE; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#endif -} - -/** - * @brief Pack a current_mode message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param intended_custom_mode The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_current_mode_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t standard_mode,uint32_t custom_mode,uint32_t intended_custom_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_MODE_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, intended_custom_mode); - _mav_put_uint8_t(buf, 8, standard_mode); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#else - mavlink_current_mode_t packet; - packet.custom_mode = custom_mode; - packet.intended_custom_mode = intended_custom_mode; - packet.standard_mode = standard_mode; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CURRENT_MODE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_CURRENT_MODE; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -} - -/** - * @brief Encode a current_mode struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param current_mode C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_mode_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_current_mode_t* current_mode) -{ - return mavlink_msg_current_mode_pack(system_id, component_id, msg, current_mode->standard_mode, current_mode->custom_mode, current_mode->intended_custom_mode); -} - -/** - * @brief Encode a current_mode struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param current_mode C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_mode_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_current_mode_t* current_mode) -{ - return mavlink_msg_current_mode_pack_chan(system_id, component_id, chan, msg, current_mode->standard_mode, current_mode->custom_mode, current_mode->intended_custom_mode); -} - -/** - * @brief Encode a current_mode struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param current_mode C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_current_mode_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_current_mode_t* current_mode) -{ - return mavlink_msg_current_mode_pack_status(system_id, component_id, _status, msg, current_mode->standard_mode, current_mode->custom_mode, current_mode->intended_custom_mode); -} - -/** - * @brief Send a current_mode message - * @param chan MAVLink channel to send the message - * - * @param standard_mode Standard mode. - * @param custom_mode A bitfield for use for autopilot-specific flags - * @param intended_custom_mode The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_current_mode_send(mavlink_channel_t chan, uint8_t standard_mode, uint32_t custom_mode, uint32_t intended_custom_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_CURRENT_MODE_LEN]; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, intended_custom_mode); - _mav_put_uint8_t(buf, 8, standard_mode); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_MODE, buf, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#else - mavlink_current_mode_t packet; - packet.custom_mode = custom_mode; - packet.intended_custom_mode = intended_custom_mode; - packet.standard_mode = standard_mode; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_MODE, (const char *)&packet, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#endif -} - -/** - * @brief Send a current_mode message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_current_mode_send_struct(mavlink_channel_t chan, const mavlink_current_mode_t* current_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_current_mode_send(chan, current_mode->standard_mode, current_mode->custom_mode, current_mode->intended_custom_mode); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_MODE, (const char *)current_mode, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#endif -} - -#if MAVLINK_MSG_ID_CURRENT_MODE_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_current_mode_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t standard_mode, uint32_t custom_mode, uint32_t intended_custom_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, custom_mode); - _mav_put_uint32_t(buf, 4, intended_custom_mode); - _mav_put_uint8_t(buf, 8, standard_mode); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_MODE, buf, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#else - mavlink_current_mode_t *packet = (mavlink_current_mode_t *)msgbuf; - packet->custom_mode = custom_mode; - packet->intended_custom_mode = intended_custom_mode; - packet->standard_mode = standard_mode; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CURRENT_MODE, (const char *)packet, MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN, MAVLINK_MSG_ID_CURRENT_MODE_LEN, MAVLINK_MSG_ID_CURRENT_MODE_CRC); -#endif -} -#endif - -#endif - -// MESSAGE CURRENT_MODE UNPACKING - - -/** - * @brief Get field standard_mode from current_mode message - * - * @return Standard mode. - */ -static inline uint8_t mavlink_msg_current_mode_get_standard_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field custom_mode from current_mode message - * - * @return A bitfield for use for autopilot-specific flags - */ -static inline uint32_t mavlink_msg_current_mode_get_custom_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field intended_custom_mode from current_mode message - * - * @return The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - */ -static inline uint32_t mavlink_msg_current_mode_get_intended_custom_mode(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Decode a current_mode message into a struct - * - * @param msg The message to decode - * @param current_mode C-struct to decode the message contents into - */ -static inline void mavlink_msg_current_mode_decode(const mavlink_message_t* msg, mavlink_current_mode_t* current_mode) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - current_mode->custom_mode = mavlink_msg_current_mode_get_custom_mode(msg); - current_mode->intended_custom_mode = mavlink_msg_current_mode_get_intended_custom_mode(msg); - current_mode->standard_mode = mavlink_msg_current_mode_get_standard_mode(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_CURRENT_MODE_LEN? msg->len : MAVLINK_MSG_ID_CURRENT_MODE_LEN; - memset(current_mode, 0, MAVLINK_MSG_ID_CURRENT_MODE_LEN); - memcpy(current_mode, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_figure_eight_execution_status.h b/development/mavlink_msg_figure_eight_execution_status.h deleted file mode 100644 index 8786f53c3..000000000 --- a/development/mavlink_msg_figure_eight_execution_status.h +++ /dev/null @@ -1,456 +0,0 @@ -#pragma once -// MESSAGE FIGURE_EIGHT_EXECUTION_STATUS PACKING - -#define MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS 361 - - -typedef struct __mavlink_figure_eight_execution_status_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - float major_radius; /*< [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise.*/ - float minor_radius; /*< [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure.*/ - float orientation; /*< [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi).*/ - int32_t x; /*< X coordinate of center point. Coordinate system depends on frame field.*/ - int32_t y; /*< Y coordinate of center point. Coordinate system depends on frame field.*/ - float z; /*< [m] Altitude of center point. Coordinate system depends on frame field.*/ - uint8_t frame; /*< The coordinate system of the fields: x, y, z.*/ -} mavlink_figure_eight_execution_status_t; - -#define MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN 33 -#define MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN 33 -#define MAVLINK_MSG_ID_361_LEN 33 -#define MAVLINK_MSG_ID_361_MIN_LEN 33 - -#define MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC 93 -#define MAVLINK_MSG_ID_361_CRC 93 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FIGURE_EIGHT_EXECUTION_STATUS { \ - 361, \ - "FIGURE_EIGHT_EXECUTION_STATUS", \ - 8, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_figure_eight_execution_status_t, time_usec) }, \ - { "major_radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_figure_eight_execution_status_t, major_radius) }, \ - { "minor_radius", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_figure_eight_execution_status_t, minor_radius) }, \ - { "orientation", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_figure_eight_execution_status_t, orientation) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_figure_eight_execution_status_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_figure_eight_execution_status_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_figure_eight_execution_status_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_figure_eight_execution_status_t, z) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FIGURE_EIGHT_EXECUTION_STATUS { \ - "FIGURE_EIGHT_EXECUTION_STATUS", \ - 8, \ - { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_figure_eight_execution_status_t, time_usec) }, \ - { "major_radius", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_figure_eight_execution_status_t, major_radius) }, \ - { "minor_radius", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_figure_eight_execution_status_t, minor_radius) }, \ - { "orientation", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_figure_eight_execution_status_t, orientation) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_figure_eight_execution_status_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_figure_eight_execution_status_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_figure_eight_execution_status_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_figure_eight_execution_status_t, z) }, \ - } \ -} -#endif - -/** - * @brief Pack a figure_eight_execution_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param major_radius [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - * @param minor_radius [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - * @param orientation [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi). - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field. - * @param y Y coordinate of center point. Coordinate system depends on frame field. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t time_usec, float major_radius, float minor_radius, float orientation, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, major_radius); - _mav_put_float(buf, 12, minor_radius); - _mav_put_float(buf, 16, orientation); - _mav_put_int32_t(buf, 20, x); - _mav_put_int32_t(buf, 24, y); - _mav_put_float(buf, 28, z); - _mav_put_uint8_t(buf, 32, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#else - mavlink_figure_eight_execution_status_t packet; - packet.time_usec = time_usec; - packet.major_radius = major_radius; - packet.minor_radius = minor_radius; - packet.orientation = orientation; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -} - -/** - * @brief Pack a figure_eight_execution_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param major_radius [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - * @param minor_radius [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - * @param orientation [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi). - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field. - * @param y Y coordinate of center point. Coordinate system depends on frame field. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t time_usec, float major_radius, float minor_radius, float orientation, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, major_radius); - _mav_put_float(buf, 12, minor_radius); - _mav_put_float(buf, 16, orientation); - _mav_put_int32_t(buf, 20, x); - _mav_put_int32_t(buf, 24, y); - _mav_put_float(buf, 28, z); - _mav_put_uint8_t(buf, 32, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#else - mavlink_figure_eight_execution_status_t packet; - packet.time_usec = time_usec; - packet.major_radius = major_radius; - packet.minor_radius = minor_radius; - packet.orientation = orientation; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#endif -} - -/** - * @brief Pack a figure_eight_execution_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param major_radius [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - * @param minor_radius [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - * @param orientation [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi). - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field. - * @param y Y coordinate of center point. Coordinate system depends on frame field. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t time_usec,float major_radius,float minor_radius,float orientation,uint8_t frame,int32_t x,int32_t y,float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, major_radius); - _mav_put_float(buf, 12, minor_radius); - _mav_put_float(buf, 16, orientation); - _mav_put_int32_t(buf, 20, x); - _mav_put_int32_t(buf, 24, y); - _mav_put_float(buf, 28, z); - _mav_put_uint8_t(buf, 32, frame); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#else - mavlink_figure_eight_execution_status_t packet; - packet.time_usec = time_usec; - packet.major_radius = major_radius; - packet.minor_radius = minor_radius; - packet.orientation = orientation; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -} - -/** - * @brief Encode a figure_eight_execution_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param figure_eight_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_figure_eight_execution_status_t* figure_eight_execution_status) -{ - return mavlink_msg_figure_eight_execution_status_pack(system_id, component_id, msg, figure_eight_execution_status->time_usec, figure_eight_execution_status->major_radius, figure_eight_execution_status->minor_radius, figure_eight_execution_status->orientation, figure_eight_execution_status->frame, figure_eight_execution_status->x, figure_eight_execution_status->y, figure_eight_execution_status->z); -} - -/** - * @brief Encode a figure_eight_execution_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param figure_eight_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_figure_eight_execution_status_t* figure_eight_execution_status) -{ - return mavlink_msg_figure_eight_execution_status_pack_chan(system_id, component_id, chan, msg, figure_eight_execution_status->time_usec, figure_eight_execution_status->major_radius, figure_eight_execution_status->minor_radius, figure_eight_execution_status->orientation, figure_eight_execution_status->frame, figure_eight_execution_status->x, figure_eight_execution_status->y, figure_eight_execution_status->z); -} - -/** - * @brief Encode a figure_eight_execution_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param figure_eight_execution_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_figure_eight_execution_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_figure_eight_execution_status_t* figure_eight_execution_status) -{ - return mavlink_msg_figure_eight_execution_status_pack_status(system_id, component_id, _status, msg, figure_eight_execution_status->time_usec, figure_eight_execution_status->major_radius, figure_eight_execution_status->minor_radius, figure_eight_execution_status->orientation, figure_eight_execution_status->frame, figure_eight_execution_status->x, figure_eight_execution_status->y, figure_eight_execution_status->z); -} - -/** - * @brief Send a figure_eight_execution_status message - * @param chan MAVLink channel to send the message - * - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @param major_radius [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - * @param minor_radius [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - * @param orientation [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi). - * @param frame The coordinate system of the fields: x, y, z. - * @param x X coordinate of center point. Coordinate system depends on frame field. - * @param y Y coordinate of center point. Coordinate system depends on frame field. - * @param z [m] Altitude of center point. Coordinate system depends on frame field. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_figure_eight_execution_status_send(mavlink_channel_t chan, uint64_t time_usec, float major_radius, float minor_radius, float orientation, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, major_radius); - _mav_put_float(buf, 12, minor_radius); - _mav_put_float(buf, 16, orientation); - _mav_put_int32_t(buf, 20, x); - _mav_put_int32_t(buf, 24, y); - _mav_put_float(buf, 28, z); - _mav_put_uint8_t(buf, 32, frame); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS, buf, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#else - mavlink_figure_eight_execution_status_t packet; - packet.time_usec = time_usec; - packet.major_radius = major_radius; - packet.minor_radius = minor_radius; - packet.orientation = orientation; - packet.x = x; - packet.y = y; - packet.z = z; - packet.frame = frame; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS, (const char *)&packet, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#endif -} - -/** - * @brief Send a figure_eight_execution_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_figure_eight_execution_status_send_struct(mavlink_channel_t chan, const mavlink_figure_eight_execution_status_t* figure_eight_execution_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_figure_eight_execution_status_send(chan, figure_eight_execution_status->time_usec, figure_eight_execution_status->major_radius, figure_eight_execution_status->minor_radius, figure_eight_execution_status->orientation, figure_eight_execution_status->frame, figure_eight_execution_status->x, figure_eight_execution_status->y, figure_eight_execution_status->z); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS, (const char *)figure_eight_execution_status, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_figure_eight_execution_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, float major_radius, float minor_radius, float orientation, uint8_t frame, int32_t x, int32_t y, float z) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_float(buf, 8, major_radius); - _mav_put_float(buf, 12, minor_radius); - _mav_put_float(buf, 16, orientation); - _mav_put_int32_t(buf, 20, x); - _mav_put_int32_t(buf, 24, y); - _mav_put_float(buf, 28, z); - _mav_put_uint8_t(buf, 32, frame); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS, buf, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#else - mavlink_figure_eight_execution_status_t *packet = (mavlink_figure_eight_execution_status_t *)msgbuf; - packet->time_usec = time_usec; - packet->major_radius = major_radius; - packet->minor_radius = minor_radius; - packet->orientation = orientation; - packet->x = x; - packet->y = y; - packet->z = z; - packet->frame = frame; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS, (const char *)packet, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FIGURE_EIGHT_EXECUTION_STATUS UNPACKING - - -/** - * @brief Get field time_usec from figure_eight_execution_status message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_figure_eight_execution_status_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field major_radius from figure_eight_execution_status message - * - * @return [m] Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - */ -static inline float mavlink_msg_figure_eight_execution_status_get_major_radius(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field minor_radius from figure_eight_execution_status message - * - * @return [m] Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - */ -static inline float mavlink_msg_figure_eight_execution_status_get_minor_radius(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field orientation from figure_eight_execution_status message - * - * @return [rad] Orientation of the figure eight major axis with respect to true north in [-pi,pi). - */ -static inline float mavlink_msg_figure_eight_execution_status_get_orientation(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field frame from figure_eight_execution_status message - * - * @return The coordinate system of the fields: x, y, z. - */ -static inline uint8_t mavlink_msg_figure_eight_execution_status_get_frame(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 32); -} - -/** - * @brief Get field x from figure_eight_execution_status message - * - * @return X coordinate of center point. Coordinate system depends on frame field. - */ -static inline int32_t mavlink_msg_figure_eight_execution_status_get_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 20); -} - -/** - * @brief Get field y from figure_eight_execution_status message - * - * @return Y coordinate of center point. Coordinate system depends on frame field. - */ -static inline int32_t mavlink_msg_figure_eight_execution_status_get_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 24); -} - -/** - * @brief Get field z from figure_eight_execution_status message - * - * @return [m] Altitude of center point. Coordinate system depends on frame field. - */ -static inline float mavlink_msg_figure_eight_execution_status_get_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 28); -} - -/** - * @brief Decode a figure_eight_execution_status message into a struct - * - * @param msg The message to decode - * @param figure_eight_execution_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_figure_eight_execution_status_decode(const mavlink_message_t* msg, mavlink_figure_eight_execution_status_t* figure_eight_execution_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - figure_eight_execution_status->time_usec = mavlink_msg_figure_eight_execution_status_get_time_usec(msg); - figure_eight_execution_status->major_radius = mavlink_msg_figure_eight_execution_status_get_major_radius(msg); - figure_eight_execution_status->minor_radius = mavlink_msg_figure_eight_execution_status_get_minor_radius(msg); - figure_eight_execution_status->orientation = mavlink_msg_figure_eight_execution_status_get_orientation(msg); - figure_eight_execution_status->x = mavlink_msg_figure_eight_execution_status_get_x(msg); - figure_eight_execution_status->y = mavlink_msg_figure_eight_execution_status_get_y(msg); - figure_eight_execution_status->z = mavlink_msg_figure_eight_execution_status_get_z(msg); - figure_eight_execution_status->frame = mavlink_msg_figure_eight_execution_status_get_frame(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN? msg->len : MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN; - memset(figure_eight_execution_status, 0, MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_LEN); - memcpy(figure_eight_execution_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_fuel_status.h b/development/mavlink_msg_fuel_status.h deleted file mode 100644 index b24e526fe..000000000 --- a/development/mavlink_msg_fuel_status.h +++ /dev/null @@ -1,456 +0,0 @@ -#pragma once -// MESSAGE FUEL_STATUS PACKING - -#define MAVLINK_MSG_ID_FUEL_STATUS 371 - - -typedef struct __mavlink_fuel_status_t { - float maximum_fuel; /*< Capacity when full. Must be provided.*/ - float consumed_fuel; /*< Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided.*/ - float remaining_fuel; /*< Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided.*/ - float flow_rate; /*< Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided.*/ - float temperature; /*< [K] Fuel temperature. NaN: field not provided.*/ - uint32_t fuel_type; /*< Fuel type. Defines units for fuel capacity and consumption fields above.*/ - uint8_t id; /*< Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2.*/ - uint8_t percent_remaining; /*< [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided.*/ -} mavlink_fuel_status_t; - -#define MAVLINK_MSG_ID_FUEL_STATUS_LEN 26 -#define MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN 26 -#define MAVLINK_MSG_ID_371_LEN 26 -#define MAVLINK_MSG_ID_371_MIN_LEN 26 - -#define MAVLINK_MSG_ID_FUEL_STATUS_CRC 10 -#define MAVLINK_MSG_ID_371_CRC 10 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FUEL_STATUS { \ - 371, \ - "FUEL_STATUS", \ - 8, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_fuel_status_t, id) }, \ - { "maximum_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fuel_status_t, maximum_fuel) }, \ - { "consumed_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fuel_status_t, consumed_fuel) }, \ - { "remaining_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fuel_status_t, remaining_fuel) }, \ - { "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_fuel_status_t, percent_remaining) }, \ - { "flow_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fuel_status_t, flow_rate) }, \ - { "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fuel_status_t, temperature) }, \ - { "fuel_type", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_fuel_status_t, fuel_type) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FUEL_STATUS { \ - "FUEL_STATUS", \ - 8, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_fuel_status_t, id) }, \ - { "maximum_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fuel_status_t, maximum_fuel) }, \ - { "consumed_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fuel_status_t, consumed_fuel) }, \ - { "remaining_fuel", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_fuel_status_t, remaining_fuel) }, \ - { "percent_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_fuel_status_t, percent_remaining) }, \ - { "flow_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_fuel_status_t, flow_rate) }, \ - { "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fuel_status_t, temperature) }, \ - { "fuel_type", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_fuel_status_t, fuel_type) }, \ - } \ -} -#endif - -/** - * @brief Pack a fuel_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - * @param maximum_fuel Capacity when full. Must be provided. - * @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - * @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - * @param temperature [K] Fuel temperature. NaN: field not provided. - * @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_fuel_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN]; - _mav_put_float(buf, 0, maximum_fuel); - _mav_put_float(buf, 4, consumed_fuel); - _mav_put_float(buf, 8, remaining_fuel); - _mav_put_float(buf, 12, flow_rate); - _mav_put_float(buf, 16, temperature); - _mav_put_uint32_t(buf, 20, fuel_type); - _mav_put_uint8_t(buf, 24, id); - _mav_put_uint8_t(buf, 25, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#else - mavlink_fuel_status_t packet; - packet.maximum_fuel = maximum_fuel; - packet.consumed_fuel = consumed_fuel; - packet.remaining_fuel = remaining_fuel; - packet.flow_rate = flow_rate; - packet.temperature = temperature; - packet.fuel_type = fuel_type; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -} - -/** - * @brief Pack a fuel_status message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - * @param maximum_fuel Capacity when full. Must be provided. - * @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - * @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - * @param temperature [K] Fuel temperature. NaN: field not provided. - * @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_fuel_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN]; - _mav_put_float(buf, 0, maximum_fuel); - _mav_put_float(buf, 4, consumed_fuel); - _mav_put_float(buf, 8, remaining_fuel); - _mav_put_float(buf, 12, flow_rate); - _mav_put_float(buf, 16, temperature); - _mav_put_uint32_t(buf, 20, fuel_type); - _mav_put_uint8_t(buf, 24, id); - _mav_put_uint8_t(buf, 25, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#else - mavlink_fuel_status_t packet; - packet.maximum_fuel = maximum_fuel; - packet.consumed_fuel = consumed_fuel; - packet.remaining_fuel = remaining_fuel; - packet.flow_rate = flow_rate; - packet.temperature = temperature; - packet.fuel_type = fuel_type; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#endif -} - -/** - * @brief Pack a fuel_status message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - * @param maximum_fuel Capacity when full. Must be provided. - * @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - * @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - * @param temperature [K] Fuel temperature. NaN: field not provided. - * @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_fuel_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t id,float maximum_fuel,float consumed_fuel,float remaining_fuel,uint8_t percent_remaining,float flow_rate,float temperature,uint32_t fuel_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN]; - _mav_put_float(buf, 0, maximum_fuel); - _mav_put_float(buf, 4, consumed_fuel); - _mav_put_float(buf, 8, remaining_fuel); - _mav_put_float(buf, 12, flow_rate); - _mav_put_float(buf, 16, temperature); - _mav_put_uint32_t(buf, 20, fuel_type); - _mav_put_uint8_t(buf, 24, id); - _mav_put_uint8_t(buf, 25, percent_remaining); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#else - mavlink_fuel_status_t packet; - packet.maximum_fuel = maximum_fuel; - packet.consumed_fuel = consumed_fuel; - packet.remaining_fuel = remaining_fuel; - packet.flow_rate = flow_rate; - packet.temperature = temperature; - packet.fuel_type = fuel_type; - packet.id = id; - packet.percent_remaining = percent_remaining; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FUEL_STATUS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FUEL_STATUS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -} - -/** - * @brief Encode a fuel_status struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param fuel_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_fuel_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status) -{ - return mavlink_msg_fuel_status_pack(system_id, component_id, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type); -} - -/** - * @brief Encode a fuel_status struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param fuel_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_fuel_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status) -{ - return mavlink_msg_fuel_status_pack_chan(system_id, component_id, chan, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type); -} - -/** - * @brief Encode a fuel_status struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param fuel_status C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_fuel_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fuel_status_t* fuel_status) -{ - return mavlink_msg_fuel_status_pack_status(system_id, component_id, _status, msg, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type); -} - -/** - * @brief Send a fuel_status message - * @param chan MAVLink channel to send the message - * - * @param id Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - * @param maximum_fuel Capacity when full. Must be provided. - * @param consumed_fuel Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param remaining_fuel Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - * @param percent_remaining [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - * @param flow_rate Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - * @param temperature [K] Fuel temperature. NaN: field not provided. - * @param fuel_type Fuel type. Defines units for fuel capacity and consumption fields above. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_fuel_status_send(mavlink_channel_t chan, uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FUEL_STATUS_LEN]; - _mav_put_float(buf, 0, maximum_fuel); - _mav_put_float(buf, 4, consumed_fuel); - _mav_put_float(buf, 8, remaining_fuel); - _mav_put_float(buf, 12, flow_rate); - _mav_put_float(buf, 16, temperature); - _mav_put_uint32_t(buf, 20, fuel_type); - _mav_put_uint8_t(buf, 24, id); - _mav_put_uint8_t(buf, 25, percent_remaining); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, buf, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#else - mavlink_fuel_status_t packet; - packet.maximum_fuel = maximum_fuel; - packet.consumed_fuel = consumed_fuel; - packet.remaining_fuel = remaining_fuel; - packet.flow_rate = flow_rate; - packet.temperature = temperature; - packet.fuel_type = fuel_type; - packet.id = id; - packet.percent_remaining = percent_remaining; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)&packet, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#endif -} - -/** - * @brief Send a fuel_status message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_fuel_status_send_struct(mavlink_channel_t chan, const mavlink_fuel_status_t* fuel_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_fuel_status_send(chan, fuel_status->id, fuel_status->maximum_fuel, fuel_status->consumed_fuel, fuel_status->remaining_fuel, fuel_status->percent_remaining, fuel_status->flow_rate, fuel_status->temperature, fuel_status->fuel_type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)fuel_status, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FUEL_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_fuel_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, float maximum_fuel, float consumed_fuel, float remaining_fuel, uint8_t percent_remaining, float flow_rate, float temperature, uint32_t fuel_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, maximum_fuel); - _mav_put_float(buf, 4, consumed_fuel); - _mav_put_float(buf, 8, remaining_fuel); - _mav_put_float(buf, 12, flow_rate); - _mav_put_float(buf, 16, temperature); - _mav_put_uint32_t(buf, 20, fuel_type); - _mav_put_uint8_t(buf, 24, id); - _mav_put_uint8_t(buf, 25, percent_remaining); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, buf, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#else - mavlink_fuel_status_t *packet = (mavlink_fuel_status_t *)msgbuf; - packet->maximum_fuel = maximum_fuel; - packet->consumed_fuel = consumed_fuel; - packet->remaining_fuel = remaining_fuel; - packet->flow_rate = flow_rate; - packet->temperature = temperature; - packet->fuel_type = fuel_type; - packet->id = id; - packet->percent_remaining = percent_remaining; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FUEL_STATUS, (const char *)packet, MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN, MAVLINK_MSG_ID_FUEL_STATUS_LEN, MAVLINK_MSG_ID_FUEL_STATUS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FUEL_STATUS UNPACKING - - -/** - * @brief Get field id from fuel_status message - * - * @return Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - */ -static inline uint8_t mavlink_msg_fuel_status_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 24); -} - -/** - * @brief Get field maximum_fuel from fuel_status message - * - * @return Capacity when full. Must be provided. - */ -static inline float mavlink_msg_fuel_status_get_maximum_fuel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field consumed_fuel from fuel_status message - * - * @return Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - */ -static inline float mavlink_msg_fuel_status_get_consumed_fuel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field remaining_fuel from fuel_status message - * - * @return Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - */ -static inline float mavlink_msg_fuel_status_get_remaining_fuel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field percent_remaining from fuel_status message - * - * @return [%] Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - */ -static inline uint8_t mavlink_msg_fuel_status_get_percent_remaining(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 25); -} - -/** - * @brief Get field flow_rate from fuel_status message - * - * @return Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - */ -static inline float mavlink_msg_fuel_status_get_flow_rate(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field temperature from fuel_status message - * - * @return [K] Fuel temperature. NaN: field not provided. - */ -static inline float mavlink_msg_fuel_status_get_temperature(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field fuel_type from fuel_status message - * - * @return Fuel type. Defines units for fuel capacity and consumption fields above. - */ -static inline uint32_t mavlink_msg_fuel_status_get_fuel_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 20); -} - -/** - * @brief Decode a fuel_status message into a struct - * - * @param msg The message to decode - * @param fuel_status C-struct to decode the message contents into - */ -static inline void mavlink_msg_fuel_status_decode(const mavlink_message_t* msg, mavlink_fuel_status_t* fuel_status) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - fuel_status->maximum_fuel = mavlink_msg_fuel_status_get_maximum_fuel(msg); - fuel_status->consumed_fuel = mavlink_msg_fuel_status_get_consumed_fuel(msg); - fuel_status->remaining_fuel = mavlink_msg_fuel_status_get_remaining_fuel(msg); - fuel_status->flow_rate = mavlink_msg_fuel_status_get_flow_rate(msg); - fuel_status->temperature = mavlink_msg_fuel_status_get_temperature(msg); - fuel_status->fuel_type = mavlink_msg_fuel_status_get_fuel_type(msg); - fuel_status->id = mavlink_msg_fuel_status_get_id(msg); - fuel_status->percent_remaining = mavlink_msg_fuel_status_get_percent_remaining(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FUEL_STATUS_LEN? msg->len : MAVLINK_MSG_ID_FUEL_STATUS_LEN; - memset(fuel_status, 0, MAVLINK_MSG_ID_FUEL_STATUS_LEN); - memcpy(fuel_status, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_gnss_integrity.h b/development/mavlink_msg_gnss_integrity.h deleted file mode 100644 index b9fb6f3f2..000000000 --- a/development/mavlink_msg_gnss_integrity.h +++ /dev/null @@ -1,568 +0,0 @@ -#pragma once -// MESSAGE GNSS_INTEGRITY PACKING - -#define MAVLINK_MSG_ID_GNSS_INTEGRITY 441 - - -typedef struct __mavlink_gnss_integrity_t { - uint32_t system_errors; /*< Errors in the GPS system.*/ - uint16_t raim_hfom; /*< [cm] Horizontal expected accuracy using satellites successfully validated using RAIM.*/ - uint16_t raim_vfom; /*< [cm] Vertical expected accuracy using satellites successfully validated using RAIM.*/ - uint8_t id; /*< GNSS receiver id. Must match instance ids of other messages from same receiver.*/ - uint8_t authentication_state; /*< Signal authentication state of the GPS system.*/ - uint8_t jamming_state; /*< Signal jamming state of the GPS system.*/ - uint8_t spoofing_state; /*< Signal spoofing state of the GPS system.*/ - uint8_t raim_state; /*< The state of the RAIM processing.*/ - uint8_t corrections_quality; /*< An abstract value representing the estimated quality of incoming corrections, or 255 if not available.*/ - uint8_t system_status_summary; /*< An abstract value representing the overall status of the receiver, or 255 if not available.*/ - uint8_t gnss_signal_quality; /*< An abstract value representing the quality of incoming GNSS signals, or 255 if not available.*/ - uint8_t post_processing_quality; /*< An abstract value representing the estimated PPK quality, or 255 if not available.*/ -} mavlink_gnss_integrity_t; - -#define MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN 17 -#define MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN 17 -#define MAVLINK_MSG_ID_441_LEN 17 -#define MAVLINK_MSG_ID_441_MIN_LEN 17 - -#define MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC 169 -#define MAVLINK_MSG_ID_441_CRC 169 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_GNSS_INTEGRITY { \ - 441, \ - "GNSS_INTEGRITY", \ - 12, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gnss_integrity_t, id) }, \ - { "system_errors", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gnss_integrity_t, system_errors) }, \ - { "authentication_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gnss_integrity_t, authentication_state) }, \ - { "jamming_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gnss_integrity_t, jamming_state) }, \ - { "spoofing_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gnss_integrity_t, spoofing_state) }, \ - { "raim_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_gnss_integrity_t, raim_state) }, \ - { "raim_hfom", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_gnss_integrity_t, raim_hfom) }, \ - { "raim_vfom", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_gnss_integrity_t, raim_vfom) }, \ - { "corrections_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_gnss_integrity_t, corrections_quality) }, \ - { "system_status_summary", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_gnss_integrity_t, system_status_summary) }, \ - { "gnss_signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_gnss_integrity_t, gnss_signal_quality) }, \ - { "post_processing_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_gnss_integrity_t, post_processing_quality) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_GNSS_INTEGRITY { \ - "GNSS_INTEGRITY", \ - 12, \ - { { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gnss_integrity_t, id) }, \ - { "system_errors", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gnss_integrity_t, system_errors) }, \ - { "authentication_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gnss_integrity_t, authentication_state) }, \ - { "jamming_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gnss_integrity_t, jamming_state) }, \ - { "spoofing_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gnss_integrity_t, spoofing_state) }, \ - { "raim_state", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_gnss_integrity_t, raim_state) }, \ - { "raim_hfom", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_gnss_integrity_t, raim_hfom) }, \ - { "raim_vfom", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_gnss_integrity_t, raim_vfom) }, \ - { "corrections_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_gnss_integrity_t, corrections_quality) }, \ - { "system_status_summary", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_gnss_integrity_t, system_status_summary) }, \ - { "gnss_signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_gnss_integrity_t, gnss_signal_quality) }, \ - { "post_processing_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_gnss_integrity_t, post_processing_quality) }, \ - } \ -} -#endif - -/** - * @brief Pack a gnss_integrity message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param id GNSS receiver id. Must match instance ids of other messages from same receiver. - * @param system_errors Errors in the GPS system. - * @param authentication_state Signal authentication state of the GPS system. - * @param jamming_state Signal jamming state of the GPS system. - * @param spoofing_state Signal spoofing state of the GPS system. - * @param raim_state The state of the RAIM processing. - * @param raim_hfom [cm] Horizontal expected accuracy using satellites successfully validated using RAIM. - * @param raim_vfom [cm] Vertical expected accuracy using satellites successfully validated using RAIM. - * @param corrections_quality An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - * @param system_status_summary An abstract value representing the overall status of the receiver, or 255 if not available. - * @param gnss_signal_quality An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - * @param post_processing_quality An abstract value representing the estimated PPK quality, or 255 if not available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_gnss_integrity_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t id, uint32_t system_errors, uint8_t authentication_state, uint8_t jamming_state, uint8_t spoofing_state, uint8_t raim_state, uint16_t raim_hfom, uint16_t raim_vfom, uint8_t corrections_quality, uint8_t system_status_summary, uint8_t gnss_signal_quality, uint8_t post_processing_quality) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN]; - _mav_put_uint32_t(buf, 0, system_errors); - _mav_put_uint16_t(buf, 4, raim_hfom); - _mav_put_uint16_t(buf, 6, raim_vfom); - _mav_put_uint8_t(buf, 8, id); - _mav_put_uint8_t(buf, 9, authentication_state); - _mav_put_uint8_t(buf, 10, jamming_state); - _mav_put_uint8_t(buf, 11, spoofing_state); - _mav_put_uint8_t(buf, 12, raim_state); - _mav_put_uint8_t(buf, 13, corrections_quality); - _mav_put_uint8_t(buf, 14, system_status_summary); - _mav_put_uint8_t(buf, 15, gnss_signal_quality); - _mav_put_uint8_t(buf, 16, post_processing_quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#else - mavlink_gnss_integrity_t packet; - packet.system_errors = system_errors; - packet.raim_hfom = raim_hfom; - packet.raim_vfom = raim_vfom; - packet.id = id; - packet.authentication_state = authentication_state; - packet.jamming_state = jamming_state; - packet.spoofing_state = spoofing_state; - packet.raim_state = raim_state; - packet.corrections_quality = corrections_quality; - packet.system_status_summary = system_status_summary; - packet.gnss_signal_quality = gnss_signal_quality; - packet.post_processing_quality = post_processing_quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GNSS_INTEGRITY; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -} - -/** - * @brief Pack a gnss_integrity message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param id GNSS receiver id. Must match instance ids of other messages from same receiver. - * @param system_errors Errors in the GPS system. - * @param authentication_state Signal authentication state of the GPS system. - * @param jamming_state Signal jamming state of the GPS system. - * @param spoofing_state Signal spoofing state of the GPS system. - * @param raim_state The state of the RAIM processing. - * @param raim_hfom [cm] Horizontal expected accuracy using satellites successfully validated using RAIM. - * @param raim_vfom [cm] Vertical expected accuracy using satellites successfully validated using RAIM. - * @param corrections_quality An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - * @param system_status_summary An abstract value representing the overall status of the receiver, or 255 if not available. - * @param gnss_signal_quality An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - * @param post_processing_quality An abstract value representing the estimated PPK quality, or 255 if not available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_gnss_integrity_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t id, uint32_t system_errors, uint8_t authentication_state, uint8_t jamming_state, uint8_t spoofing_state, uint8_t raim_state, uint16_t raim_hfom, uint16_t raim_vfom, uint8_t corrections_quality, uint8_t system_status_summary, uint8_t gnss_signal_quality, uint8_t post_processing_quality) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN]; - _mav_put_uint32_t(buf, 0, system_errors); - _mav_put_uint16_t(buf, 4, raim_hfom); - _mav_put_uint16_t(buf, 6, raim_vfom); - _mav_put_uint8_t(buf, 8, id); - _mav_put_uint8_t(buf, 9, authentication_state); - _mav_put_uint8_t(buf, 10, jamming_state); - _mav_put_uint8_t(buf, 11, spoofing_state); - _mav_put_uint8_t(buf, 12, raim_state); - _mav_put_uint8_t(buf, 13, corrections_quality); - _mav_put_uint8_t(buf, 14, system_status_summary); - _mav_put_uint8_t(buf, 15, gnss_signal_quality); - _mav_put_uint8_t(buf, 16, post_processing_quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#else - mavlink_gnss_integrity_t packet; - packet.system_errors = system_errors; - packet.raim_hfom = raim_hfom; - packet.raim_vfom = raim_vfom; - packet.id = id; - packet.authentication_state = authentication_state; - packet.jamming_state = jamming_state; - packet.spoofing_state = spoofing_state; - packet.raim_state = raim_state; - packet.corrections_quality = corrections_quality; - packet.system_status_summary = system_status_summary; - packet.gnss_signal_quality = gnss_signal_quality; - packet.post_processing_quality = post_processing_quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GNSS_INTEGRITY; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#endif -} - -/** - * @brief Pack a gnss_integrity message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param id GNSS receiver id. Must match instance ids of other messages from same receiver. - * @param system_errors Errors in the GPS system. - * @param authentication_state Signal authentication state of the GPS system. - * @param jamming_state Signal jamming state of the GPS system. - * @param spoofing_state Signal spoofing state of the GPS system. - * @param raim_state The state of the RAIM processing. - * @param raim_hfom [cm] Horizontal expected accuracy using satellites successfully validated using RAIM. - * @param raim_vfom [cm] Vertical expected accuracy using satellites successfully validated using RAIM. - * @param corrections_quality An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - * @param system_status_summary An abstract value representing the overall status of the receiver, or 255 if not available. - * @param gnss_signal_quality An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - * @param post_processing_quality An abstract value representing the estimated PPK quality, or 255 if not available. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_gnss_integrity_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t id,uint32_t system_errors,uint8_t authentication_state,uint8_t jamming_state,uint8_t spoofing_state,uint8_t raim_state,uint16_t raim_hfom,uint16_t raim_vfom,uint8_t corrections_quality,uint8_t system_status_summary,uint8_t gnss_signal_quality,uint8_t post_processing_quality) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN]; - _mav_put_uint32_t(buf, 0, system_errors); - _mav_put_uint16_t(buf, 4, raim_hfom); - _mav_put_uint16_t(buf, 6, raim_vfom); - _mav_put_uint8_t(buf, 8, id); - _mav_put_uint8_t(buf, 9, authentication_state); - _mav_put_uint8_t(buf, 10, jamming_state); - _mav_put_uint8_t(buf, 11, spoofing_state); - _mav_put_uint8_t(buf, 12, raim_state); - _mav_put_uint8_t(buf, 13, corrections_quality); - _mav_put_uint8_t(buf, 14, system_status_summary); - _mav_put_uint8_t(buf, 15, gnss_signal_quality); - _mav_put_uint8_t(buf, 16, post_processing_quality); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#else - mavlink_gnss_integrity_t packet; - packet.system_errors = system_errors; - packet.raim_hfom = raim_hfom; - packet.raim_vfom = raim_vfom; - packet.id = id; - packet.authentication_state = authentication_state; - packet.jamming_state = jamming_state; - packet.spoofing_state = spoofing_state; - packet.raim_state = raim_state; - packet.corrections_quality = corrections_quality; - packet.system_status_summary = system_status_summary; - packet.gnss_signal_quality = gnss_signal_quality; - packet.post_processing_quality = post_processing_quality; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GNSS_INTEGRITY; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -} - -/** - * @brief Encode a gnss_integrity struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param gnss_integrity C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_gnss_integrity_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gnss_integrity_t* gnss_integrity) -{ - return mavlink_msg_gnss_integrity_pack(system_id, component_id, msg, gnss_integrity->id, gnss_integrity->system_errors, gnss_integrity->authentication_state, gnss_integrity->jamming_state, gnss_integrity->spoofing_state, gnss_integrity->raim_state, gnss_integrity->raim_hfom, gnss_integrity->raim_vfom, gnss_integrity->corrections_quality, gnss_integrity->system_status_summary, gnss_integrity->gnss_signal_quality, gnss_integrity->post_processing_quality); -} - -/** - * @brief Encode a gnss_integrity struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param gnss_integrity C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_gnss_integrity_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gnss_integrity_t* gnss_integrity) -{ - return mavlink_msg_gnss_integrity_pack_chan(system_id, component_id, chan, msg, gnss_integrity->id, gnss_integrity->system_errors, gnss_integrity->authentication_state, gnss_integrity->jamming_state, gnss_integrity->spoofing_state, gnss_integrity->raim_state, gnss_integrity->raim_hfom, gnss_integrity->raim_vfom, gnss_integrity->corrections_quality, gnss_integrity->system_status_summary, gnss_integrity->gnss_signal_quality, gnss_integrity->post_processing_quality); -} - -/** - * @brief Encode a gnss_integrity struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param gnss_integrity C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_gnss_integrity_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gnss_integrity_t* gnss_integrity) -{ - return mavlink_msg_gnss_integrity_pack_status(system_id, component_id, _status, msg, gnss_integrity->id, gnss_integrity->system_errors, gnss_integrity->authentication_state, gnss_integrity->jamming_state, gnss_integrity->spoofing_state, gnss_integrity->raim_state, gnss_integrity->raim_hfom, gnss_integrity->raim_vfom, gnss_integrity->corrections_quality, gnss_integrity->system_status_summary, gnss_integrity->gnss_signal_quality, gnss_integrity->post_processing_quality); -} - -/** - * @brief Send a gnss_integrity message - * @param chan MAVLink channel to send the message - * - * @param id GNSS receiver id. Must match instance ids of other messages from same receiver. - * @param system_errors Errors in the GPS system. - * @param authentication_state Signal authentication state of the GPS system. - * @param jamming_state Signal jamming state of the GPS system. - * @param spoofing_state Signal spoofing state of the GPS system. - * @param raim_state The state of the RAIM processing. - * @param raim_hfom [cm] Horizontal expected accuracy using satellites successfully validated using RAIM. - * @param raim_vfom [cm] Vertical expected accuracy using satellites successfully validated using RAIM. - * @param corrections_quality An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - * @param system_status_summary An abstract value representing the overall status of the receiver, or 255 if not available. - * @param gnss_signal_quality An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - * @param post_processing_quality An abstract value representing the estimated PPK quality, or 255 if not available. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_gnss_integrity_send(mavlink_channel_t chan, uint8_t id, uint32_t system_errors, uint8_t authentication_state, uint8_t jamming_state, uint8_t spoofing_state, uint8_t raim_state, uint16_t raim_hfom, uint16_t raim_vfom, uint8_t corrections_quality, uint8_t system_status_summary, uint8_t gnss_signal_quality, uint8_t post_processing_quality) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN]; - _mav_put_uint32_t(buf, 0, system_errors); - _mav_put_uint16_t(buf, 4, raim_hfom); - _mav_put_uint16_t(buf, 6, raim_vfom); - _mav_put_uint8_t(buf, 8, id); - _mav_put_uint8_t(buf, 9, authentication_state); - _mav_put_uint8_t(buf, 10, jamming_state); - _mav_put_uint8_t(buf, 11, spoofing_state); - _mav_put_uint8_t(buf, 12, raim_state); - _mav_put_uint8_t(buf, 13, corrections_quality); - _mav_put_uint8_t(buf, 14, system_status_summary); - _mav_put_uint8_t(buf, 15, gnss_signal_quality); - _mav_put_uint8_t(buf, 16, post_processing_quality); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GNSS_INTEGRITY, buf, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#else - mavlink_gnss_integrity_t packet; - packet.system_errors = system_errors; - packet.raim_hfom = raim_hfom; - packet.raim_vfom = raim_vfom; - packet.id = id; - packet.authentication_state = authentication_state; - packet.jamming_state = jamming_state; - packet.spoofing_state = spoofing_state; - packet.raim_state = raim_state; - packet.corrections_quality = corrections_quality; - packet.system_status_summary = system_status_summary; - packet.gnss_signal_quality = gnss_signal_quality; - packet.post_processing_quality = post_processing_quality; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GNSS_INTEGRITY, (const char *)&packet, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#endif -} - -/** - * @brief Send a gnss_integrity message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_gnss_integrity_send_struct(mavlink_channel_t chan, const mavlink_gnss_integrity_t* gnss_integrity) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_gnss_integrity_send(chan, gnss_integrity->id, gnss_integrity->system_errors, gnss_integrity->authentication_state, gnss_integrity->jamming_state, gnss_integrity->spoofing_state, gnss_integrity->raim_state, gnss_integrity->raim_hfom, gnss_integrity->raim_vfom, gnss_integrity->corrections_quality, gnss_integrity->system_status_summary, gnss_integrity->gnss_signal_quality, gnss_integrity->post_processing_quality); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GNSS_INTEGRITY, (const char *)gnss_integrity, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#endif -} - -#if MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_gnss_integrity_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t id, uint32_t system_errors, uint8_t authentication_state, uint8_t jamming_state, uint8_t spoofing_state, uint8_t raim_state, uint16_t raim_hfom, uint16_t raim_vfom, uint8_t corrections_quality, uint8_t system_status_summary, uint8_t gnss_signal_quality, uint8_t post_processing_quality) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, system_errors); - _mav_put_uint16_t(buf, 4, raim_hfom); - _mav_put_uint16_t(buf, 6, raim_vfom); - _mav_put_uint8_t(buf, 8, id); - _mav_put_uint8_t(buf, 9, authentication_state); - _mav_put_uint8_t(buf, 10, jamming_state); - _mav_put_uint8_t(buf, 11, spoofing_state); - _mav_put_uint8_t(buf, 12, raim_state); - _mav_put_uint8_t(buf, 13, corrections_quality); - _mav_put_uint8_t(buf, 14, system_status_summary); - _mav_put_uint8_t(buf, 15, gnss_signal_quality); - _mav_put_uint8_t(buf, 16, post_processing_quality); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GNSS_INTEGRITY, buf, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#else - mavlink_gnss_integrity_t *packet = (mavlink_gnss_integrity_t *)msgbuf; - packet->system_errors = system_errors; - packet->raim_hfom = raim_hfom; - packet->raim_vfom = raim_vfom; - packet->id = id; - packet->authentication_state = authentication_state; - packet->jamming_state = jamming_state; - packet->spoofing_state = spoofing_state; - packet->raim_state = raim_state; - packet->corrections_quality = corrections_quality; - packet->system_status_summary = system_status_summary; - packet->gnss_signal_quality = gnss_signal_quality; - packet->post_processing_quality = post_processing_quality; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GNSS_INTEGRITY, (const char *)packet, MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN, MAVLINK_MSG_ID_GNSS_INTEGRITY_CRC); -#endif -} -#endif - -#endif - -// MESSAGE GNSS_INTEGRITY UNPACKING - - -/** - * @brief Get field id from gnss_integrity message - * - * @return GNSS receiver id. Must match instance ids of other messages from same receiver. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field system_errors from gnss_integrity message - * - * @return Errors in the GPS system. - */ -static inline uint32_t mavlink_msg_gnss_integrity_get_system_errors(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field authentication_state from gnss_integrity message - * - * @return Signal authentication state of the GPS system. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_authentication_state(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 9); -} - -/** - * @brief Get field jamming_state from gnss_integrity message - * - * @return Signal jamming state of the GPS system. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_jamming_state(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 10); -} - -/** - * @brief Get field spoofing_state from gnss_integrity message - * - * @return Signal spoofing state of the GPS system. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_spoofing_state(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 11); -} - -/** - * @brief Get field raim_state from gnss_integrity message - * - * @return The state of the RAIM processing. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_raim_state(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 12); -} - -/** - * @brief Get field raim_hfom from gnss_integrity message - * - * @return [cm] Horizontal expected accuracy using satellites successfully validated using RAIM. - */ -static inline uint16_t mavlink_msg_gnss_integrity_get_raim_hfom(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 4); -} - -/** - * @brief Get field raim_vfom from gnss_integrity message - * - * @return [cm] Vertical expected accuracy using satellites successfully validated using RAIM. - */ -static inline uint16_t mavlink_msg_gnss_integrity_get_raim_vfom(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 6); -} - -/** - * @brief Get field corrections_quality from gnss_integrity message - * - * @return An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_corrections_quality(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 13); -} - -/** - * @brief Get field system_status_summary from gnss_integrity message - * - * @return An abstract value representing the overall status of the receiver, or 255 if not available. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_system_status_summary(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 14); -} - -/** - * @brief Get field gnss_signal_quality from gnss_integrity message - * - * @return An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_gnss_signal_quality(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 15); -} - -/** - * @brief Get field post_processing_quality from gnss_integrity message - * - * @return An abstract value representing the estimated PPK quality, or 255 if not available. - */ -static inline uint8_t mavlink_msg_gnss_integrity_get_post_processing_quality(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 16); -} - -/** - * @brief Decode a gnss_integrity message into a struct - * - * @param msg The message to decode - * @param gnss_integrity C-struct to decode the message contents into - */ -static inline void mavlink_msg_gnss_integrity_decode(const mavlink_message_t* msg, mavlink_gnss_integrity_t* gnss_integrity) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - gnss_integrity->system_errors = mavlink_msg_gnss_integrity_get_system_errors(msg); - gnss_integrity->raim_hfom = mavlink_msg_gnss_integrity_get_raim_hfom(msg); - gnss_integrity->raim_vfom = mavlink_msg_gnss_integrity_get_raim_vfom(msg); - gnss_integrity->id = mavlink_msg_gnss_integrity_get_id(msg); - gnss_integrity->authentication_state = mavlink_msg_gnss_integrity_get_authentication_state(msg); - gnss_integrity->jamming_state = mavlink_msg_gnss_integrity_get_jamming_state(msg); - gnss_integrity->spoofing_state = mavlink_msg_gnss_integrity_get_spoofing_state(msg); - gnss_integrity->raim_state = mavlink_msg_gnss_integrity_get_raim_state(msg); - gnss_integrity->corrections_quality = mavlink_msg_gnss_integrity_get_corrections_quality(msg); - gnss_integrity->system_status_summary = mavlink_msg_gnss_integrity_get_system_status_summary(msg); - gnss_integrity->gnss_signal_quality = mavlink_msg_gnss_integrity_get_gnss_signal_quality(msg); - gnss_integrity->post_processing_quality = mavlink_msg_gnss_integrity_get_post_processing_quality(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN? msg->len : MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN; - memset(gnss_integrity, 0, MAVLINK_MSG_ID_GNSS_INTEGRITY_LEN); - memcpy(gnss_integrity, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_group_end.h b/development/mavlink_msg_group_end.h deleted file mode 100644 index 115af86a6..000000000 --- a/development/mavlink_msg_group_end.h +++ /dev/null @@ -1,322 +0,0 @@ -#pragma once -// MESSAGE GROUP_END PACKING - -#define MAVLINK_MSG_ID_GROUP_END 415 - - -typedef struct __mavlink_group_end_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - uint32_t group_id; /*< Mission-unique group id (from MAV_CMD_GROUP_END).*/ - uint32_t mission_checksum; /*< CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message.*/ -} mavlink_group_end_t; - -#define MAVLINK_MSG_ID_GROUP_END_LEN 16 -#define MAVLINK_MSG_ID_GROUP_END_MIN_LEN 16 -#define MAVLINK_MSG_ID_415_LEN 16 -#define MAVLINK_MSG_ID_415_MIN_LEN 16 - -#define MAVLINK_MSG_ID_GROUP_END_CRC 161 -#define MAVLINK_MSG_ID_415_CRC 161 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_GROUP_END { \ - 415, \ - "GROUP_END", \ - 3, \ - { { "group_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_group_end_t, group_id) }, \ - { "mission_checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_group_end_t, mission_checksum) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_group_end_t, time_usec) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_GROUP_END { \ - "GROUP_END", \ - 3, \ - { { "group_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_group_end_t, group_id) }, \ - { "mission_checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_group_end_t, mission_checksum) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_group_end_t, time_usec) }, \ - } \ -} -#endif - -/** - * @brief Pack a group_end message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_END). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_end_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_END_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_END_LEN); -#else - mavlink_group_end_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_END_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_END; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -} - -/** - * @brief Pack a group_end message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_END). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_end_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_END_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_END_LEN); -#else - mavlink_group_end_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_END_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_END; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN); -#endif -} - -/** - * @brief Pack a group_end message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_END). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_end_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t group_id,uint32_t mission_checksum,uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_END_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_END_LEN); -#else - mavlink_group_end_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_END_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_END; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -} - -/** - * @brief Encode a group_end struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param group_end C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_end_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_group_end_t* group_end) -{ - return mavlink_msg_group_end_pack(system_id, component_id, msg, group_end->group_id, group_end->mission_checksum, group_end->time_usec); -} - -/** - * @brief Encode a group_end struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param group_end C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_end_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_group_end_t* group_end) -{ - return mavlink_msg_group_end_pack_chan(system_id, component_id, chan, msg, group_end->group_id, group_end->mission_checksum, group_end->time_usec); -} - -/** - * @brief Encode a group_end struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param group_end C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_end_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_group_end_t* group_end) -{ - return mavlink_msg_group_end_pack_status(system_id, component_id, _status, msg, group_end->group_id, group_end->mission_checksum, group_end->time_usec); -} - -/** - * @brief Send a group_end message - * @param chan MAVLink channel to send the message - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_END). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_group_end_send(mavlink_channel_t chan, uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_END_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_END, buf, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#else - mavlink_group_end_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_END, (const char *)&packet, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#endif -} - -/** - * @brief Send a group_end message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_group_end_send_struct(mavlink_channel_t chan, const mavlink_group_end_t* group_end) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_group_end_send(chan, group_end->group_id, group_end->mission_checksum, group_end->time_usec); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_END, (const char *)group_end, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#endif -} - -#if MAVLINK_MSG_ID_GROUP_END_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_group_end_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_END, buf, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#else - mavlink_group_end_t *packet = (mavlink_group_end_t *)msgbuf; - packet->time_usec = time_usec; - packet->group_id = group_id; - packet->mission_checksum = mission_checksum; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_END, (const char *)packet, MAVLINK_MSG_ID_GROUP_END_MIN_LEN, MAVLINK_MSG_ID_GROUP_END_LEN, MAVLINK_MSG_ID_GROUP_END_CRC); -#endif -} -#endif - -#endif - -// MESSAGE GROUP_END UNPACKING - - -/** - * @brief Get field group_id from group_end message - * - * @return Mission-unique group id (from MAV_CMD_GROUP_END). - */ -static inline uint32_t mavlink_msg_group_end_get_group_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field mission_checksum from group_end message - * - * @return CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - */ -static inline uint32_t mavlink_msg_group_end_get_mission_checksum(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 12); -} - -/** - * @brief Get field time_usec from group_end message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_group_end_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Decode a group_end message into a struct - * - * @param msg The message to decode - * @param group_end C-struct to decode the message contents into - */ -static inline void mavlink_msg_group_end_decode(const mavlink_message_t* msg, mavlink_group_end_t* group_end) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - group_end->time_usec = mavlink_msg_group_end_get_time_usec(msg); - group_end->group_id = mavlink_msg_group_end_get_group_id(msg); - group_end->mission_checksum = mavlink_msg_group_end_get_mission_checksum(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_GROUP_END_LEN? msg->len : MAVLINK_MSG_ID_GROUP_END_LEN; - memset(group_end, 0, MAVLINK_MSG_ID_GROUP_END_LEN); - memcpy(group_end, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_group_start.h b/development/mavlink_msg_group_start.h deleted file mode 100644 index e1f1037b2..000000000 --- a/development/mavlink_msg_group_start.h +++ /dev/null @@ -1,322 +0,0 @@ -#pragma once -// MESSAGE GROUP_START PACKING - -#define MAVLINK_MSG_ID_GROUP_START 414 - - -typedef struct __mavlink_group_start_t { - uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ - uint32_t group_id; /*< Mission-unique group id (from MAV_CMD_GROUP_START).*/ - uint32_t mission_checksum; /*< CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message.*/ -} mavlink_group_start_t; - -#define MAVLINK_MSG_ID_GROUP_START_LEN 16 -#define MAVLINK_MSG_ID_GROUP_START_MIN_LEN 16 -#define MAVLINK_MSG_ID_414_LEN 16 -#define MAVLINK_MSG_ID_414_MIN_LEN 16 - -#define MAVLINK_MSG_ID_GROUP_START_CRC 109 -#define MAVLINK_MSG_ID_414_CRC 109 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_GROUP_START { \ - 414, \ - "GROUP_START", \ - 3, \ - { { "group_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_group_start_t, group_id) }, \ - { "mission_checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_group_start_t, mission_checksum) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_group_start_t, time_usec) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_GROUP_START { \ - "GROUP_START", \ - 3, \ - { { "group_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_group_start_t, group_id) }, \ - { "mission_checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_group_start_t, mission_checksum) }, \ - { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_group_start_t, time_usec) }, \ - } \ -} -#endif - -/** - * @brief Pack a group_start message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_START). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_start_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_START_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_START_LEN); -#else - mavlink_group_start_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_START_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_START; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -} - -/** - * @brief Pack a group_start message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_START). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_start_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_START_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_START_LEN); -#else - mavlink_group_start_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_START_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_START; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN); -#endif -} - -/** - * @brief Pack a group_start message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_START). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_group_start_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t group_id,uint32_t mission_checksum,uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_START_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GROUP_START_LEN); -#else - mavlink_group_start_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GROUP_START_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_GROUP_START; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -} - -/** - * @brief Encode a group_start struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param group_start C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_start_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_group_start_t* group_start) -{ - return mavlink_msg_group_start_pack(system_id, component_id, msg, group_start->group_id, group_start->mission_checksum, group_start->time_usec); -} - -/** - * @brief Encode a group_start struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param group_start C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_start_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_group_start_t* group_start) -{ - return mavlink_msg_group_start_pack_chan(system_id, component_id, chan, msg, group_start->group_id, group_start->mission_checksum, group_start->time_usec); -} - -/** - * @brief Encode a group_start struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param group_start C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_group_start_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_group_start_t* group_start) -{ - return mavlink_msg_group_start_pack_status(system_id, component_id, _status, msg, group_start->group_id, group_start->mission_checksum, group_start->time_usec); -} - -/** - * @brief Send a group_start message - * @param chan MAVLink channel to send the message - * - * @param group_id Mission-unique group id (from MAV_CMD_GROUP_START). - * @param mission_checksum CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_group_start_send(mavlink_channel_t chan, uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_GROUP_START_LEN]; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_START, buf, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#else - mavlink_group_start_t packet; - packet.time_usec = time_usec; - packet.group_id = group_id; - packet.mission_checksum = mission_checksum; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_START, (const char *)&packet, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#endif -} - -/** - * @brief Send a group_start message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_group_start_send_struct(mavlink_channel_t chan, const mavlink_group_start_t* group_start) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_group_start_send(chan, group_start->group_id, group_start->mission_checksum, group_start->time_usec); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_START, (const char *)group_start, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#endif -} - -#if MAVLINK_MSG_ID_GROUP_START_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_group_start_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t group_id, uint32_t mission_checksum, uint64_t time_usec) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, time_usec); - _mav_put_uint32_t(buf, 8, group_id); - _mav_put_uint32_t(buf, 12, mission_checksum); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_START, buf, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#else - mavlink_group_start_t *packet = (mavlink_group_start_t *)msgbuf; - packet->time_usec = time_usec; - packet->group_id = group_id; - packet->mission_checksum = mission_checksum; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GROUP_START, (const char *)packet, MAVLINK_MSG_ID_GROUP_START_MIN_LEN, MAVLINK_MSG_ID_GROUP_START_LEN, MAVLINK_MSG_ID_GROUP_START_CRC); -#endif -} -#endif - -#endif - -// MESSAGE GROUP_START UNPACKING - - -/** - * @brief Get field group_id from group_start message - * - * @return Mission-unique group id (from MAV_CMD_GROUP_START). - */ -static inline uint32_t mavlink_msg_group_start_get_group_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 8); -} - -/** - * @brief Get field mission_checksum from group_start message - * - * @return CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - */ -static inline uint32_t mavlink_msg_group_start_get_mission_checksum(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 12); -} - -/** - * @brief Get field time_usec from group_start message - * - * @return [us] Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - */ -static inline uint64_t mavlink_msg_group_start_get_time_usec(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Decode a group_start message into a struct - * - * @param msg The message to decode - * @param group_start C-struct to decode the message contents into - */ -static inline void mavlink_msg_group_start_decode(const mavlink_message_t* msg, mavlink_group_start_t* group_start) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - group_start->time_usec = mavlink_msg_group_start_get_time_usec(msg); - group_start->group_id = mavlink_msg_group_start_get_group_id(msg); - group_start->mission_checksum = mavlink_msg_group_start_get_mission_checksum(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_GROUP_START_LEN? msg->len : MAVLINK_MSG_ID_GROUP_START_LEN; - memset(group_start, 0, MAVLINK_MSG_ID_GROUP_START_LEN); - memcpy(group_start, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_mission_checksum.h b/development/mavlink_msg_mission_checksum.h new file mode 100644 index 000000000..ef6614f3d --- /dev/null +++ b/development/mavlink_msg_mission_checksum.h @@ -0,0 +1,288 @@ +#pragma once +// MESSAGE MISSION_CHECKSUM PACKING + +#define MAVLINK_MSG_ID_MISSION_CHECKSUM 53 + + +typedef struct __mavlink_mission_checksum_t { + uint32_t checksum; /*< CRC32 checksum of current plan for specified type.*/ + uint8_t mission_type; /*< Mission type.*/ +} mavlink_mission_checksum_t; + +#define MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN 5 +#define MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN 5 +#define MAVLINK_MSG_ID_53_LEN 5 +#define MAVLINK_MSG_ID_53_MIN_LEN 5 + +#define MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC 3 +#define MAVLINK_MSG_ID_53_CRC 3 + + + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_MISSION_CHECKSUM { \ + 53, \ + "MISSION_CHECKSUM", \ + 2, \ + { { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_checksum_t, mission_type) }, \ + { "checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_mission_checksum_t, checksum) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_MISSION_CHECKSUM { \ + "MISSION_CHECKSUM", \ + 2, \ + { { "mission_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_mission_checksum_t, mission_type) }, \ + { "checksum", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_mission_checksum_t, checksum) }, \ + } \ +} +#endif + +/** + * @brief Pack a mission_checksum message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param mission_type Mission type. + * @param checksum CRC32 checksum of current plan for specified type. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mission_checksum_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t mission_type, uint32_t checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN]; + _mav_put_uint32_t(buf, 0, checksum); + _mav_put_uint8_t(buf, 4, mission_type); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#else + mavlink_mission_checksum_t packet; + packet.checksum = checksum; + packet.mission_type = mission_type; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MISSION_CHECKSUM; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +} + +/** + * @brief Pack a mission_checksum message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param mission_type Mission type. + * @param checksum CRC32 checksum of current plan for specified type. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mission_checksum_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t mission_type, uint32_t checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN]; + _mav_put_uint32_t(buf, 0, checksum); + _mav_put_uint8_t(buf, 4, mission_type); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#else + mavlink_mission_checksum_t packet; + packet.checksum = checksum; + packet.mission_type = mission_type; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MISSION_CHECKSUM; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#endif +} + +/** + * @brief Pack a mission_checksum message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param mission_type Mission type. + * @param checksum CRC32 checksum of current plan for specified type. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_mission_checksum_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t mission_type,uint32_t checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN]; + _mav_put_uint32_t(buf, 0, checksum); + _mav_put_uint8_t(buf, 4, mission_type); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#else + mavlink_mission_checksum_t packet; + packet.checksum = checksum; + packet.mission_type = mission_type; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_MISSION_CHECKSUM; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +} + +/** + * @brief Encode a mission_checksum struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param mission_checksum C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mission_checksum_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_checksum_t* mission_checksum) +{ + return mavlink_msg_mission_checksum_pack(system_id, component_id, msg, mission_checksum->mission_type, mission_checksum->checksum); +} + +/** + * @brief Encode a mission_checksum struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param mission_checksum C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mission_checksum_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_checksum_t* mission_checksum) +{ + return mavlink_msg_mission_checksum_pack_chan(system_id, component_id, chan, msg, mission_checksum->mission_type, mission_checksum->checksum); +} + +/** + * @brief Encode a mission_checksum struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param mission_checksum C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_mission_checksum_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mission_checksum_t* mission_checksum) +{ + return mavlink_msg_mission_checksum_pack_status(system_id, component_id, _status, msg, mission_checksum->mission_type, mission_checksum->checksum); +} + +/** + * @brief Send a mission_checksum message + * @param chan MAVLink channel to send the message + * + * @param mission_type Mission type. + * @param checksum CRC32 checksum of current plan for specified type. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_mission_checksum_send(mavlink_channel_t chan, uint8_t mission_type, uint32_t checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN]; + _mav_put_uint32_t(buf, 0, checksum); + _mav_put_uint8_t(buf, 4, mission_type); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CHECKSUM, buf, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#else + mavlink_mission_checksum_t packet; + packet.checksum = checksum; + packet.mission_type = mission_type; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CHECKSUM, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#endif +} + +/** + * @brief Send a mission_checksum message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_mission_checksum_send_struct(mavlink_channel_t chan, const mavlink_mission_checksum_t* mission_checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_mission_checksum_send(chan, mission_checksum->mission_type, mission_checksum->checksum); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CHECKSUM, (const char *)mission_checksum, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#endif +} + +#if MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_mission_checksum_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t mission_type, uint32_t checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, checksum); + _mav_put_uint8_t(buf, 4, mission_type); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CHECKSUM, buf, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#else + mavlink_mission_checksum_t *packet = (mavlink_mission_checksum_t *)msgbuf; + packet->checksum = checksum; + packet->mission_type = mission_type; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CHECKSUM, (const char *)packet, MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN, MAVLINK_MSG_ID_MISSION_CHECKSUM_CRC); +#endif +} +#endif + +#endif + +// MESSAGE MISSION_CHECKSUM UNPACKING + + +/** + * @brief Get field mission_type from mission_checksum message + * + * @return Mission type. + */ +static inline uint8_t mavlink_msg_mission_checksum_get_mission_type(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 4); +} + +/** + * @brief Get field checksum from mission_checksum message + * + * @return CRC32 checksum of current plan for specified type. + */ +static inline uint32_t mavlink_msg_mission_checksum_get_checksum(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Decode a mission_checksum message into a struct + * + * @param msg The message to decode + * @param mission_checksum C-struct to decode the message contents into + */ +static inline void mavlink_msg_mission_checksum_decode(const mavlink_message_t* msg, mavlink_mission_checksum_t* mission_checksum) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mission_checksum->checksum = mavlink_msg_mission_checksum_get_checksum(msg); + mission_checksum->mission_type = mavlink_msg_mission_checksum_get_mission_type(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN? msg->len : MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN; + memset(mission_checksum, 0, MAVLINK_MSG_ID_MISSION_CHECKSUM_LEN); + memcpy(mission_checksum, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/development/mavlink_msg_param_ack_transaction.h b/development/mavlink_msg_param_ack_transaction.h deleted file mode 100644 index 6e5e57851..000000000 --- a/development/mavlink_msg_param_ack_transaction.h +++ /dev/null @@ -1,390 +0,0 @@ -#pragma once -// MESSAGE PARAM_ACK_TRANSACTION PACKING - -#define MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION 19 - - -typedef struct __mavlink_param_ack_transaction_t { - float param_value; /*< Parameter value (new value if PARAM_ACCEPTED, current value otherwise)*/ - uint8_t target_system; /*< Id of system that sent PARAM_SET message.*/ - uint8_t target_component; /*< Id of system that sent PARAM_SET message.*/ - char param_id[16]; /*< Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string*/ - uint8_t param_type; /*< Parameter type.*/ - uint8_t param_result; /*< Result code.*/ -} mavlink_param_ack_transaction_t; - -#define MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN 24 -#define MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN 24 -#define MAVLINK_MSG_ID_19_LEN 24 -#define MAVLINK_MSG_ID_19_MIN_LEN 24 - -#define MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC 137 -#define MAVLINK_MSG_ID_19_CRC 137 - -#define MAVLINK_MSG_PARAM_ACK_TRANSACTION_FIELD_PARAM_ID_LEN 16 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_PARAM_ACK_TRANSACTION { \ - 19, \ - "PARAM_ACK_TRANSACTION", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_param_ack_transaction_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_param_ack_transaction_t, target_component) }, \ - { "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 6, offsetof(mavlink_param_ack_transaction_t, param_id) }, \ - { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_ack_transaction_t, param_value) }, \ - { "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_param_ack_transaction_t, param_type) }, \ - { "param_result", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_param_ack_transaction_t, param_result) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_PARAM_ACK_TRANSACTION { \ - "PARAM_ACK_TRANSACTION", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_param_ack_transaction_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_param_ack_transaction_t, target_component) }, \ - { "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 6, offsetof(mavlink_param_ack_transaction_t, param_id) }, \ - { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_ack_transaction_t, param_value) }, \ - { "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_param_ack_transaction_t, param_type) }, \ - { "param_result", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_param_ack_transaction_t, param_result) }, \ - } \ -} -#endif - -/** - * @brief Pack a param_ack_transaction message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system Id of system that sent PARAM_SET message. - * @param target_component Id of system that sent PARAM_SET message. - * @param param_id Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - * @param param_value Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - * @param param_type Parameter type. - * @param param_result Result code. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_ack_transaction_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type, uint8_t param_result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN]; - _mav_put_float(buf, 0, param_value); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 22, param_type); - _mav_put_uint8_t(buf, 23, param_result); - _mav_put_char_array(buf, 6, param_id, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#else - mavlink_param_ack_transaction_t packet; - packet.param_value = param_value; - packet.target_system = target_system; - packet.target_component = target_component; - packet.param_type = param_type; - packet.param_result = param_result; - mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -} - -/** - * @brief Pack a param_ack_transaction message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system Id of system that sent PARAM_SET message. - * @param target_component Id of system that sent PARAM_SET message. - * @param param_id Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - * @param param_value Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - * @param param_type Parameter type. - * @param param_result Result code. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_ack_transaction_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type, uint8_t param_result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN]; - _mav_put_float(buf, 0, param_value); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 22, param_type); - _mav_put_uint8_t(buf, 23, param_result); - _mav_put_char_array(buf, 6, param_id, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#else - mavlink_param_ack_transaction_t packet; - packet.param_value = param_value; - packet.target_system = target_system; - packet.target_component = target_component; - packet.param_type = param_type; - packet.param_result = param_result; - mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#endif -} - -/** - * @brief Pack a param_ack_transaction message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system Id of system that sent PARAM_SET message. - * @param target_component Id of system that sent PARAM_SET message. - * @param param_id Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - * @param param_value Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - * @param param_type Parameter type. - * @param param_result Result code. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_ack_transaction_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,const char *param_id,float param_value,uint8_t param_type,uint8_t param_result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN]; - _mav_put_float(buf, 0, param_value); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 22, param_type); - _mav_put_uint8_t(buf, 23, param_result); - _mav_put_char_array(buf, 6, param_id, 16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#else - mavlink_param_ack_transaction_t packet; - packet.param_value = param_value; - packet.target_system = target_system; - packet.target_component = target_component; - packet.param_type = param_type; - packet.param_result = param_result; - mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -} - -/** - * @brief Encode a param_ack_transaction struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param param_ack_transaction C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_ack_transaction_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_ack_transaction_t* param_ack_transaction) -{ - return mavlink_msg_param_ack_transaction_pack(system_id, component_id, msg, param_ack_transaction->target_system, param_ack_transaction->target_component, param_ack_transaction->param_id, param_ack_transaction->param_value, param_ack_transaction->param_type, param_ack_transaction->param_result); -} - -/** - * @brief Encode a param_ack_transaction struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param param_ack_transaction C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_ack_transaction_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_param_ack_transaction_t* param_ack_transaction) -{ - return mavlink_msg_param_ack_transaction_pack_chan(system_id, component_id, chan, msg, param_ack_transaction->target_system, param_ack_transaction->target_component, param_ack_transaction->param_id, param_ack_transaction->param_value, param_ack_transaction->param_type, param_ack_transaction->param_result); -} - -/** - * @brief Encode a param_ack_transaction struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param param_ack_transaction C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_ack_transaction_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_param_ack_transaction_t* param_ack_transaction) -{ - return mavlink_msg_param_ack_transaction_pack_status(system_id, component_id, _status, msg, param_ack_transaction->target_system, param_ack_transaction->target_component, param_ack_transaction->param_id, param_ack_transaction->param_value, param_ack_transaction->param_type, param_ack_transaction->param_result); -} - -/** - * @brief Send a param_ack_transaction message - * @param chan MAVLink channel to send the message - * - * @param target_system Id of system that sent PARAM_SET message. - * @param target_component Id of system that sent PARAM_SET message. - * @param param_id Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - * @param param_value Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - * @param param_type Parameter type. - * @param param_result Result code. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_param_ack_transaction_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type, uint8_t param_result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN]; - _mav_put_float(buf, 0, param_value); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 22, param_type); - _mav_put_uint8_t(buf, 23, param_result); - _mav_put_char_array(buf, 6, param_id, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION, buf, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#else - mavlink_param_ack_transaction_t packet; - packet.param_value = param_value; - packet.target_system = target_system; - packet.target_component = target_component; - packet.param_type = param_type; - packet.param_result = param_result; - mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION, (const char *)&packet, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#endif -} - -/** - * @brief Send a param_ack_transaction message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_param_ack_transaction_send_struct(mavlink_channel_t chan, const mavlink_param_ack_transaction_t* param_ack_transaction) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_param_ack_transaction_send(chan, param_ack_transaction->target_system, param_ack_transaction->target_component, param_ack_transaction->param_id, param_ack_transaction->param_value, param_ack_transaction->param_type, param_ack_transaction->param_result); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION, (const char *)param_ack_transaction, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#endif -} - -#if MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_param_ack_transaction_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const char *param_id, float param_value, uint8_t param_type, uint8_t param_result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, param_value); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - _mav_put_uint8_t(buf, 22, param_type); - _mav_put_uint8_t(buf, 23, param_result); - _mav_put_char_array(buf, 6, param_id, 16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION, buf, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#else - mavlink_param_ack_transaction_t *packet = (mavlink_param_ack_transaction_t *)msgbuf; - packet->param_value = param_value; - packet->target_system = target_system; - packet->target_component = target_component; - packet->param_type = param_type; - packet->param_result = param_result; - mav_array_memcpy(packet->param_id, param_id, sizeof(char)*16); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION, (const char *)packet, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_CRC); -#endif -} -#endif - -#endif - -// MESSAGE PARAM_ACK_TRANSACTION UNPACKING - - -/** - * @brief Get field target_system from param_ack_transaction message - * - * @return Id of system that sent PARAM_SET message. - */ -static inline uint8_t mavlink_msg_param_ack_transaction_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from param_ack_transaction message - * - * @return Id of system that sent PARAM_SET message. - */ -static inline uint8_t mavlink_msg_param_ack_transaction_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field param_id from param_ack_transaction message - * - * @return Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - */ -static inline uint16_t mavlink_msg_param_ack_transaction_get_param_id(const mavlink_message_t* msg, char *param_id) -{ - return _MAV_RETURN_char_array(msg, param_id, 16, 6); -} - -/** - * @brief Get field param_value from param_ack_transaction message - * - * @return Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - */ -static inline float mavlink_msg_param_ack_transaction_get_param_value(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field param_type from param_ack_transaction message - * - * @return Parameter type. - */ -static inline uint8_t mavlink_msg_param_ack_transaction_get_param_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 22); -} - -/** - * @brief Get field param_result from param_ack_transaction message - * - * @return Result code. - */ -static inline uint8_t mavlink_msg_param_ack_transaction_get_param_result(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 23); -} - -/** - * @brief Decode a param_ack_transaction message into a struct - * - * @param msg The message to decode - * @param param_ack_transaction C-struct to decode the message contents into - */ -static inline void mavlink_msg_param_ack_transaction_decode(const mavlink_message_t* msg, mavlink_param_ack_transaction_t* param_ack_transaction) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - param_ack_transaction->param_value = mavlink_msg_param_ack_transaction_get_param_value(msg); - param_ack_transaction->target_system = mavlink_msg_param_ack_transaction_get_target_system(msg); - param_ack_transaction->target_component = mavlink_msg_param_ack_transaction_get_target_component(msg); - mavlink_msg_param_ack_transaction_get_param_id(msg, param_ack_transaction->param_id); - param_ack_transaction->param_type = mavlink_msg_param_ack_transaction_get_param_type(msg); - param_ack_transaction->param_result = mavlink_msg_param_ack_transaction_get_param_result(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN? msg->len : MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN; - memset(param_ack_transaction, 0, MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_LEN); - memcpy(param_ack_transaction, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_set_velocity_limits.h b/development/mavlink_msg_set_velocity_limits.h deleted file mode 100644 index 366de7962..000000000 --- a/development/mavlink_msg_set_velocity_limits.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -// MESSAGE SET_VELOCITY_LIMITS PACKING - -#define MAVLINK_MSG_ID_SET_VELOCITY_LIMITS 354 - - -typedef struct __mavlink_set_velocity_limits_t { - float horizontal_speed_limit; /*< [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)*/ - float vertical_speed_limit; /*< [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)*/ - float yaw_rate_limit; /*< [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore)*/ - uint8_t target_system; /*< System ID (0 for broadcast).*/ - uint8_t target_component; /*< Component ID (0 for broadcast).*/ -} mavlink_set_velocity_limits_t; - -#define MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN 14 -#define MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN 14 -#define MAVLINK_MSG_ID_354_LEN 14 -#define MAVLINK_MSG_ID_354_MIN_LEN 14 - -#define MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC 210 -#define MAVLINK_MSG_ID_354_CRC 210 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SET_VELOCITY_LIMITS { \ - 354, \ - "SET_VELOCITY_LIMITS", \ - 5, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_velocity_limits_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_set_velocity_limits_t, target_component) }, \ - { "horizontal_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_velocity_limits_t, horizontal_speed_limit) }, \ - { "vertical_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_set_velocity_limits_t, vertical_speed_limit) }, \ - { "yaw_rate_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_set_velocity_limits_t, yaw_rate_limit) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SET_VELOCITY_LIMITS { \ - "SET_VELOCITY_LIMITS", \ - 5, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_set_velocity_limits_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_set_velocity_limits_t, target_component) }, \ - { "horizontal_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_set_velocity_limits_t, horizontal_speed_limit) }, \ - { "vertical_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_set_velocity_limits_t, vertical_speed_limit) }, \ - { "yaw_rate_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_set_velocity_limits_t, yaw_rate_limit) }, \ - } \ -} -#endif - -/** - * @brief Pack a set_velocity_limits message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID (0 for broadcast). - * @param target_component Component ID (0 for broadcast). - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_set_velocity_limits_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - _mav_put_uint8_t(buf, 12, target_system); - _mav_put_uint8_t(buf, 13, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#else - mavlink_set_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SET_VELOCITY_LIMITS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -} - -/** - * @brief Pack a set_velocity_limits message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID (0 for broadcast). - * @param target_component Component ID (0 for broadcast). - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_set_velocity_limits_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - _mav_put_uint8_t(buf, 12, target_system); - _mav_put_uint8_t(buf, 13, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#else - mavlink_set_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SET_VELOCITY_LIMITS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#endif -} - -/** - * @brief Pack a set_velocity_limits message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID (0 for broadcast). - * @param target_component Component ID (0 for broadcast). - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_set_velocity_limits_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,float horizontal_speed_limit,float vertical_speed_limit,float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - _mav_put_uint8_t(buf, 12, target_system); - _mav_put_uint8_t(buf, 13, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#else - mavlink_set_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SET_VELOCITY_LIMITS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -} - -/** - * @brief Encode a set_velocity_limits struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param set_velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_set_velocity_limits_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_velocity_limits_t* set_velocity_limits) -{ - return mavlink_msg_set_velocity_limits_pack(system_id, component_id, msg, set_velocity_limits->target_system, set_velocity_limits->target_component, set_velocity_limits->horizontal_speed_limit, set_velocity_limits->vertical_speed_limit, set_velocity_limits->yaw_rate_limit); -} - -/** - * @brief Encode a set_velocity_limits struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param set_velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_set_velocity_limits_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_velocity_limits_t* set_velocity_limits) -{ - return mavlink_msg_set_velocity_limits_pack_chan(system_id, component_id, chan, msg, set_velocity_limits->target_system, set_velocity_limits->target_component, set_velocity_limits->horizontal_speed_limit, set_velocity_limits->vertical_speed_limit, set_velocity_limits->yaw_rate_limit); -} - -/** - * @brief Encode a set_velocity_limits struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param set_velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_set_velocity_limits_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_set_velocity_limits_t* set_velocity_limits) -{ - return mavlink_msg_set_velocity_limits_pack_status(system_id, component_id, _status, msg, set_velocity_limits->target_system, set_velocity_limits->target_component, set_velocity_limits->horizontal_speed_limit, set_velocity_limits->vertical_speed_limit, set_velocity_limits->yaw_rate_limit); -} - -/** - * @brief Send a set_velocity_limits message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID (0 for broadcast). - * @param target_component Component ID (0 for broadcast). - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_set_velocity_limits_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - _mav_put_uint8_t(buf, 12, target_system); - _mav_put_uint8_t(buf, 13, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS, buf, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#else - mavlink_set_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS, (const char *)&packet, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#endif -} - -/** - * @brief Send a set_velocity_limits message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_set_velocity_limits_send_struct(mavlink_channel_t chan, const mavlink_set_velocity_limits_t* set_velocity_limits) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_set_velocity_limits_send(chan, set_velocity_limits->target_system, set_velocity_limits->target_component, set_velocity_limits->horizontal_speed_limit, set_velocity_limits->vertical_speed_limit, set_velocity_limits->yaw_rate_limit); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS, (const char *)set_velocity_limits, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_set_velocity_limits_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - _mav_put_uint8_t(buf, 12, target_system); - _mav_put_uint8_t(buf, 13, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS, buf, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#else - mavlink_set_velocity_limits_t *packet = (mavlink_set_velocity_limits_t *)msgbuf; - packet->horizontal_speed_limit = horizontal_speed_limit; - packet->vertical_speed_limit = vertical_speed_limit; - packet->yaw_rate_limit = yaw_rate_limit; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS, (const char *)packet, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SET_VELOCITY_LIMITS UNPACKING - - -/** - * @brief Get field target_system from set_velocity_limits message - * - * @return System ID (0 for broadcast). - */ -static inline uint8_t mavlink_msg_set_velocity_limits_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 12); -} - -/** - * @brief Get field target_component from set_velocity_limits message - * - * @return Component ID (0 for broadcast). - */ -static inline uint8_t mavlink_msg_set_velocity_limits_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 13); -} - -/** - * @brief Get field horizontal_speed_limit from set_velocity_limits message - * - * @return [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - */ -static inline float mavlink_msg_set_velocity_limits_get_horizontal_speed_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field vertical_speed_limit from set_velocity_limits message - * - * @return [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - */ -static inline float mavlink_msg_set_velocity_limits_get_vertical_speed_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field yaw_rate_limit from set_velocity_limits message - * - * @return [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - */ -static inline float mavlink_msg_set_velocity_limits_get_yaw_rate_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Decode a set_velocity_limits message into a struct - * - * @param msg The message to decode - * @param set_velocity_limits C-struct to decode the message contents into - */ -static inline void mavlink_msg_set_velocity_limits_decode(const mavlink_message_t* msg, mavlink_set_velocity_limits_t* set_velocity_limits) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - set_velocity_limits->horizontal_speed_limit = mavlink_msg_set_velocity_limits_get_horizontal_speed_limit(msg); - set_velocity_limits->vertical_speed_limit = mavlink_msg_set_velocity_limits_get_vertical_speed_limit(msg); - set_velocity_limits->yaw_rate_limit = mavlink_msg_set_velocity_limits_get_yaw_rate_limit(msg); - set_velocity_limits->target_system = mavlink_msg_set_velocity_limits_get_target_system(msg); - set_velocity_limits->target_component = mavlink_msg_set_velocity_limits_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN? msg->len : MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN; - memset(set_velocity_limits, 0, MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_LEN); - memcpy(set_velocity_limits, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_target_absolute.h b/development/mavlink_msg_target_absolute.h deleted file mode 100644 index 462d1b8ef..000000000 --- a/development/mavlink_msg_target_absolute.h +++ /dev/null @@ -1,592 +0,0 @@ -#pragma once -// MESSAGE TARGET_ABSOLUTE PACKING - -#define MAVLINK_MSG_ID_TARGET_ABSOLUTE 510 - - -typedef struct __mavlink_target_absolute_t { - uint64_t timestamp; /*< [us] Timestamp (UNIX epoch time).*/ - int32_t lat; /*< [degE7] Target's latitude (WGS84)*/ - int32_t lon; /*< [degE7] Target's longitude (WGS84)*/ - float alt; /*< [m] Target's altitude (AMSL)*/ - float vel[3]; /*< [m/s] Target's velocity in its body frame*/ - float acc[3]; /*< [m/s/s] Linear target's acceleration in its body frame*/ - float q_target[4]; /*< Quaternion of the target's orientation from its body frame to the vehicle's NED frame.*/ - float rates[3]; /*< [rad/s] Target's roll, pitch and yaw rates*/ - float position_std[2]; /*< [m] Standard deviation of horizontal (eph) and vertical (epv) position errors*/ - float vel_std[3]; /*< [m/s] Standard deviation of the target's velocity in its body frame*/ - float acc_std[3]; /*< [m/s/s] Standard deviation of the target's acceleration in its body frame*/ - uint8_t id; /*< The ID of the target if multiple targets are present*/ - uint8_t sensor_capabilities; /*< Bitmap to indicate the sensor's reporting capabilities*/ -} mavlink_target_absolute_t; - -#define MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN 106 -#define MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN 106 -#define MAVLINK_MSG_ID_510_LEN 106 -#define MAVLINK_MSG_ID_510_MIN_LEN 106 - -#define MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC 245 -#define MAVLINK_MSG_ID_510_CRC 245 - -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_VEL_LEN 3 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_ACC_LEN 3 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_Q_TARGET_LEN 4 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_RATES_LEN 3 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_POSITION_STD_LEN 2 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_VEL_STD_LEN 3 -#define MAVLINK_MSG_TARGET_ABSOLUTE_FIELD_ACC_STD_LEN 3 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_TARGET_ABSOLUTE { \ - 510, \ - "TARGET_ABSOLUTE", \ - 13, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_target_absolute_t, timestamp) }, \ - { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 104, offsetof(mavlink_target_absolute_t, id) }, \ - { "sensor_capabilities", NULL, MAVLINK_TYPE_UINT8_T, 0, 105, offsetof(mavlink_target_absolute_t, sensor_capabilities) }, \ - { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_target_absolute_t, lat) }, \ - { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_target_absolute_t, lon) }, \ - { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_target_absolute_t, alt) }, \ - { "vel", NULL, MAVLINK_TYPE_FLOAT, 3, 20, offsetof(mavlink_target_absolute_t, vel) }, \ - { "acc", NULL, MAVLINK_TYPE_FLOAT, 3, 32, offsetof(mavlink_target_absolute_t, acc) }, \ - { "q_target", NULL, MAVLINK_TYPE_FLOAT, 4, 44, offsetof(mavlink_target_absolute_t, q_target) }, \ - { "rates", NULL, MAVLINK_TYPE_FLOAT, 3, 60, offsetof(mavlink_target_absolute_t, rates) }, \ - { "position_std", NULL, MAVLINK_TYPE_FLOAT, 2, 72, offsetof(mavlink_target_absolute_t, position_std) }, \ - { "vel_std", NULL, MAVLINK_TYPE_FLOAT, 3, 80, offsetof(mavlink_target_absolute_t, vel_std) }, \ - { "acc_std", NULL, MAVLINK_TYPE_FLOAT, 3, 92, offsetof(mavlink_target_absolute_t, acc_std) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_TARGET_ABSOLUTE { \ - "TARGET_ABSOLUTE", \ - 13, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_target_absolute_t, timestamp) }, \ - { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 104, offsetof(mavlink_target_absolute_t, id) }, \ - { "sensor_capabilities", NULL, MAVLINK_TYPE_UINT8_T, 0, 105, offsetof(mavlink_target_absolute_t, sensor_capabilities) }, \ - { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_target_absolute_t, lat) }, \ - { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_target_absolute_t, lon) }, \ - { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_target_absolute_t, alt) }, \ - { "vel", NULL, MAVLINK_TYPE_FLOAT, 3, 20, offsetof(mavlink_target_absolute_t, vel) }, \ - { "acc", NULL, MAVLINK_TYPE_FLOAT, 3, 32, offsetof(mavlink_target_absolute_t, acc) }, \ - { "q_target", NULL, MAVLINK_TYPE_FLOAT, 4, 44, offsetof(mavlink_target_absolute_t, q_target) }, \ - { "rates", NULL, MAVLINK_TYPE_FLOAT, 3, 60, offsetof(mavlink_target_absolute_t, rates) }, \ - { "position_std", NULL, MAVLINK_TYPE_FLOAT, 2, 72, offsetof(mavlink_target_absolute_t, position_std) }, \ - { "vel_std", NULL, MAVLINK_TYPE_FLOAT, 3, 80, offsetof(mavlink_target_absolute_t, vel_std) }, \ - { "acc_std", NULL, MAVLINK_TYPE_FLOAT, 3, 92, offsetof(mavlink_target_absolute_t, acc_std) }, \ - } \ -} -#endif - -/** - * @brief Pack a target_absolute message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [us] Timestamp (UNIX epoch time). - * @param id The ID of the target if multiple targets are present - * @param sensor_capabilities Bitmap to indicate the sensor's reporting capabilities - * @param lat [degE7] Target's latitude (WGS84) - * @param lon [degE7] Target's longitude (WGS84) - * @param alt [m] Target's altitude (AMSL) - * @param vel [m/s] Target's velocity in its body frame - * @param acc [m/s/s] Linear target's acceleration in its body frame - * @param q_target Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - * @param rates [rad/s] Target's roll, pitch and yaw rates - * @param position_std [m] Standard deviation of horizontal (eph) and vertical (epv) position errors - * @param vel_std [m/s] Standard deviation of the target's velocity in its body frame - * @param acc_std [m/s/s] Standard deviation of the target's acceleration in its body frame - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_absolute_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t timestamp, uint8_t id, uint8_t sensor_capabilities, int32_t lat, int32_t lon, float alt, const float *vel, const float *acc, const float *q_target, const float *rates, const float *position_std, const float *vel_std, const float *acc_std) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_int32_t(buf, 8, lat); - _mav_put_int32_t(buf, 12, lon); - _mav_put_float(buf, 16, alt); - _mav_put_uint8_t(buf, 104, id); - _mav_put_uint8_t(buf, 105, sensor_capabilities); - _mav_put_float_array(buf, 20, vel, 3); - _mav_put_float_array(buf, 32, acc, 3); - _mav_put_float_array(buf, 44, q_target, 4); - _mav_put_float_array(buf, 60, rates, 3); - _mav_put_float_array(buf, 72, position_std, 2); - _mav_put_float_array(buf, 80, vel_std, 3); - _mav_put_float_array(buf, 92, acc_std, 3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#else - mavlink_target_absolute_t packet; - packet.timestamp = timestamp; - packet.lat = lat; - packet.lon = lon; - packet.alt = alt; - packet.id = id; - packet.sensor_capabilities = sensor_capabilities; - mav_array_memcpy(packet.vel, vel, sizeof(float)*3); - mav_array_memcpy(packet.acc, acc, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.rates, rates, sizeof(float)*3); - mav_array_memcpy(packet.position_std, position_std, sizeof(float)*2); - mav_array_memcpy(packet.vel_std, vel_std, sizeof(float)*3); - mav_array_memcpy(packet.acc_std, acc_std, sizeof(float)*3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_ABSOLUTE; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -} - -/** - * @brief Pack a target_absolute message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [us] Timestamp (UNIX epoch time). - * @param id The ID of the target if multiple targets are present - * @param sensor_capabilities Bitmap to indicate the sensor's reporting capabilities - * @param lat [degE7] Target's latitude (WGS84) - * @param lon [degE7] Target's longitude (WGS84) - * @param alt [m] Target's altitude (AMSL) - * @param vel [m/s] Target's velocity in its body frame - * @param acc [m/s/s] Linear target's acceleration in its body frame - * @param q_target Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - * @param rates [rad/s] Target's roll, pitch and yaw rates - * @param position_std [m] Standard deviation of horizontal (eph) and vertical (epv) position errors - * @param vel_std [m/s] Standard deviation of the target's velocity in its body frame - * @param acc_std [m/s/s] Standard deviation of the target's acceleration in its body frame - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_absolute_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t timestamp, uint8_t id, uint8_t sensor_capabilities, int32_t lat, int32_t lon, float alt, const float *vel, const float *acc, const float *q_target, const float *rates, const float *position_std, const float *vel_std, const float *acc_std) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_int32_t(buf, 8, lat); - _mav_put_int32_t(buf, 12, lon); - _mav_put_float(buf, 16, alt); - _mav_put_uint8_t(buf, 104, id); - _mav_put_uint8_t(buf, 105, sensor_capabilities); - _mav_put_float_array(buf, 20, vel, 3); - _mav_put_float_array(buf, 32, acc, 3); - _mav_put_float_array(buf, 44, q_target, 4); - _mav_put_float_array(buf, 60, rates, 3); - _mav_put_float_array(buf, 72, position_std, 2); - _mav_put_float_array(buf, 80, vel_std, 3); - _mav_put_float_array(buf, 92, acc_std, 3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#else - mavlink_target_absolute_t packet; - packet.timestamp = timestamp; - packet.lat = lat; - packet.lon = lon; - packet.alt = alt; - packet.id = id; - packet.sensor_capabilities = sensor_capabilities; - mav_array_memcpy(packet.vel, vel, sizeof(float)*3); - mav_array_memcpy(packet.acc, acc, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.rates, rates, sizeof(float)*3); - mav_array_memcpy(packet.position_std, position_std, sizeof(float)*2); - mav_array_memcpy(packet.vel_std, vel_std, sizeof(float)*3); - mav_array_memcpy(packet.acc_std, acc_std, sizeof(float)*3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_ABSOLUTE; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#endif -} - -/** - * @brief Pack a target_absolute message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param timestamp [us] Timestamp (UNIX epoch time). - * @param id The ID of the target if multiple targets are present - * @param sensor_capabilities Bitmap to indicate the sensor's reporting capabilities - * @param lat [degE7] Target's latitude (WGS84) - * @param lon [degE7] Target's longitude (WGS84) - * @param alt [m] Target's altitude (AMSL) - * @param vel [m/s] Target's velocity in its body frame - * @param acc [m/s/s] Linear target's acceleration in its body frame - * @param q_target Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - * @param rates [rad/s] Target's roll, pitch and yaw rates - * @param position_std [m] Standard deviation of horizontal (eph) and vertical (epv) position errors - * @param vel_std [m/s] Standard deviation of the target's velocity in its body frame - * @param acc_std [m/s/s] Standard deviation of the target's acceleration in its body frame - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_absolute_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t timestamp,uint8_t id,uint8_t sensor_capabilities,int32_t lat,int32_t lon,float alt,const float *vel,const float *acc,const float *q_target,const float *rates,const float *position_std,const float *vel_std,const float *acc_std) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_int32_t(buf, 8, lat); - _mav_put_int32_t(buf, 12, lon); - _mav_put_float(buf, 16, alt); - _mav_put_uint8_t(buf, 104, id); - _mav_put_uint8_t(buf, 105, sensor_capabilities); - _mav_put_float_array(buf, 20, vel, 3); - _mav_put_float_array(buf, 32, acc, 3); - _mav_put_float_array(buf, 44, q_target, 4); - _mav_put_float_array(buf, 60, rates, 3); - _mav_put_float_array(buf, 72, position_std, 2); - _mav_put_float_array(buf, 80, vel_std, 3); - _mav_put_float_array(buf, 92, acc_std, 3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#else - mavlink_target_absolute_t packet; - packet.timestamp = timestamp; - packet.lat = lat; - packet.lon = lon; - packet.alt = alt; - packet.id = id; - packet.sensor_capabilities = sensor_capabilities; - mav_array_memcpy(packet.vel, vel, sizeof(float)*3); - mav_array_memcpy(packet.acc, acc, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.rates, rates, sizeof(float)*3); - mav_array_memcpy(packet.position_std, position_std, sizeof(float)*2); - mav_array_memcpy(packet.vel_std, vel_std, sizeof(float)*3); - mav_array_memcpy(packet.acc_std, acc_std, sizeof(float)*3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_ABSOLUTE; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -} - -/** - * @brief Encode a target_absolute struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param target_absolute C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_absolute_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_target_absolute_t* target_absolute) -{ - return mavlink_msg_target_absolute_pack(system_id, component_id, msg, target_absolute->timestamp, target_absolute->id, target_absolute->sensor_capabilities, target_absolute->lat, target_absolute->lon, target_absolute->alt, target_absolute->vel, target_absolute->acc, target_absolute->q_target, target_absolute->rates, target_absolute->position_std, target_absolute->vel_std, target_absolute->acc_std); -} - -/** - * @brief Encode a target_absolute struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_absolute C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_absolute_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_target_absolute_t* target_absolute) -{ - return mavlink_msg_target_absolute_pack_chan(system_id, component_id, chan, msg, target_absolute->timestamp, target_absolute->id, target_absolute->sensor_capabilities, target_absolute->lat, target_absolute->lon, target_absolute->alt, target_absolute->vel, target_absolute->acc, target_absolute->q_target, target_absolute->rates, target_absolute->position_std, target_absolute->vel_std, target_absolute->acc_std); -} - -/** - * @brief Encode a target_absolute struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param target_absolute C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_absolute_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_target_absolute_t* target_absolute) -{ - return mavlink_msg_target_absolute_pack_status(system_id, component_id, _status, msg, target_absolute->timestamp, target_absolute->id, target_absolute->sensor_capabilities, target_absolute->lat, target_absolute->lon, target_absolute->alt, target_absolute->vel, target_absolute->acc, target_absolute->q_target, target_absolute->rates, target_absolute->position_std, target_absolute->vel_std, target_absolute->acc_std); -} - -/** - * @brief Send a target_absolute message - * @param chan MAVLink channel to send the message - * - * @param timestamp [us] Timestamp (UNIX epoch time). - * @param id The ID of the target if multiple targets are present - * @param sensor_capabilities Bitmap to indicate the sensor's reporting capabilities - * @param lat [degE7] Target's latitude (WGS84) - * @param lon [degE7] Target's longitude (WGS84) - * @param alt [m] Target's altitude (AMSL) - * @param vel [m/s] Target's velocity in its body frame - * @param acc [m/s/s] Linear target's acceleration in its body frame - * @param q_target Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - * @param rates [rad/s] Target's roll, pitch and yaw rates - * @param position_std [m] Standard deviation of horizontal (eph) and vertical (epv) position errors - * @param vel_std [m/s] Standard deviation of the target's velocity in its body frame - * @param acc_std [m/s/s] Standard deviation of the target's acceleration in its body frame - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_target_absolute_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t id, uint8_t sensor_capabilities, int32_t lat, int32_t lon, float alt, const float *vel, const float *acc, const float *q_target, const float *rates, const float *position_std, const float *vel_std, const float *acc_std) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_int32_t(buf, 8, lat); - _mav_put_int32_t(buf, 12, lon); - _mav_put_float(buf, 16, alt); - _mav_put_uint8_t(buf, 104, id); - _mav_put_uint8_t(buf, 105, sensor_capabilities); - _mav_put_float_array(buf, 20, vel, 3); - _mav_put_float_array(buf, 32, acc, 3); - _mav_put_float_array(buf, 44, q_target, 4); - _mav_put_float_array(buf, 60, rates, 3); - _mav_put_float_array(buf, 72, position_std, 2); - _mav_put_float_array(buf, 80, vel_std, 3); - _mav_put_float_array(buf, 92, acc_std, 3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE, buf, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#else - mavlink_target_absolute_t packet; - packet.timestamp = timestamp; - packet.lat = lat; - packet.lon = lon; - packet.alt = alt; - packet.id = id; - packet.sensor_capabilities = sensor_capabilities; - mav_array_memcpy(packet.vel, vel, sizeof(float)*3); - mav_array_memcpy(packet.acc, acc, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.rates, rates, sizeof(float)*3); - mav_array_memcpy(packet.position_std, position_std, sizeof(float)*2); - mav_array_memcpy(packet.vel_std, vel_std, sizeof(float)*3); - mav_array_memcpy(packet.acc_std, acc_std, sizeof(float)*3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE, (const char *)&packet, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#endif -} - -/** - * @brief Send a target_absolute message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_target_absolute_send_struct(mavlink_channel_t chan, const mavlink_target_absolute_t* target_absolute) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_target_absolute_send(chan, target_absolute->timestamp, target_absolute->id, target_absolute->sensor_capabilities, target_absolute->lat, target_absolute->lon, target_absolute->alt, target_absolute->vel, target_absolute->acc, target_absolute->q_target, target_absolute->rates, target_absolute->position_std, target_absolute->vel_std, target_absolute->acc_std); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE, (const char *)target_absolute, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#endif -} - -#if MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_target_absolute_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t id, uint8_t sensor_capabilities, int32_t lat, int32_t lon, float alt, const float *vel, const float *acc, const float *q_target, const float *rates, const float *position_std, const float *vel_std, const float *acc_std) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_int32_t(buf, 8, lat); - _mav_put_int32_t(buf, 12, lon); - _mav_put_float(buf, 16, alt); - _mav_put_uint8_t(buf, 104, id); - _mav_put_uint8_t(buf, 105, sensor_capabilities); - _mav_put_float_array(buf, 20, vel, 3); - _mav_put_float_array(buf, 32, acc, 3); - _mav_put_float_array(buf, 44, q_target, 4); - _mav_put_float_array(buf, 60, rates, 3); - _mav_put_float_array(buf, 72, position_std, 2); - _mav_put_float_array(buf, 80, vel_std, 3); - _mav_put_float_array(buf, 92, acc_std, 3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE, buf, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#else - mavlink_target_absolute_t *packet = (mavlink_target_absolute_t *)msgbuf; - packet->timestamp = timestamp; - packet->lat = lat; - packet->lon = lon; - packet->alt = alt; - packet->id = id; - packet->sensor_capabilities = sensor_capabilities; - mav_array_memcpy(packet->vel, vel, sizeof(float)*3); - mav_array_memcpy(packet->acc, acc, sizeof(float)*3); - mav_array_memcpy(packet->q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet->rates, rates, sizeof(float)*3); - mav_array_memcpy(packet->position_std, position_std, sizeof(float)*2); - mav_array_memcpy(packet->vel_std, vel_std, sizeof(float)*3); - mav_array_memcpy(packet->acc_std, acc_std, sizeof(float)*3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_ABSOLUTE, (const char *)packet, MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN, MAVLINK_MSG_ID_TARGET_ABSOLUTE_CRC); -#endif -} -#endif - -#endif - -// MESSAGE TARGET_ABSOLUTE UNPACKING - - -/** - * @brief Get field timestamp from target_absolute message - * - * @return [us] Timestamp (UNIX epoch time). - */ -static inline uint64_t mavlink_msg_target_absolute_get_timestamp(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field id from target_absolute message - * - * @return The ID of the target if multiple targets are present - */ -static inline uint8_t mavlink_msg_target_absolute_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 104); -} - -/** - * @brief Get field sensor_capabilities from target_absolute message - * - * @return Bitmap to indicate the sensor's reporting capabilities - */ -static inline uint8_t mavlink_msg_target_absolute_get_sensor_capabilities(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 105); -} - -/** - * @brief Get field lat from target_absolute message - * - * @return [degE7] Target's latitude (WGS84) - */ -static inline int32_t mavlink_msg_target_absolute_get_lat(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Get field lon from target_absolute message - * - * @return [degE7] Target's longitude (WGS84) - */ -static inline int32_t mavlink_msg_target_absolute_get_lon(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field alt from target_absolute message - * - * @return [m] Target's altitude (AMSL) - */ -static inline float mavlink_msg_target_absolute_get_alt(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field vel from target_absolute message - * - * @return [m/s] Target's velocity in its body frame - */ -static inline uint16_t mavlink_msg_target_absolute_get_vel(const mavlink_message_t* msg, float *vel) -{ - return _MAV_RETURN_float_array(msg, vel, 3, 20); -} - -/** - * @brief Get field acc from target_absolute message - * - * @return [m/s/s] Linear target's acceleration in its body frame - */ -static inline uint16_t mavlink_msg_target_absolute_get_acc(const mavlink_message_t* msg, float *acc) -{ - return _MAV_RETURN_float_array(msg, acc, 3, 32); -} - -/** - * @brief Get field q_target from target_absolute message - * - * @return Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - */ -static inline uint16_t mavlink_msg_target_absolute_get_q_target(const mavlink_message_t* msg, float *q_target) -{ - return _MAV_RETURN_float_array(msg, q_target, 4, 44); -} - -/** - * @brief Get field rates from target_absolute message - * - * @return [rad/s] Target's roll, pitch and yaw rates - */ -static inline uint16_t mavlink_msg_target_absolute_get_rates(const mavlink_message_t* msg, float *rates) -{ - return _MAV_RETURN_float_array(msg, rates, 3, 60); -} - -/** - * @brief Get field position_std from target_absolute message - * - * @return [m] Standard deviation of horizontal (eph) and vertical (epv) position errors - */ -static inline uint16_t mavlink_msg_target_absolute_get_position_std(const mavlink_message_t* msg, float *position_std) -{ - return _MAV_RETURN_float_array(msg, position_std, 2, 72); -} - -/** - * @brief Get field vel_std from target_absolute message - * - * @return [m/s] Standard deviation of the target's velocity in its body frame - */ -static inline uint16_t mavlink_msg_target_absolute_get_vel_std(const mavlink_message_t* msg, float *vel_std) -{ - return _MAV_RETURN_float_array(msg, vel_std, 3, 80); -} - -/** - * @brief Get field acc_std from target_absolute message - * - * @return [m/s/s] Standard deviation of the target's acceleration in its body frame - */ -static inline uint16_t mavlink_msg_target_absolute_get_acc_std(const mavlink_message_t* msg, float *acc_std) -{ - return _MAV_RETURN_float_array(msg, acc_std, 3, 92); -} - -/** - * @brief Decode a target_absolute message into a struct - * - * @param msg The message to decode - * @param target_absolute C-struct to decode the message contents into - */ -static inline void mavlink_msg_target_absolute_decode(const mavlink_message_t* msg, mavlink_target_absolute_t* target_absolute) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - target_absolute->timestamp = mavlink_msg_target_absolute_get_timestamp(msg); - target_absolute->lat = mavlink_msg_target_absolute_get_lat(msg); - target_absolute->lon = mavlink_msg_target_absolute_get_lon(msg); - target_absolute->alt = mavlink_msg_target_absolute_get_alt(msg); - mavlink_msg_target_absolute_get_vel(msg, target_absolute->vel); - mavlink_msg_target_absolute_get_acc(msg, target_absolute->acc); - mavlink_msg_target_absolute_get_q_target(msg, target_absolute->q_target); - mavlink_msg_target_absolute_get_rates(msg, target_absolute->rates); - mavlink_msg_target_absolute_get_position_std(msg, target_absolute->position_std); - mavlink_msg_target_absolute_get_vel_std(msg, target_absolute->vel_std); - mavlink_msg_target_absolute_get_acc_std(msg, target_absolute->acc_std); - target_absolute->id = mavlink_msg_target_absolute_get_id(msg); - target_absolute->sensor_capabilities = mavlink_msg_target_absolute_get_sensor_capabilities(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN? msg->len : MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN; - memset(target_absolute, 0, MAVLINK_MSG_ID_TARGET_ABSOLUTE_LEN); - memcpy(target_absolute, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_target_relative.h b/development/mavlink_msg_target_relative.h deleted file mode 100644 index 06109469f..000000000 --- a/development/mavlink_msg_target_relative.h +++ /dev/null @@ -1,532 +0,0 @@ -#pragma once -// MESSAGE TARGET_RELATIVE PACKING - -#define MAVLINK_MSG_ID_TARGET_RELATIVE 511 - - -typedef struct __mavlink_target_relative_t { - uint64_t timestamp; /*< [us] Timestamp (UNIX epoch time)*/ - float x; /*< [m] X Position of the target in TARGET_OBS_FRAME*/ - float y; /*< [m] Y Position of the target in TARGET_OBS_FRAME*/ - float z; /*< [m] Z Position of the target in TARGET_OBS_FRAME*/ - float pos_std[3]; /*< [m] Standard deviation of the target's position in TARGET_OBS_FRAME*/ - float yaw_std; /*< [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME*/ - float q_target[4]; /*< Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ - float q_sensor[4]; /*< Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0)*/ - uint8_t id; /*< The ID of the target if multiple targets are present*/ - uint8_t frame; /*< Coordinate frame used for following fields.*/ - uint8_t type; /*< Type of target*/ -} mavlink_target_relative_t; - -#define MAVLINK_MSG_ID_TARGET_RELATIVE_LEN 71 -#define MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN 71 -#define MAVLINK_MSG_ID_511_LEN 71 -#define MAVLINK_MSG_ID_511_MIN_LEN 71 - -#define MAVLINK_MSG_ID_TARGET_RELATIVE_CRC 28 -#define MAVLINK_MSG_ID_511_CRC 28 - -#define MAVLINK_MSG_TARGET_RELATIVE_FIELD_POS_STD_LEN 3 -#define MAVLINK_MSG_TARGET_RELATIVE_FIELD_Q_TARGET_LEN 4 -#define MAVLINK_MSG_TARGET_RELATIVE_FIELD_Q_SENSOR_LEN 4 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_TARGET_RELATIVE { \ - 511, \ - "TARGET_RELATIVE", \ - 11, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_target_relative_t, timestamp) }, \ - { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 68, offsetof(mavlink_target_relative_t, id) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 69, offsetof(mavlink_target_relative_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_target_relative_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_target_relative_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_target_relative_t, z) }, \ - { "pos_std", NULL, MAVLINK_TYPE_FLOAT, 3, 20, offsetof(mavlink_target_relative_t, pos_std) }, \ - { "yaw_std", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_target_relative_t, yaw_std) }, \ - { "q_target", NULL, MAVLINK_TYPE_FLOAT, 4, 36, offsetof(mavlink_target_relative_t, q_target) }, \ - { "q_sensor", NULL, MAVLINK_TYPE_FLOAT, 4, 52, offsetof(mavlink_target_relative_t, q_sensor) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 70, offsetof(mavlink_target_relative_t, type) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_TARGET_RELATIVE { \ - "TARGET_RELATIVE", \ - 11, \ - { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_target_relative_t, timestamp) }, \ - { "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 68, offsetof(mavlink_target_relative_t, id) }, \ - { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 69, offsetof(mavlink_target_relative_t, frame) }, \ - { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_target_relative_t, x) }, \ - { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_target_relative_t, y) }, \ - { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_target_relative_t, z) }, \ - { "pos_std", NULL, MAVLINK_TYPE_FLOAT, 3, 20, offsetof(mavlink_target_relative_t, pos_std) }, \ - { "yaw_std", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_target_relative_t, yaw_std) }, \ - { "q_target", NULL, MAVLINK_TYPE_FLOAT, 4, 36, offsetof(mavlink_target_relative_t, q_target) }, \ - { "q_sensor", NULL, MAVLINK_TYPE_FLOAT, 4, 52, offsetof(mavlink_target_relative_t, q_sensor) }, \ - { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 70, offsetof(mavlink_target_relative_t, type) }, \ - } \ -} -#endif - -/** - * @brief Pack a target_relative message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [us] Timestamp (UNIX epoch time) - * @param id The ID of the target if multiple targets are present - * @param frame Coordinate frame used for following fields. - * @param x [m] X Position of the target in TARGET_OBS_FRAME - * @param y [m] Y Position of the target in TARGET_OBS_FRAME - * @param z [m] Z Position of the target in TARGET_OBS_FRAME - * @param pos_std [m] Standard deviation of the target's position in TARGET_OBS_FRAME - * @param yaw_std [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME - * @param q_target Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param q_sensor Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param type Type of target - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_relative_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint64_t timestamp, uint8_t id, uint8_t frame, float x, float y, float z, const float *pos_std, float yaw_std, const float *q_target, const float *q_sensor, uint8_t type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_RELATIVE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, x); - _mav_put_float(buf, 12, y); - _mav_put_float(buf, 16, z); - _mav_put_float(buf, 32, yaw_std); - _mav_put_uint8_t(buf, 68, id); - _mav_put_uint8_t(buf, 69, frame); - _mav_put_uint8_t(buf, 70, type); - _mav_put_float_array(buf, 20, pos_std, 3); - _mav_put_float_array(buf, 36, q_target, 4); - _mav_put_float_array(buf, 52, q_sensor, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#else - mavlink_target_relative_t packet; - packet.timestamp = timestamp; - packet.x = x; - packet.y = y; - packet.z = z; - packet.yaw_std = yaw_std; - packet.id = id; - packet.frame = frame; - packet.type = type; - mav_array_memcpy(packet.pos_std, pos_std, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.q_sensor, q_sensor, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_RELATIVE; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -} - -/** - * @brief Pack a target_relative message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param timestamp [us] Timestamp (UNIX epoch time) - * @param id The ID of the target if multiple targets are present - * @param frame Coordinate frame used for following fields. - * @param x [m] X Position of the target in TARGET_OBS_FRAME - * @param y [m] Y Position of the target in TARGET_OBS_FRAME - * @param z [m] Z Position of the target in TARGET_OBS_FRAME - * @param pos_std [m] Standard deviation of the target's position in TARGET_OBS_FRAME - * @param yaw_std [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME - * @param q_target Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param q_sensor Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param type Type of target - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_relative_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint64_t timestamp, uint8_t id, uint8_t frame, float x, float y, float z, const float *pos_std, float yaw_std, const float *q_target, const float *q_sensor, uint8_t type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_RELATIVE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, x); - _mav_put_float(buf, 12, y); - _mav_put_float(buf, 16, z); - _mav_put_float(buf, 32, yaw_std); - _mav_put_uint8_t(buf, 68, id); - _mav_put_uint8_t(buf, 69, frame); - _mav_put_uint8_t(buf, 70, type); - _mav_put_float_array(buf, 20, pos_std, 3); - _mav_put_float_array(buf, 36, q_target, 4); - _mav_put_float_array(buf, 52, q_sensor, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#else - mavlink_target_relative_t packet; - packet.timestamp = timestamp; - packet.x = x; - packet.y = y; - packet.z = z; - packet.yaw_std = yaw_std; - packet.id = id; - packet.frame = frame; - packet.type = type; - mav_array_memcpy(packet.pos_std, pos_std, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.q_sensor, q_sensor, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_RELATIVE; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#endif -} - -/** - * @brief Pack a target_relative message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param timestamp [us] Timestamp (UNIX epoch time) - * @param id The ID of the target if multiple targets are present - * @param frame Coordinate frame used for following fields. - * @param x [m] X Position of the target in TARGET_OBS_FRAME - * @param y [m] Y Position of the target in TARGET_OBS_FRAME - * @param z [m] Z Position of the target in TARGET_OBS_FRAME - * @param pos_std [m] Standard deviation of the target's position in TARGET_OBS_FRAME - * @param yaw_std [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME - * @param q_target Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param q_sensor Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param type Type of target - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_target_relative_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint64_t timestamp,uint8_t id,uint8_t frame,float x,float y,float z,const float *pos_std,float yaw_std,const float *q_target,const float *q_sensor,uint8_t type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_RELATIVE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, x); - _mav_put_float(buf, 12, y); - _mav_put_float(buf, 16, z); - _mav_put_float(buf, 32, yaw_std); - _mav_put_uint8_t(buf, 68, id); - _mav_put_uint8_t(buf, 69, frame); - _mav_put_uint8_t(buf, 70, type); - _mav_put_float_array(buf, 20, pos_std, 3); - _mav_put_float_array(buf, 36, q_target, 4); - _mav_put_float_array(buf, 52, q_sensor, 4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#else - mavlink_target_relative_t packet; - packet.timestamp = timestamp; - packet.x = x; - packet.y = y; - packet.z = z; - packet.yaw_std = yaw_std; - packet.id = id; - packet.frame = frame; - packet.type = type; - mav_array_memcpy(packet.pos_std, pos_std, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.q_sensor, q_sensor, sizeof(float)*4); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_TARGET_RELATIVE; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -} - -/** - * @brief Encode a target_relative struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param target_relative C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_relative_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_target_relative_t* target_relative) -{ - return mavlink_msg_target_relative_pack(system_id, component_id, msg, target_relative->timestamp, target_relative->id, target_relative->frame, target_relative->x, target_relative->y, target_relative->z, target_relative->pos_std, target_relative->yaw_std, target_relative->q_target, target_relative->q_sensor, target_relative->type); -} - -/** - * @brief Encode a target_relative struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_relative C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_relative_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_target_relative_t* target_relative) -{ - return mavlink_msg_target_relative_pack_chan(system_id, component_id, chan, msg, target_relative->timestamp, target_relative->id, target_relative->frame, target_relative->x, target_relative->y, target_relative->z, target_relative->pos_std, target_relative->yaw_std, target_relative->q_target, target_relative->q_sensor, target_relative->type); -} - -/** - * @brief Encode a target_relative struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param target_relative C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_target_relative_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_target_relative_t* target_relative) -{ - return mavlink_msg_target_relative_pack_status(system_id, component_id, _status, msg, target_relative->timestamp, target_relative->id, target_relative->frame, target_relative->x, target_relative->y, target_relative->z, target_relative->pos_std, target_relative->yaw_std, target_relative->q_target, target_relative->q_sensor, target_relative->type); -} - -/** - * @brief Send a target_relative message - * @param chan MAVLink channel to send the message - * - * @param timestamp [us] Timestamp (UNIX epoch time) - * @param id The ID of the target if multiple targets are present - * @param frame Coordinate frame used for following fields. - * @param x [m] X Position of the target in TARGET_OBS_FRAME - * @param y [m] Y Position of the target in TARGET_OBS_FRAME - * @param z [m] Z Position of the target in TARGET_OBS_FRAME - * @param pos_std [m] Standard deviation of the target's position in TARGET_OBS_FRAME - * @param yaw_std [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME - * @param q_target Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param q_sensor Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - * @param type Type of target - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_target_relative_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t id, uint8_t frame, float x, float y, float z, const float *pos_std, float yaw_std, const float *q_target, const float *q_sensor, uint8_t type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_TARGET_RELATIVE_LEN]; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, x); - _mav_put_float(buf, 12, y); - _mav_put_float(buf, 16, z); - _mav_put_float(buf, 32, yaw_std); - _mav_put_uint8_t(buf, 68, id); - _mav_put_uint8_t(buf, 69, frame); - _mav_put_uint8_t(buf, 70, type); - _mav_put_float_array(buf, 20, pos_std, 3); - _mav_put_float_array(buf, 36, q_target, 4); - _mav_put_float_array(buf, 52, q_sensor, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_RELATIVE, buf, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#else - mavlink_target_relative_t packet; - packet.timestamp = timestamp; - packet.x = x; - packet.y = y; - packet.z = z; - packet.yaw_std = yaw_std; - packet.id = id; - packet.frame = frame; - packet.type = type; - mav_array_memcpy(packet.pos_std, pos_std, sizeof(float)*3); - mav_array_memcpy(packet.q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet.q_sensor, q_sensor, sizeof(float)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_RELATIVE, (const char *)&packet, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#endif -} - -/** - * @brief Send a target_relative message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_target_relative_send_struct(mavlink_channel_t chan, const mavlink_target_relative_t* target_relative) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_target_relative_send(chan, target_relative->timestamp, target_relative->id, target_relative->frame, target_relative->x, target_relative->y, target_relative->z, target_relative->pos_std, target_relative->yaw_std, target_relative->q_target, target_relative->q_sensor, target_relative->type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_RELATIVE, (const char *)target_relative, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#endif -} - -#if MAVLINK_MSG_ID_TARGET_RELATIVE_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_target_relative_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t id, uint8_t frame, float x, float y, float z, const float *pos_std, float yaw_std, const float *q_target, const float *q_sensor, uint8_t type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint64_t(buf, 0, timestamp); - _mav_put_float(buf, 8, x); - _mav_put_float(buf, 12, y); - _mav_put_float(buf, 16, z); - _mav_put_float(buf, 32, yaw_std); - _mav_put_uint8_t(buf, 68, id); - _mav_put_uint8_t(buf, 69, frame); - _mav_put_uint8_t(buf, 70, type); - _mav_put_float_array(buf, 20, pos_std, 3); - _mav_put_float_array(buf, 36, q_target, 4); - _mav_put_float_array(buf, 52, q_sensor, 4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_RELATIVE, buf, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#else - mavlink_target_relative_t *packet = (mavlink_target_relative_t *)msgbuf; - packet->timestamp = timestamp; - packet->x = x; - packet->y = y; - packet->z = z; - packet->yaw_std = yaw_std; - packet->id = id; - packet->frame = frame; - packet->type = type; - mav_array_memcpy(packet->pos_std, pos_std, sizeof(float)*3); - mav_array_memcpy(packet->q_target, q_target, sizeof(float)*4); - mav_array_memcpy(packet->q_sensor, q_sensor, sizeof(float)*4); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TARGET_RELATIVE, (const char *)packet, MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN, MAVLINK_MSG_ID_TARGET_RELATIVE_CRC); -#endif -} -#endif - -#endif - -// MESSAGE TARGET_RELATIVE UNPACKING - - -/** - * @brief Get field timestamp from target_relative message - * - * @return [us] Timestamp (UNIX epoch time) - */ -static inline uint64_t mavlink_msg_target_relative_get_timestamp(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint64_t(msg, 0); -} - -/** - * @brief Get field id from target_relative message - * - * @return The ID of the target if multiple targets are present - */ -static inline uint8_t mavlink_msg_target_relative_get_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 68); -} - -/** - * @brief Get field frame from target_relative message - * - * @return Coordinate frame used for following fields. - */ -static inline uint8_t mavlink_msg_target_relative_get_frame(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 69); -} - -/** - * @brief Get field x from target_relative message - * - * @return [m] X Position of the target in TARGET_OBS_FRAME - */ -static inline float mavlink_msg_target_relative_get_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field y from target_relative message - * - * @return [m] Y Position of the target in TARGET_OBS_FRAME - */ -static inline float mavlink_msg_target_relative_get_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field z from target_relative message - * - * @return [m] Z Position of the target in TARGET_OBS_FRAME - */ -static inline float mavlink_msg_target_relative_get_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field pos_std from target_relative message - * - * @return [m] Standard deviation of the target's position in TARGET_OBS_FRAME - */ -static inline uint16_t mavlink_msg_target_relative_get_pos_std(const mavlink_message_t* msg, float *pos_std) -{ - return _MAV_RETURN_float_array(msg, pos_std, 3, 20); -} - -/** - * @brief Get field yaw_std from target_relative message - * - * @return [rad] Standard deviation of the target's orientation in TARGET_OBS_FRAME - */ -static inline float mavlink_msg_target_relative_get_yaw_std(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 32); -} - -/** - * @brief Get field q_target from target_relative message - * - * @return Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - */ -static inline uint16_t mavlink_msg_target_relative_get_q_target(const mavlink_message_t* msg, float *q_target) -{ - return _MAV_RETURN_float_array(msg, q_target, 4, 36); -} - -/** - * @brief Get field q_sensor from target_relative message - * - * @return Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - */ -static inline uint16_t mavlink_msg_target_relative_get_q_sensor(const mavlink_message_t* msg, float *q_sensor) -{ - return _MAV_RETURN_float_array(msg, q_sensor, 4, 52); -} - -/** - * @brief Get field type from target_relative message - * - * @return Type of target - */ -static inline uint8_t mavlink_msg_target_relative_get_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 70); -} - -/** - * @brief Decode a target_relative message into a struct - * - * @param msg The message to decode - * @param target_relative C-struct to decode the message contents into - */ -static inline void mavlink_msg_target_relative_decode(const mavlink_message_t* msg, mavlink_target_relative_t* target_relative) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - target_relative->timestamp = mavlink_msg_target_relative_get_timestamp(msg); - target_relative->x = mavlink_msg_target_relative_get_x(msg); - target_relative->y = mavlink_msg_target_relative_get_y(msg); - target_relative->z = mavlink_msg_target_relative_get_z(msg); - mavlink_msg_target_relative_get_pos_std(msg, target_relative->pos_std); - target_relative->yaw_std = mavlink_msg_target_relative_get_yaw_std(msg); - mavlink_msg_target_relative_get_q_target(msg, target_relative->q_target); - mavlink_msg_target_relative_get_q_sensor(msg, target_relative->q_sensor); - target_relative->id = mavlink_msg_target_relative_get_id(msg); - target_relative->frame = mavlink_msg_target_relative_get_frame(msg); - target_relative->type = mavlink_msg_target_relative_get_type(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_TARGET_RELATIVE_LEN? msg->len : MAVLINK_MSG_ID_TARGET_RELATIVE_LEN; - memset(target_relative, 0, MAVLINK_MSG_ID_TARGET_RELATIVE_LEN); - memcpy(target_relative, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_velocity_limits.h b/development/mavlink_msg_velocity_limits.h deleted file mode 100644 index 3ef48cc9d..000000000 --- a/development/mavlink_msg_velocity_limits.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE VELOCITY_LIMITS PACKING - -#define MAVLINK_MSG_ID_VELOCITY_LIMITS 355 - - -typedef struct __mavlink_velocity_limits_t { - float horizontal_speed_limit; /*< [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied*/ - float vertical_speed_limit; /*< [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied*/ - float yaw_rate_limit; /*< [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied*/ -} mavlink_velocity_limits_t; - -#define MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN 12 -#define MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN 12 -#define MAVLINK_MSG_ID_355_LEN 12 -#define MAVLINK_MSG_ID_355_MIN_LEN 12 - -#define MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC 6 -#define MAVLINK_MSG_ID_355_CRC 6 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_VELOCITY_LIMITS { \ - 355, \ - "VELOCITY_LIMITS", \ - 3, \ - { { "horizontal_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_velocity_limits_t, horizontal_speed_limit) }, \ - { "vertical_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_velocity_limits_t, vertical_speed_limit) }, \ - { "yaw_rate_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_velocity_limits_t, yaw_rate_limit) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_VELOCITY_LIMITS { \ - "VELOCITY_LIMITS", \ - 3, \ - { { "horizontal_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_velocity_limits_t, horizontal_speed_limit) }, \ - { "vertical_speed_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_velocity_limits_t, vertical_speed_limit) }, \ - { "yaw_rate_limit", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_velocity_limits_t, yaw_rate_limit) }, \ - } \ -} -#endif - -/** - * @brief Pack a velocity_limits message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_velocity_limits_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#else - mavlink_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_VELOCITY_LIMITS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -} - -/** - * @brief Pack a velocity_limits message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_velocity_limits_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#else - mavlink_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_VELOCITY_LIMITS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#endif -} - -/** - * @brief Pack a velocity_limits message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_velocity_limits_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float horizontal_speed_limit,float vertical_speed_limit,float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#else - mavlink_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_VELOCITY_LIMITS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -} - -/** - * @brief Encode a velocity_limits struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_velocity_limits_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_velocity_limits_t* velocity_limits) -{ - return mavlink_msg_velocity_limits_pack(system_id, component_id, msg, velocity_limits->horizontal_speed_limit, velocity_limits->vertical_speed_limit, velocity_limits->yaw_rate_limit); -} - -/** - * @brief Encode a velocity_limits struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_velocity_limits_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_velocity_limits_t* velocity_limits) -{ - return mavlink_msg_velocity_limits_pack_chan(system_id, component_id, chan, msg, velocity_limits->horizontal_speed_limit, velocity_limits->vertical_speed_limit, velocity_limits->yaw_rate_limit); -} - -/** - * @brief Encode a velocity_limits struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param velocity_limits C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_velocity_limits_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_velocity_limits_t* velocity_limits) -{ - return mavlink_msg_velocity_limits_pack_status(system_id, component_id, _status, msg, velocity_limits->horizontal_speed_limit, velocity_limits->vertical_speed_limit, velocity_limits->yaw_rate_limit); -} - -/** - * @brief Send a velocity_limits message - * @param chan MAVLink channel to send the message - * - * @param horizontal_speed_limit [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param vertical_speed_limit [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - * @param yaw_rate_limit [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_velocity_limits_send(mavlink_channel_t chan, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN]; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VELOCITY_LIMITS, buf, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#else - mavlink_velocity_limits_t packet; - packet.horizontal_speed_limit = horizontal_speed_limit; - packet.vertical_speed_limit = vertical_speed_limit; - packet.yaw_rate_limit = yaw_rate_limit; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VELOCITY_LIMITS, (const char *)&packet, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#endif -} - -/** - * @brief Send a velocity_limits message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_velocity_limits_send_struct(mavlink_channel_t chan, const mavlink_velocity_limits_t* velocity_limits) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_velocity_limits_send(chan, velocity_limits->horizontal_speed_limit, velocity_limits->vertical_speed_limit, velocity_limits->yaw_rate_limit); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VELOCITY_LIMITS, (const char *)velocity_limits, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_velocity_limits_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float horizontal_speed_limit, float vertical_speed_limit, float yaw_rate_limit) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, horizontal_speed_limit); - _mav_put_float(buf, 4, vertical_speed_limit); - _mav_put_float(buf, 8, yaw_rate_limit); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VELOCITY_LIMITS, buf, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#else - mavlink_velocity_limits_t *packet = (mavlink_velocity_limits_t *)msgbuf; - packet->horizontal_speed_limit = horizontal_speed_limit; - packet->vertical_speed_limit = vertical_speed_limit; - packet->yaw_rate_limit = yaw_rate_limit; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VELOCITY_LIMITS, (const char *)packet, MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN, MAVLINK_MSG_ID_VELOCITY_LIMITS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE VELOCITY_LIMITS UNPACKING - - -/** - * @brief Get field horizontal_speed_limit from velocity_limits message - * - * @return [m/s] Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - */ -static inline float mavlink_msg_velocity_limits_get_horizontal_speed_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field vertical_speed_limit from velocity_limits message - * - * @return [m/s] Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - */ -static inline float mavlink_msg_velocity_limits_get_vertical_speed_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field yaw_rate_limit from velocity_limits message - * - * @return [rad/s] Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - */ -static inline float mavlink_msg_velocity_limits_get_yaw_rate_limit(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Decode a velocity_limits message into a struct - * - * @param msg The message to decode - * @param velocity_limits C-struct to decode the message contents into - */ -static inline void mavlink_msg_velocity_limits_decode(const mavlink_message_t* msg, mavlink_velocity_limits_t* velocity_limits) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - velocity_limits->horizontal_speed_limit = mavlink_msg_velocity_limits_get_horizontal_speed_limit(msg); - velocity_limits->vertical_speed_limit = mavlink_msg_velocity_limits_get_vertical_speed_limit(msg); - velocity_limits->yaw_rate_limit = mavlink_msg_velocity_limits_get_yaw_rate_limit(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN? msg->len : MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN; - memset(velocity_limits, 0, MAVLINK_MSG_ID_VELOCITY_LIMITS_LEN); - memcpy(velocity_limits, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/mavlink_msg_wifi_network_info.h b/development/mavlink_msg_wifi_network_info.h deleted file mode 100644 index 958963f97..000000000 --- a/development/mavlink_msg_wifi_network_info.h +++ /dev/null @@ -1,362 +0,0 @@ -#pragma once -// MESSAGE WIFI_NETWORK_INFO PACKING - -#define MAVLINK_MSG_ID_WIFI_NETWORK_INFO 298 - - -typedef struct __mavlink_wifi_network_info_t { - uint16_t data_rate; /*< [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied.*/ - char ssid[32]; /*< Name of Wi-Fi network (SSID).*/ - uint8_t channel_id; /*< WiFi network operating channel ID. Set to 0 if unknown or unidentified.*/ - uint8_t signal_quality; /*< [%] WiFi network signal quality.*/ - uint8_t security; /*< WiFi network security type.*/ -} mavlink_wifi_network_info_t; - -#define MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN 37 -#define MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN 37 -#define MAVLINK_MSG_ID_298_LEN 37 -#define MAVLINK_MSG_ID_298_MIN_LEN 37 - -#define MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC 237 -#define MAVLINK_MSG_ID_298_CRC 237 - -#define MAVLINK_MSG_WIFI_NETWORK_INFO_FIELD_SSID_LEN 32 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_WIFI_NETWORK_INFO { \ - 298, \ - "WIFI_NETWORK_INFO", \ - 5, \ - { { "ssid", NULL, MAVLINK_TYPE_CHAR, 32, 2, offsetof(mavlink_wifi_network_info_t, ssid) }, \ - { "channel_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_wifi_network_info_t, channel_id) }, \ - { "signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_wifi_network_info_t, signal_quality) }, \ - { "data_rate", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_wifi_network_info_t, data_rate) }, \ - { "security", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_wifi_network_info_t, security) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_WIFI_NETWORK_INFO { \ - "WIFI_NETWORK_INFO", \ - 5, \ - { { "ssid", NULL, MAVLINK_TYPE_CHAR, 32, 2, offsetof(mavlink_wifi_network_info_t, ssid) }, \ - { "channel_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_wifi_network_info_t, channel_id) }, \ - { "signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_wifi_network_info_t, signal_quality) }, \ - { "data_rate", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_wifi_network_info_t, data_rate) }, \ - { "security", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_wifi_network_info_t, security) }, \ - } \ -} -#endif - -/** - * @brief Pack a wifi_network_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param ssid Name of Wi-Fi network (SSID). - * @param channel_id WiFi network operating channel ID. Set to 0 if unknown or unidentified. - * @param signal_quality [%] WiFi network signal quality. - * @param data_rate [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - * @param security WiFi network security type. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_wifi_network_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - const char *ssid, uint8_t channel_id, uint8_t signal_quality, uint16_t data_rate, uint8_t security) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN]; - _mav_put_uint16_t(buf, 0, data_rate); - _mav_put_uint8_t(buf, 34, channel_id); - _mav_put_uint8_t(buf, 35, signal_quality); - _mav_put_uint8_t(buf, 36, security); - _mav_put_char_array(buf, 2, ssid, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#else - mavlink_wifi_network_info_t packet; - packet.data_rate = data_rate; - packet.channel_id = channel_id; - packet.signal_quality = signal_quality; - packet.security = security; - mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_WIFI_NETWORK_INFO; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -} - -/** - * @brief Pack a wifi_network_info message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param ssid Name of Wi-Fi network (SSID). - * @param channel_id WiFi network operating channel ID. Set to 0 if unknown or unidentified. - * @param signal_quality [%] WiFi network signal quality. - * @param data_rate [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - * @param security WiFi network security type. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_wifi_network_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - const char *ssid, uint8_t channel_id, uint8_t signal_quality, uint16_t data_rate, uint8_t security) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN]; - _mav_put_uint16_t(buf, 0, data_rate); - _mav_put_uint8_t(buf, 34, channel_id); - _mav_put_uint8_t(buf, 35, signal_quality); - _mav_put_uint8_t(buf, 36, security); - _mav_put_char_array(buf, 2, ssid, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#else - mavlink_wifi_network_info_t packet; - packet.data_rate = data_rate; - packet.channel_id = channel_id; - packet.signal_quality = signal_quality; - packet.security = security; - mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_WIFI_NETWORK_INFO; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#endif -} - -/** - * @brief Pack a wifi_network_info message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param ssid Name of Wi-Fi network (SSID). - * @param channel_id WiFi network operating channel ID. Set to 0 if unknown or unidentified. - * @param signal_quality [%] WiFi network signal quality. - * @param data_rate [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - * @param security WiFi network security type. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_wifi_network_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - const char *ssid,uint8_t channel_id,uint8_t signal_quality,uint16_t data_rate,uint8_t security) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN]; - _mav_put_uint16_t(buf, 0, data_rate); - _mav_put_uint8_t(buf, 34, channel_id); - _mav_put_uint8_t(buf, 35, signal_quality); - _mav_put_uint8_t(buf, 36, security); - _mav_put_char_array(buf, 2, ssid, 32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#else - mavlink_wifi_network_info_t packet; - packet.data_rate = data_rate; - packet.channel_id = channel_id; - packet.signal_quality = signal_quality; - packet.security = security; - mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_WIFI_NETWORK_INFO; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -} - -/** - * @brief Encode a wifi_network_info struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param wifi_network_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_wifi_network_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_wifi_network_info_t* wifi_network_info) -{ - return mavlink_msg_wifi_network_info_pack(system_id, component_id, msg, wifi_network_info->ssid, wifi_network_info->channel_id, wifi_network_info->signal_quality, wifi_network_info->data_rate, wifi_network_info->security); -} - -/** - * @brief Encode a wifi_network_info struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param wifi_network_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_wifi_network_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_wifi_network_info_t* wifi_network_info) -{ - return mavlink_msg_wifi_network_info_pack_chan(system_id, component_id, chan, msg, wifi_network_info->ssid, wifi_network_info->channel_id, wifi_network_info->signal_quality, wifi_network_info->data_rate, wifi_network_info->security); -} - -/** - * @brief Encode a wifi_network_info struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param wifi_network_info C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_wifi_network_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_wifi_network_info_t* wifi_network_info) -{ - return mavlink_msg_wifi_network_info_pack_status(system_id, component_id, _status, msg, wifi_network_info->ssid, wifi_network_info->channel_id, wifi_network_info->signal_quality, wifi_network_info->data_rate, wifi_network_info->security); -} - -/** - * @brief Send a wifi_network_info message - * @param chan MAVLink channel to send the message - * - * @param ssid Name of Wi-Fi network (SSID). - * @param channel_id WiFi network operating channel ID. Set to 0 if unknown or unidentified. - * @param signal_quality [%] WiFi network signal quality. - * @param data_rate [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - * @param security WiFi network security type. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_wifi_network_info_send(mavlink_channel_t chan, const char *ssid, uint8_t channel_id, uint8_t signal_quality, uint16_t data_rate, uint8_t security) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN]; - _mav_put_uint16_t(buf, 0, data_rate); - _mav_put_uint8_t(buf, 34, channel_id); - _mav_put_uint8_t(buf, 35, signal_quality); - _mav_put_uint8_t(buf, 36, security); - _mav_put_char_array(buf, 2, ssid, 32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO, buf, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#else - mavlink_wifi_network_info_t packet; - packet.data_rate = data_rate; - packet.channel_id = channel_id; - packet.signal_quality = signal_quality; - packet.security = security; - mav_array_memcpy(packet.ssid, ssid, sizeof(char)*32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO, (const char *)&packet, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#endif -} - -/** - * @brief Send a wifi_network_info message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_wifi_network_info_send_struct(mavlink_channel_t chan, const mavlink_wifi_network_info_t* wifi_network_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_wifi_network_info_send(chan, wifi_network_info->ssid, wifi_network_info->channel_id, wifi_network_info->signal_quality, wifi_network_info->data_rate, wifi_network_info->security); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO, (const char *)wifi_network_info, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#endif -} - -#if MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_wifi_network_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const char *ssid, uint8_t channel_id, uint8_t signal_quality, uint16_t data_rate, uint8_t security) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, data_rate); - _mav_put_uint8_t(buf, 34, channel_id); - _mav_put_uint8_t(buf, 35, signal_quality); - _mav_put_uint8_t(buf, 36, security); - _mav_put_char_array(buf, 2, ssid, 32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO, buf, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#else - mavlink_wifi_network_info_t *packet = (mavlink_wifi_network_info_t *)msgbuf; - packet->data_rate = data_rate; - packet->channel_id = channel_id; - packet->signal_quality = signal_quality; - packet->security = security; - mav_array_memcpy(packet->ssid, ssid, sizeof(char)*32); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_WIFI_NETWORK_INFO, (const char *)packet, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_CRC); -#endif -} -#endif - -#endif - -// MESSAGE WIFI_NETWORK_INFO UNPACKING - - -/** - * @brief Get field ssid from wifi_network_info message - * - * @return Name of Wi-Fi network (SSID). - */ -static inline uint16_t mavlink_msg_wifi_network_info_get_ssid(const mavlink_message_t* msg, char *ssid) -{ - return _MAV_RETURN_char_array(msg, ssid, 32, 2); -} - -/** - * @brief Get field channel_id from wifi_network_info message - * - * @return WiFi network operating channel ID. Set to 0 if unknown or unidentified. - */ -static inline uint8_t mavlink_msg_wifi_network_info_get_channel_id(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 34); -} - -/** - * @brief Get field signal_quality from wifi_network_info message - * - * @return [%] WiFi network signal quality. - */ -static inline uint8_t mavlink_msg_wifi_network_info_get_signal_quality(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 35); -} - -/** - * @brief Get field data_rate from wifi_network_info message - * - * @return [MiB/s] WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - */ -static inline uint16_t mavlink_msg_wifi_network_info_get_data_rate(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field security from wifi_network_info message - * - * @return WiFi network security type. - */ -static inline uint8_t mavlink_msg_wifi_network_info_get_security(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 36); -} - -/** - * @brief Decode a wifi_network_info message into a struct - * - * @param msg The message to decode - * @param wifi_network_info C-struct to decode the message contents into - */ -static inline void mavlink_msg_wifi_network_info_decode(const mavlink_message_t* msg, mavlink_wifi_network_info_t* wifi_network_info) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - wifi_network_info->data_rate = mavlink_msg_wifi_network_info_get_data_rate(msg); - mavlink_msg_wifi_network_info_get_ssid(msg, wifi_network_info->ssid); - wifi_network_info->channel_id = mavlink_msg_wifi_network_info_get_channel_id(msg); - wifi_network_info->signal_quality = mavlink_msg_wifi_network_info_get_signal_quality(msg); - wifi_network_info->security = mavlink_msg_wifi_network_info_get_security(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN? msg->len : MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN; - memset(wifi_network_info, 0, MAVLINK_MSG_ID_WIFI_NETWORK_INFO_LEN); - memcpy(wifi_network_info, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/development/testsuite.h b/development/testsuite.h index eeae938b9..ae3236b90 100644 --- a/development/testsuite.h +++ b/development/testsuite.h @@ -12,62 +12,58 @@ extern "C" { #ifndef MAVLINK_TEST_ALL #define MAVLINK_TEST_ALL -static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_development(uint8_t, uint8_t, mavlink_message_t *last_msg); static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) { - mavlink_test_common(system_id, component_id, last_msg); + mavlink_test_standard(system_id, component_id, last_msg); mavlink_test_development(system_id, component_id, last_msg); } #endif -#include "../common/testsuite.h" +#include "../standard/testsuite.h" -static void mavlink_test_param_ack_transaction(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +static void mavlink_test_mission_checksum(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) { #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_MISSION_CHECKSUM >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_param_ack_transaction_t packet_in = { - 17.0,17,84,"GHIJKLMNOPQRSTU",199,10 + mavlink_mission_checksum_t packet_in = { + 963497464,17 }; - mavlink_param_ack_transaction_t packet1, packet2; + mavlink_mission_checksum_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.param_value = packet_in.param_value; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.param_type = packet_in.param_type; - packet1.param_result = packet_in.param_result; + packet1.checksum = packet_in.checksum; + packet1.mission_type = packet_in.mission_type; - mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PARAM_ACK_TRANSACTION_MIN_LEN); + memset(MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_MISSION_CHECKSUM_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_ack_transaction_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_param_ack_transaction_decode(&msg, &packet2); + mavlink_msg_mission_checksum_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_mission_checksum_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_ack_transaction_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_result ); - mavlink_msg_param_ack_transaction_decode(&msg, &packet2); + mavlink_msg_mission_checksum_pack(system_id, component_id, &msg , packet1.mission_type , packet1.checksum ); + mavlink_msg_mission_checksum_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_ack_transaction_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_value , packet1.param_type , packet1.param_result ); - mavlink_msg_param_ack_transaction_decode(&msg, &packet2); + mavlink_msg_mission_checksum_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.mission_type , packet1.checksum ); + mavlink_msg_mission_checksum_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -75,17 +71,17 @@ static void mavlink_test_param_ack_transaction(uint8_t system_id, uint8_t compon for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_WIFI_NETWORK_INFO >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_wifi_network_info_t packet_in = { - 17235,"CDEFGHIJKLMNOPQRSTUVWXYZABCDEFG",235,46,113 - }; - mavlink_wifi_network_info_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.data_rate = packet_in.data_rate; - packet1.channel_id = packet_in.channel_id; - packet1.signal_quality = packet_in.signal_quality; - packet1.security = packet_in.security; - - mav_array_memcpy(packet1.ssid, packet_in.ssid, sizeof(char)*32); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_WIFI_NETWORK_INFO_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_wifi_network_info_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_wifi_network_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_wifi_network_info_pack(system_id, component_id, &msg , packet1.ssid , packet1.channel_id , packet1.signal_quality , packet1.data_rate , packet1.security ); - mavlink_msg_wifi_network_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_wifi_network_info_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.ssid , packet1.channel_id , packet1.signal_quality , packet1.data_rate , packet1.security ); - mavlink_msg_wifi_network_info_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SET_VELOCITY_LIMITS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RADIO_RC_CHANNELS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_set_velocity_limits_t packet_in = { - 17.0,45.0,73.0,41,108 + mavlink_radio_rc_channels_t packet_in = { + 963497464,17443,151,218,29,{ 17703, 17704, 17705, 17706, 17707, 17708, 17709, 17710, 17711, 17712, 17713, 17714, 17715, 17716, 17717, 17718, 17719, 17720, 17721, 17722, 17723, 17724, 17725, 17726, 17727, 17728, 17729, 17730, 17731, 17732, 17733, 17734 } }; - mavlink_set_velocity_limits_t packet1, packet2; + mavlink_radio_rc_channels_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.horizontal_speed_limit = packet_in.horizontal_speed_limit; - packet1.vertical_speed_limit = packet_in.vertical_speed_limit; - packet1.yaw_rate_limit = packet_in.yaw_rate_limit; + packet1.time_last_update_ms = packet_in.time_last_update_ms; + packet1.flags = packet_in.flags; packet1.target_system = packet_in.target_system; packet1.target_component = packet_in.target_component; + packet1.count = packet_in.count; + mav_array_memcpy(packet1.channels, packet_in.channels, sizeof(int16_t)*32); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SET_VELOCITY_LIMITS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_velocity_limits_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_set_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_velocity_limits_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.horizontal_speed_limit , packet1.vertical_speed_limit , packet1.yaw_rate_limit ); - mavlink_msg_set_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_set_velocity_limits_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.horizontal_speed_limit , packet1.vertical_speed_limit , packet1.yaw_rate_limit ); - mavlink_msg_set_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_VELOCITY_LIMITS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_velocity_limits_t packet_in = { - 17.0,45.0,73.0 - }; - mavlink_velocity_limits_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.horizontal_speed_limit = packet_in.horizontal_speed_limit; - packet1.vertical_speed_limit = packet_in.vertical_speed_limit; - packet1.yaw_rate_limit = packet_in.yaw_rate_limit; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_VELOCITY_LIMITS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_velocity_limits_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_velocity_limits_pack(system_id, component_id, &msg , packet1.horizontal_speed_limit , packet1.vertical_speed_limit , packet1.yaw_rate_limit ); - mavlink_msg_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_velocity_limits_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.horizontal_speed_limit , packet1.vertical_speed_limit , packet1.yaw_rate_limit ); - mavlink_msg_velocity_limits_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_figure_eight_execution_status_t packet_in = { - 93372036854775807ULL,73.0,101.0,129.0,963498504,963498712,213.0,101 - }; - mavlink_figure_eight_execution_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.major_radius = packet_in.major_radius; - packet1.minor_radius = packet_in.minor_radius; - packet1.orientation = packet_in.orientation; - packet1.x = packet_in.x; - packet1.y = packet_in.y; - packet1.z = packet_in.z; - packet1.frame = packet_in.frame; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FIGURE_EIGHT_EXECUTION_STATUS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_figure_eight_execution_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_figure_eight_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_figure_eight_execution_status_pack(system_id, component_id, &msg , packet1.time_usec , packet1.major_radius , packet1.minor_radius , packet1.orientation , packet1.frame , packet1.x , packet1.y , packet1.z ); - mavlink_msg_figure_eight_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_figure_eight_execution_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_usec , packet1.major_radius , packet1.minor_radius , packet1.orientation , packet1.frame , packet1.x , packet1.y , packet1.z ); - mavlink_msg_figure_eight_execution_status_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_BATTERY_STATUS_V2 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_battery_status_v2_t packet_in = { - 17.0,45.0,73.0,101.0,963498296,18275,199,10 - }; - mavlink_battery_status_v2_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.voltage = packet_in.voltage; - packet1.current = packet_in.current; - packet1.capacity_consumed = packet_in.capacity_consumed; - packet1.capacity_remaining = packet_in.capacity_remaining; - packet1.status_flags = packet_in.status_flags; - packet1.temperature = packet_in.temperature; - packet1.id = packet_in.id; - packet1.percent_remaining = packet_in.percent_remaining; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_BATTERY_STATUS_V2_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_status_v2_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_battery_status_v2_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_status_v2_pack(system_id, component_id, &msg , packet1.id , packet1.temperature , packet1.voltage , packet1.current , packet1.capacity_consumed , packet1.capacity_remaining , packet1.percent_remaining , packet1.status_flags ); - mavlink_msg_battery_status_v2_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_battery_status_v2_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.temperature , packet1.voltage , packet1.current , packet1.capacity_consumed , packet1.capacity_remaining , packet1.percent_remaining , packet1.status_flags ); - mavlink_msg_battery_status_v2_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FUEL_STATUS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_fuel_status_t packet_in = { - 17.0,45.0,73.0,101.0,129.0,963498504,77,144 - }; - mavlink_fuel_status_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.maximum_fuel = packet_in.maximum_fuel; - packet1.consumed_fuel = packet_in.consumed_fuel; - packet1.remaining_fuel = packet_in.remaining_fuel; - packet1.flow_rate = packet_in.flow_rate; - packet1.temperature = packet_in.temperature; - packet1.fuel_type = packet_in.fuel_type; - packet1.id = packet_in.id; - packet1.percent_remaining = packet_in.percent_remaining; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FUEL_STATUS_MIN_LEN); + memset(MAVLINK_MSG_ID_RADIO_RC_CHANNELS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RADIO_RC_CHANNELS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_fuel_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_fuel_status_decode(&msg, &packet2); + mavlink_msg_radio_rc_channels_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_radio_rc_channels_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_fuel_status_pack(system_id, component_id, &msg , packet1.id , packet1.maximum_fuel , packet1.consumed_fuel , packet1.remaining_fuel , packet1.percent_remaining , packet1.flow_rate , packet1.temperature , packet1.fuel_type ); - mavlink_msg_fuel_status_decode(&msg, &packet2); + mavlink_msg_radio_rc_channels_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.time_last_update_ms , packet1.flags , packet1.count , packet1.channels ); + mavlink_msg_radio_rc_channels_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_fuel_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.maximum_fuel , packet1.consumed_fuel , packet1.remaining_fuel , packet1.percent_remaining , packet1.flow_rate , packet1.temperature , packet1.fuel_type ); - mavlink_msg_fuel_status_decode(&msg, &packet2); + mavlink_msg_radio_rc_channels_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.time_last_update_ms , packet1.flags , packet1.count , packet1.channels ); + mavlink_msg_radio_rc_channels_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -523,198 +198,12 @@ static void mavlink_test_fuel_status(uint8_t system_id, uint8_t component_id, ma for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GROUP_START >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_group_start_t packet_in = { - 93372036854775807ULL,963497880,963498088 - }; - mavlink_group_start_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.group_id = packet_in.group_id; - packet1.mission_checksum = packet_in.mission_checksum; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_GROUP_START_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GROUP_START_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_start_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_group_start_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_start_pack(system_id, component_id, &msg , packet1.group_id , packet1.mission_checksum , packet1.time_usec ); - mavlink_msg_group_start_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_start_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.group_id , packet1.mission_checksum , packet1.time_usec ); - mavlink_msg_group_start_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GROUP_END >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_group_end_t packet_in = { - 93372036854775807ULL,963497880,963498088 - }; - mavlink_group_end_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_usec = packet_in.time_usec; - packet1.group_id = packet_in.group_id; - packet1.mission_checksum = packet_in.mission_checksum; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_GROUP_END_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GROUP_END_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_end_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_group_end_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_end_pack(system_id, component_id, &msg , packet1.group_id , packet1.mission_checksum , packet1.time_usec ); - mavlink_msg_group_end_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_group_end_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.group_id , packet1.mission_checksum , packet1.time_usec ); - mavlink_msg_group_end_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_RADIO_RC_CHANNELS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_radio_rc_channels_t packet_in = { - 963497464,17443,151,218,29,{ 17703, 17704, 17705, 17706, 17707, 17708, 17709, 17710, 17711, 17712, 17713, 17714, 17715, 17716, 17717, 17718, 17719, 17720, 17721, 17722, 17723, 17724, 17725, 17726, 17727, 17728, 17729, 17730, 17731, 17732, 17733, 17734 } - }; - mavlink_radio_rc_channels_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_last_update_ms = packet_in.time_last_update_ms; - packet1.flags = packet_in.flags; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.count = packet_in.count; - - mav_array_memcpy(packet1.channels, packet_in.channels, sizeof(int16_t)*32); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_RADIO_RC_CHANNELS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_RADIO_RC_CHANNELS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_radio_rc_channels_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_radio_rc_channels_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_radio_rc_channels_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.time_last_update_ms , packet1.flags , packet1.count , packet1.channels ); - mavlink_msg_radio_rc_channels_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_radio_rc_channels_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.time_last_update_ms , packet1.flags , packet1.count , packet1.channels ); - mavlink_msg_radio_rc_channels_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AVAILABLE_MODES >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_available_modes_t packet_in = { - 963497464,963497672,29,96,163,"LMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRS" - }; - mavlink_available_modes_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.custom_mode = packet_in.custom_mode; - packet1.properties = packet_in.properties; - packet1.number_modes = packet_in.number_modes; - packet1.mode_index = packet_in.mode_index; - packet1.standard_mode = packet_in.standard_mode; - - mav_array_memcpy(packet1.mode_name, packet_in.mode_name, sizeof(char)*35); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AVAILABLE_MODES_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_available_modes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_pack(system_id, component_id, &msg , packet1.number_modes , packet1.mode_index , packet1.standard_mode , packet1.custom_mode , packet1.properties , packet1.mode_name ); - mavlink_msg_available_modes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.number_modes , packet1.mode_index , packet1.standard_mode , packet1.custom_mode , packet1.properties , packet1.mode_name ); - mavlink_msg_available_modes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_CURRENT_MODE >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_current_mode_t packet_in = { - 963497464,963497672,29 - }; - mavlink_current_mode_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.custom_mode = packet_in.custom_mode; - packet1.intended_custom_mode = packet_in.intended_custom_mode; - packet1.standard_mode = packet_in.standard_mode; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_CURRENT_MODE_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_mode_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_current_mode_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_mode_pack(system_id, component_id, &msg , packet1.standard_mode , packet1.custom_mode , packet1.intended_custom_mode ); - mavlink_msg_current_mode_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_current_mode_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.standard_mode , packet1.custom_mode , packet1.intended_custom_mode ); - mavlink_msg_current_mode_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_available_modes_monitor_t packet_in = { - 5 - }; - mavlink_available_modes_monitor_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.seq = packet_in.seq; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_monitor_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_available_modes_monitor_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_monitor_pack(system_id, component_id, &msg , packet1.seq ); - mavlink_msg_available_modes_monitor_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_available_modes_monitor_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq ); - mavlink_msg_available_modes_monitor_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_GNSS_INTEGRITY >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_gnss_integrity_t packet_in = { - 963497464,17443,17547,29,96,163,230,41,108,175,242,53 - }; - mavlink_gnss_integrity_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.system_errors = packet_in.system_errors; - packet1.raim_hfom = packet_in.raim_hfom; - packet1.raim_vfom = packet_in.raim_vfom; - packet1.id = packet_in.id; - packet1.authentication_state = packet_in.authentication_state; - packet1.jamming_state = packet_in.jamming_state; - packet1.spoofing_state = packet_in.spoofing_state; - packet1.raim_state = packet_in.raim_state; - packet1.corrections_quality = packet_in.corrections_quality; - packet1.system_status_summary = packet_in.system_status_summary; - packet1.gnss_signal_quality = packet_in.gnss_signal_quality; - packet1.post_processing_quality = packet_in.post_processing_quality; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_GNSS_INTEGRITY_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_gnss_integrity_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_gnss_integrity_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_gnss_integrity_pack(system_id, component_id, &msg , packet1.id , packet1.system_errors , packet1.authentication_state , packet1.jamming_state , packet1.spoofing_state , packet1.raim_state , packet1.raim_hfom , packet1.raim_vfom , packet1.corrections_quality , packet1.system_status_summary , packet1.gnss_signal_quality , packet1.post_processing_quality ); - mavlink_msg_gnss_integrity_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_gnss_integrity_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.id , packet1.system_errors , packet1.authentication_state , packet1.jamming_state , packet1.spoofing_state , packet1.raim_state , packet1.raim_hfom , packet1.raim_vfom , packet1.corrections_quality , packet1.system_status_summary , packet1.gnss_signal_quality , packet1.post_processing_quality ); - mavlink_msg_gnss_integrity_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TARGET_ABSOLUTE >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_target_absolute_t packet_in = { - 93372036854775807ULL,963497880,963498088,129.0,{ 157.0, 158.0, 159.0 },{ 241.0, 242.0, 243.0 },{ 325.0, 326.0, 327.0, 328.0 },{ 437.0, 438.0, 439.0 },{ 521.0, 522.0 },{ 577.0, 578.0, 579.0 },{ 661.0, 662.0, 663.0 },61,128 - }; - mavlink_target_absolute_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.timestamp = packet_in.timestamp; - packet1.lat = packet_in.lat; - packet1.lon = packet_in.lon; - packet1.alt = packet_in.alt; - packet1.id = packet_in.id; - packet1.sensor_capabilities = packet_in.sensor_capabilities; - - mav_array_memcpy(packet1.vel, packet_in.vel, sizeof(float)*3); - mav_array_memcpy(packet1.acc, packet_in.acc, sizeof(float)*3); - mav_array_memcpy(packet1.q_target, packet_in.q_target, sizeof(float)*4); - mav_array_memcpy(packet1.rates, packet_in.rates, sizeof(float)*3); - mav_array_memcpy(packet1.position_std, packet_in.position_std, sizeof(float)*2); - mav_array_memcpy(packet1.vel_std, packet_in.vel_std, sizeof(float)*3); - mav_array_memcpy(packet1.acc_std, packet_in.acc_std, sizeof(float)*3); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TARGET_ABSOLUTE_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_absolute_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_target_absolute_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_absolute_pack(system_id, component_id, &msg , packet1.timestamp , packet1.id , packet1.sensor_capabilities , packet1.lat , packet1.lon , packet1.alt , packet1.vel , packet1.acc , packet1.q_target , packet1.rates , packet1.position_std , packet1.vel_std , packet1.acc_std ); - mavlink_msg_target_absolute_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_absolute_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.id , packet1.sensor_capabilities , packet1.lat , packet1.lon , packet1.alt , packet1.vel , packet1.acc , packet1.q_target , packet1.rates , packet1.position_std , packet1.vel_std , packet1.acc_std ); - mavlink_msg_target_absolute_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_TARGET_RELATIVE >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_target_relative_t packet_in = { - 93372036854775807ULL,73.0,101.0,129.0,{ 157.0, 158.0, 159.0 },241.0,{ 269.0, 270.0, 271.0, 272.0 },{ 381.0, 382.0, 383.0, 384.0 },209,20,87 - }; - mavlink_target_relative_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.timestamp = packet_in.timestamp; - packet1.x = packet_in.x; - packet1.y = packet_in.y; - packet1.z = packet_in.z; - packet1.yaw_std = packet_in.yaw_std; - packet1.id = packet_in.id; - packet1.frame = packet_in.frame; - packet1.type = packet_in.type; - - mav_array_memcpy(packet1.pos_std, packet_in.pos_std, sizeof(float)*3); - mav_array_memcpy(packet1.q_target, packet_in.q_target, sizeof(float)*4); - mav_array_memcpy(packet1.q_sensor, packet_in.q_sensor, sizeof(float)*4); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_TARGET_RELATIVE_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_relative_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_target_relative_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_relative_pack(system_id, component_id, &msg , packet1.timestamp , packet1.id , packet1.frame , packet1.x , packet1.y , packet1.z , packet1.pos_std , packet1.yaw_std , packet1.q_target , packet1.q_sensor , packet1.type ); - mavlink_msg_target_relative_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_target_relative_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.timestamp , packet1.id , packet1.frame , packet1.x , packet1.y , packet1.z , packet1.pos_std , packet1.yaw_std , packet1.q_target , packet1.q_sensor , packet1.type ); - mavlink_msg_target_relative_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; imsgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +} + +/** + * @brief Pack a loweheiser_gov_efi message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param volt_batt [V] Generator Battery voltage. + * @param curr_batt [A] Generator Battery current. + * @param curr_gen [A] Current being produced by generator. + * @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt) + * @param fuel_level [l] Generator fuel remaining in litres. + * @param throttle [%] Throttle Output. + * @param runtime [s] Seconds this generator has run since it was rebooted. + * @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due. + * @param rectifier_temp [degC] The Temperature of the rectifier. + * @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator. + * @param efi_batt [V] EFI Supply Voltage. + * @param efi_rpm [rpm] Motor RPM. + * @param efi_pw [ms] Injector pulse-width in miliseconds. + * @param efi_fuel_flow Fuel flow rate in litres/hour. + * @param efi_fuel_consumed [l] Fuel consumed. + * @param efi_baro [kPa] Atmospheric pressure. + * @param efi_mat [degC] Manifold Air Temperature. + * @param efi_clt [degC] Cylinder Head Temperature. + * @param efi_tps [%] Throttle Position. + * @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature. + * @param efi_index EFI index. + * @param generator_status Generator status. + * @param efi_status EFI status. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN]; + _mav_put_float(buf, 0, volt_batt); + _mav_put_float(buf, 4, curr_batt); + _mav_put_float(buf, 8, curr_gen); + _mav_put_float(buf, 12, curr_rot); + _mav_put_float(buf, 16, fuel_level); + _mav_put_float(buf, 20, throttle); + _mav_put_uint32_t(buf, 24, runtime); + _mav_put_int32_t(buf, 28, until_maintenance); + _mav_put_float(buf, 32, rectifier_temp); + _mav_put_float(buf, 36, generator_temp); + _mav_put_float(buf, 40, efi_batt); + _mav_put_float(buf, 44, efi_rpm); + _mav_put_float(buf, 48, efi_pw); + _mav_put_float(buf, 52, efi_fuel_flow); + _mav_put_float(buf, 56, efi_fuel_consumed); + _mav_put_float(buf, 60, efi_baro); + _mav_put_float(buf, 64, efi_mat); + _mav_put_float(buf, 68, efi_clt); + _mav_put_float(buf, 72, efi_tps); + _mav_put_float(buf, 76, efi_exhaust_gas_temperature); + _mav_put_uint16_t(buf, 80, generator_status); + _mav_put_uint16_t(buf, 82, efi_status); + _mav_put_uint8_t(buf, 84, efi_index); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); +#else + mavlink_loweheiser_gov_efi_t packet; + packet.volt_batt = volt_batt; + packet.curr_batt = curr_batt; + packet.curr_gen = curr_gen; + packet.curr_rot = curr_rot; + packet.fuel_level = fuel_level; + packet.throttle = throttle; + packet.runtime = runtime; + packet.until_maintenance = until_maintenance; + packet.rectifier_temp = rectifier_temp; + packet.generator_temp = generator_temp; + packet.efi_batt = efi_batt; + packet.efi_rpm = efi_rpm; + packet.efi_pw = efi_pw; + packet.efi_fuel_flow = efi_fuel_flow; + packet.efi_fuel_consumed = efi_fuel_consumed; + packet.efi_baro = efi_baro; + packet.efi_mat = efi_mat; + packet.efi_clt = efi_clt; + packet.efi_tps = efi_tps; + packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature; + packet.generator_status = generator_status; + packet.efi_status = efi_status; + packet.efi_index = efi_index; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); +#endif +} + +/** + * @brief Pack a loweheiser_gov_efi message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param volt_batt [V] Generator Battery voltage. + * @param curr_batt [A] Generator Battery current. + * @param curr_gen [A] Current being produced by generator. + * @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt) + * @param fuel_level [l] Generator fuel remaining in litres. + * @param throttle [%] Throttle Output. + * @param runtime [s] Seconds this generator has run since it was rebooted. + * @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due. + * @param rectifier_temp [degC] The Temperature of the rectifier. + * @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator. + * @param efi_batt [V] EFI Supply Voltage. + * @param efi_rpm [rpm] Motor RPM. + * @param efi_pw [ms] Injector pulse-width in miliseconds. + * @param efi_fuel_flow Fuel flow rate in litres/hour. + * @param efi_fuel_consumed [l] Fuel consumed. + * @param efi_baro [kPa] Atmospheric pressure. + * @param efi_mat [degC] Manifold Air Temperature. + * @param efi_clt [degC] Cylinder Head Temperature. + * @param efi_tps [%] Throttle Position. + * @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature. + * @param efi_index EFI index. + * @param generator_status Generator status. + * @param efi_status EFI status. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + float volt_batt,float curr_batt,float curr_gen,float curr_rot,float fuel_level,float throttle,uint32_t runtime,int32_t until_maintenance,float rectifier_temp,float generator_temp,float efi_batt,float efi_rpm,float efi_pw,float efi_fuel_flow,float efi_fuel_consumed,float efi_baro,float efi_mat,float efi_clt,float efi_tps,float efi_exhaust_gas_temperature,uint8_t efi_index,uint16_t generator_status,uint16_t efi_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN]; + _mav_put_float(buf, 0, volt_batt); + _mav_put_float(buf, 4, curr_batt); + _mav_put_float(buf, 8, curr_gen); + _mav_put_float(buf, 12, curr_rot); + _mav_put_float(buf, 16, fuel_level); + _mav_put_float(buf, 20, throttle); + _mav_put_uint32_t(buf, 24, runtime); + _mav_put_int32_t(buf, 28, until_maintenance); + _mav_put_float(buf, 32, rectifier_temp); + _mav_put_float(buf, 36, generator_temp); + _mav_put_float(buf, 40, efi_batt); + _mav_put_float(buf, 44, efi_rpm); + _mav_put_float(buf, 48, efi_pw); + _mav_put_float(buf, 52, efi_fuel_flow); + _mav_put_float(buf, 56, efi_fuel_consumed); + _mav_put_float(buf, 60, efi_baro); + _mav_put_float(buf, 64, efi_mat); + _mav_put_float(buf, 68, efi_clt); + _mav_put_float(buf, 72, efi_tps); + _mav_put_float(buf, 76, efi_exhaust_gas_temperature); + _mav_put_uint16_t(buf, 80, generator_status); + _mav_put_uint16_t(buf, 82, efi_status); + _mav_put_uint8_t(buf, 84, efi_index); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); +#else + mavlink_loweheiser_gov_efi_t packet; + packet.volt_batt = volt_batt; + packet.curr_batt = curr_batt; + packet.curr_gen = curr_gen; + packet.curr_rot = curr_rot; + packet.fuel_level = fuel_level; + packet.throttle = throttle; + packet.runtime = runtime; + packet.until_maintenance = until_maintenance; + packet.rectifier_temp = rectifier_temp; + packet.generator_temp = generator_temp; + packet.efi_batt = efi_batt; + packet.efi_rpm = efi_rpm; + packet.efi_pw = efi_pw; + packet.efi_fuel_flow = efi_fuel_flow; + packet.efi_fuel_consumed = efi_fuel_consumed; + packet.efi_baro = efi_baro; + packet.efi_mat = efi_mat; + packet.efi_clt = efi_clt; + packet.efi_tps = efi_tps; + packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature; + packet.generator_status = generator_status; + packet.efi_status = efi_status; + packet.efi_index = efi_index; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +} + +/** + * @brief Encode a loweheiser_gov_efi struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param loweheiser_gov_efi C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi) +{ + return mavlink_msg_loweheiser_gov_efi_pack(system_id, component_id, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status); +} + +/** + * @brief Encode a loweheiser_gov_efi struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param loweheiser_gov_efi C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi) +{ + return mavlink_msg_loweheiser_gov_efi_pack_chan(system_id, component_id, chan, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status); +} + +/** + * @brief Encode a loweheiser_gov_efi struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param loweheiser_gov_efi C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi) +{ + return mavlink_msg_loweheiser_gov_efi_pack_status(system_id, component_id, _status, msg, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status); +} + +/** + * @brief Send a loweheiser_gov_efi message + * @param chan MAVLink channel to send the message + * + * @param volt_batt [V] Generator Battery voltage. + * @param curr_batt [A] Generator Battery current. + * @param curr_gen [A] Current being produced by generator. + * @param curr_rot [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt) + * @param fuel_level [l] Generator fuel remaining in litres. + * @param throttle [%] Throttle Output. + * @param runtime [s] Seconds this generator has run since it was rebooted. + * @param until_maintenance [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due. + * @param rectifier_temp [degC] The Temperature of the rectifier. + * @param generator_temp [degC] The temperature of the mechanical motor, fuel cell core or generator. + * @param efi_batt [V] EFI Supply Voltage. + * @param efi_rpm [rpm] Motor RPM. + * @param efi_pw [ms] Injector pulse-width in miliseconds. + * @param efi_fuel_flow Fuel flow rate in litres/hour. + * @param efi_fuel_consumed [l] Fuel consumed. + * @param efi_baro [kPa] Atmospheric pressure. + * @param efi_mat [degC] Manifold Air Temperature. + * @param efi_clt [degC] Cylinder Head Temperature. + * @param efi_tps [%] Throttle Position. + * @param efi_exhaust_gas_temperature [degC] Exhaust gas temperature. + * @param efi_index EFI index. + * @param generator_status Generator status. + * @param efi_status EFI status. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_loweheiser_gov_efi_send(mavlink_channel_t chan, float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN]; + _mav_put_float(buf, 0, volt_batt); + _mav_put_float(buf, 4, curr_batt); + _mav_put_float(buf, 8, curr_gen); + _mav_put_float(buf, 12, curr_rot); + _mav_put_float(buf, 16, fuel_level); + _mav_put_float(buf, 20, throttle); + _mav_put_uint32_t(buf, 24, runtime); + _mav_put_int32_t(buf, 28, until_maintenance); + _mav_put_float(buf, 32, rectifier_temp); + _mav_put_float(buf, 36, generator_temp); + _mav_put_float(buf, 40, efi_batt); + _mav_put_float(buf, 44, efi_rpm); + _mav_put_float(buf, 48, efi_pw); + _mav_put_float(buf, 52, efi_fuel_flow); + _mav_put_float(buf, 56, efi_fuel_consumed); + _mav_put_float(buf, 60, efi_baro); + _mav_put_float(buf, 64, efi_mat); + _mav_put_float(buf, 68, efi_clt); + _mav_put_float(buf, 72, efi_tps); + _mav_put_float(buf, 76, efi_exhaust_gas_temperature); + _mav_put_uint16_t(buf, 80, generator_status); + _mav_put_uint16_t(buf, 82, efi_status); + _mav_put_uint8_t(buf, 84, efi_index); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#else + mavlink_loweheiser_gov_efi_t packet; + packet.volt_batt = volt_batt; + packet.curr_batt = curr_batt; + packet.curr_gen = curr_gen; + packet.curr_rot = curr_rot; + packet.fuel_level = fuel_level; + packet.throttle = throttle; + packet.runtime = runtime; + packet.until_maintenance = until_maintenance; + packet.rectifier_temp = rectifier_temp; + packet.generator_temp = generator_temp; + packet.efi_batt = efi_batt; + packet.efi_rpm = efi_rpm; + packet.efi_pw = efi_pw; + packet.efi_fuel_flow = efi_fuel_flow; + packet.efi_fuel_consumed = efi_fuel_consumed; + packet.efi_baro = efi_baro; + packet.efi_mat = efi_mat; + packet.efi_clt = efi_clt; + packet.efi_tps = efi_tps; + packet.efi_exhaust_gas_temperature = efi_exhaust_gas_temperature; + packet.generator_status = generator_status; + packet.efi_status = efi_status; + packet.efi_index = efi_index; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)&packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#endif +} + +/** + * @brief Send a loweheiser_gov_efi message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_loweheiser_gov_efi_send_struct(mavlink_channel_t chan, const mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_loweheiser_gov_efi_send(chan, loweheiser_gov_efi->volt_batt, loweheiser_gov_efi->curr_batt, loweheiser_gov_efi->curr_gen, loweheiser_gov_efi->curr_rot, loweheiser_gov_efi->fuel_level, loweheiser_gov_efi->throttle, loweheiser_gov_efi->runtime, loweheiser_gov_efi->until_maintenance, loweheiser_gov_efi->rectifier_temp, loweheiser_gov_efi->generator_temp, loweheiser_gov_efi->efi_batt, loweheiser_gov_efi->efi_rpm, loweheiser_gov_efi->efi_pw, loweheiser_gov_efi->efi_fuel_flow, loweheiser_gov_efi->efi_fuel_consumed, loweheiser_gov_efi->efi_baro, loweheiser_gov_efi->efi_mat, loweheiser_gov_efi->efi_clt, loweheiser_gov_efi->efi_tps, loweheiser_gov_efi->efi_exhaust_gas_temperature, loweheiser_gov_efi->efi_index, loweheiser_gov_efi->generator_status, loweheiser_gov_efi->efi_status); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)loweheiser_gov_efi, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#endif +} + +#if MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_loweheiser_gov_efi_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float volt_batt, float curr_batt, float curr_gen, float curr_rot, float fuel_level, float throttle, uint32_t runtime, int32_t until_maintenance, float rectifier_temp, float generator_temp, float efi_batt, float efi_rpm, float efi_pw, float efi_fuel_flow, float efi_fuel_consumed, float efi_baro, float efi_mat, float efi_clt, float efi_tps, float efi_exhaust_gas_temperature, uint8_t efi_index, uint16_t generator_status, uint16_t efi_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_float(buf, 0, volt_batt); + _mav_put_float(buf, 4, curr_batt); + _mav_put_float(buf, 8, curr_gen); + _mav_put_float(buf, 12, curr_rot); + _mav_put_float(buf, 16, fuel_level); + _mav_put_float(buf, 20, throttle); + _mav_put_uint32_t(buf, 24, runtime); + _mav_put_int32_t(buf, 28, until_maintenance); + _mav_put_float(buf, 32, rectifier_temp); + _mav_put_float(buf, 36, generator_temp); + _mav_put_float(buf, 40, efi_batt); + _mav_put_float(buf, 44, efi_rpm); + _mav_put_float(buf, 48, efi_pw); + _mav_put_float(buf, 52, efi_fuel_flow); + _mav_put_float(buf, 56, efi_fuel_consumed); + _mav_put_float(buf, 60, efi_baro); + _mav_put_float(buf, 64, efi_mat); + _mav_put_float(buf, 68, efi_clt); + _mav_put_float(buf, 72, efi_tps); + _mav_put_float(buf, 76, efi_exhaust_gas_temperature); + _mav_put_uint16_t(buf, 80, generator_status); + _mav_put_uint16_t(buf, 82, efi_status); + _mav_put_uint8_t(buf, 84, efi_index); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, buf, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#else + mavlink_loweheiser_gov_efi_t *packet = (mavlink_loweheiser_gov_efi_t *)msgbuf; + packet->volt_batt = volt_batt; + packet->curr_batt = curr_batt; + packet->curr_gen = curr_gen; + packet->curr_rot = curr_rot; + packet->fuel_level = fuel_level; + packet->throttle = throttle; + packet->runtime = runtime; + packet->until_maintenance = until_maintenance; + packet->rectifier_temp = rectifier_temp; + packet->generator_temp = generator_temp; + packet->efi_batt = efi_batt; + packet->efi_rpm = efi_rpm; + packet->efi_pw = efi_pw; + packet->efi_fuel_flow = efi_fuel_flow; + packet->efi_fuel_consumed = efi_fuel_consumed; + packet->efi_baro = efi_baro; + packet->efi_mat = efi_mat; + packet->efi_clt = efi_clt; + packet->efi_tps = efi_tps; + packet->efi_exhaust_gas_temperature = efi_exhaust_gas_temperature; + packet->generator_status = generator_status; + packet->efi_status = efi_status; + packet->efi_index = efi_index; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI, (const char *)packet, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_CRC); +#endif +} +#endif + +#endif + +// MESSAGE LOWEHEISER_GOV_EFI UNPACKING + + +/** + * @brief Get field volt_batt from loweheiser_gov_efi message + * + * @return [V] Generator Battery voltage. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_volt_batt(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 0); +} + +/** + * @brief Get field curr_batt from loweheiser_gov_efi message + * + * @return [A] Generator Battery current. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_curr_batt(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 4); +} + +/** + * @brief Get field curr_gen from loweheiser_gov_efi message + * + * @return [A] Current being produced by generator. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_curr_gen(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 8); +} + +/** + * @brief Get field curr_rot from loweheiser_gov_efi message + * + * @return [A] Load current being consumed by the UAV (sum of curr_gen and curr_batt) + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_curr_rot(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 12); +} + +/** + * @brief Get field fuel_level from loweheiser_gov_efi message + * + * @return [l] Generator fuel remaining in litres. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_fuel_level(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field throttle from loweheiser_gov_efi message + * + * @return [%] Throttle Output. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_throttle(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field runtime from loweheiser_gov_efi message + * + * @return [s] Seconds this generator has run since it was rebooted. + */ +static inline uint32_t mavlink_msg_loweheiser_gov_efi_get_runtime(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 24); +} + +/** + * @brief Get field until_maintenance from loweheiser_gov_efi message + * + * @return [s] Seconds until this generator requires maintenance. A negative value indicates maintenance is past due. + */ +static inline int32_t mavlink_msg_loweheiser_gov_efi_get_until_maintenance(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 28); +} + +/** + * @brief Get field rectifier_temp from loweheiser_gov_efi message + * + * @return [degC] The Temperature of the rectifier. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_rectifier_temp(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 32); +} + +/** + * @brief Get field generator_temp from loweheiser_gov_efi message + * + * @return [degC] The temperature of the mechanical motor, fuel cell core or generator. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_generator_temp(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 36); +} + +/** + * @brief Get field efi_batt from loweheiser_gov_efi message + * + * @return [V] EFI Supply Voltage. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_batt(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 40); +} + +/** + * @brief Get field efi_rpm from loweheiser_gov_efi message + * + * @return [rpm] Motor RPM. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_rpm(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 44); +} + +/** + * @brief Get field efi_pw from loweheiser_gov_efi message + * + * @return [ms] Injector pulse-width in miliseconds. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_pw(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 48); +} + +/** + * @brief Get field efi_fuel_flow from loweheiser_gov_efi message + * + * @return Fuel flow rate in litres/hour. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_fuel_flow(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 52); +} + +/** + * @brief Get field efi_fuel_consumed from loweheiser_gov_efi message + * + * @return [l] Fuel consumed. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_fuel_consumed(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 56); +} + +/** + * @brief Get field efi_baro from loweheiser_gov_efi message + * + * @return [kPa] Atmospheric pressure. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_baro(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 60); +} + +/** + * @brief Get field efi_mat from loweheiser_gov_efi message + * + * @return [degC] Manifold Air Temperature. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_mat(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 64); +} + +/** + * @brief Get field efi_clt from loweheiser_gov_efi message + * + * @return [degC] Cylinder Head Temperature. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_clt(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 68); +} + +/** + * @brief Get field efi_tps from loweheiser_gov_efi message + * + * @return [%] Throttle Position. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_tps(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 72); +} + +/** + * @brief Get field efi_exhaust_gas_temperature from loweheiser_gov_efi message + * + * @return [degC] Exhaust gas temperature. + */ +static inline float mavlink_msg_loweheiser_gov_efi_get_efi_exhaust_gas_temperature(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 76); +} + +/** + * @brief Get field efi_index from loweheiser_gov_efi message + * + * @return EFI index. + */ +static inline uint8_t mavlink_msg_loweheiser_gov_efi_get_efi_index(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 84); +} + +/** + * @brief Get field generator_status from loweheiser_gov_efi message + * + * @return Generator status. + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_get_generator_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 80); +} + +/** + * @brief Get field efi_status from loweheiser_gov_efi message + * + * @return EFI status. + */ +static inline uint16_t mavlink_msg_loweheiser_gov_efi_get_efi_status(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 82); +} + +/** + * @brief Decode a loweheiser_gov_efi message into a struct + * + * @param msg The message to decode + * @param loweheiser_gov_efi C-struct to decode the message contents into + */ +static inline void mavlink_msg_loweheiser_gov_efi_decode(const mavlink_message_t* msg, mavlink_loweheiser_gov_efi_t* loweheiser_gov_efi) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + loweheiser_gov_efi->volt_batt = mavlink_msg_loweheiser_gov_efi_get_volt_batt(msg); + loweheiser_gov_efi->curr_batt = mavlink_msg_loweheiser_gov_efi_get_curr_batt(msg); + loweheiser_gov_efi->curr_gen = mavlink_msg_loweheiser_gov_efi_get_curr_gen(msg); + loweheiser_gov_efi->curr_rot = mavlink_msg_loweheiser_gov_efi_get_curr_rot(msg); + loweheiser_gov_efi->fuel_level = mavlink_msg_loweheiser_gov_efi_get_fuel_level(msg); + loweheiser_gov_efi->throttle = mavlink_msg_loweheiser_gov_efi_get_throttle(msg); + loweheiser_gov_efi->runtime = mavlink_msg_loweheiser_gov_efi_get_runtime(msg); + loweheiser_gov_efi->until_maintenance = mavlink_msg_loweheiser_gov_efi_get_until_maintenance(msg); + loweheiser_gov_efi->rectifier_temp = mavlink_msg_loweheiser_gov_efi_get_rectifier_temp(msg); + loweheiser_gov_efi->generator_temp = mavlink_msg_loweheiser_gov_efi_get_generator_temp(msg); + loweheiser_gov_efi->efi_batt = mavlink_msg_loweheiser_gov_efi_get_efi_batt(msg); + loweheiser_gov_efi->efi_rpm = mavlink_msg_loweheiser_gov_efi_get_efi_rpm(msg); + loweheiser_gov_efi->efi_pw = mavlink_msg_loweheiser_gov_efi_get_efi_pw(msg); + loweheiser_gov_efi->efi_fuel_flow = mavlink_msg_loweheiser_gov_efi_get_efi_fuel_flow(msg); + loweheiser_gov_efi->efi_fuel_consumed = mavlink_msg_loweheiser_gov_efi_get_efi_fuel_consumed(msg); + loweheiser_gov_efi->efi_baro = mavlink_msg_loweheiser_gov_efi_get_efi_baro(msg); + loweheiser_gov_efi->efi_mat = mavlink_msg_loweheiser_gov_efi_get_efi_mat(msg); + loweheiser_gov_efi->efi_clt = mavlink_msg_loweheiser_gov_efi_get_efi_clt(msg); + loweheiser_gov_efi->efi_tps = mavlink_msg_loweheiser_gov_efi_get_efi_tps(msg); + loweheiser_gov_efi->efi_exhaust_gas_temperature = mavlink_msg_loweheiser_gov_efi_get_efi_exhaust_gas_temperature(msg); + loweheiser_gov_efi->generator_status = mavlink_msg_loweheiser_gov_efi_get_generator_status(msg); + loweheiser_gov_efi->efi_status = mavlink_msg_loweheiser_gov_efi_get_efi_status(msg); + loweheiser_gov_efi->efi_index = mavlink_msg_loweheiser_gov_efi_get_efi_index(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN? msg->len : MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN; + memset(loweheiser_gov_efi, 0, MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_LEN); + memcpy(loweheiser_gov_efi, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/loweheiser/testsuite.h b/loweheiser/testsuite.h new file mode 100644 index 000000000..94f4f49d3 --- /dev/null +++ b/loweheiser/testsuite.h @@ -0,0 +1,117 @@ +/** @file + * @brief MAVLink comm protocol testsuite generated from loweheiser.xml + * @see https://mavlink.io/en/ + */ +#pragma once +#ifndef LOWEHEISER_TESTSUITE_H +#define LOWEHEISER_TESTSUITE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef MAVLINK_TEST_ALL +#define MAVLINK_TEST_ALL +static void mavlink_test_minimal(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_loweheiser(uint8_t, uint8_t, mavlink_message_t *last_msg); + +static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ + mavlink_test_minimal(system_id, component_id, last_msg); + mavlink_test_loweheiser(system_id, component_id, last_msg); +} +#endif + +#include "../minimal/testsuite.h" + + +static void mavlink_test_loweheiser_gov_efi(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_loweheiser_gov_efi_t packet_in = { + 17.0,45.0,73.0,101.0,129.0,157.0,963498712,963498920,241.0,269.0,297.0,325.0,353.0,381.0,409.0,437.0,465.0,493.0,521.0,549.0,21395,21499,1 + }; + mavlink_loweheiser_gov_efi_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.volt_batt = packet_in.volt_batt; + packet1.curr_batt = packet_in.curr_batt; + packet1.curr_gen = packet_in.curr_gen; + packet1.curr_rot = packet_in.curr_rot; + packet1.fuel_level = packet_in.fuel_level; + packet1.throttle = packet_in.throttle; + packet1.runtime = packet_in.runtime; + packet1.until_maintenance = packet_in.until_maintenance; + packet1.rectifier_temp = packet_in.rectifier_temp; + packet1.generator_temp = packet_in.generator_temp; + packet1.efi_batt = packet_in.efi_batt; + packet1.efi_rpm = packet_in.efi_rpm; + packet1.efi_pw = packet_in.efi_pw; + packet1.efi_fuel_flow = packet_in.efi_fuel_flow; + packet1.efi_fuel_consumed = packet_in.efi_fuel_consumed; + packet1.efi_baro = packet_in.efi_baro; + packet1.efi_mat = packet_in.efi_mat; + packet1.efi_clt = packet_in.efi_clt; + packet1.efi_tps = packet_in.efi_tps; + packet1.efi_exhaust_gas_temperature = packet_in.efi_exhaust_gas_temperature; + packet1.generator_status = packet_in.generator_status; + packet1.efi_status = packet_in.efi_status; + packet1.efi_index = packet_in.efi_index; + + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_LOWEHEISER_GOV_EFI_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_loweheiser_gov_efi_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_loweheiser_gov_efi_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_loweheiser_gov_efi_pack(system_id, component_id, &msg , packet1.volt_batt , packet1.curr_batt , packet1.curr_gen , packet1.curr_rot , packet1.fuel_level , packet1.throttle , packet1.runtime , packet1.until_maintenance , packet1.rectifier_temp , packet1.generator_temp , packet1.efi_batt , packet1.efi_rpm , packet1.efi_pw , packet1.efi_fuel_flow , packet1.efi_fuel_consumed , packet1.efi_baro , packet1.efi_mat , packet1.efi_clt , packet1.efi_tps , packet1.efi_exhaust_gas_temperature , packet1.efi_index , packet1.generator_status , packet1.efi_status ); + mavlink_msg_loweheiser_gov_efi_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_loweheiser_gov_efi_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.volt_batt , packet1.curr_batt , packet1.curr_gen , packet1.curr_rot , packet1.fuel_level , packet1.throttle , packet1.runtime , packet1.until_maintenance , packet1.rectifier_temp , packet1.generator_temp , packet1.efi_batt , packet1.efi_rpm , packet1.efi_pw , packet1.efi_fuel_flow , packet1.efi_fuel_consumed , packet1.efi_baro , packet1.efi_mat , packet1.efi_clt , packet1.efi_tps , packet1.efi_exhaust_gas_temperature , packet1.efi_index , packet1.generator_status , packet1.efi_status ); + mavlink_msg_loweheiser_gov_efi_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; i 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ - MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */ - MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ - MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ - MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ - MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ - MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ - MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ - MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ - MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ - MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ - MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ - MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ - MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ - MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ - MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ - MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ - MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - |Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area. - |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area. - |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined. - |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ - MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ - MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_ENUM_END=43004, /* | */ -} MAV_CMD; -#endif - -// MAVLINK VERSION - -#ifndef MAVLINK_VERSION -#define MAVLINK_VERSION 2 -#endif - -#if (MAVLINK_VERSION == 0) -#undef MAVLINK_VERSION -#define MAVLINK_VERSION 2 -#endif - -// MESSAGE DEFINITIONS -#include "./mavlink_msg_flexifunction_set.h" -#include "./mavlink_msg_flexifunction_read_req.h" -#include "./mavlink_msg_flexifunction_buffer_function.h" -#include "./mavlink_msg_flexifunction_buffer_function_ack.h" -#include "./mavlink_msg_flexifunction_directory.h" -#include "./mavlink_msg_flexifunction_directory_ack.h" -#include "./mavlink_msg_flexifunction_command.h" -#include "./mavlink_msg_flexifunction_command_ack.h" -#include "./mavlink_msg_serial_udb_extra_f2_a.h" -#include "./mavlink_msg_serial_udb_extra_f2_b.h" -#include "./mavlink_msg_serial_udb_extra_f4.h" -#include "./mavlink_msg_serial_udb_extra_f5.h" -#include "./mavlink_msg_serial_udb_extra_f6.h" -#include "./mavlink_msg_serial_udb_extra_f7.h" -#include "./mavlink_msg_serial_udb_extra_f8.h" -#include "./mavlink_msg_serial_udb_extra_f13.h" -#include "./mavlink_msg_serial_udb_extra_f14.h" -#include "./mavlink_msg_serial_udb_extra_f15.h" -#include "./mavlink_msg_serial_udb_extra_f16.h" -#include "./mavlink_msg_altitudes.h" -#include "./mavlink_msg_airspeeds.h" -#include "./mavlink_msg_serial_udb_extra_f17.h" -#include "./mavlink_msg_serial_udb_extra_f18.h" -#include "./mavlink_msg_serial_udb_extra_f19.h" -#include "./mavlink_msg_serial_udb_extra_f20.h" -#include "./mavlink_msg_serial_udb_extra_f21.h" -#include "./mavlink_msg_serial_udb_extra_f22.h" - -// base include -#include "../common/common.h" - - -#if MAVLINK_MATRIXPILOT_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_SET, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_READ_REQ, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY_ACK, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND, MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND_ACK, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_A, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_B, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F4, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F5, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F6, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F7, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F8, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F13, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F14, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F15, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F16, MAVLINK_MESSAGE_INFO_ALTITUDES, MAVLINK_MESSAGE_INFO_AIRSPEEDS, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F17, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F18, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F19, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F20, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F21, MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F22, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIRSPEEDS", 182 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ALTITUDES", 181 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLEXIFUNCTION_BUFFER_FUNCTION", 152 }, { "FLEXIFUNCTION_BUFFER_FUNCTION_ACK", 153 }, { "FLEXIFUNCTION_COMMAND", 157 }, { "FLEXIFUNCTION_COMMAND_ACK", 158 }, { "FLEXIFUNCTION_DIRECTORY", 155 }, { "FLEXIFUNCTION_DIRECTORY_ACK", 156 }, { "FLEXIFUNCTION_READ_REQ", 151 }, { "FLEXIFUNCTION_SET", 150 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERIAL_UDB_EXTRA_F13", 177 }, { "SERIAL_UDB_EXTRA_F14", 178 }, { "SERIAL_UDB_EXTRA_F15", 179 }, { "SERIAL_UDB_EXTRA_F16", 180 }, { "SERIAL_UDB_EXTRA_F17", 183 }, { "SERIAL_UDB_EXTRA_F18", 184 }, { "SERIAL_UDB_EXTRA_F19", 185 }, { "SERIAL_UDB_EXTRA_F20", 186 }, { "SERIAL_UDB_EXTRA_F21", 187 }, { "SERIAL_UDB_EXTRA_F22", 188 }, { "SERIAL_UDB_EXTRA_F2_A", 170 }, { "SERIAL_UDB_EXTRA_F2_B", 171 }, { "SERIAL_UDB_EXTRA_F4", 172 }, { "SERIAL_UDB_EXTRA_F5", 173 }, { "SERIAL_UDB_EXTRA_F6", 174 }, { "SERIAL_UDB_EXTRA_F7", 175 }, { "SERIAL_UDB_EXTRA_F8", 176 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} -# if MAVLINK_COMMAND_24BIT -# include "../mavlink_get_info.h" -# endif -#endif - -#ifdef __cplusplus -} -#endif // __cplusplus -#endif // MAVLINK_MATRIXPILOT_H diff --git a/matrixpilot/mavlink_msg_airspeeds.h b/matrixpilot/mavlink_msg_airspeeds.h deleted file mode 100644 index ea473ec85..000000000 --- a/matrixpilot/mavlink_msg_airspeeds.h +++ /dev/null @@ -1,428 +0,0 @@ -#pragma once -// MESSAGE AIRSPEEDS PACKING - -#define MAVLINK_MSG_ID_AIRSPEEDS 182 - - -typedef struct __mavlink_airspeeds_t { - uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ - int16_t airspeed_imu; /*< Airspeed estimate from IMU, cm/s*/ - int16_t airspeed_pitot; /*< Pitot measured forward airpseed, cm/s*/ - int16_t airspeed_hot_wire; /*< Hot wire anenometer measured airspeed, cm/s*/ - int16_t airspeed_ultrasonic; /*< Ultrasonic measured airspeed, cm/s*/ - int16_t aoa; /*< Angle of attack sensor, degrees * 10*/ - int16_t aoy; /*< Yaw angle sensor, degrees * 10*/ -} mavlink_airspeeds_t; - -#define MAVLINK_MSG_ID_AIRSPEEDS_LEN 16 -#define MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN 16 -#define MAVLINK_MSG_ID_182_LEN 16 -#define MAVLINK_MSG_ID_182_MIN_LEN 16 - -#define MAVLINK_MSG_ID_AIRSPEEDS_CRC 154 -#define MAVLINK_MSG_ID_182_CRC 154 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_AIRSPEEDS { \ - 182, \ - "AIRSPEEDS", \ - 7, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airspeeds_t, time_boot_ms) }, \ - { "airspeed_imu", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_airspeeds_t, airspeed_imu) }, \ - { "airspeed_pitot", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_airspeeds_t, airspeed_pitot) }, \ - { "airspeed_hot_wire", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_airspeeds_t, airspeed_hot_wire) }, \ - { "airspeed_ultrasonic", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_airspeeds_t, airspeed_ultrasonic) }, \ - { "aoa", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_airspeeds_t, aoa) }, \ - { "aoy", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_airspeeds_t, aoy) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_AIRSPEEDS { \ - "AIRSPEEDS", \ - 7, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airspeeds_t, time_boot_ms) }, \ - { "airspeed_imu", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_airspeeds_t, airspeed_imu) }, \ - { "airspeed_pitot", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_airspeeds_t, airspeed_pitot) }, \ - { "airspeed_hot_wire", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_airspeeds_t, airspeed_hot_wire) }, \ - { "airspeed_ultrasonic", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_airspeeds_t, airspeed_ultrasonic) }, \ - { "aoa", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_airspeeds_t, aoa) }, \ - { "aoy", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_airspeeds_t, aoy) }, \ - } \ -} -#endif - -/** - * @brief Pack a airspeeds message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param airspeed_imu Airspeed estimate from IMU, cm/s - * @param airspeed_pitot Pitot measured forward airpseed, cm/s - * @param airspeed_hot_wire Hot wire anenometer measured airspeed, cm/s - * @param airspeed_ultrasonic Ultrasonic measured airspeed, cm/s - * @param aoa Angle of attack sensor, degrees * 10 - * @param aoy Yaw angle sensor, degrees * 10 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airspeeds_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int16_t(buf, 4, airspeed_imu); - _mav_put_int16_t(buf, 6, airspeed_pitot); - _mav_put_int16_t(buf, 8, airspeed_hot_wire); - _mav_put_int16_t(buf, 10, airspeed_ultrasonic); - _mav_put_int16_t(buf, 12, aoa); - _mav_put_int16_t(buf, 14, aoy); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#else - mavlink_airspeeds_t packet; - packet.time_boot_ms = time_boot_ms; - packet.airspeed_imu = airspeed_imu; - packet.airspeed_pitot = airspeed_pitot; - packet.airspeed_hot_wire = airspeed_hot_wire; - packet.airspeed_ultrasonic = airspeed_ultrasonic; - packet.aoa = aoa; - packet.aoy = aoy; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRSPEEDS; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -} - -/** - * @brief Pack a airspeeds message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param airspeed_imu Airspeed estimate from IMU, cm/s - * @param airspeed_pitot Pitot measured forward airpseed, cm/s - * @param airspeed_hot_wire Hot wire anenometer measured airspeed, cm/s - * @param airspeed_ultrasonic Ultrasonic measured airspeed, cm/s - * @param aoa Angle of attack sensor, degrees * 10 - * @param aoy Yaw angle sensor, degrees * 10 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airspeeds_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int16_t(buf, 4, airspeed_imu); - _mav_put_int16_t(buf, 6, airspeed_pitot); - _mav_put_int16_t(buf, 8, airspeed_hot_wire); - _mav_put_int16_t(buf, 10, airspeed_ultrasonic); - _mav_put_int16_t(buf, 12, aoa); - _mav_put_int16_t(buf, 14, aoy); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#else - mavlink_airspeeds_t packet; - packet.time_boot_ms = time_boot_ms; - packet.airspeed_imu = airspeed_imu; - packet.airspeed_pitot = airspeed_pitot; - packet.airspeed_hot_wire = airspeed_hot_wire; - packet.airspeed_ultrasonic = airspeed_ultrasonic; - packet.aoa = aoa; - packet.aoy = aoy; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRSPEEDS; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#endif -} - -/** - * @brief Pack a airspeeds message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param airspeed_imu Airspeed estimate from IMU, cm/s - * @param airspeed_pitot Pitot measured forward airpseed, cm/s - * @param airspeed_hot_wire Hot wire anenometer measured airspeed, cm/s - * @param airspeed_ultrasonic Ultrasonic measured airspeed, cm/s - * @param aoa Angle of attack sensor, degrees * 10 - * @param aoy Yaw angle sensor, degrees * 10 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_airspeeds_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,int16_t airspeed_imu,int16_t airspeed_pitot,int16_t airspeed_hot_wire,int16_t airspeed_ultrasonic,int16_t aoa,int16_t aoy) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int16_t(buf, 4, airspeed_imu); - _mav_put_int16_t(buf, 6, airspeed_pitot); - _mav_put_int16_t(buf, 8, airspeed_hot_wire); - _mav_put_int16_t(buf, 10, airspeed_ultrasonic); - _mav_put_int16_t(buf, 12, aoa); - _mav_put_int16_t(buf, 14, aoy); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#else - mavlink_airspeeds_t packet; - packet.time_boot_ms = time_boot_ms; - packet.airspeed_imu = airspeed_imu; - packet.airspeed_pitot = airspeed_pitot; - packet.airspeed_hot_wire = airspeed_hot_wire; - packet.airspeed_ultrasonic = airspeed_ultrasonic; - packet.aoa = aoa; - packet.aoy = aoy; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEEDS_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_AIRSPEEDS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -} - -/** - * @brief Encode a airspeeds struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param airspeeds C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airspeeds_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airspeeds_t* airspeeds) -{ - return mavlink_msg_airspeeds_pack(system_id, component_id, msg, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy); -} - -/** - * @brief Encode a airspeeds struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param airspeeds C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airspeeds_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airspeeds_t* airspeeds) -{ - return mavlink_msg_airspeeds_pack_chan(system_id, component_id, chan, msg, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy); -} - -/** - * @brief Encode a airspeeds struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param airspeeds C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_airspeeds_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airspeeds_t* airspeeds) -{ - return mavlink_msg_airspeeds_pack_status(system_id, component_id, _status, msg, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy); -} - -/** - * @brief Send a airspeeds message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param airspeed_imu Airspeed estimate from IMU, cm/s - * @param airspeed_pitot Pitot measured forward airpseed, cm/s - * @param airspeed_hot_wire Hot wire anenometer measured airspeed, cm/s - * @param airspeed_ultrasonic Ultrasonic measured airspeed, cm/s - * @param aoa Angle of attack sensor, degrees * 10 - * @param aoy Yaw angle sensor, degrees * 10 - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_airspeeds_send(mavlink_channel_t chan, uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int16_t(buf, 4, airspeed_imu); - _mav_put_int16_t(buf, 6, airspeed_pitot); - _mav_put_int16_t(buf, 8, airspeed_hot_wire); - _mav_put_int16_t(buf, 10, airspeed_ultrasonic); - _mav_put_int16_t(buf, 12, aoa); - _mav_put_int16_t(buf, 14, aoy); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, buf, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#else - mavlink_airspeeds_t packet; - packet.time_boot_ms = time_boot_ms; - packet.airspeed_imu = airspeed_imu; - packet.airspeed_pitot = airspeed_pitot; - packet.airspeed_hot_wire = airspeed_hot_wire; - packet.airspeed_ultrasonic = airspeed_ultrasonic; - packet.aoa = aoa; - packet.aoy = aoy; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (const char *)&packet, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#endif -} - -/** - * @brief Send a airspeeds message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_airspeeds_send_struct(mavlink_channel_t chan, const mavlink_airspeeds_t* airspeeds) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_airspeeds_send(chan, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (const char *)airspeeds, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#endif -} - -#if MAVLINK_MSG_ID_AIRSPEEDS_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_airspeeds_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int16_t(buf, 4, airspeed_imu); - _mav_put_int16_t(buf, 6, airspeed_pitot); - _mav_put_int16_t(buf, 8, airspeed_hot_wire); - _mav_put_int16_t(buf, 10, airspeed_ultrasonic); - _mav_put_int16_t(buf, 12, aoa); - _mav_put_int16_t(buf, 14, aoy); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, buf, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#else - mavlink_airspeeds_t *packet = (mavlink_airspeeds_t *)msgbuf; - packet->time_boot_ms = time_boot_ms; - packet->airspeed_imu = airspeed_imu; - packet->airspeed_pitot = airspeed_pitot; - packet->airspeed_hot_wire = airspeed_hot_wire; - packet->airspeed_ultrasonic = airspeed_ultrasonic; - packet->aoa = aoa; - packet->aoy = aoy; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (const char *)packet, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC); -#endif -} -#endif - -#endif - -// MESSAGE AIRSPEEDS UNPACKING - - -/** - * @brief Get field time_boot_ms from airspeeds message - * - * @return Timestamp (milliseconds since system boot) - */ -static inline uint32_t mavlink_msg_airspeeds_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field airspeed_imu from airspeeds message - * - * @return Airspeed estimate from IMU, cm/s - */ -static inline int16_t mavlink_msg_airspeeds_get_airspeed_imu(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 4); -} - -/** - * @brief Get field airspeed_pitot from airspeeds message - * - * @return Pitot measured forward airpseed, cm/s - */ -static inline int16_t mavlink_msg_airspeeds_get_airspeed_pitot(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 6); -} - -/** - * @brief Get field airspeed_hot_wire from airspeeds message - * - * @return Hot wire anenometer measured airspeed, cm/s - */ -static inline int16_t mavlink_msg_airspeeds_get_airspeed_hot_wire(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 8); -} - -/** - * @brief Get field airspeed_ultrasonic from airspeeds message - * - * @return Ultrasonic measured airspeed, cm/s - */ -static inline int16_t mavlink_msg_airspeeds_get_airspeed_ultrasonic(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 10); -} - -/** - * @brief Get field aoa from airspeeds message - * - * @return Angle of attack sensor, degrees * 10 - */ -static inline int16_t mavlink_msg_airspeeds_get_aoa(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 12); -} - -/** - * @brief Get field aoy from airspeeds message - * - * @return Yaw angle sensor, degrees * 10 - */ -static inline int16_t mavlink_msg_airspeeds_get_aoy(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 14); -} - -/** - * @brief Decode a airspeeds message into a struct - * - * @param msg The message to decode - * @param airspeeds C-struct to decode the message contents into - */ -static inline void mavlink_msg_airspeeds_decode(const mavlink_message_t* msg, mavlink_airspeeds_t* airspeeds) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - airspeeds->time_boot_ms = mavlink_msg_airspeeds_get_time_boot_ms(msg); - airspeeds->airspeed_imu = mavlink_msg_airspeeds_get_airspeed_imu(msg); - airspeeds->airspeed_pitot = mavlink_msg_airspeeds_get_airspeed_pitot(msg); - airspeeds->airspeed_hot_wire = mavlink_msg_airspeeds_get_airspeed_hot_wire(msg); - airspeeds->airspeed_ultrasonic = mavlink_msg_airspeeds_get_airspeed_ultrasonic(msg); - airspeeds->aoa = mavlink_msg_airspeeds_get_aoa(msg); - airspeeds->aoy = mavlink_msg_airspeeds_get_aoy(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_AIRSPEEDS_LEN? msg->len : MAVLINK_MSG_ID_AIRSPEEDS_LEN; - memset(airspeeds, 0, MAVLINK_MSG_ID_AIRSPEEDS_LEN); - memcpy(airspeeds, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_altitudes.h b/matrixpilot/mavlink_msg_altitudes.h deleted file mode 100644 index 16e9e5a27..000000000 --- a/matrixpilot/mavlink_msg_altitudes.h +++ /dev/null @@ -1,428 +0,0 @@ -#pragma once -// MESSAGE ALTITUDES PACKING - -#define MAVLINK_MSG_ID_ALTITUDES 181 - - -typedef struct __mavlink_altitudes_t { - uint32_t time_boot_ms; /*< Timestamp (milliseconds since system boot)*/ - int32_t alt_gps; /*< GPS altitude (MSL) in meters, expressed as * 1000 (millimeters)*/ - int32_t alt_imu; /*< IMU altitude above ground in meters, expressed as * 1000 (millimeters)*/ - int32_t alt_barometric; /*< barometeric altitude above ground in meters, expressed as * 1000 (millimeters)*/ - int32_t alt_optical_flow; /*< Optical flow altitude above ground in meters, expressed as * 1000 (millimeters)*/ - int32_t alt_range_finder; /*< Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters)*/ - int32_t alt_extra; /*< Extra altitude above ground in meters, expressed as * 1000 (millimeters)*/ -} mavlink_altitudes_t; - -#define MAVLINK_MSG_ID_ALTITUDES_LEN 28 -#define MAVLINK_MSG_ID_ALTITUDES_MIN_LEN 28 -#define MAVLINK_MSG_ID_181_LEN 28 -#define MAVLINK_MSG_ID_181_MIN_LEN 28 - -#define MAVLINK_MSG_ID_ALTITUDES_CRC 55 -#define MAVLINK_MSG_ID_181_CRC 55 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_ALTITUDES { \ - 181, \ - "ALTITUDES", \ - 7, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_altitudes_t, time_boot_ms) }, \ - { "alt_gps", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_altitudes_t, alt_gps) }, \ - { "alt_imu", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_altitudes_t, alt_imu) }, \ - { "alt_barometric", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_altitudes_t, alt_barometric) }, \ - { "alt_optical_flow", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_altitudes_t, alt_optical_flow) }, \ - { "alt_range_finder", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_altitudes_t, alt_range_finder) }, \ - { "alt_extra", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_altitudes_t, alt_extra) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_ALTITUDES { \ - "ALTITUDES", \ - 7, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_altitudes_t, time_boot_ms) }, \ - { "alt_gps", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_altitudes_t, alt_gps) }, \ - { "alt_imu", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_altitudes_t, alt_imu) }, \ - { "alt_barometric", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_altitudes_t, alt_barometric) }, \ - { "alt_optical_flow", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_altitudes_t, alt_optical_flow) }, \ - { "alt_range_finder", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_altitudes_t, alt_range_finder) }, \ - { "alt_extra", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_altitudes_t, alt_extra) }, \ - } \ -} -#endif - -/** - * @brief Pack a altitudes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param alt_gps GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - * @param alt_imu IMU altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_barometric barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_optical_flow Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_range_finder Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_extra Extra altitude above ground in meters, expressed as * 1000 (millimeters) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_altitudes_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, int32_t alt_gps, int32_t alt_imu, int32_t alt_barometric, int32_t alt_optical_flow, int32_t alt_range_finder, int32_t alt_extra) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ALTITUDES_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int32_t(buf, 4, alt_gps); - _mav_put_int32_t(buf, 8, alt_imu); - _mav_put_int32_t(buf, 12, alt_barometric); - _mav_put_int32_t(buf, 16, alt_optical_flow); - _mav_put_int32_t(buf, 20, alt_range_finder); - _mav_put_int32_t(buf, 24, alt_extra); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ALTITUDES_LEN); -#else - mavlink_altitudes_t packet; - packet.time_boot_ms = time_boot_ms; - packet.alt_gps = alt_gps; - packet.alt_imu = alt_imu; - packet.alt_barometric = alt_barometric; - packet.alt_optical_flow = alt_optical_flow; - packet.alt_range_finder = alt_range_finder; - packet.alt_extra = alt_extra; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ALTITUDES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ALTITUDES; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -} - -/** - * @brief Pack a altitudes message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param alt_gps GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - * @param alt_imu IMU altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_barometric barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_optical_flow Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_range_finder Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_extra Extra altitude above ground in meters, expressed as * 1000 (millimeters) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_altitudes_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, int32_t alt_gps, int32_t alt_imu, int32_t alt_barometric, int32_t alt_optical_flow, int32_t alt_range_finder, int32_t alt_extra) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ALTITUDES_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int32_t(buf, 4, alt_gps); - _mav_put_int32_t(buf, 8, alt_imu); - _mav_put_int32_t(buf, 12, alt_barometric); - _mav_put_int32_t(buf, 16, alt_optical_flow); - _mav_put_int32_t(buf, 20, alt_range_finder); - _mav_put_int32_t(buf, 24, alt_extra); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ALTITUDES_LEN); -#else - mavlink_altitudes_t packet; - packet.time_boot_ms = time_boot_ms; - packet.alt_gps = alt_gps; - packet.alt_imu = alt_imu; - packet.alt_barometric = alt_barometric; - packet.alt_optical_flow = alt_optical_flow; - packet.alt_range_finder = alt_range_finder; - packet.alt_extra = alt_extra; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ALTITUDES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ALTITUDES; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN); -#endif -} - -/** - * @brief Pack a altitudes message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param alt_gps GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - * @param alt_imu IMU altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_barometric barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_optical_flow Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_range_finder Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_extra Extra altitude above ground in meters, expressed as * 1000 (millimeters) - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_altitudes_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,int32_t alt_gps,int32_t alt_imu,int32_t alt_barometric,int32_t alt_optical_flow,int32_t alt_range_finder,int32_t alt_extra) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ALTITUDES_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int32_t(buf, 4, alt_gps); - _mav_put_int32_t(buf, 8, alt_imu); - _mav_put_int32_t(buf, 12, alt_barometric); - _mav_put_int32_t(buf, 16, alt_optical_flow); - _mav_put_int32_t(buf, 20, alt_range_finder); - _mav_put_int32_t(buf, 24, alt_extra); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ALTITUDES_LEN); -#else - mavlink_altitudes_t packet; - packet.time_boot_ms = time_boot_ms; - packet.alt_gps = alt_gps; - packet.alt_imu = alt_imu; - packet.alt_barometric = alt_barometric; - packet.alt_optical_flow = alt_optical_flow; - packet.alt_range_finder = alt_range_finder; - packet.alt_extra = alt_extra; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ALTITUDES_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_ALTITUDES; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -} - -/** - * @brief Encode a altitudes struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param altitudes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_altitudes_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_altitudes_t* altitudes) -{ - return mavlink_msg_altitudes_pack(system_id, component_id, msg, altitudes->time_boot_ms, altitudes->alt_gps, altitudes->alt_imu, altitudes->alt_barometric, altitudes->alt_optical_flow, altitudes->alt_range_finder, altitudes->alt_extra); -} - -/** - * @brief Encode a altitudes struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param altitudes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_altitudes_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_altitudes_t* altitudes) -{ - return mavlink_msg_altitudes_pack_chan(system_id, component_id, chan, msg, altitudes->time_boot_ms, altitudes->alt_gps, altitudes->alt_imu, altitudes->alt_barometric, altitudes->alt_optical_flow, altitudes->alt_range_finder, altitudes->alt_extra); -} - -/** - * @brief Encode a altitudes struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param altitudes C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_altitudes_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_altitudes_t* altitudes) -{ - return mavlink_msg_altitudes_pack_status(system_id, component_id, _status, msg, altitudes->time_boot_ms, altitudes->alt_gps, altitudes->alt_imu, altitudes->alt_barometric, altitudes->alt_optical_flow, altitudes->alt_range_finder, altitudes->alt_extra); -} - -/** - * @brief Send a altitudes message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms Timestamp (milliseconds since system boot) - * @param alt_gps GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - * @param alt_imu IMU altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_barometric barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_optical_flow Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_range_finder Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - * @param alt_extra Extra altitude above ground in meters, expressed as * 1000 (millimeters) - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_altitudes_send(mavlink_channel_t chan, uint32_t time_boot_ms, int32_t alt_gps, int32_t alt_imu, int32_t alt_barometric, int32_t alt_optical_flow, int32_t alt_range_finder, int32_t alt_extra) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_ALTITUDES_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int32_t(buf, 4, alt_gps); - _mav_put_int32_t(buf, 8, alt_imu); - _mav_put_int32_t(buf, 12, alt_barometric); - _mav_put_int32_t(buf, 16, alt_optical_flow); - _mav_put_int32_t(buf, 20, alt_range_finder); - _mav_put_int32_t(buf, 24, alt_extra); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDES, buf, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#else - mavlink_altitudes_t packet; - packet.time_boot_ms = time_boot_ms; - packet.alt_gps = alt_gps; - packet.alt_imu = alt_imu; - packet.alt_barometric = alt_barometric; - packet.alt_optical_flow = alt_optical_flow; - packet.alt_range_finder = alt_range_finder; - packet.alt_extra = alt_extra; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDES, (const char *)&packet, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#endif -} - -/** - * @brief Send a altitudes message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_altitudes_send_struct(mavlink_channel_t chan, const mavlink_altitudes_t* altitudes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_altitudes_send(chan, altitudes->time_boot_ms, altitudes->alt_gps, altitudes->alt_imu, altitudes->alt_barometric, altitudes->alt_optical_flow, altitudes->alt_range_finder, altitudes->alt_extra); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDES, (const char *)altitudes, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#endif -} - -#if MAVLINK_MSG_ID_ALTITUDES_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_altitudes_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, int32_t alt_gps, int32_t alt_imu, int32_t alt_barometric, int32_t alt_optical_flow, int32_t alt_range_finder, int32_t alt_extra) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_int32_t(buf, 4, alt_gps); - _mav_put_int32_t(buf, 8, alt_imu); - _mav_put_int32_t(buf, 12, alt_barometric); - _mav_put_int32_t(buf, 16, alt_optical_flow); - _mav_put_int32_t(buf, 20, alt_range_finder); - _mav_put_int32_t(buf, 24, alt_extra); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDES, buf, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#else - mavlink_altitudes_t *packet = (mavlink_altitudes_t *)msgbuf; - packet->time_boot_ms = time_boot_ms; - packet->alt_gps = alt_gps; - packet->alt_imu = alt_imu; - packet->alt_barometric = alt_barometric; - packet->alt_optical_flow = alt_optical_flow; - packet->alt_range_finder = alt_range_finder; - packet->alt_extra = alt_extra; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ALTITUDES, (const char *)packet, MAVLINK_MSG_ID_ALTITUDES_MIN_LEN, MAVLINK_MSG_ID_ALTITUDES_LEN, MAVLINK_MSG_ID_ALTITUDES_CRC); -#endif -} -#endif - -#endif - -// MESSAGE ALTITUDES UNPACKING - - -/** - * @brief Get field time_boot_ms from altitudes message - * - * @return Timestamp (milliseconds since system boot) - */ -static inline uint32_t mavlink_msg_altitudes_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field alt_gps from altitudes message - * - * @return GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_gps(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 4); -} - -/** - * @brief Get field alt_imu from altitudes message - * - * @return IMU altitude above ground in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_imu(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Get field alt_barometric from altitudes message - * - * @return barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_barometric(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field alt_optical_flow from altitudes message - * - * @return Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_optical_flow(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 16); -} - -/** - * @brief Get field alt_range_finder from altitudes message - * - * @return Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_range_finder(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 20); -} - -/** - * @brief Get field alt_extra from altitudes message - * - * @return Extra altitude above ground in meters, expressed as * 1000 (millimeters) - */ -static inline int32_t mavlink_msg_altitudes_get_alt_extra(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 24); -} - -/** - * @brief Decode a altitudes message into a struct - * - * @param msg The message to decode - * @param altitudes C-struct to decode the message contents into - */ -static inline void mavlink_msg_altitudes_decode(const mavlink_message_t* msg, mavlink_altitudes_t* altitudes) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - altitudes->time_boot_ms = mavlink_msg_altitudes_get_time_boot_ms(msg); - altitudes->alt_gps = mavlink_msg_altitudes_get_alt_gps(msg); - altitudes->alt_imu = mavlink_msg_altitudes_get_alt_imu(msg); - altitudes->alt_barometric = mavlink_msg_altitudes_get_alt_barometric(msg); - altitudes->alt_optical_flow = mavlink_msg_altitudes_get_alt_optical_flow(msg); - altitudes->alt_range_finder = mavlink_msg_altitudes_get_alt_range_finder(msg); - altitudes->alt_extra = mavlink_msg_altitudes_get_alt_extra(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_ALTITUDES_LEN? msg->len : MAVLINK_MSG_ID_ALTITUDES_LEN; - memset(altitudes, 0, MAVLINK_MSG_ID_ALTITUDES_LEN); - memcpy(altitudes, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_buffer_function.h b/matrixpilot/mavlink_msg_flexifunction_buffer_function.h deleted file mode 100644 index 1bb04dffe..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_buffer_function.h +++ /dev/null @@ -1,418 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_BUFFER_FUNCTION PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION 152 - - -typedef struct __mavlink_flexifunction_buffer_function_t { - uint16_t func_index; /*< Function index*/ - uint16_t func_count; /*< Total count of functions*/ - uint16_t data_address; /*< Address in the flexifunction data, Set to 0xFFFF to use address in target memory*/ - uint16_t data_size; /*< Size of the */ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - int8_t data[48]; /*< Settings data*/ -} mavlink_flexifunction_buffer_function_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN 58 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN 58 -#define MAVLINK_MSG_ID_152_LEN 58 -#define MAVLINK_MSG_ID_152_MIN_LEN 58 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC 101 -#define MAVLINK_MSG_ID_152_CRC 101 - -#define MAVLINK_MSG_FLEXIFUNCTION_BUFFER_FUNCTION_FIELD_DATA_LEN 48 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION { \ - 152, \ - "FLEXIFUNCTION_BUFFER_FUNCTION", \ - 7, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_flexifunction_buffer_function_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_flexifunction_buffer_function_t, target_component) }, \ - { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_t, func_index) }, \ - { "func_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_t, func_count) }, \ - { "data_address", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_t, data_address) }, \ - { "data_size", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_flexifunction_buffer_function_t, data_size) }, \ - { "data", NULL, MAVLINK_TYPE_INT8_T, 48, 10, offsetof(mavlink_flexifunction_buffer_function_t, data) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION { \ - "FLEXIFUNCTION_BUFFER_FUNCTION", \ - 7, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_flexifunction_buffer_function_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_flexifunction_buffer_function_t, target_component) }, \ - { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_t, func_index) }, \ - { "func_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_t, func_count) }, \ - { "data_address", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_t, data_address) }, \ - { "data_size", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_flexifunction_buffer_function_t, data_size) }, \ - { "data", NULL, MAVLINK_TYPE_INT8_T, 48, 10, offsetof(mavlink_flexifunction_buffer_function_t, data) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_buffer_function message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param func_count Total count of functions - * @param data_address Address in the flexifunction data, Set to 0xFFFF to use address in target memory - * @param data_size Size of the - * @param data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size, const int8_t *data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, func_count); - _mav_put_uint16_t(buf, 4, data_address); - _mav_put_uint16_t(buf, 6, data_size); - _mav_put_uint8_t(buf, 8, target_system); - _mav_put_uint8_t(buf, 9, target_component); - _mav_put_int8_t_array(buf, 10, data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#else - mavlink_flexifunction_buffer_function_t packet; - packet.func_index = func_index; - packet.func_count = func_count; - packet.data_address = data_address; - packet.data_size = data_size; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.data, data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -} - -/** - * @brief Pack a flexifunction_buffer_function message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param func_count Total count of functions - * @param data_address Address in the flexifunction data, Set to 0xFFFF to use address in target memory - * @param data_size Size of the - * @param data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size, const int8_t *data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, func_count); - _mav_put_uint16_t(buf, 4, data_address); - _mav_put_uint16_t(buf, 6, data_size); - _mav_put_uint8_t(buf, 8, target_system); - _mav_put_uint8_t(buf, 9, target_component); - _mav_put_int8_t_array(buf, 10, data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#else - mavlink_flexifunction_buffer_function_t packet; - packet.func_index = func_index; - packet.func_count = func_count; - packet.data_address = data_address; - packet.data_size = data_size; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.data, data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_buffer_function message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param func_count Total count of functions - * @param data_address Address in the flexifunction data, Set to 0xFFFF to use address in target memory - * @param data_size Size of the - * @param data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t func_index,uint16_t func_count,uint16_t data_address,uint16_t data_size,const int8_t *data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, func_count); - _mav_put_uint16_t(buf, 4, data_address); - _mav_put_uint16_t(buf, 6, data_size); - _mav_put_uint8_t(buf, 8, target_system); - _mav_put_uint8_t(buf, 9, target_component); - _mav_put_int8_t_array(buf, 10, data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#else - mavlink_flexifunction_buffer_function_t packet; - packet.func_index = func_index; - packet.func_count = func_count; - packet.data_address = data_address; - packet.data_size = data_size; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.data, data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -} - -/** - * @brief Encode a flexifunction_buffer_function struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function) -{ - return mavlink_msg_flexifunction_buffer_function_pack(system_id, component_id, msg, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data); -} - -/** - * @brief Encode a flexifunction_buffer_function struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function) -{ - return mavlink_msg_flexifunction_buffer_function_pack_chan(system_id, component_id, chan, msg, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data); -} - -/** - * @brief Encode a flexifunction_buffer_function struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function) -{ - return mavlink_msg_flexifunction_buffer_function_pack_status(system_id, component_id, _status, msg, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data); -} - -/** - * @brief Send a flexifunction_buffer_function message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param func_count Total count of functions - * @param data_address Address in the flexifunction data, Set to 0xFFFF to use address in target memory - * @param data_size Size of the - * @param data Settings data - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_buffer_function_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size, const int8_t *data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, func_count); - _mav_put_uint16_t(buf, 4, data_address); - _mav_put_uint16_t(buf, 6, data_size); - _mav_put_uint8_t(buf, 8, target_system); - _mav_put_uint8_t(buf, 9, target_component); - _mav_put_int8_t_array(buf, 10, data, 48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#else - mavlink_flexifunction_buffer_function_t packet; - packet.func_index = func_index; - packet.func_count = func_count; - packet.data_address = data_address; - packet.data_size = data_size; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.data, data, sizeof(int8_t)*48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#endif -} - -/** - * @brief Send a flexifunction_buffer_function message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_buffer_function_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_buffer_function_send(chan, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (const char *)flexifunction_buffer_function, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_buffer_function_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size, const int8_t *data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, func_count); - _mav_put_uint16_t(buf, 4, data_address); - _mav_put_uint16_t(buf, 6, data_size); - _mav_put_uint8_t(buf, 8, target_system); - _mav_put_uint8_t(buf, 9, target_component); - _mav_put_int8_t_array(buf, 10, data, 48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#else - mavlink_flexifunction_buffer_function_t *packet = (mavlink_flexifunction_buffer_function_t *)msgbuf; - packet->func_index = func_index; - packet->func_count = func_count; - packet->data_address = data_address; - packet->data_size = data_size; - packet->target_system = target_system; - packet->target_component = target_component; - mav_array_memcpy(packet->data, data, sizeof(int8_t)*48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_BUFFER_FUNCTION UNPACKING - - -/** - * @brief Get field target_system from flexifunction_buffer_function message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_buffer_function_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field target_component from flexifunction_buffer_function message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_buffer_function_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 9); -} - -/** - * @brief Get field func_index from flexifunction_buffer_function message - * - * @return Function index - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_func_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field func_count from flexifunction_buffer_function message - * - * @return Total count of functions - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_func_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Get field data_address from flexifunction_buffer_function message - * - * @return Address in the flexifunction data, Set to 0xFFFF to use address in target memory - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data_address(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 4); -} - -/** - * @brief Get field data_size from flexifunction_buffer_function message - * - * @return Size of the - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data_size(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 6); -} - -/** - * @brief Get field data from flexifunction_buffer_function message - * - * @return Settings data - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data(const mavlink_message_t* msg, int8_t *data) -{ - return _MAV_RETURN_int8_t_array(msg, data, 48, 10); -} - -/** - * @brief Decode a flexifunction_buffer_function message into a struct - * - * @param msg The message to decode - * @param flexifunction_buffer_function C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_buffer_function_decode(const mavlink_message_t* msg, mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_buffer_function->func_index = mavlink_msg_flexifunction_buffer_function_get_func_index(msg); - flexifunction_buffer_function->func_count = mavlink_msg_flexifunction_buffer_function_get_func_count(msg); - flexifunction_buffer_function->data_address = mavlink_msg_flexifunction_buffer_function_get_data_address(msg); - flexifunction_buffer_function->data_size = mavlink_msg_flexifunction_buffer_function_get_data_size(msg); - flexifunction_buffer_function->target_system = mavlink_msg_flexifunction_buffer_function_get_target_system(msg); - flexifunction_buffer_function->target_component = mavlink_msg_flexifunction_buffer_function_get_target_component(msg); - mavlink_msg_flexifunction_buffer_function_get_data(msg, flexifunction_buffer_function->data); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN; - memset(flexifunction_buffer_function, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN); - memcpy(flexifunction_buffer_function, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_buffer_function_ack.h b/matrixpilot/mavlink_msg_flexifunction_buffer_function_ack.h deleted file mode 100644 index 5041fa464..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_buffer_function_ack.h +++ /dev/null @@ -1,344 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_BUFFER_FUNCTION_ACK PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK 153 - - -typedef struct __mavlink_flexifunction_buffer_function_ack_t { - uint16_t func_index; /*< Function index*/ - uint16_t result; /*< result of acknowledge, 0=fail, 1=good*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_flexifunction_buffer_function_ack_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN 6 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN 6 -#define MAVLINK_MSG_ID_153_LEN 6 -#define MAVLINK_MSG_ID_153_MIN_LEN 6 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC 109 -#define MAVLINK_MSG_ID_153_CRC 109 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION_ACK { \ - 153, \ - "FLEXIFUNCTION_BUFFER_FUNCTION_ACK", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_ack_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_buffer_function_ack_t, target_component) }, \ - { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_ack_t, func_index) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_ack_t, result) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION_ACK { \ - "FLEXIFUNCTION_BUFFER_FUNCTION_ACK", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_ack_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_buffer_function_ack_t, target_component) }, \ - { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_ack_t, func_index) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_ack_t, result) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_buffer_function_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, result); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#else - mavlink_flexifunction_buffer_function_ack_t packet; - packet.func_index = func_index; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -} - -/** - * @brief Pack a flexifunction_buffer_function_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, result); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#else - mavlink_flexifunction_buffer_function_ack_t packet; - packet.func_index = func_index; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_buffer_function_ack message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t func_index,uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, result); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#else - mavlink_flexifunction_buffer_function_ack_t packet; - packet.func_index = func_index; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -} - -/** - * @brief Encode a flexifunction_buffer_function_ack struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_ack_t* flexifunction_buffer_function_ack) -{ - return mavlink_msg_flexifunction_buffer_function_ack_pack(system_id, component_id, msg, flexifunction_buffer_function_ack->target_system, flexifunction_buffer_function_ack->target_component, flexifunction_buffer_function_ack->func_index, flexifunction_buffer_function_ack->result); -} - -/** - * @brief Encode a flexifunction_buffer_function_ack struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_ack_t* flexifunction_buffer_function_ack) -{ - return mavlink_msg_flexifunction_buffer_function_ack_pack_chan(system_id, component_id, chan, msg, flexifunction_buffer_function_ack->target_system, flexifunction_buffer_function_ack->target_component, flexifunction_buffer_function_ack->func_index, flexifunction_buffer_function_ack->result); -} - -/** - * @brief Encode a flexifunction_buffer_function_ack struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_buffer_function_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_buffer_function_ack_t* flexifunction_buffer_function_ack) -{ - return mavlink_msg_flexifunction_buffer_function_ack_pack_status(system_id, component_id, _status, msg, flexifunction_buffer_function_ack->target_system, flexifunction_buffer_function_ack->target_component, flexifunction_buffer_function_ack->func_index, flexifunction_buffer_function_ack->result); -} - -/** - * @brief Send a flexifunction_buffer_function_ack message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param func_index Function index - * @param result result of acknowledge, 0=fail, 1=good - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_buffer_function_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN]; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, result); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#else - mavlink_flexifunction_buffer_function_ack_t packet; - packet.func_index = func_index; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#endif -} - -/** - * @brief Send a flexifunction_buffer_function_ack message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_buffer_function_ack_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_buffer_function_ack_t* flexifunction_buffer_function_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_buffer_function_ack_send(chan, flexifunction_buffer_function_ack->target_system, flexifunction_buffer_function_ack->target_component, flexifunction_buffer_function_ack->func_index, flexifunction_buffer_function_ack->result); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, (const char *)flexifunction_buffer_function_ack, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_buffer_function_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, func_index); - _mav_put_uint16_t(buf, 2, result); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#else - mavlink_flexifunction_buffer_function_ack_t *packet = (mavlink_flexifunction_buffer_function_ack_t *)msgbuf; - packet->func_index = func_index; - packet->result = result; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_BUFFER_FUNCTION_ACK UNPACKING - - -/** - * @brief Get field target_system from flexifunction_buffer_function_ack message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_buffer_function_ack_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from flexifunction_buffer_function_ack message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_buffer_function_ack_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field func_index from flexifunction_buffer_function_ack message - * - * @return Function index - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_get_func_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field result from flexifunction_buffer_function_ack message - * - * @return result of acknowledge, 0=fail, 1=good - */ -static inline uint16_t mavlink_msg_flexifunction_buffer_function_ack_get_result(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Decode a flexifunction_buffer_function_ack message into a struct - * - * @param msg The message to decode - * @param flexifunction_buffer_function_ack C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_buffer_function_ack_decode(const mavlink_message_t* msg, mavlink_flexifunction_buffer_function_ack_t* flexifunction_buffer_function_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_buffer_function_ack->func_index = mavlink_msg_flexifunction_buffer_function_ack_get_func_index(msg); - flexifunction_buffer_function_ack->result = mavlink_msg_flexifunction_buffer_function_ack_get_result(msg); - flexifunction_buffer_function_ack->target_system = mavlink_msg_flexifunction_buffer_function_ack_get_target_system(msg); - flexifunction_buffer_function_ack->target_component = mavlink_msg_flexifunction_buffer_function_ack_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN; - memset(flexifunction_buffer_function_ack, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_LEN); - memcpy(flexifunction_buffer_function_ack, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_command.h b/matrixpilot/mavlink_msg_flexifunction_command.h deleted file mode 100644 index d61d9b6a4..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_command.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_COMMAND PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND 157 - - -typedef struct __mavlink_flexifunction_command_t { - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - uint8_t command_type; /*< Flexifunction command type*/ -} mavlink_flexifunction_command_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN 3 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN 3 -#define MAVLINK_MSG_ID_157_LEN 3 -#define MAVLINK_MSG_ID_157_MIN_LEN 3 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC 133 -#define MAVLINK_MSG_ID_157_CRC 133 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND { \ - 157, \ - "FLEXIFUNCTION_COMMAND", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_command_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_command_t, target_component) }, \ - { "command_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_command_t, command_type) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND { \ - "FLEXIFUNCTION_COMMAND", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_command_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_command_t, target_component) }, \ - { "command_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_command_t, command_type) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_command message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param command_type Flexifunction command type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t command_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, command_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#else - mavlink_flexifunction_command_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.command_type = command_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -} - -/** - * @brief Pack a flexifunction_command message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param command_type Flexifunction command type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t command_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, command_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#else - mavlink_flexifunction_command_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.command_type = command_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_command message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param command_type Flexifunction command type - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint8_t command_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, command_type); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#else - mavlink_flexifunction_command_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.command_type = command_type; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -} - -/** - * @brief Encode a flexifunction_command struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_command_t* flexifunction_command) -{ - return mavlink_msg_flexifunction_command_pack(system_id, component_id, msg, flexifunction_command->target_system, flexifunction_command->target_component, flexifunction_command->command_type); -} - -/** - * @brief Encode a flexifunction_command struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_command_t* flexifunction_command) -{ - return mavlink_msg_flexifunction_command_pack_chan(system_id, component_id, chan, msg, flexifunction_command->target_system, flexifunction_command->target_component, flexifunction_command->command_type); -} - -/** - * @brief Encode a flexifunction_command struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_command_t* flexifunction_command) -{ - return mavlink_msg_flexifunction_command_pack_status(system_id, component_id, _status, msg, flexifunction_command->target_system, flexifunction_command->target_component, flexifunction_command->command_type); -} - -/** - * @brief Send a flexifunction_command message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param command_type Flexifunction command type - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_command_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t command_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, command_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#else - mavlink_flexifunction_command_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.command_type = command_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#endif -} - -/** - * @brief Send a flexifunction_command message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_command_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_command_t* flexifunction_command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_command_send(chan, flexifunction_command->target_system, flexifunction_command->target_component, flexifunction_command->command_type); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND, (const char *)flexifunction_command, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_command_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t command_type) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, command_type); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#else - mavlink_flexifunction_command_t *packet = (mavlink_flexifunction_command_t *)msgbuf; - packet->target_system = target_system; - packet->target_component = target_component; - packet->command_type = command_type; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_COMMAND UNPACKING - - -/** - * @brief Get field target_system from flexifunction_command message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_command_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field target_component from flexifunction_command message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_command_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Get field command_type from flexifunction_command message - * - * @return Flexifunction command type - */ -static inline uint8_t mavlink_msg_flexifunction_command_get_command_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Decode a flexifunction_command message into a struct - * - * @param msg The message to decode - * @param flexifunction_command C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_command_decode(const mavlink_message_t* msg, mavlink_flexifunction_command_t* flexifunction_command) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_command->target_system = mavlink_msg_flexifunction_command_get_target_system(msg); - flexifunction_command->target_component = mavlink_msg_flexifunction_command_get_target_component(msg); - flexifunction_command->command_type = mavlink_msg_flexifunction_command_get_command_type(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN; - memset(flexifunction_command, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_LEN); - memcpy(flexifunction_command, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_command_ack.h b/matrixpilot/mavlink_msg_flexifunction_command_ack.h deleted file mode 100644 index f19deb933..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_command_ack.h +++ /dev/null @@ -1,288 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_COMMAND_ACK PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK 158 - - -typedef struct __mavlink_flexifunction_command_ack_t { - uint16_t command_type; /*< Command acknowledged*/ - uint16_t result; /*< result of acknowledge*/ -} mavlink_flexifunction_command_ack_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN 4 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN 4 -#define MAVLINK_MSG_ID_158_LEN 4 -#define MAVLINK_MSG_ID_158_MIN_LEN 4 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC 208 -#define MAVLINK_MSG_ID_158_CRC 208 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND_ACK { \ - 158, \ - "FLEXIFUNCTION_COMMAND_ACK", \ - 2, \ - { { "command_type", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_command_ack_t, command_type) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_command_ack_t, result) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND_ACK { \ - "FLEXIFUNCTION_COMMAND_ACK", \ - 2, \ - { { "command_type", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_command_ack_t, command_type) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_command_ack_t, result) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_command_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param command_type Command acknowledged - * @param result result of acknowledge - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t command_type, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN]; - _mav_put_uint16_t(buf, 0, command_type); - _mav_put_uint16_t(buf, 2, result); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#else - mavlink_flexifunction_command_ack_t packet; - packet.command_type = command_type; - packet.result = result; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -} - -/** - * @brief Pack a flexifunction_command_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param command_type Command acknowledged - * @param result result of acknowledge - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t command_type, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN]; - _mav_put_uint16_t(buf, 0, command_type); - _mav_put_uint16_t(buf, 2, result); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#else - mavlink_flexifunction_command_ack_t packet; - packet.command_type = command_type; - packet.result = result; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_command_ack message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param command_type Command acknowledged - * @param result result of acknowledge - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint16_t command_type,uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN]; - _mav_put_uint16_t(buf, 0, command_type); - _mav_put_uint16_t(buf, 2, result); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#else - mavlink_flexifunction_command_ack_t packet; - packet.command_type = command_type; - packet.result = result; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -} - -/** - * @brief Encode a flexifunction_command_ack struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_command_ack_t* flexifunction_command_ack) -{ - return mavlink_msg_flexifunction_command_ack_pack(system_id, component_id, msg, flexifunction_command_ack->command_type, flexifunction_command_ack->result); -} - -/** - * @brief Encode a flexifunction_command_ack struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_command_ack_t* flexifunction_command_ack) -{ - return mavlink_msg_flexifunction_command_ack_pack_chan(system_id, component_id, chan, msg, flexifunction_command_ack->command_type, flexifunction_command_ack->result); -} - -/** - * @brief Encode a flexifunction_command_ack struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_command_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_command_ack_t* flexifunction_command_ack) -{ - return mavlink_msg_flexifunction_command_ack_pack_status(system_id, component_id, _status, msg, flexifunction_command_ack->command_type, flexifunction_command_ack->result); -} - -/** - * @brief Send a flexifunction_command_ack message - * @param chan MAVLink channel to send the message - * - * @param command_type Command acknowledged - * @param result result of acknowledge - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_command_ack_send(mavlink_channel_t chan, uint16_t command_type, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN]; - _mav_put_uint16_t(buf, 0, command_type); - _mav_put_uint16_t(buf, 2, result); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#else - mavlink_flexifunction_command_ack_t packet; - packet.command_type = command_type; - packet.result = result; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#endif -} - -/** - * @brief Send a flexifunction_command_ack message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_command_ack_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_command_ack_t* flexifunction_command_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_command_ack_send(chan, flexifunction_command_ack->command_type, flexifunction_command_ack->result); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (const char *)flexifunction_command_ack, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_command_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t command_type, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, command_type); - _mav_put_uint16_t(buf, 2, result); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#else - mavlink_flexifunction_command_ack_t *packet = (mavlink_flexifunction_command_ack_t *)msgbuf; - packet->command_type = command_type; - packet->result = result; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_COMMAND_ACK UNPACKING - - -/** - * @brief Get field command_type from flexifunction_command_ack message - * - * @return Command acknowledged - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_get_command_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field result from flexifunction_command_ack message - * - * @return result of acknowledge - */ -static inline uint16_t mavlink_msg_flexifunction_command_ack_get_result(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Decode a flexifunction_command_ack message into a struct - * - * @param msg The message to decode - * @param flexifunction_command_ack C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_command_ack_decode(const mavlink_message_t* msg, mavlink_flexifunction_command_ack_t* flexifunction_command_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_command_ack->command_type = mavlink_msg_flexifunction_command_ack_get_command_type(msg); - flexifunction_command_ack->result = mavlink_msg_flexifunction_command_ack_get_result(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN; - memset(flexifunction_command_ack, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN); - memcpy(flexifunction_command_ack, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_directory.h b/matrixpilot/mavlink_msg_flexifunction_directory.h deleted file mode 100644 index d5b8e8b1f..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_directory.h +++ /dev/null @@ -1,390 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_DIRECTORY PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY 155 - - -typedef struct __mavlink_flexifunction_directory_t { - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - uint8_t directory_type; /*< 0=inputs, 1=outputs*/ - uint8_t start_index; /*< index of first directory entry to write*/ - uint8_t count; /*< count of directory entries to write*/ - int8_t directory_data[48]; /*< Settings data*/ -} mavlink_flexifunction_directory_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN 53 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN 53 -#define MAVLINK_MSG_ID_155_LEN 53 -#define MAVLINK_MSG_ID_155_MIN_LEN 53 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC 12 -#define MAVLINK_MSG_ID_155_CRC 12 - -#define MAVLINK_MSG_FLEXIFUNCTION_DIRECTORY_FIELD_DIRECTORY_DATA_LEN 48 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY { \ - 155, \ - "FLEXIFUNCTION_DIRECTORY", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_directory_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_directory_t, target_component) }, \ - { "directory_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_directory_t, directory_type) }, \ - { "start_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_flexifunction_directory_t, start_index) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_directory_t, count) }, \ - { "directory_data", NULL, MAVLINK_TYPE_INT8_T, 48, 5, offsetof(mavlink_flexifunction_directory_t, directory_data) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY { \ - "FLEXIFUNCTION_DIRECTORY", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_directory_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_directory_t, target_component) }, \ - { "directory_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_directory_t, directory_type) }, \ - { "start_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_flexifunction_directory_t, start_index) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_directory_t, count) }, \ - { "directory_data", NULL, MAVLINK_TYPE_INT8_T, 48, 5, offsetof(mavlink_flexifunction_directory_t, directory_data) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_directory message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param directory_data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, const int8_t *directory_data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, directory_type); - _mav_put_uint8_t(buf, 3, start_index); - _mav_put_uint8_t(buf, 4, count); - _mav_put_int8_t_array(buf, 5, directory_data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#else - mavlink_flexifunction_directory_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - mav_array_memcpy(packet.directory_data, directory_data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -} - -/** - * @brief Pack a flexifunction_directory message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param directory_data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, const int8_t *directory_data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, directory_type); - _mav_put_uint8_t(buf, 3, start_index); - _mav_put_uint8_t(buf, 4, count); - _mav_put_int8_t_array(buf, 5, directory_data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#else - mavlink_flexifunction_directory_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - mav_array_memcpy(packet.directory_data, directory_data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_directory message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param directory_data Settings data - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint8_t directory_type,uint8_t start_index,uint8_t count,const int8_t *directory_data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, directory_type); - _mav_put_uint8_t(buf, 3, start_index); - _mav_put_uint8_t(buf, 4, count); - _mav_put_int8_t_array(buf, 5, directory_data, 48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#else - mavlink_flexifunction_directory_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - mav_array_memcpy(packet.directory_data, directory_data, sizeof(int8_t)*48); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -} - -/** - * @brief Encode a flexifunction_directory struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_directory_t* flexifunction_directory) -{ - return mavlink_msg_flexifunction_directory_pack(system_id, component_id, msg, flexifunction_directory->target_system, flexifunction_directory->target_component, flexifunction_directory->directory_type, flexifunction_directory->start_index, flexifunction_directory->count, flexifunction_directory->directory_data); -} - -/** - * @brief Encode a flexifunction_directory struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_directory_t* flexifunction_directory) -{ - return mavlink_msg_flexifunction_directory_pack_chan(system_id, component_id, chan, msg, flexifunction_directory->target_system, flexifunction_directory->target_component, flexifunction_directory->directory_type, flexifunction_directory->start_index, flexifunction_directory->count, flexifunction_directory->directory_data); -} - -/** - * @brief Encode a flexifunction_directory struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_directory_t* flexifunction_directory) -{ - return mavlink_msg_flexifunction_directory_pack_status(system_id, component_id, _status, msg, flexifunction_directory->target_system, flexifunction_directory->target_component, flexifunction_directory->directory_type, flexifunction_directory->start_index, flexifunction_directory->count, flexifunction_directory->directory_data); -} - -/** - * @brief Send a flexifunction_directory message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param directory_data Settings data - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_directory_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, const int8_t *directory_data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, directory_type); - _mav_put_uint8_t(buf, 3, start_index); - _mav_put_uint8_t(buf, 4, count); - _mav_put_int8_t_array(buf, 5, directory_data, 48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#else - mavlink_flexifunction_directory_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - mav_array_memcpy(packet.directory_data, directory_data, sizeof(int8_t)*48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#endif -} - -/** - * @brief Send a flexifunction_directory message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_directory_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_directory_t* flexifunction_directory) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_directory_send(chan, flexifunction_directory->target_system, flexifunction_directory->target_component, flexifunction_directory->directory_type, flexifunction_directory->start_index, flexifunction_directory->count, flexifunction_directory->directory_data); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY, (const char *)flexifunction_directory, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_directory_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, const int8_t *directory_data) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - _mav_put_uint8_t(buf, 2, directory_type); - _mav_put_uint8_t(buf, 3, start_index); - _mav_put_uint8_t(buf, 4, count); - _mav_put_int8_t_array(buf, 5, directory_data, 48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#else - mavlink_flexifunction_directory_t *packet = (mavlink_flexifunction_directory_t *)msgbuf; - packet->target_system = target_system; - packet->target_component = target_component; - packet->directory_type = directory_type; - packet->start_index = start_index; - packet->count = count; - mav_array_memcpy(packet->directory_data, directory_data, sizeof(int8_t)*48); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_DIRECTORY UNPACKING - - -/** - * @brief Get field target_system from flexifunction_directory message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_directory_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field target_component from flexifunction_directory message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_directory_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Get field directory_type from flexifunction_directory message - * - * @return 0=inputs, 1=outputs - */ -static inline uint8_t mavlink_msg_flexifunction_directory_get_directory_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field start_index from flexifunction_directory message - * - * @return index of first directory entry to write - */ -static inline uint8_t mavlink_msg_flexifunction_directory_get_start_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field count from flexifunction_directory message - * - * @return count of directory entries to write - */ -static inline uint8_t mavlink_msg_flexifunction_directory_get_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field directory_data from flexifunction_directory message - * - * @return Settings data - */ -static inline uint16_t mavlink_msg_flexifunction_directory_get_directory_data(const mavlink_message_t* msg, int8_t *directory_data) -{ - return _MAV_RETURN_int8_t_array(msg, directory_data, 48, 5); -} - -/** - * @brief Decode a flexifunction_directory message into a struct - * - * @param msg The message to decode - * @param flexifunction_directory C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_directory_decode(const mavlink_message_t* msg, mavlink_flexifunction_directory_t* flexifunction_directory) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_directory->target_system = mavlink_msg_flexifunction_directory_get_target_system(msg); - flexifunction_directory->target_component = mavlink_msg_flexifunction_directory_get_target_component(msg); - flexifunction_directory->directory_type = mavlink_msg_flexifunction_directory_get_directory_type(msg); - flexifunction_directory->start_index = mavlink_msg_flexifunction_directory_get_start_index(msg); - flexifunction_directory->count = mavlink_msg_flexifunction_directory_get_count(msg); - mavlink_msg_flexifunction_directory_get_directory_data(msg, flexifunction_directory->directory_data); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN; - memset(flexifunction_directory, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_LEN); - memcpy(flexifunction_directory, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_directory_ack.h b/matrixpilot/mavlink_msg_flexifunction_directory_ack.h deleted file mode 100644 index d86a8f7d1..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_directory_ack.h +++ /dev/null @@ -1,400 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_DIRECTORY_ACK PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK 156 - - -typedef struct __mavlink_flexifunction_directory_ack_t { - uint16_t result; /*< result of acknowledge, 0=fail, 1=good*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - uint8_t directory_type; /*< 0=inputs, 1=outputs*/ - uint8_t start_index; /*< index of first directory entry to write*/ - uint8_t count; /*< count of directory entries to write*/ -} mavlink_flexifunction_directory_ack_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN 7 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN 7 -#define MAVLINK_MSG_ID_156_LEN 7 -#define MAVLINK_MSG_ID_156_MIN_LEN 7 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC 218 -#define MAVLINK_MSG_ID_156_CRC 218 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY_ACK { \ - 156, \ - "FLEXIFUNCTION_DIRECTORY_ACK", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_directory_ack_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_flexifunction_directory_ack_t, target_component) }, \ - { "directory_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_directory_ack_t, directory_type) }, \ - { "start_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_directory_ack_t, start_index) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_flexifunction_directory_ack_t, count) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_directory_ack_t, result) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_DIRECTORY_ACK { \ - "FLEXIFUNCTION_DIRECTORY_ACK", \ - 6, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_flexifunction_directory_ack_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_flexifunction_directory_ack_t, target_component) }, \ - { "directory_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_directory_ack_t, directory_type) }, \ - { "start_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_directory_ack_t, start_index) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_flexifunction_directory_ack_t, count) }, \ - { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_directory_ack_t, result) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_directory_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN]; - _mav_put_uint16_t(buf, 0, result); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_uint8_t(buf, 4, directory_type); - _mav_put_uint8_t(buf, 5, start_index); - _mav_put_uint8_t(buf, 6, count); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#else - mavlink_flexifunction_directory_ack_t packet; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -} - -/** - * @brief Pack a flexifunction_directory_ack message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN]; - _mav_put_uint16_t(buf, 0, result); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_uint8_t(buf, 4, directory_type); - _mav_put_uint8_t(buf, 5, start_index); - _mav_put_uint8_t(buf, 6, count); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#else - mavlink_flexifunction_directory_ack_t packet; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_directory_ack message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param result result of acknowledge, 0=fail, 1=good - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint8_t directory_type,uint8_t start_index,uint8_t count,uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN]; - _mav_put_uint16_t(buf, 0, result); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_uint8_t(buf, 4, directory_type); - _mav_put_uint8_t(buf, 5, start_index); - _mav_put_uint8_t(buf, 6, count); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#else - mavlink_flexifunction_directory_ack_t packet; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -} - -/** - * @brief Encode a flexifunction_directory_ack struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack) -{ - return mavlink_msg_flexifunction_directory_ack_pack(system_id, component_id, msg, flexifunction_directory_ack->target_system, flexifunction_directory_ack->target_component, flexifunction_directory_ack->directory_type, flexifunction_directory_ack->start_index, flexifunction_directory_ack->count, flexifunction_directory_ack->result); -} - -/** - * @brief Encode a flexifunction_directory_ack struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack) -{ - return mavlink_msg_flexifunction_directory_ack_pack_chan(system_id, component_id, chan, msg, flexifunction_directory_ack->target_system, flexifunction_directory_ack->target_component, flexifunction_directory_ack->directory_type, flexifunction_directory_ack->start_index, flexifunction_directory_ack->count, flexifunction_directory_ack->result); -} - -/** - * @brief Encode a flexifunction_directory_ack struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_directory_ack C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack) -{ - return mavlink_msg_flexifunction_directory_ack_pack_status(system_id, component_id, _status, msg, flexifunction_directory_ack->target_system, flexifunction_directory_ack->target_component, flexifunction_directory_ack->directory_type, flexifunction_directory_ack->start_index, flexifunction_directory_ack->count, flexifunction_directory_ack->result); -} - -/** - * @brief Send a flexifunction_directory_ack message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param directory_type 0=inputs, 1=outputs - * @param start_index index of first directory entry to write - * @param count count of directory entries to write - * @param result result of acknowledge, 0=fail, 1=good - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_directory_ack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN]; - _mav_put_uint16_t(buf, 0, result); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_uint8_t(buf, 4, directory_type); - _mav_put_uint8_t(buf, 5, start_index); - _mav_put_uint8_t(buf, 6, count); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#else - mavlink_flexifunction_directory_ack_t packet; - packet.result = result; - packet.target_system = target_system; - packet.target_component = target_component; - packet.directory_type = directory_type; - packet.start_index = start_index; - packet.count = count; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#endif -} - -/** - * @brief Send a flexifunction_directory_ack message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_directory_ack_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_directory_ack_send(chan, flexifunction_directory_ack->target_system, flexifunction_directory_ack->target_component, flexifunction_directory_ack->directory_type, flexifunction_directory_ack->start_index, flexifunction_directory_ack->count, flexifunction_directory_ack->result); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK, (const char *)flexifunction_directory_ack, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_directory_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t directory_type, uint8_t start_index, uint8_t count, uint16_t result) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, result); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_uint8_t(buf, 4, directory_type); - _mav_put_uint8_t(buf, 5, start_index); - _mav_put_uint8_t(buf, 6, count); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#else - mavlink_flexifunction_directory_ack_t *packet = (mavlink_flexifunction_directory_ack_t *)msgbuf; - packet->result = result; - packet->target_system = target_system; - packet->target_component = target_component; - packet->directory_type = directory_type; - packet->start_index = start_index; - packet->count = count; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_DIRECTORY_ACK UNPACKING - - -/** - * @brief Get field target_system from flexifunction_directory_ack message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field target_component from flexifunction_directory_ack message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field directory_type from flexifunction_directory_ack message - * - * @return 0=inputs, 1=outputs - */ -static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_directory_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field start_index from flexifunction_directory_ack message - * - * @return index of first directory entry to write - */ -static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_start_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field count from flexifunction_directory_ack message - * - * @return count of directory entries to write - */ -static inline uint8_t mavlink_msg_flexifunction_directory_ack_get_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Get field result from flexifunction_directory_ack message - * - * @return result of acknowledge, 0=fail, 1=good - */ -static inline uint16_t mavlink_msg_flexifunction_directory_ack_get_result(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Decode a flexifunction_directory_ack message into a struct - * - * @param msg The message to decode - * @param flexifunction_directory_ack C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_directory_ack_decode(const mavlink_message_t* msg, mavlink_flexifunction_directory_ack_t* flexifunction_directory_ack) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_directory_ack->result = mavlink_msg_flexifunction_directory_ack_get_result(msg); - flexifunction_directory_ack->target_system = mavlink_msg_flexifunction_directory_ack_get_target_system(msg); - flexifunction_directory_ack->target_component = mavlink_msg_flexifunction_directory_ack_get_target_component(msg); - flexifunction_directory_ack->directory_type = mavlink_msg_flexifunction_directory_ack_get_directory_type(msg); - flexifunction_directory_ack->start_index = mavlink_msg_flexifunction_directory_ack_get_start_index(msg); - flexifunction_directory_ack->count = mavlink_msg_flexifunction_directory_ack_get_count(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN; - memset(flexifunction_directory_ack, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_LEN); - memcpy(flexifunction_directory_ack, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_read_req.h b/matrixpilot/mavlink_msg_flexifunction_read_req.h deleted file mode 100644 index b3a15c5c4..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_read_req.h +++ /dev/null @@ -1,344 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_READ_REQ PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ 151 - - -typedef struct __mavlink_flexifunction_read_req_t { - int16_t read_req_type; /*< Type of flexifunction data requested*/ - int16_t data_index; /*< index into data where needed*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_flexifunction_read_req_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN 6 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN 6 -#define MAVLINK_MSG_ID_151_LEN 6 -#define MAVLINK_MSG_ID_151_MIN_LEN 6 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC 26 -#define MAVLINK_MSG_ID_151_CRC 26 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_READ_REQ { \ - 151, \ - "FLEXIFUNCTION_READ_REQ", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_read_req_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_read_req_t, target_component) }, \ - { "read_req_type", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_flexifunction_read_req_t, read_req_type) }, \ - { "data_index", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_flexifunction_read_req_t, data_index) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_READ_REQ { \ - "FLEXIFUNCTION_READ_REQ", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_flexifunction_read_req_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_flexifunction_read_req_t, target_component) }, \ - { "read_req_type", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_flexifunction_read_req_t, read_req_type) }, \ - { "data_index", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_flexifunction_read_req_t, data_index) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_read_req message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param read_req_type Type of flexifunction data requested - * @param data_index index into data where needed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, int16_t read_req_type, int16_t data_index) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN]; - _mav_put_int16_t(buf, 0, read_req_type); - _mav_put_int16_t(buf, 2, data_index); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#else - mavlink_flexifunction_read_req_t packet; - packet.read_req_type = read_req_type; - packet.data_index = data_index; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -} - -/** - * @brief Pack a flexifunction_read_req message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param read_req_type Type of flexifunction data requested - * @param data_index index into data where needed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, int16_t read_req_type, int16_t data_index) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN]; - _mav_put_int16_t(buf, 0, read_req_type); - _mav_put_int16_t(buf, 2, data_index); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#else - mavlink_flexifunction_read_req_t packet; - packet.read_req_type = read_req_type; - packet.data_index = data_index; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_read_req message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param read_req_type Type of flexifunction data requested - * @param data_index index into data where needed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,int16_t read_req_type,int16_t data_index) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN]; - _mav_put_int16_t(buf, 0, read_req_type); - _mav_put_int16_t(buf, 2, data_index); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#else - mavlink_flexifunction_read_req_t packet; - packet.read_req_type = read_req_type; - packet.data_index = data_index; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -} - -/** - * @brief Encode a flexifunction_read_req struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_read_req C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_read_req_t* flexifunction_read_req) -{ - return mavlink_msg_flexifunction_read_req_pack(system_id, component_id, msg, flexifunction_read_req->target_system, flexifunction_read_req->target_component, flexifunction_read_req->read_req_type, flexifunction_read_req->data_index); -} - -/** - * @brief Encode a flexifunction_read_req struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_read_req C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_read_req_t* flexifunction_read_req) -{ - return mavlink_msg_flexifunction_read_req_pack_chan(system_id, component_id, chan, msg, flexifunction_read_req->target_system, flexifunction_read_req->target_component, flexifunction_read_req->read_req_type, flexifunction_read_req->data_index); -} - -/** - * @brief Encode a flexifunction_read_req struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_read_req C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_read_req_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_read_req_t* flexifunction_read_req) -{ - return mavlink_msg_flexifunction_read_req_pack_status(system_id, component_id, _status, msg, flexifunction_read_req->target_system, flexifunction_read_req->target_component, flexifunction_read_req->read_req_type, flexifunction_read_req->data_index); -} - -/** - * @brief Send a flexifunction_read_req message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param read_req_type Type of flexifunction data requested - * @param data_index index into data where needed - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_read_req_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t read_req_type, int16_t data_index) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN]; - _mav_put_int16_t(buf, 0, read_req_type); - _mav_put_int16_t(buf, 2, data_index); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#else - mavlink_flexifunction_read_req_t packet; - packet.read_req_type = read_req_type; - packet.data_index = data_index; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#endif -} - -/** - * @brief Send a flexifunction_read_req message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_read_req_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_read_req_t* flexifunction_read_req) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_read_req_send(chan, flexifunction_read_req->target_system, flexifunction_read_req->target_component, flexifunction_read_req->read_req_type, flexifunction_read_req->data_index); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ, (const char *)flexifunction_read_req, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_read_req_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t read_req_type, int16_t data_index) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int16_t(buf, 0, read_req_type); - _mav_put_int16_t(buf, 2, data_index); - _mav_put_uint8_t(buf, 4, target_system); - _mav_put_uint8_t(buf, 5, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#else - mavlink_flexifunction_read_req_t *packet = (mavlink_flexifunction_read_req_t *)msgbuf; - packet->read_req_type = read_req_type; - packet->data_index = data_index; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_READ_REQ UNPACKING - - -/** - * @brief Get field target_system from flexifunction_read_req message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_read_req_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field target_component from flexifunction_read_req message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_read_req_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field read_req_type from flexifunction_read_req message - * - * @return Type of flexifunction data requested - */ -static inline int16_t mavlink_msg_flexifunction_read_req_get_read_req_type(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 0); -} - -/** - * @brief Get field data_index from flexifunction_read_req message - * - * @return index into data where needed - */ -static inline int16_t mavlink_msg_flexifunction_read_req_get_data_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 2); -} - -/** - * @brief Decode a flexifunction_read_req message into a struct - * - * @param msg The message to decode - * @param flexifunction_read_req C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_read_req_decode(const mavlink_message_t* msg, mavlink_flexifunction_read_req_t* flexifunction_read_req) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_read_req->read_req_type = mavlink_msg_flexifunction_read_req_get_read_req_type(msg); - flexifunction_read_req->data_index = mavlink_msg_flexifunction_read_req_get_data_index(msg); - flexifunction_read_req->target_system = mavlink_msg_flexifunction_read_req_get_target_system(msg); - flexifunction_read_req->target_component = mavlink_msg_flexifunction_read_req_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN; - memset(flexifunction_read_req, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_LEN); - memcpy(flexifunction_read_req, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_flexifunction_set.h b/matrixpilot/mavlink_msg_flexifunction_set.h deleted file mode 100644 index 0e43ca2cf..000000000 --- a/matrixpilot/mavlink_msg_flexifunction_set.h +++ /dev/null @@ -1,288 +0,0 @@ -#pragma once -// MESSAGE FLEXIFUNCTION_SET PACKING - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_SET 150 - - -typedef struct __mavlink_flexifunction_set_t { - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_flexifunction_set_t; - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN 2 -#define MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN 2 -#define MAVLINK_MSG_ID_150_LEN 2 -#define MAVLINK_MSG_ID_150_MIN_LEN 2 - -#define MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC 181 -#define MAVLINK_MSG_ID_150_CRC 181 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_SET { \ - 150, \ - "FLEXIFUNCTION_SET", \ - 2, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_set_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_set_t, target_component) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_SET { \ - "FLEXIFUNCTION_SET", \ - 2, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_flexifunction_set_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_flexifunction_set_t, target_component) }, \ - } \ -} -#endif - -/** - * @brief Pack a flexifunction_set message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#else - mavlink_flexifunction_set_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_SET; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -} - -/** - * @brief Pack a flexifunction_set message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_set_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#else - mavlink_flexifunction_set_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_SET; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#endif -} - -/** - * @brief Pack a flexifunction_set message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_flexifunction_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#else - mavlink_flexifunction_set_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_SET; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -} - -/** - * @brief Encode a flexifunction_set struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param flexifunction_set C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_set_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_flexifunction_set_t* flexifunction_set) -{ - return mavlink_msg_flexifunction_set_pack(system_id, component_id, msg, flexifunction_set->target_system, flexifunction_set->target_component); -} - -/** - * @brief Encode a flexifunction_set struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param flexifunction_set C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_set_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_flexifunction_set_t* flexifunction_set) -{ - return mavlink_msg_flexifunction_set_pack_chan(system_id, component_id, chan, msg, flexifunction_set->target_system, flexifunction_set->target_component); -} - -/** - * @brief Encode a flexifunction_set struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param flexifunction_set C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_flexifunction_set_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_flexifunction_set_t* flexifunction_set) -{ - return mavlink_msg_flexifunction_set_pack_status(system_id, component_id, _status, msg, flexifunction_set->target_system, flexifunction_set->target_component); -} - -/** - * @brief Send a flexifunction_set message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_flexifunction_set_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#else - mavlink_flexifunction_set_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET, (const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#endif -} - -/** - * @brief Send a flexifunction_set message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_flexifunction_set_send_struct(mavlink_channel_t chan, const mavlink_flexifunction_set_t* flexifunction_set) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_flexifunction_set_send(chan, flexifunction_set->target_system, flexifunction_set->target_component); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET, (const char *)flexifunction_set, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_flexifunction_set_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#else - mavlink_flexifunction_set_t *packet = (mavlink_flexifunction_set_t *)msgbuf; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_SET, (const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FLEXIFUNCTION_SET UNPACKING - - -/** - * @brief Get field target_system from flexifunction_set message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_flexifunction_set_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field target_component from flexifunction_set message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_flexifunction_set_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Decode a flexifunction_set message into a struct - * - * @param msg The message to decode - * @param flexifunction_set C-struct to decode the message contents into - */ -static inline void mavlink_msg_flexifunction_set_decode(const mavlink_message_t* msg, mavlink_flexifunction_set_t* flexifunction_set) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - flexifunction_set->target_system = mavlink_msg_flexifunction_set_get_target_system(msg); - flexifunction_set->target_component = mavlink_msg_flexifunction_set_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN; - memset(flexifunction_set, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_SET_LEN); - memcpy(flexifunction_set, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f13.h b/matrixpilot/mavlink_msg_serial_udb_extra_f13.h deleted file mode 100644 index 24ff226aa..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f13.h +++ /dev/null @@ -1,344 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F13 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13 177 - - -typedef struct __mavlink_serial_udb_extra_f13_t { - int32_t sue_lat_origin; /*< Serial UDB Extra MP Origin Latitude*/ - int32_t sue_lon_origin; /*< Serial UDB Extra MP Origin Longitude*/ - int32_t sue_alt_origin; /*< Serial UDB Extra MP Origin Altitude Above Sea Level*/ - int16_t sue_week_no; /*< Serial UDB Extra GPS Week Number*/ -} mavlink_serial_udb_extra_f13_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN 14 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN 14 -#define MAVLINK_MSG_ID_177_LEN 14 -#define MAVLINK_MSG_ID_177_MIN_LEN 14 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC 249 -#define MAVLINK_MSG_ID_177_CRC 249 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F13 { \ - 177, \ - "SERIAL_UDB_EXTRA_F13", \ - 4, \ - { { "sue_week_no", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_serial_udb_extra_f13_t, sue_week_no) }, \ - { "sue_lat_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f13_t, sue_lat_origin) }, \ - { "sue_lon_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f13_t, sue_lon_origin) }, \ - { "sue_alt_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f13_t, sue_alt_origin) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F13 { \ - "SERIAL_UDB_EXTRA_F13", \ - 4, \ - { { "sue_week_no", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_serial_udb_extra_f13_t, sue_week_no) }, \ - { "sue_lat_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f13_t, sue_lat_origin) }, \ - { "sue_lon_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f13_t, sue_lon_origin) }, \ - { "sue_alt_origin", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f13_t, sue_alt_origin) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f13 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_week_no Serial UDB Extra GPS Week Number - * @param sue_lat_origin Serial UDB Extra MP Origin Latitude - * @param sue_lon_origin Serial UDB Extra MP Origin Longitude - * @param sue_alt_origin Serial UDB Extra MP Origin Altitude Above Sea Level - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - int16_t sue_week_no, int32_t sue_lat_origin, int32_t sue_lon_origin, int32_t sue_alt_origin) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN]; - _mav_put_int32_t(buf, 0, sue_lat_origin); - _mav_put_int32_t(buf, 4, sue_lon_origin); - _mav_put_int32_t(buf, 8, sue_alt_origin); - _mav_put_int16_t(buf, 12, sue_week_no); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#else - mavlink_serial_udb_extra_f13_t packet; - packet.sue_lat_origin = sue_lat_origin; - packet.sue_lon_origin = sue_lon_origin; - packet.sue_alt_origin = sue_alt_origin; - packet.sue_week_no = sue_week_no; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f13 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_week_no Serial UDB Extra GPS Week Number - * @param sue_lat_origin Serial UDB Extra MP Origin Latitude - * @param sue_lon_origin Serial UDB Extra MP Origin Longitude - * @param sue_alt_origin Serial UDB Extra MP Origin Altitude Above Sea Level - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - int16_t sue_week_no, int32_t sue_lat_origin, int32_t sue_lon_origin, int32_t sue_alt_origin) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN]; - _mav_put_int32_t(buf, 0, sue_lat_origin); - _mav_put_int32_t(buf, 4, sue_lon_origin); - _mav_put_int32_t(buf, 8, sue_alt_origin); - _mav_put_int16_t(buf, 12, sue_week_no); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#else - mavlink_serial_udb_extra_f13_t packet; - packet.sue_lat_origin = sue_lat_origin; - packet.sue_lon_origin = sue_lon_origin; - packet.sue_alt_origin = sue_alt_origin; - packet.sue_week_no = sue_week_no; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f13 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_week_no Serial UDB Extra GPS Week Number - * @param sue_lat_origin Serial UDB Extra MP Origin Latitude - * @param sue_lon_origin Serial UDB Extra MP Origin Longitude - * @param sue_alt_origin Serial UDB Extra MP Origin Altitude Above Sea Level - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - int16_t sue_week_no,int32_t sue_lat_origin,int32_t sue_lon_origin,int32_t sue_alt_origin) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN]; - _mav_put_int32_t(buf, 0, sue_lat_origin); - _mav_put_int32_t(buf, 4, sue_lon_origin); - _mav_put_int32_t(buf, 8, sue_alt_origin); - _mav_put_int16_t(buf, 12, sue_week_no); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#else - mavlink_serial_udb_extra_f13_t packet; - packet.sue_lat_origin = sue_lat_origin; - packet.sue_lon_origin = sue_lon_origin; - packet.sue_alt_origin = sue_alt_origin; - packet.sue_week_no = sue_week_no; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f13 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f13 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f13_t* serial_udb_extra_f13) -{ - return mavlink_msg_serial_udb_extra_f13_pack(system_id, component_id, msg, serial_udb_extra_f13->sue_week_no, serial_udb_extra_f13->sue_lat_origin, serial_udb_extra_f13->sue_lon_origin, serial_udb_extra_f13->sue_alt_origin); -} - -/** - * @brief Encode a serial_udb_extra_f13 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f13 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f13_t* serial_udb_extra_f13) -{ - return mavlink_msg_serial_udb_extra_f13_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f13->sue_week_no, serial_udb_extra_f13->sue_lat_origin, serial_udb_extra_f13->sue_lon_origin, serial_udb_extra_f13->sue_alt_origin); -} - -/** - * @brief Encode a serial_udb_extra_f13 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f13 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f13_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f13_t* serial_udb_extra_f13) -{ - return mavlink_msg_serial_udb_extra_f13_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f13->sue_week_no, serial_udb_extra_f13->sue_lat_origin, serial_udb_extra_f13->sue_lon_origin, serial_udb_extra_f13->sue_alt_origin); -} - -/** - * @brief Send a serial_udb_extra_f13 message - * @param chan MAVLink channel to send the message - * - * @param sue_week_no Serial UDB Extra GPS Week Number - * @param sue_lat_origin Serial UDB Extra MP Origin Latitude - * @param sue_lon_origin Serial UDB Extra MP Origin Longitude - * @param sue_alt_origin Serial UDB Extra MP Origin Altitude Above Sea Level - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f13_send(mavlink_channel_t chan, int16_t sue_week_no, int32_t sue_lat_origin, int32_t sue_lon_origin, int32_t sue_alt_origin) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN]; - _mav_put_int32_t(buf, 0, sue_lat_origin); - _mav_put_int32_t(buf, 4, sue_lon_origin); - _mav_put_int32_t(buf, 8, sue_alt_origin); - _mav_put_int16_t(buf, 12, sue_week_no); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#else - mavlink_serial_udb_extra_f13_t packet; - packet.sue_lat_origin = sue_lat_origin; - packet.sue_lon_origin = sue_lon_origin; - packet.sue_alt_origin = sue_alt_origin; - packet.sue_week_no = sue_week_no; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f13 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f13_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f13_t* serial_udb_extra_f13) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f13_send(chan, serial_udb_extra_f13->sue_week_no, serial_udb_extra_f13->sue_lat_origin, serial_udb_extra_f13->sue_lon_origin, serial_udb_extra_f13->sue_alt_origin); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13, (const char *)serial_udb_extra_f13, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f13_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int16_t sue_week_no, int32_t sue_lat_origin, int32_t sue_lon_origin, int32_t sue_alt_origin) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int32_t(buf, 0, sue_lat_origin); - _mav_put_int32_t(buf, 4, sue_lon_origin); - _mav_put_int32_t(buf, 8, sue_alt_origin); - _mav_put_int16_t(buf, 12, sue_week_no); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#else - mavlink_serial_udb_extra_f13_t *packet = (mavlink_serial_udb_extra_f13_t *)msgbuf; - packet->sue_lat_origin = sue_lat_origin; - packet->sue_lon_origin = sue_lon_origin; - packet->sue_alt_origin = sue_alt_origin; - packet->sue_week_no = sue_week_no; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F13 UNPACKING - - -/** - * @brief Get field sue_week_no from serial_udb_extra_f13 message - * - * @return Serial UDB Extra GPS Week Number - */ -static inline int16_t mavlink_msg_serial_udb_extra_f13_get_sue_week_no(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 12); -} - -/** - * @brief Get field sue_lat_origin from serial_udb_extra_f13 message - * - * @return Serial UDB Extra MP Origin Latitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f13_get_sue_lat_origin(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 0); -} - -/** - * @brief Get field sue_lon_origin from serial_udb_extra_f13 message - * - * @return Serial UDB Extra MP Origin Longitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f13_get_sue_lon_origin(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 4); -} - -/** - * @brief Get field sue_alt_origin from serial_udb_extra_f13 message - * - * @return Serial UDB Extra MP Origin Altitude Above Sea Level - */ -static inline int32_t mavlink_msg_serial_udb_extra_f13_get_sue_alt_origin(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Decode a serial_udb_extra_f13 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f13 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f13_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f13_t* serial_udb_extra_f13) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f13->sue_lat_origin = mavlink_msg_serial_udb_extra_f13_get_sue_lat_origin(msg); - serial_udb_extra_f13->sue_lon_origin = mavlink_msg_serial_udb_extra_f13_get_sue_lon_origin(msg); - serial_udb_extra_f13->sue_alt_origin = mavlink_msg_serial_udb_extra_f13_get_sue_alt_origin(msg); - serial_udb_extra_f13->sue_week_no = mavlink_msg_serial_udb_extra_f13_get_sue_week_no(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN; - memset(serial_udb_extra_f13, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_LEN); - memcpy(serial_udb_extra_f13, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f14.h b/matrixpilot/mavlink_msg_serial_udb_extra_f14.h deleted file mode 100644 index 6e6e5bd68..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f14.h +++ /dev/null @@ -1,540 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F14 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14 178 - - -typedef struct __mavlink_serial_udb_extra_f14_t { - uint32_t sue_TRAP_SOURCE; /*< Serial UDB Extra Type Program Address of Last Trap*/ - int16_t sue_RCON; /*< Serial UDB Extra Reboot Register of DSPIC*/ - int16_t sue_TRAP_FLAGS; /*< Serial UDB Extra Last dspic Trap Flags*/ - int16_t sue_osc_fail_count; /*< Serial UDB Extra Number of Ocillator Failures*/ - uint8_t sue_WIND_ESTIMATION; /*< Serial UDB Extra Wind Estimation Enabled*/ - uint8_t sue_GPS_TYPE; /*< Serial UDB Extra Type of GPS Unit*/ - uint8_t sue_DR; /*< Serial UDB Extra Dead Reckoning Enabled*/ - uint8_t sue_BOARD_TYPE; /*< Serial UDB Extra Type of UDB Hardware*/ - uint8_t sue_AIRFRAME; /*< Serial UDB Extra Type of Airframe*/ - uint8_t sue_CLOCK_CONFIG; /*< Serial UDB Extra UDB Internal Clock Configuration*/ - uint8_t sue_FLIGHT_PLAN_TYPE; /*< Serial UDB Extra Type of Flight Plan*/ -} mavlink_serial_udb_extra_f14_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN 17 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN 17 -#define MAVLINK_MSG_ID_178_LEN 17 -#define MAVLINK_MSG_ID_178_MIN_LEN 17 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC 123 -#define MAVLINK_MSG_ID_178_CRC 123 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F14 { \ - 178, \ - "SERIAL_UDB_EXTRA_F14", \ - 11, \ - { { "sue_WIND_ESTIMATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_serial_udb_extra_f14_t, sue_WIND_ESTIMATION) }, \ - { "sue_GPS_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_serial_udb_extra_f14_t, sue_GPS_TYPE) }, \ - { "sue_DR", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_serial_udb_extra_f14_t, sue_DR) }, \ - { "sue_BOARD_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_serial_udb_extra_f14_t, sue_BOARD_TYPE) }, \ - { "sue_AIRFRAME", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_serial_udb_extra_f14_t, sue_AIRFRAME) }, \ - { "sue_RCON", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f14_t, sue_RCON) }, \ - { "sue_TRAP_FLAGS", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f14_t, sue_TRAP_FLAGS) }, \ - { "sue_TRAP_SOURCE", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f14_t, sue_TRAP_SOURCE) }, \ - { "sue_osc_fail_count", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f14_t, sue_osc_fail_count) }, \ - { "sue_CLOCK_CONFIG", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_serial_udb_extra_f14_t, sue_CLOCK_CONFIG) }, \ - { "sue_FLIGHT_PLAN_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_serial_udb_extra_f14_t, sue_FLIGHT_PLAN_TYPE) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F14 { \ - "SERIAL_UDB_EXTRA_F14", \ - 11, \ - { { "sue_WIND_ESTIMATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_serial_udb_extra_f14_t, sue_WIND_ESTIMATION) }, \ - { "sue_GPS_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_serial_udb_extra_f14_t, sue_GPS_TYPE) }, \ - { "sue_DR", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_serial_udb_extra_f14_t, sue_DR) }, \ - { "sue_BOARD_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_serial_udb_extra_f14_t, sue_BOARD_TYPE) }, \ - { "sue_AIRFRAME", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_serial_udb_extra_f14_t, sue_AIRFRAME) }, \ - { "sue_RCON", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f14_t, sue_RCON) }, \ - { "sue_TRAP_FLAGS", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f14_t, sue_TRAP_FLAGS) }, \ - { "sue_TRAP_SOURCE", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f14_t, sue_TRAP_SOURCE) }, \ - { "sue_osc_fail_count", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f14_t, sue_osc_fail_count) }, \ - { "sue_CLOCK_CONFIG", NULL, MAVLINK_TYPE_UINT8_T, 0, 15, offsetof(mavlink_serial_udb_extra_f14_t, sue_CLOCK_CONFIG) }, \ - { "sue_FLIGHT_PLAN_TYPE", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_serial_udb_extra_f14_t, sue_FLIGHT_PLAN_TYPE) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f14 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_WIND_ESTIMATION Serial UDB Extra Wind Estimation Enabled - * @param sue_GPS_TYPE Serial UDB Extra Type of GPS Unit - * @param sue_DR Serial UDB Extra Dead Reckoning Enabled - * @param sue_BOARD_TYPE Serial UDB Extra Type of UDB Hardware - * @param sue_AIRFRAME Serial UDB Extra Type of Airframe - * @param sue_RCON Serial UDB Extra Reboot Register of DSPIC - * @param sue_TRAP_FLAGS Serial UDB Extra Last dspic Trap Flags - * @param sue_TRAP_SOURCE Serial UDB Extra Type Program Address of Last Trap - * @param sue_osc_fail_count Serial UDB Extra Number of Ocillator Failures - * @param sue_CLOCK_CONFIG Serial UDB Extra UDB Internal Clock Configuration - * @param sue_FLIGHT_PLAN_TYPE Serial UDB Extra Type of Flight Plan - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t sue_WIND_ESTIMATION, uint8_t sue_GPS_TYPE, uint8_t sue_DR, uint8_t sue_BOARD_TYPE, uint8_t sue_AIRFRAME, int16_t sue_RCON, int16_t sue_TRAP_FLAGS, uint32_t sue_TRAP_SOURCE, int16_t sue_osc_fail_count, uint8_t sue_CLOCK_CONFIG, uint8_t sue_FLIGHT_PLAN_TYPE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN]; - _mav_put_uint32_t(buf, 0, sue_TRAP_SOURCE); - _mav_put_int16_t(buf, 4, sue_RCON); - _mav_put_int16_t(buf, 6, sue_TRAP_FLAGS); - _mav_put_int16_t(buf, 8, sue_osc_fail_count); - _mav_put_uint8_t(buf, 10, sue_WIND_ESTIMATION); - _mav_put_uint8_t(buf, 11, sue_GPS_TYPE); - _mav_put_uint8_t(buf, 12, sue_DR); - _mav_put_uint8_t(buf, 13, sue_BOARD_TYPE); - _mav_put_uint8_t(buf, 14, sue_AIRFRAME); - _mav_put_uint8_t(buf, 15, sue_CLOCK_CONFIG); - _mav_put_uint8_t(buf, 16, sue_FLIGHT_PLAN_TYPE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#else - mavlink_serial_udb_extra_f14_t packet; - packet.sue_TRAP_SOURCE = sue_TRAP_SOURCE; - packet.sue_RCON = sue_RCON; - packet.sue_TRAP_FLAGS = sue_TRAP_FLAGS; - packet.sue_osc_fail_count = sue_osc_fail_count; - packet.sue_WIND_ESTIMATION = sue_WIND_ESTIMATION; - packet.sue_GPS_TYPE = sue_GPS_TYPE; - packet.sue_DR = sue_DR; - packet.sue_BOARD_TYPE = sue_BOARD_TYPE; - packet.sue_AIRFRAME = sue_AIRFRAME; - packet.sue_CLOCK_CONFIG = sue_CLOCK_CONFIG; - packet.sue_FLIGHT_PLAN_TYPE = sue_FLIGHT_PLAN_TYPE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f14 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_WIND_ESTIMATION Serial UDB Extra Wind Estimation Enabled - * @param sue_GPS_TYPE Serial UDB Extra Type of GPS Unit - * @param sue_DR Serial UDB Extra Dead Reckoning Enabled - * @param sue_BOARD_TYPE Serial UDB Extra Type of UDB Hardware - * @param sue_AIRFRAME Serial UDB Extra Type of Airframe - * @param sue_RCON Serial UDB Extra Reboot Register of DSPIC - * @param sue_TRAP_FLAGS Serial UDB Extra Last dspic Trap Flags - * @param sue_TRAP_SOURCE Serial UDB Extra Type Program Address of Last Trap - * @param sue_osc_fail_count Serial UDB Extra Number of Ocillator Failures - * @param sue_CLOCK_CONFIG Serial UDB Extra UDB Internal Clock Configuration - * @param sue_FLIGHT_PLAN_TYPE Serial UDB Extra Type of Flight Plan - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t sue_WIND_ESTIMATION, uint8_t sue_GPS_TYPE, uint8_t sue_DR, uint8_t sue_BOARD_TYPE, uint8_t sue_AIRFRAME, int16_t sue_RCON, int16_t sue_TRAP_FLAGS, uint32_t sue_TRAP_SOURCE, int16_t sue_osc_fail_count, uint8_t sue_CLOCK_CONFIG, uint8_t sue_FLIGHT_PLAN_TYPE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN]; - _mav_put_uint32_t(buf, 0, sue_TRAP_SOURCE); - _mav_put_int16_t(buf, 4, sue_RCON); - _mav_put_int16_t(buf, 6, sue_TRAP_FLAGS); - _mav_put_int16_t(buf, 8, sue_osc_fail_count); - _mav_put_uint8_t(buf, 10, sue_WIND_ESTIMATION); - _mav_put_uint8_t(buf, 11, sue_GPS_TYPE); - _mav_put_uint8_t(buf, 12, sue_DR); - _mav_put_uint8_t(buf, 13, sue_BOARD_TYPE); - _mav_put_uint8_t(buf, 14, sue_AIRFRAME); - _mav_put_uint8_t(buf, 15, sue_CLOCK_CONFIG); - _mav_put_uint8_t(buf, 16, sue_FLIGHT_PLAN_TYPE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#else - mavlink_serial_udb_extra_f14_t packet; - packet.sue_TRAP_SOURCE = sue_TRAP_SOURCE; - packet.sue_RCON = sue_RCON; - packet.sue_TRAP_FLAGS = sue_TRAP_FLAGS; - packet.sue_osc_fail_count = sue_osc_fail_count; - packet.sue_WIND_ESTIMATION = sue_WIND_ESTIMATION; - packet.sue_GPS_TYPE = sue_GPS_TYPE; - packet.sue_DR = sue_DR; - packet.sue_BOARD_TYPE = sue_BOARD_TYPE; - packet.sue_AIRFRAME = sue_AIRFRAME; - packet.sue_CLOCK_CONFIG = sue_CLOCK_CONFIG; - packet.sue_FLIGHT_PLAN_TYPE = sue_FLIGHT_PLAN_TYPE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f14 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_WIND_ESTIMATION Serial UDB Extra Wind Estimation Enabled - * @param sue_GPS_TYPE Serial UDB Extra Type of GPS Unit - * @param sue_DR Serial UDB Extra Dead Reckoning Enabled - * @param sue_BOARD_TYPE Serial UDB Extra Type of UDB Hardware - * @param sue_AIRFRAME Serial UDB Extra Type of Airframe - * @param sue_RCON Serial UDB Extra Reboot Register of DSPIC - * @param sue_TRAP_FLAGS Serial UDB Extra Last dspic Trap Flags - * @param sue_TRAP_SOURCE Serial UDB Extra Type Program Address of Last Trap - * @param sue_osc_fail_count Serial UDB Extra Number of Ocillator Failures - * @param sue_CLOCK_CONFIG Serial UDB Extra UDB Internal Clock Configuration - * @param sue_FLIGHT_PLAN_TYPE Serial UDB Extra Type of Flight Plan - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t sue_WIND_ESTIMATION,uint8_t sue_GPS_TYPE,uint8_t sue_DR,uint8_t sue_BOARD_TYPE,uint8_t sue_AIRFRAME,int16_t sue_RCON,int16_t sue_TRAP_FLAGS,uint32_t sue_TRAP_SOURCE,int16_t sue_osc_fail_count,uint8_t sue_CLOCK_CONFIG,uint8_t sue_FLIGHT_PLAN_TYPE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN]; - _mav_put_uint32_t(buf, 0, sue_TRAP_SOURCE); - _mav_put_int16_t(buf, 4, sue_RCON); - _mav_put_int16_t(buf, 6, sue_TRAP_FLAGS); - _mav_put_int16_t(buf, 8, sue_osc_fail_count); - _mav_put_uint8_t(buf, 10, sue_WIND_ESTIMATION); - _mav_put_uint8_t(buf, 11, sue_GPS_TYPE); - _mav_put_uint8_t(buf, 12, sue_DR); - _mav_put_uint8_t(buf, 13, sue_BOARD_TYPE); - _mav_put_uint8_t(buf, 14, sue_AIRFRAME); - _mav_put_uint8_t(buf, 15, sue_CLOCK_CONFIG); - _mav_put_uint8_t(buf, 16, sue_FLIGHT_PLAN_TYPE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#else - mavlink_serial_udb_extra_f14_t packet; - packet.sue_TRAP_SOURCE = sue_TRAP_SOURCE; - packet.sue_RCON = sue_RCON; - packet.sue_TRAP_FLAGS = sue_TRAP_FLAGS; - packet.sue_osc_fail_count = sue_osc_fail_count; - packet.sue_WIND_ESTIMATION = sue_WIND_ESTIMATION; - packet.sue_GPS_TYPE = sue_GPS_TYPE; - packet.sue_DR = sue_DR; - packet.sue_BOARD_TYPE = sue_BOARD_TYPE; - packet.sue_AIRFRAME = sue_AIRFRAME; - packet.sue_CLOCK_CONFIG = sue_CLOCK_CONFIG; - packet.sue_FLIGHT_PLAN_TYPE = sue_FLIGHT_PLAN_TYPE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f14 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f14 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f14_t* serial_udb_extra_f14) -{ - return mavlink_msg_serial_udb_extra_f14_pack(system_id, component_id, msg, serial_udb_extra_f14->sue_WIND_ESTIMATION, serial_udb_extra_f14->sue_GPS_TYPE, serial_udb_extra_f14->sue_DR, serial_udb_extra_f14->sue_BOARD_TYPE, serial_udb_extra_f14->sue_AIRFRAME, serial_udb_extra_f14->sue_RCON, serial_udb_extra_f14->sue_TRAP_FLAGS, serial_udb_extra_f14->sue_TRAP_SOURCE, serial_udb_extra_f14->sue_osc_fail_count, serial_udb_extra_f14->sue_CLOCK_CONFIG, serial_udb_extra_f14->sue_FLIGHT_PLAN_TYPE); -} - -/** - * @brief Encode a serial_udb_extra_f14 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f14 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f14_t* serial_udb_extra_f14) -{ - return mavlink_msg_serial_udb_extra_f14_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f14->sue_WIND_ESTIMATION, serial_udb_extra_f14->sue_GPS_TYPE, serial_udb_extra_f14->sue_DR, serial_udb_extra_f14->sue_BOARD_TYPE, serial_udb_extra_f14->sue_AIRFRAME, serial_udb_extra_f14->sue_RCON, serial_udb_extra_f14->sue_TRAP_FLAGS, serial_udb_extra_f14->sue_TRAP_SOURCE, serial_udb_extra_f14->sue_osc_fail_count, serial_udb_extra_f14->sue_CLOCK_CONFIG, serial_udb_extra_f14->sue_FLIGHT_PLAN_TYPE); -} - -/** - * @brief Encode a serial_udb_extra_f14 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f14 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f14_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f14_t* serial_udb_extra_f14) -{ - return mavlink_msg_serial_udb_extra_f14_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f14->sue_WIND_ESTIMATION, serial_udb_extra_f14->sue_GPS_TYPE, serial_udb_extra_f14->sue_DR, serial_udb_extra_f14->sue_BOARD_TYPE, serial_udb_extra_f14->sue_AIRFRAME, serial_udb_extra_f14->sue_RCON, serial_udb_extra_f14->sue_TRAP_FLAGS, serial_udb_extra_f14->sue_TRAP_SOURCE, serial_udb_extra_f14->sue_osc_fail_count, serial_udb_extra_f14->sue_CLOCK_CONFIG, serial_udb_extra_f14->sue_FLIGHT_PLAN_TYPE); -} - -/** - * @brief Send a serial_udb_extra_f14 message - * @param chan MAVLink channel to send the message - * - * @param sue_WIND_ESTIMATION Serial UDB Extra Wind Estimation Enabled - * @param sue_GPS_TYPE Serial UDB Extra Type of GPS Unit - * @param sue_DR Serial UDB Extra Dead Reckoning Enabled - * @param sue_BOARD_TYPE Serial UDB Extra Type of UDB Hardware - * @param sue_AIRFRAME Serial UDB Extra Type of Airframe - * @param sue_RCON Serial UDB Extra Reboot Register of DSPIC - * @param sue_TRAP_FLAGS Serial UDB Extra Last dspic Trap Flags - * @param sue_TRAP_SOURCE Serial UDB Extra Type Program Address of Last Trap - * @param sue_osc_fail_count Serial UDB Extra Number of Ocillator Failures - * @param sue_CLOCK_CONFIG Serial UDB Extra UDB Internal Clock Configuration - * @param sue_FLIGHT_PLAN_TYPE Serial UDB Extra Type of Flight Plan - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f14_send(mavlink_channel_t chan, uint8_t sue_WIND_ESTIMATION, uint8_t sue_GPS_TYPE, uint8_t sue_DR, uint8_t sue_BOARD_TYPE, uint8_t sue_AIRFRAME, int16_t sue_RCON, int16_t sue_TRAP_FLAGS, uint32_t sue_TRAP_SOURCE, int16_t sue_osc_fail_count, uint8_t sue_CLOCK_CONFIG, uint8_t sue_FLIGHT_PLAN_TYPE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN]; - _mav_put_uint32_t(buf, 0, sue_TRAP_SOURCE); - _mav_put_int16_t(buf, 4, sue_RCON); - _mav_put_int16_t(buf, 6, sue_TRAP_FLAGS); - _mav_put_int16_t(buf, 8, sue_osc_fail_count); - _mav_put_uint8_t(buf, 10, sue_WIND_ESTIMATION); - _mav_put_uint8_t(buf, 11, sue_GPS_TYPE); - _mav_put_uint8_t(buf, 12, sue_DR); - _mav_put_uint8_t(buf, 13, sue_BOARD_TYPE); - _mav_put_uint8_t(buf, 14, sue_AIRFRAME); - _mav_put_uint8_t(buf, 15, sue_CLOCK_CONFIG); - _mav_put_uint8_t(buf, 16, sue_FLIGHT_PLAN_TYPE); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#else - mavlink_serial_udb_extra_f14_t packet; - packet.sue_TRAP_SOURCE = sue_TRAP_SOURCE; - packet.sue_RCON = sue_RCON; - packet.sue_TRAP_FLAGS = sue_TRAP_FLAGS; - packet.sue_osc_fail_count = sue_osc_fail_count; - packet.sue_WIND_ESTIMATION = sue_WIND_ESTIMATION; - packet.sue_GPS_TYPE = sue_GPS_TYPE; - packet.sue_DR = sue_DR; - packet.sue_BOARD_TYPE = sue_BOARD_TYPE; - packet.sue_AIRFRAME = sue_AIRFRAME; - packet.sue_CLOCK_CONFIG = sue_CLOCK_CONFIG; - packet.sue_FLIGHT_PLAN_TYPE = sue_FLIGHT_PLAN_TYPE; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f14 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f14_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f14_t* serial_udb_extra_f14) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f14_send(chan, serial_udb_extra_f14->sue_WIND_ESTIMATION, serial_udb_extra_f14->sue_GPS_TYPE, serial_udb_extra_f14->sue_DR, serial_udb_extra_f14->sue_BOARD_TYPE, serial_udb_extra_f14->sue_AIRFRAME, serial_udb_extra_f14->sue_RCON, serial_udb_extra_f14->sue_TRAP_FLAGS, serial_udb_extra_f14->sue_TRAP_SOURCE, serial_udb_extra_f14->sue_osc_fail_count, serial_udb_extra_f14->sue_CLOCK_CONFIG, serial_udb_extra_f14->sue_FLIGHT_PLAN_TYPE); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14, (const char *)serial_udb_extra_f14, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f14_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sue_WIND_ESTIMATION, uint8_t sue_GPS_TYPE, uint8_t sue_DR, uint8_t sue_BOARD_TYPE, uint8_t sue_AIRFRAME, int16_t sue_RCON, int16_t sue_TRAP_FLAGS, uint32_t sue_TRAP_SOURCE, int16_t sue_osc_fail_count, uint8_t sue_CLOCK_CONFIG, uint8_t sue_FLIGHT_PLAN_TYPE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, sue_TRAP_SOURCE); - _mav_put_int16_t(buf, 4, sue_RCON); - _mav_put_int16_t(buf, 6, sue_TRAP_FLAGS); - _mav_put_int16_t(buf, 8, sue_osc_fail_count); - _mav_put_uint8_t(buf, 10, sue_WIND_ESTIMATION); - _mav_put_uint8_t(buf, 11, sue_GPS_TYPE); - _mav_put_uint8_t(buf, 12, sue_DR); - _mav_put_uint8_t(buf, 13, sue_BOARD_TYPE); - _mav_put_uint8_t(buf, 14, sue_AIRFRAME); - _mav_put_uint8_t(buf, 15, sue_CLOCK_CONFIG); - _mav_put_uint8_t(buf, 16, sue_FLIGHT_PLAN_TYPE); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#else - mavlink_serial_udb_extra_f14_t *packet = (mavlink_serial_udb_extra_f14_t *)msgbuf; - packet->sue_TRAP_SOURCE = sue_TRAP_SOURCE; - packet->sue_RCON = sue_RCON; - packet->sue_TRAP_FLAGS = sue_TRAP_FLAGS; - packet->sue_osc_fail_count = sue_osc_fail_count; - packet->sue_WIND_ESTIMATION = sue_WIND_ESTIMATION; - packet->sue_GPS_TYPE = sue_GPS_TYPE; - packet->sue_DR = sue_DR; - packet->sue_BOARD_TYPE = sue_BOARD_TYPE; - packet->sue_AIRFRAME = sue_AIRFRAME; - packet->sue_CLOCK_CONFIG = sue_CLOCK_CONFIG; - packet->sue_FLIGHT_PLAN_TYPE = sue_FLIGHT_PLAN_TYPE; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F14 UNPACKING - - -/** - * @brief Get field sue_WIND_ESTIMATION from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Wind Estimation Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_WIND_ESTIMATION(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 10); -} - -/** - * @brief Get field sue_GPS_TYPE from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Type of GPS Unit - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_GPS_TYPE(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 11); -} - -/** - * @brief Get field sue_DR from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Dead Reckoning Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_DR(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 12); -} - -/** - * @brief Get field sue_BOARD_TYPE from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Type of UDB Hardware - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_BOARD_TYPE(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 13); -} - -/** - * @brief Get field sue_AIRFRAME from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Type of Airframe - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_AIRFRAME(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 14); -} - -/** - * @brief Get field sue_RCON from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Reboot Register of DSPIC - */ -static inline int16_t mavlink_msg_serial_udb_extra_f14_get_sue_RCON(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 4); -} - -/** - * @brief Get field sue_TRAP_FLAGS from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Last dspic Trap Flags - */ -static inline int16_t mavlink_msg_serial_udb_extra_f14_get_sue_TRAP_FLAGS(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 6); -} - -/** - * @brief Get field sue_TRAP_SOURCE from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Type Program Address of Last Trap - */ -static inline uint32_t mavlink_msg_serial_udb_extra_f14_get_sue_TRAP_SOURCE(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field sue_osc_fail_count from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Number of Ocillator Failures - */ -static inline int16_t mavlink_msg_serial_udb_extra_f14_get_sue_osc_fail_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 8); -} - -/** - * @brief Get field sue_CLOCK_CONFIG from serial_udb_extra_f14 message - * - * @return Serial UDB Extra UDB Internal Clock Configuration - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_CLOCK_CONFIG(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 15); -} - -/** - * @brief Get field sue_FLIGHT_PLAN_TYPE from serial_udb_extra_f14 message - * - * @return Serial UDB Extra Type of Flight Plan - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f14_get_sue_FLIGHT_PLAN_TYPE(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 16); -} - -/** - * @brief Decode a serial_udb_extra_f14 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f14 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f14_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f14_t* serial_udb_extra_f14) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f14->sue_TRAP_SOURCE = mavlink_msg_serial_udb_extra_f14_get_sue_TRAP_SOURCE(msg); - serial_udb_extra_f14->sue_RCON = mavlink_msg_serial_udb_extra_f14_get_sue_RCON(msg); - serial_udb_extra_f14->sue_TRAP_FLAGS = mavlink_msg_serial_udb_extra_f14_get_sue_TRAP_FLAGS(msg); - serial_udb_extra_f14->sue_osc_fail_count = mavlink_msg_serial_udb_extra_f14_get_sue_osc_fail_count(msg); - serial_udb_extra_f14->sue_WIND_ESTIMATION = mavlink_msg_serial_udb_extra_f14_get_sue_WIND_ESTIMATION(msg); - serial_udb_extra_f14->sue_GPS_TYPE = mavlink_msg_serial_udb_extra_f14_get_sue_GPS_TYPE(msg); - serial_udb_extra_f14->sue_DR = mavlink_msg_serial_udb_extra_f14_get_sue_DR(msg); - serial_udb_extra_f14->sue_BOARD_TYPE = mavlink_msg_serial_udb_extra_f14_get_sue_BOARD_TYPE(msg); - serial_udb_extra_f14->sue_AIRFRAME = mavlink_msg_serial_udb_extra_f14_get_sue_AIRFRAME(msg); - serial_udb_extra_f14->sue_CLOCK_CONFIG = mavlink_msg_serial_udb_extra_f14_get_sue_CLOCK_CONFIG(msg); - serial_udb_extra_f14->sue_FLIGHT_PLAN_TYPE = mavlink_msg_serial_udb_extra_f14_get_sue_FLIGHT_PLAN_TYPE(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN; - memset(serial_udb_extra_f14, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_LEN); - memcpy(serial_udb_extra_f14, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f15.h b/matrixpilot/mavlink_msg_serial_udb_extra_f15.h deleted file mode 100644 index dd9db7658..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f15.h +++ /dev/null @@ -1,289 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F15 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15 179 - - -typedef struct __mavlink_serial_udb_extra_f15_t { - uint8_t sue_ID_VEHICLE_MODEL_NAME[40]; /*< Serial UDB Extra Model Name Of Vehicle*/ - uint8_t sue_ID_VEHICLE_REGISTRATION[20]; /*< Serial UDB Extra Registraton Number of Vehicle*/ -} mavlink_serial_udb_extra_f15_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN 60 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN 60 -#define MAVLINK_MSG_ID_179_LEN 60 -#define MAVLINK_MSG_ID_179_MIN_LEN 60 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC 7 -#define MAVLINK_MSG_ID_179_CRC 7 - -#define MAVLINK_MSG_SERIAL_UDB_EXTRA_F15_FIELD_SUE_ID_VEHICLE_MODEL_NAME_LEN 40 -#define MAVLINK_MSG_SERIAL_UDB_EXTRA_F15_FIELD_SUE_ID_VEHICLE_REGISTRATION_LEN 20 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F15 { \ - 179, \ - "SERIAL_UDB_EXTRA_F15", \ - 2, \ - { { "sue_ID_VEHICLE_MODEL_NAME", NULL, MAVLINK_TYPE_UINT8_T, 40, 0, offsetof(mavlink_serial_udb_extra_f15_t, sue_ID_VEHICLE_MODEL_NAME) }, \ - { "sue_ID_VEHICLE_REGISTRATION", NULL, MAVLINK_TYPE_UINT8_T, 20, 40, offsetof(mavlink_serial_udb_extra_f15_t, sue_ID_VEHICLE_REGISTRATION) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F15 { \ - "SERIAL_UDB_EXTRA_F15", \ - 2, \ - { { "sue_ID_VEHICLE_MODEL_NAME", NULL, MAVLINK_TYPE_UINT8_T, 40, 0, offsetof(mavlink_serial_udb_extra_f15_t, sue_ID_VEHICLE_MODEL_NAME) }, \ - { "sue_ID_VEHICLE_REGISTRATION", NULL, MAVLINK_TYPE_UINT8_T, 20, 40, offsetof(mavlink_serial_udb_extra_f15_t, sue_ID_VEHICLE_REGISTRATION) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f15 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_ID_VEHICLE_MODEL_NAME Serial UDB Extra Model Name Of Vehicle - * @param sue_ID_VEHICLE_REGISTRATION Serial UDB Extra Registraton Number of Vehicle - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - const uint8_t *sue_ID_VEHICLE_MODEL_NAME, const uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_VEHICLE_MODEL_NAME, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_VEHICLE_REGISTRATION, 20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#else - mavlink_serial_udb_extra_f15_t packet; - - mav_array_memcpy(packet.sue_ID_VEHICLE_MODEL_NAME, sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_VEHICLE_REGISTRATION, sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f15 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_ID_VEHICLE_MODEL_NAME Serial UDB Extra Model Name Of Vehicle - * @param sue_ID_VEHICLE_REGISTRATION Serial UDB Extra Registraton Number of Vehicle - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - const uint8_t *sue_ID_VEHICLE_MODEL_NAME, const uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_VEHICLE_MODEL_NAME, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_VEHICLE_REGISTRATION, 20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#else - mavlink_serial_udb_extra_f15_t packet; - - mav_array_memcpy(packet.sue_ID_VEHICLE_MODEL_NAME, sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_VEHICLE_REGISTRATION, sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f15 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_ID_VEHICLE_MODEL_NAME Serial UDB Extra Model Name Of Vehicle - * @param sue_ID_VEHICLE_REGISTRATION Serial UDB Extra Registraton Number of Vehicle - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - const uint8_t *sue_ID_VEHICLE_MODEL_NAME,const uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_VEHICLE_MODEL_NAME, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_VEHICLE_REGISTRATION, 20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#else - mavlink_serial_udb_extra_f15_t packet; - - mav_array_memcpy(packet.sue_ID_VEHICLE_MODEL_NAME, sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_VEHICLE_REGISTRATION, sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f15 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f15 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f15_t* serial_udb_extra_f15) -{ - return mavlink_msg_serial_udb_extra_f15_pack(system_id, component_id, msg, serial_udb_extra_f15->sue_ID_VEHICLE_MODEL_NAME, serial_udb_extra_f15->sue_ID_VEHICLE_REGISTRATION); -} - -/** - * @brief Encode a serial_udb_extra_f15 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f15 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f15_t* serial_udb_extra_f15) -{ - return mavlink_msg_serial_udb_extra_f15_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f15->sue_ID_VEHICLE_MODEL_NAME, serial_udb_extra_f15->sue_ID_VEHICLE_REGISTRATION); -} - -/** - * @brief Encode a serial_udb_extra_f15 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f15 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f15_t* serial_udb_extra_f15) -{ - return mavlink_msg_serial_udb_extra_f15_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f15->sue_ID_VEHICLE_MODEL_NAME, serial_udb_extra_f15->sue_ID_VEHICLE_REGISTRATION); -} - -/** - * @brief Send a serial_udb_extra_f15 message - * @param chan MAVLink channel to send the message - * - * @param sue_ID_VEHICLE_MODEL_NAME Serial UDB Extra Model Name Of Vehicle - * @param sue_ID_VEHICLE_REGISTRATION Serial UDB Extra Registraton Number of Vehicle - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f15_send(mavlink_channel_t chan, const uint8_t *sue_ID_VEHICLE_MODEL_NAME, const uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_VEHICLE_MODEL_NAME, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_VEHICLE_REGISTRATION, 20); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#else - mavlink_serial_udb_extra_f15_t packet; - - mav_array_memcpy(packet.sue_ID_VEHICLE_MODEL_NAME, sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_VEHICLE_REGISTRATION, sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f15 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f15_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f15_t* serial_udb_extra_f15) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f15_send(chan, serial_udb_extra_f15->sue_ID_VEHICLE_MODEL_NAME, serial_udb_extra_f15->sue_ID_VEHICLE_REGISTRATION); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15, (const char *)serial_udb_extra_f15, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f15_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *sue_ID_VEHICLE_MODEL_NAME, const uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - - _mav_put_uint8_t_array(buf, 0, sue_ID_VEHICLE_MODEL_NAME, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_VEHICLE_REGISTRATION, 20); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#else - mavlink_serial_udb_extra_f15_t *packet = (mavlink_serial_udb_extra_f15_t *)msgbuf; - - mav_array_memcpy(packet->sue_ID_VEHICLE_MODEL_NAME, sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet->sue_ID_VEHICLE_REGISTRATION, sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F15 UNPACKING - - -/** - * @brief Get field sue_ID_VEHICLE_MODEL_NAME from serial_udb_extra_f15 message - * - * @return Serial UDB Extra Model Name Of Vehicle - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_get_sue_ID_VEHICLE_MODEL_NAME(const mavlink_message_t* msg, uint8_t *sue_ID_VEHICLE_MODEL_NAME) -{ - return _MAV_RETURN_uint8_t_array(msg, sue_ID_VEHICLE_MODEL_NAME, 40, 0); -} - -/** - * @brief Get field sue_ID_VEHICLE_REGISTRATION from serial_udb_extra_f15 message - * - * @return Serial UDB Extra Registraton Number of Vehicle - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f15_get_sue_ID_VEHICLE_REGISTRATION(const mavlink_message_t* msg, uint8_t *sue_ID_VEHICLE_REGISTRATION) -{ - return _MAV_RETURN_uint8_t_array(msg, sue_ID_VEHICLE_REGISTRATION, 20, 40); -} - -/** - * @brief Decode a serial_udb_extra_f15 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f15 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f15_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f15_t* serial_udb_extra_f15) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f15_get_sue_ID_VEHICLE_MODEL_NAME(msg, serial_udb_extra_f15->sue_ID_VEHICLE_MODEL_NAME); - mavlink_msg_serial_udb_extra_f15_get_sue_ID_VEHICLE_REGISTRATION(msg, serial_udb_extra_f15->sue_ID_VEHICLE_REGISTRATION); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN; - memset(serial_udb_extra_f15, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_LEN); - memcpy(serial_udb_extra_f15, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f16.h b/matrixpilot/mavlink_msg_serial_udb_extra_f16.h deleted file mode 100644 index 2662eebe9..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f16.h +++ /dev/null @@ -1,289 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F16 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16 180 - - -typedef struct __mavlink_serial_udb_extra_f16_t { - uint8_t sue_ID_LEAD_PILOT[40]; /*< Serial UDB Extra Name of Expected Lead Pilot*/ - uint8_t sue_ID_DIY_DRONES_URL[70]; /*< Serial UDB Extra URL of Lead Pilot or Team*/ -} mavlink_serial_udb_extra_f16_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN 110 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN 110 -#define MAVLINK_MSG_ID_180_LEN 110 -#define MAVLINK_MSG_ID_180_MIN_LEN 110 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC 222 -#define MAVLINK_MSG_ID_180_CRC 222 - -#define MAVLINK_MSG_SERIAL_UDB_EXTRA_F16_FIELD_SUE_ID_LEAD_PILOT_LEN 40 -#define MAVLINK_MSG_SERIAL_UDB_EXTRA_F16_FIELD_SUE_ID_DIY_DRONES_URL_LEN 70 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F16 { \ - 180, \ - "SERIAL_UDB_EXTRA_F16", \ - 2, \ - { { "sue_ID_LEAD_PILOT", NULL, MAVLINK_TYPE_UINT8_T, 40, 0, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_LEAD_PILOT) }, \ - { "sue_ID_DIY_DRONES_URL", NULL, MAVLINK_TYPE_UINT8_T, 70, 40, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_DIY_DRONES_URL) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F16 { \ - "SERIAL_UDB_EXTRA_F16", \ - 2, \ - { { "sue_ID_LEAD_PILOT", NULL, MAVLINK_TYPE_UINT8_T, 40, 0, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_LEAD_PILOT) }, \ - { "sue_ID_DIY_DRONES_URL", NULL, MAVLINK_TYPE_UINT8_T, 70, 40, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_DIY_DRONES_URL) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f16 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_ID_LEAD_PILOT Serial UDB Extra Name of Expected Lead Pilot - * @param sue_ID_DIY_DRONES_URL Serial UDB Extra URL of Lead Pilot or Team - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#else - mavlink_serial_udb_extra_f16_t packet; - - mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f16 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_ID_LEAD_PILOT Serial UDB Extra Name of Expected Lead Pilot - * @param sue_ID_DIY_DRONES_URL Serial UDB Extra URL of Lead Pilot or Team - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#else - mavlink_serial_udb_extra_f16_t packet; - - mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f16 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_ID_LEAD_PILOT Serial UDB Extra Name of Expected Lead Pilot - * @param sue_ID_DIY_DRONES_URL Serial UDB Extra URL of Lead Pilot or Team - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - const uint8_t *sue_ID_LEAD_PILOT,const uint8_t *sue_ID_DIY_DRONES_URL) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#else - mavlink_serial_udb_extra_f16_t packet; - - mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f16 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f16 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16) -{ - return mavlink_msg_serial_udb_extra_f16_pack(system_id, component_id, msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL); -} - -/** - * @brief Encode a serial_udb_extra_f16 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f16 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16) -{ - return mavlink_msg_serial_udb_extra_f16_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL); -} - -/** - * @brief Encode a serial_udb_extra_f16 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f16 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16) -{ - return mavlink_msg_serial_udb_extra_f16_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL); -} - -/** - * @brief Send a serial_udb_extra_f16 message - * @param chan MAVLink channel to send the message - * - * @param sue_ID_LEAD_PILOT Serial UDB Extra Name of Expected Lead Pilot - * @param sue_ID_DIY_DRONES_URL Serial UDB Extra URL of Lead Pilot or Team - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f16_send(mavlink_channel_t chan, const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN]; - - _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#else - mavlink_serial_udb_extra_f16_t packet; - - mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f16 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f16_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f16_send(chan, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, (const char *)serial_udb_extra_f16, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f16_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - - _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40); - _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#else - mavlink_serial_udb_extra_f16_t *packet = (mavlink_serial_udb_extra_f16_t *)msgbuf; - - mav_array_memcpy(packet->sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet->sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F16 UNPACKING - - -/** - * @brief Get field sue_ID_LEAD_PILOT from serial_udb_extra_f16 message - * - * @return Serial UDB Extra Name of Expected Lead Pilot - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_get_sue_ID_LEAD_PILOT(const mavlink_message_t* msg, uint8_t *sue_ID_LEAD_PILOT) -{ - return _MAV_RETURN_uint8_t_array(msg, sue_ID_LEAD_PILOT, 40, 0); -} - -/** - * @brief Get field sue_ID_DIY_DRONES_URL from serial_udb_extra_f16 message - * - * @return Serial UDB Extra URL of Lead Pilot or Team - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f16_get_sue_ID_DIY_DRONES_URL(const mavlink_message_t* msg, uint8_t *sue_ID_DIY_DRONES_URL) -{ - return _MAV_RETURN_uint8_t_array(msg, sue_ID_DIY_DRONES_URL, 70, 40); -} - -/** - * @brief Decode a serial_udb_extra_f16 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f16 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f16_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f16_get_sue_ID_LEAD_PILOT(msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT); - mavlink_msg_serial_udb_extra_f16_get_sue_ID_DIY_DRONES_URL(msg, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN; - memset(serial_udb_extra_f16, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN); - memcpy(serial_udb_extra_f16, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f17.h b/matrixpilot/mavlink_msg_serial_udb_extra_f17.h deleted file mode 100644 index f5daa92fc..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f17.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F17 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17 183 - - -typedef struct __mavlink_serial_udb_extra_f17_t { - float sue_feed_forward; /*< SUE Feed Forward Gain*/ - float sue_turn_rate_nav; /*< SUE Max Turn Rate when Navigating*/ - float sue_turn_rate_fbw; /*< SUE Max Turn Rate in Fly By Wire Mode*/ -} mavlink_serial_udb_extra_f17_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN 12 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN 12 -#define MAVLINK_MSG_ID_183_LEN 12 -#define MAVLINK_MSG_ID_183_MIN_LEN 12 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC 175 -#define MAVLINK_MSG_ID_183_CRC 175 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F17 { \ - 183, \ - "SERIAL_UDB_EXTRA_F17", \ - 3, \ - { { "sue_feed_forward", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f17_t, sue_feed_forward) }, \ - { "sue_turn_rate_nav", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f17_t, sue_turn_rate_nav) }, \ - { "sue_turn_rate_fbw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f17_t, sue_turn_rate_fbw) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F17 { \ - "SERIAL_UDB_EXTRA_F17", \ - 3, \ - { { "sue_feed_forward", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f17_t, sue_feed_forward) }, \ - { "sue_turn_rate_nav", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f17_t, sue_turn_rate_nav) }, \ - { "sue_turn_rate_fbw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f17_t, sue_turn_rate_fbw) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f17 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_feed_forward SUE Feed Forward Gain - * @param sue_turn_rate_nav SUE Max Turn Rate when Navigating - * @param sue_turn_rate_fbw SUE Max Turn Rate in Fly By Wire Mode - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float sue_feed_forward, float sue_turn_rate_nav, float sue_turn_rate_fbw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN]; - _mav_put_float(buf, 0, sue_feed_forward); - _mav_put_float(buf, 4, sue_turn_rate_nav); - _mav_put_float(buf, 8, sue_turn_rate_fbw); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#else - mavlink_serial_udb_extra_f17_t packet; - packet.sue_feed_forward = sue_feed_forward; - packet.sue_turn_rate_nav = sue_turn_rate_nav; - packet.sue_turn_rate_fbw = sue_turn_rate_fbw; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f17 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_feed_forward SUE Feed Forward Gain - * @param sue_turn_rate_nav SUE Max Turn Rate when Navigating - * @param sue_turn_rate_fbw SUE Max Turn Rate in Fly By Wire Mode - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float sue_feed_forward, float sue_turn_rate_nav, float sue_turn_rate_fbw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN]; - _mav_put_float(buf, 0, sue_feed_forward); - _mav_put_float(buf, 4, sue_turn_rate_nav); - _mav_put_float(buf, 8, sue_turn_rate_fbw); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#else - mavlink_serial_udb_extra_f17_t packet; - packet.sue_feed_forward = sue_feed_forward; - packet.sue_turn_rate_nav = sue_turn_rate_nav; - packet.sue_turn_rate_fbw = sue_turn_rate_fbw; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f17 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_feed_forward SUE Feed Forward Gain - * @param sue_turn_rate_nav SUE Max Turn Rate when Navigating - * @param sue_turn_rate_fbw SUE Max Turn Rate in Fly By Wire Mode - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float sue_feed_forward,float sue_turn_rate_nav,float sue_turn_rate_fbw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN]; - _mav_put_float(buf, 0, sue_feed_forward); - _mav_put_float(buf, 4, sue_turn_rate_nav); - _mav_put_float(buf, 8, sue_turn_rate_fbw); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#else - mavlink_serial_udb_extra_f17_t packet; - packet.sue_feed_forward = sue_feed_forward; - packet.sue_turn_rate_nav = sue_turn_rate_nav; - packet.sue_turn_rate_fbw = sue_turn_rate_fbw; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f17 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f17 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f17_t* serial_udb_extra_f17) -{ - return mavlink_msg_serial_udb_extra_f17_pack(system_id, component_id, msg, serial_udb_extra_f17->sue_feed_forward, serial_udb_extra_f17->sue_turn_rate_nav, serial_udb_extra_f17->sue_turn_rate_fbw); -} - -/** - * @brief Encode a serial_udb_extra_f17 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f17 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f17_t* serial_udb_extra_f17) -{ - return mavlink_msg_serial_udb_extra_f17_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f17->sue_feed_forward, serial_udb_extra_f17->sue_turn_rate_nav, serial_udb_extra_f17->sue_turn_rate_fbw); -} - -/** - * @brief Encode a serial_udb_extra_f17 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f17 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f17_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f17_t* serial_udb_extra_f17) -{ - return mavlink_msg_serial_udb_extra_f17_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f17->sue_feed_forward, serial_udb_extra_f17->sue_turn_rate_nav, serial_udb_extra_f17->sue_turn_rate_fbw); -} - -/** - * @brief Send a serial_udb_extra_f17 message - * @param chan MAVLink channel to send the message - * - * @param sue_feed_forward SUE Feed Forward Gain - * @param sue_turn_rate_nav SUE Max Turn Rate when Navigating - * @param sue_turn_rate_fbw SUE Max Turn Rate in Fly By Wire Mode - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f17_send(mavlink_channel_t chan, float sue_feed_forward, float sue_turn_rate_nav, float sue_turn_rate_fbw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN]; - _mav_put_float(buf, 0, sue_feed_forward); - _mav_put_float(buf, 4, sue_turn_rate_nav); - _mav_put_float(buf, 8, sue_turn_rate_fbw); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#else - mavlink_serial_udb_extra_f17_t packet; - packet.sue_feed_forward = sue_feed_forward; - packet.sue_turn_rate_nav = sue_turn_rate_nav; - packet.sue_turn_rate_fbw = sue_turn_rate_fbw; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f17 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f17_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f17_t* serial_udb_extra_f17) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f17_send(chan, serial_udb_extra_f17->sue_feed_forward, serial_udb_extra_f17->sue_turn_rate_nav, serial_udb_extra_f17->sue_turn_rate_fbw); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17, (const char *)serial_udb_extra_f17, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f17_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float sue_feed_forward, float sue_turn_rate_nav, float sue_turn_rate_fbw) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, sue_feed_forward); - _mav_put_float(buf, 4, sue_turn_rate_nav); - _mav_put_float(buf, 8, sue_turn_rate_fbw); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#else - mavlink_serial_udb_extra_f17_t *packet = (mavlink_serial_udb_extra_f17_t *)msgbuf; - packet->sue_feed_forward = sue_feed_forward; - packet->sue_turn_rate_nav = sue_turn_rate_nav; - packet->sue_turn_rate_fbw = sue_turn_rate_fbw; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F17 UNPACKING - - -/** - * @brief Get field sue_feed_forward from serial_udb_extra_f17 message - * - * @return SUE Feed Forward Gain - */ -static inline float mavlink_msg_serial_udb_extra_f17_get_sue_feed_forward(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field sue_turn_rate_nav from serial_udb_extra_f17 message - * - * @return SUE Max Turn Rate when Navigating - */ -static inline float mavlink_msg_serial_udb_extra_f17_get_sue_turn_rate_nav(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field sue_turn_rate_fbw from serial_udb_extra_f17 message - * - * @return SUE Max Turn Rate in Fly By Wire Mode - */ -static inline float mavlink_msg_serial_udb_extra_f17_get_sue_turn_rate_fbw(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Decode a serial_udb_extra_f17 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f17 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f17_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f17_t* serial_udb_extra_f17) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f17->sue_feed_forward = mavlink_msg_serial_udb_extra_f17_get_sue_feed_forward(msg); - serial_udb_extra_f17->sue_turn_rate_nav = mavlink_msg_serial_udb_extra_f17_get_sue_turn_rate_nav(msg); - serial_udb_extra_f17->sue_turn_rate_fbw = mavlink_msg_serial_udb_extra_f17_get_sue_turn_rate_fbw(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN; - memset(serial_udb_extra_f17, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_LEN); - memcpy(serial_udb_extra_f17, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f18.h b/matrixpilot/mavlink_msg_serial_udb_extra_f18.h deleted file mode 100644 index ad34afddc..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f18.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F18 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18 184 - - -typedef struct __mavlink_serial_udb_extra_f18_t { - float angle_of_attack_normal; /*< SUE Angle of Attack Normal*/ - float angle_of_attack_inverted; /*< SUE Angle of Attack Inverted*/ - float elevator_trim_normal; /*< SUE Elevator Trim Normal*/ - float elevator_trim_inverted; /*< SUE Elevator Trim Inverted*/ - float reference_speed; /*< SUE reference_speed*/ -} mavlink_serial_udb_extra_f18_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN 20 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN 20 -#define MAVLINK_MSG_ID_184_LEN 20 -#define MAVLINK_MSG_ID_184_MIN_LEN 20 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC 41 -#define MAVLINK_MSG_ID_184_CRC 41 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F18 { \ - 184, \ - "SERIAL_UDB_EXTRA_F18", \ - 5, \ - { { "angle_of_attack_normal", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f18_t, angle_of_attack_normal) }, \ - { "angle_of_attack_inverted", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f18_t, angle_of_attack_inverted) }, \ - { "elevator_trim_normal", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f18_t, elevator_trim_normal) }, \ - { "elevator_trim_inverted", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f18_t, elevator_trim_inverted) }, \ - { "reference_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f18_t, reference_speed) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F18 { \ - "SERIAL_UDB_EXTRA_F18", \ - 5, \ - { { "angle_of_attack_normal", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f18_t, angle_of_attack_normal) }, \ - { "angle_of_attack_inverted", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f18_t, angle_of_attack_inverted) }, \ - { "elevator_trim_normal", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f18_t, elevator_trim_normal) }, \ - { "elevator_trim_inverted", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f18_t, elevator_trim_inverted) }, \ - { "reference_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f18_t, reference_speed) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f18 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param angle_of_attack_normal SUE Angle of Attack Normal - * @param angle_of_attack_inverted SUE Angle of Attack Inverted - * @param elevator_trim_normal SUE Elevator Trim Normal - * @param elevator_trim_inverted SUE Elevator Trim Inverted - * @param reference_speed SUE reference_speed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float angle_of_attack_normal, float angle_of_attack_inverted, float elevator_trim_normal, float elevator_trim_inverted, float reference_speed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN]; - _mav_put_float(buf, 0, angle_of_attack_normal); - _mav_put_float(buf, 4, angle_of_attack_inverted); - _mav_put_float(buf, 8, elevator_trim_normal); - _mav_put_float(buf, 12, elevator_trim_inverted); - _mav_put_float(buf, 16, reference_speed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#else - mavlink_serial_udb_extra_f18_t packet; - packet.angle_of_attack_normal = angle_of_attack_normal; - packet.angle_of_attack_inverted = angle_of_attack_inverted; - packet.elevator_trim_normal = elevator_trim_normal; - packet.elevator_trim_inverted = elevator_trim_inverted; - packet.reference_speed = reference_speed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f18 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param angle_of_attack_normal SUE Angle of Attack Normal - * @param angle_of_attack_inverted SUE Angle of Attack Inverted - * @param elevator_trim_normal SUE Elevator Trim Normal - * @param elevator_trim_inverted SUE Elevator Trim Inverted - * @param reference_speed SUE reference_speed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float angle_of_attack_normal, float angle_of_attack_inverted, float elevator_trim_normal, float elevator_trim_inverted, float reference_speed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN]; - _mav_put_float(buf, 0, angle_of_attack_normal); - _mav_put_float(buf, 4, angle_of_attack_inverted); - _mav_put_float(buf, 8, elevator_trim_normal); - _mav_put_float(buf, 12, elevator_trim_inverted); - _mav_put_float(buf, 16, reference_speed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#else - mavlink_serial_udb_extra_f18_t packet; - packet.angle_of_attack_normal = angle_of_attack_normal; - packet.angle_of_attack_inverted = angle_of_attack_inverted; - packet.elevator_trim_normal = elevator_trim_normal; - packet.elevator_trim_inverted = elevator_trim_inverted; - packet.reference_speed = reference_speed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f18 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param angle_of_attack_normal SUE Angle of Attack Normal - * @param angle_of_attack_inverted SUE Angle of Attack Inverted - * @param elevator_trim_normal SUE Elevator Trim Normal - * @param elevator_trim_inverted SUE Elevator Trim Inverted - * @param reference_speed SUE reference_speed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float angle_of_attack_normal,float angle_of_attack_inverted,float elevator_trim_normal,float elevator_trim_inverted,float reference_speed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN]; - _mav_put_float(buf, 0, angle_of_attack_normal); - _mav_put_float(buf, 4, angle_of_attack_inverted); - _mav_put_float(buf, 8, elevator_trim_normal); - _mav_put_float(buf, 12, elevator_trim_inverted); - _mav_put_float(buf, 16, reference_speed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#else - mavlink_serial_udb_extra_f18_t packet; - packet.angle_of_attack_normal = angle_of_attack_normal; - packet.angle_of_attack_inverted = angle_of_attack_inverted; - packet.elevator_trim_normal = elevator_trim_normal; - packet.elevator_trim_inverted = elevator_trim_inverted; - packet.reference_speed = reference_speed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f18 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f18 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f18_t* serial_udb_extra_f18) -{ - return mavlink_msg_serial_udb_extra_f18_pack(system_id, component_id, msg, serial_udb_extra_f18->angle_of_attack_normal, serial_udb_extra_f18->angle_of_attack_inverted, serial_udb_extra_f18->elevator_trim_normal, serial_udb_extra_f18->elevator_trim_inverted, serial_udb_extra_f18->reference_speed); -} - -/** - * @brief Encode a serial_udb_extra_f18 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f18 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f18_t* serial_udb_extra_f18) -{ - return mavlink_msg_serial_udb_extra_f18_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f18->angle_of_attack_normal, serial_udb_extra_f18->angle_of_attack_inverted, serial_udb_extra_f18->elevator_trim_normal, serial_udb_extra_f18->elevator_trim_inverted, serial_udb_extra_f18->reference_speed); -} - -/** - * @brief Encode a serial_udb_extra_f18 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f18 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f18_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f18_t* serial_udb_extra_f18) -{ - return mavlink_msg_serial_udb_extra_f18_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f18->angle_of_attack_normal, serial_udb_extra_f18->angle_of_attack_inverted, serial_udb_extra_f18->elevator_trim_normal, serial_udb_extra_f18->elevator_trim_inverted, serial_udb_extra_f18->reference_speed); -} - -/** - * @brief Send a serial_udb_extra_f18 message - * @param chan MAVLink channel to send the message - * - * @param angle_of_attack_normal SUE Angle of Attack Normal - * @param angle_of_attack_inverted SUE Angle of Attack Inverted - * @param elevator_trim_normal SUE Elevator Trim Normal - * @param elevator_trim_inverted SUE Elevator Trim Inverted - * @param reference_speed SUE reference_speed - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f18_send(mavlink_channel_t chan, float angle_of_attack_normal, float angle_of_attack_inverted, float elevator_trim_normal, float elevator_trim_inverted, float reference_speed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN]; - _mav_put_float(buf, 0, angle_of_attack_normal); - _mav_put_float(buf, 4, angle_of_attack_inverted); - _mav_put_float(buf, 8, elevator_trim_normal); - _mav_put_float(buf, 12, elevator_trim_inverted); - _mav_put_float(buf, 16, reference_speed); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#else - mavlink_serial_udb_extra_f18_t packet; - packet.angle_of_attack_normal = angle_of_attack_normal; - packet.angle_of_attack_inverted = angle_of_attack_inverted; - packet.elevator_trim_normal = elevator_trim_normal; - packet.elevator_trim_inverted = elevator_trim_inverted; - packet.reference_speed = reference_speed; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f18 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f18_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f18_t* serial_udb_extra_f18) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f18_send(chan, serial_udb_extra_f18->angle_of_attack_normal, serial_udb_extra_f18->angle_of_attack_inverted, serial_udb_extra_f18->elevator_trim_normal, serial_udb_extra_f18->elevator_trim_inverted, serial_udb_extra_f18->reference_speed); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18, (const char *)serial_udb_extra_f18, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f18_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float angle_of_attack_normal, float angle_of_attack_inverted, float elevator_trim_normal, float elevator_trim_inverted, float reference_speed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, angle_of_attack_normal); - _mav_put_float(buf, 4, angle_of_attack_inverted); - _mav_put_float(buf, 8, elevator_trim_normal); - _mav_put_float(buf, 12, elevator_trim_inverted); - _mav_put_float(buf, 16, reference_speed); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#else - mavlink_serial_udb_extra_f18_t *packet = (mavlink_serial_udb_extra_f18_t *)msgbuf; - packet->angle_of_attack_normal = angle_of_attack_normal; - packet->angle_of_attack_inverted = angle_of_attack_inverted; - packet->elevator_trim_normal = elevator_trim_normal; - packet->elevator_trim_inverted = elevator_trim_inverted; - packet->reference_speed = reference_speed; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F18 UNPACKING - - -/** - * @brief Get field angle_of_attack_normal from serial_udb_extra_f18 message - * - * @return SUE Angle of Attack Normal - */ -static inline float mavlink_msg_serial_udb_extra_f18_get_angle_of_attack_normal(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field angle_of_attack_inverted from serial_udb_extra_f18 message - * - * @return SUE Angle of Attack Inverted - */ -static inline float mavlink_msg_serial_udb_extra_f18_get_angle_of_attack_inverted(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field elevator_trim_normal from serial_udb_extra_f18 message - * - * @return SUE Elevator Trim Normal - */ -static inline float mavlink_msg_serial_udb_extra_f18_get_elevator_trim_normal(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field elevator_trim_inverted from serial_udb_extra_f18 message - * - * @return SUE Elevator Trim Inverted - */ -static inline float mavlink_msg_serial_udb_extra_f18_get_elevator_trim_inverted(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field reference_speed from serial_udb_extra_f18 message - * - * @return SUE reference_speed - */ -static inline float mavlink_msg_serial_udb_extra_f18_get_reference_speed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Decode a serial_udb_extra_f18 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f18 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f18_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f18_t* serial_udb_extra_f18) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f18->angle_of_attack_normal = mavlink_msg_serial_udb_extra_f18_get_angle_of_attack_normal(msg); - serial_udb_extra_f18->angle_of_attack_inverted = mavlink_msg_serial_udb_extra_f18_get_angle_of_attack_inverted(msg); - serial_udb_extra_f18->elevator_trim_normal = mavlink_msg_serial_udb_extra_f18_get_elevator_trim_normal(msg); - serial_udb_extra_f18->elevator_trim_inverted = mavlink_msg_serial_udb_extra_f18_get_elevator_trim_inverted(msg); - serial_udb_extra_f18->reference_speed = mavlink_msg_serial_udb_extra_f18_get_reference_speed(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN; - memset(serial_udb_extra_f18, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_LEN); - memcpy(serial_udb_extra_f18, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f19.h b/matrixpilot/mavlink_msg_serial_udb_extra_f19.h deleted file mode 100644 index 8e3cbd843..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f19.h +++ /dev/null @@ -1,456 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F19 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19 185 - - -typedef struct __mavlink_serial_udb_extra_f19_t { - uint8_t sue_aileron_output_channel; /*< SUE aileron output channel*/ - uint8_t sue_aileron_reversed; /*< SUE aileron reversed*/ - uint8_t sue_elevator_output_channel; /*< SUE elevator output channel*/ - uint8_t sue_elevator_reversed; /*< SUE elevator reversed*/ - uint8_t sue_throttle_output_channel; /*< SUE throttle output channel*/ - uint8_t sue_throttle_reversed; /*< SUE throttle reversed*/ - uint8_t sue_rudder_output_channel; /*< SUE rudder output channel*/ - uint8_t sue_rudder_reversed; /*< SUE rudder reversed*/ -} mavlink_serial_udb_extra_f19_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN 8 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN 8 -#define MAVLINK_MSG_ID_185_LEN 8 -#define MAVLINK_MSG_ID_185_MIN_LEN 8 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC 87 -#define MAVLINK_MSG_ID_185_CRC 87 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F19 { \ - 185, \ - "SERIAL_UDB_EXTRA_F19", \ - 8, \ - { { "sue_aileron_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_serial_udb_extra_f19_t, sue_aileron_output_channel) }, \ - { "sue_aileron_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_serial_udb_extra_f19_t, sue_aileron_reversed) }, \ - { "sue_elevator_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_serial_udb_extra_f19_t, sue_elevator_output_channel) }, \ - { "sue_elevator_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_serial_udb_extra_f19_t, sue_elevator_reversed) }, \ - { "sue_throttle_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_serial_udb_extra_f19_t, sue_throttle_output_channel) }, \ - { "sue_throttle_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_serial_udb_extra_f19_t, sue_throttle_reversed) }, \ - { "sue_rudder_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_udb_extra_f19_t, sue_rudder_output_channel) }, \ - { "sue_rudder_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_udb_extra_f19_t, sue_rudder_reversed) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F19 { \ - "SERIAL_UDB_EXTRA_F19", \ - 8, \ - { { "sue_aileron_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_serial_udb_extra_f19_t, sue_aileron_output_channel) }, \ - { "sue_aileron_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_serial_udb_extra_f19_t, sue_aileron_reversed) }, \ - { "sue_elevator_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_serial_udb_extra_f19_t, sue_elevator_output_channel) }, \ - { "sue_elevator_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_serial_udb_extra_f19_t, sue_elevator_reversed) }, \ - { "sue_throttle_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_serial_udb_extra_f19_t, sue_throttle_output_channel) }, \ - { "sue_throttle_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_serial_udb_extra_f19_t, sue_throttle_reversed) }, \ - { "sue_rudder_output_channel", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_udb_extra_f19_t, sue_rudder_output_channel) }, \ - { "sue_rudder_reversed", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_udb_extra_f19_t, sue_rudder_reversed) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f19 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_aileron_output_channel SUE aileron output channel - * @param sue_aileron_reversed SUE aileron reversed - * @param sue_elevator_output_channel SUE elevator output channel - * @param sue_elevator_reversed SUE elevator reversed - * @param sue_throttle_output_channel SUE throttle output channel - * @param sue_throttle_reversed SUE throttle reversed - * @param sue_rudder_output_channel SUE rudder output channel - * @param sue_rudder_reversed SUE rudder reversed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t sue_aileron_output_channel, uint8_t sue_aileron_reversed, uint8_t sue_elevator_output_channel, uint8_t sue_elevator_reversed, uint8_t sue_throttle_output_channel, uint8_t sue_throttle_reversed, uint8_t sue_rudder_output_channel, uint8_t sue_rudder_reversed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN]; - _mav_put_uint8_t(buf, 0, sue_aileron_output_channel); - _mav_put_uint8_t(buf, 1, sue_aileron_reversed); - _mav_put_uint8_t(buf, 2, sue_elevator_output_channel); - _mav_put_uint8_t(buf, 3, sue_elevator_reversed); - _mav_put_uint8_t(buf, 4, sue_throttle_output_channel); - _mav_put_uint8_t(buf, 5, sue_throttle_reversed); - _mav_put_uint8_t(buf, 6, sue_rudder_output_channel); - _mav_put_uint8_t(buf, 7, sue_rudder_reversed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#else - mavlink_serial_udb_extra_f19_t packet; - packet.sue_aileron_output_channel = sue_aileron_output_channel; - packet.sue_aileron_reversed = sue_aileron_reversed; - packet.sue_elevator_output_channel = sue_elevator_output_channel; - packet.sue_elevator_reversed = sue_elevator_reversed; - packet.sue_throttle_output_channel = sue_throttle_output_channel; - packet.sue_throttle_reversed = sue_throttle_reversed; - packet.sue_rudder_output_channel = sue_rudder_output_channel; - packet.sue_rudder_reversed = sue_rudder_reversed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f19 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_aileron_output_channel SUE aileron output channel - * @param sue_aileron_reversed SUE aileron reversed - * @param sue_elevator_output_channel SUE elevator output channel - * @param sue_elevator_reversed SUE elevator reversed - * @param sue_throttle_output_channel SUE throttle output channel - * @param sue_throttle_reversed SUE throttle reversed - * @param sue_rudder_output_channel SUE rudder output channel - * @param sue_rudder_reversed SUE rudder reversed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t sue_aileron_output_channel, uint8_t sue_aileron_reversed, uint8_t sue_elevator_output_channel, uint8_t sue_elevator_reversed, uint8_t sue_throttle_output_channel, uint8_t sue_throttle_reversed, uint8_t sue_rudder_output_channel, uint8_t sue_rudder_reversed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN]; - _mav_put_uint8_t(buf, 0, sue_aileron_output_channel); - _mav_put_uint8_t(buf, 1, sue_aileron_reversed); - _mav_put_uint8_t(buf, 2, sue_elevator_output_channel); - _mav_put_uint8_t(buf, 3, sue_elevator_reversed); - _mav_put_uint8_t(buf, 4, sue_throttle_output_channel); - _mav_put_uint8_t(buf, 5, sue_throttle_reversed); - _mav_put_uint8_t(buf, 6, sue_rudder_output_channel); - _mav_put_uint8_t(buf, 7, sue_rudder_reversed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#else - mavlink_serial_udb_extra_f19_t packet; - packet.sue_aileron_output_channel = sue_aileron_output_channel; - packet.sue_aileron_reversed = sue_aileron_reversed; - packet.sue_elevator_output_channel = sue_elevator_output_channel; - packet.sue_elevator_reversed = sue_elevator_reversed; - packet.sue_throttle_output_channel = sue_throttle_output_channel; - packet.sue_throttle_reversed = sue_throttle_reversed; - packet.sue_rudder_output_channel = sue_rudder_output_channel; - packet.sue_rudder_reversed = sue_rudder_reversed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f19 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_aileron_output_channel SUE aileron output channel - * @param sue_aileron_reversed SUE aileron reversed - * @param sue_elevator_output_channel SUE elevator output channel - * @param sue_elevator_reversed SUE elevator reversed - * @param sue_throttle_output_channel SUE throttle output channel - * @param sue_throttle_reversed SUE throttle reversed - * @param sue_rudder_output_channel SUE rudder output channel - * @param sue_rudder_reversed SUE rudder reversed - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t sue_aileron_output_channel,uint8_t sue_aileron_reversed,uint8_t sue_elevator_output_channel,uint8_t sue_elevator_reversed,uint8_t sue_throttle_output_channel,uint8_t sue_throttle_reversed,uint8_t sue_rudder_output_channel,uint8_t sue_rudder_reversed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN]; - _mav_put_uint8_t(buf, 0, sue_aileron_output_channel); - _mav_put_uint8_t(buf, 1, sue_aileron_reversed); - _mav_put_uint8_t(buf, 2, sue_elevator_output_channel); - _mav_put_uint8_t(buf, 3, sue_elevator_reversed); - _mav_put_uint8_t(buf, 4, sue_throttle_output_channel); - _mav_put_uint8_t(buf, 5, sue_throttle_reversed); - _mav_put_uint8_t(buf, 6, sue_rudder_output_channel); - _mav_put_uint8_t(buf, 7, sue_rudder_reversed); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#else - mavlink_serial_udb_extra_f19_t packet; - packet.sue_aileron_output_channel = sue_aileron_output_channel; - packet.sue_aileron_reversed = sue_aileron_reversed; - packet.sue_elevator_output_channel = sue_elevator_output_channel; - packet.sue_elevator_reversed = sue_elevator_reversed; - packet.sue_throttle_output_channel = sue_throttle_output_channel; - packet.sue_throttle_reversed = sue_throttle_reversed; - packet.sue_rudder_output_channel = sue_rudder_output_channel; - packet.sue_rudder_reversed = sue_rudder_reversed; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f19 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f19 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f19_t* serial_udb_extra_f19) -{ - return mavlink_msg_serial_udb_extra_f19_pack(system_id, component_id, msg, serial_udb_extra_f19->sue_aileron_output_channel, serial_udb_extra_f19->sue_aileron_reversed, serial_udb_extra_f19->sue_elevator_output_channel, serial_udb_extra_f19->sue_elevator_reversed, serial_udb_extra_f19->sue_throttle_output_channel, serial_udb_extra_f19->sue_throttle_reversed, serial_udb_extra_f19->sue_rudder_output_channel, serial_udb_extra_f19->sue_rudder_reversed); -} - -/** - * @brief Encode a serial_udb_extra_f19 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f19 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f19_t* serial_udb_extra_f19) -{ - return mavlink_msg_serial_udb_extra_f19_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f19->sue_aileron_output_channel, serial_udb_extra_f19->sue_aileron_reversed, serial_udb_extra_f19->sue_elevator_output_channel, serial_udb_extra_f19->sue_elevator_reversed, serial_udb_extra_f19->sue_throttle_output_channel, serial_udb_extra_f19->sue_throttle_reversed, serial_udb_extra_f19->sue_rudder_output_channel, serial_udb_extra_f19->sue_rudder_reversed); -} - -/** - * @brief Encode a serial_udb_extra_f19 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f19 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f19_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f19_t* serial_udb_extra_f19) -{ - return mavlink_msg_serial_udb_extra_f19_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f19->sue_aileron_output_channel, serial_udb_extra_f19->sue_aileron_reversed, serial_udb_extra_f19->sue_elevator_output_channel, serial_udb_extra_f19->sue_elevator_reversed, serial_udb_extra_f19->sue_throttle_output_channel, serial_udb_extra_f19->sue_throttle_reversed, serial_udb_extra_f19->sue_rudder_output_channel, serial_udb_extra_f19->sue_rudder_reversed); -} - -/** - * @brief Send a serial_udb_extra_f19 message - * @param chan MAVLink channel to send the message - * - * @param sue_aileron_output_channel SUE aileron output channel - * @param sue_aileron_reversed SUE aileron reversed - * @param sue_elevator_output_channel SUE elevator output channel - * @param sue_elevator_reversed SUE elevator reversed - * @param sue_throttle_output_channel SUE throttle output channel - * @param sue_throttle_reversed SUE throttle reversed - * @param sue_rudder_output_channel SUE rudder output channel - * @param sue_rudder_reversed SUE rudder reversed - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f19_send(mavlink_channel_t chan, uint8_t sue_aileron_output_channel, uint8_t sue_aileron_reversed, uint8_t sue_elevator_output_channel, uint8_t sue_elevator_reversed, uint8_t sue_throttle_output_channel, uint8_t sue_throttle_reversed, uint8_t sue_rudder_output_channel, uint8_t sue_rudder_reversed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN]; - _mav_put_uint8_t(buf, 0, sue_aileron_output_channel); - _mav_put_uint8_t(buf, 1, sue_aileron_reversed); - _mav_put_uint8_t(buf, 2, sue_elevator_output_channel); - _mav_put_uint8_t(buf, 3, sue_elevator_reversed); - _mav_put_uint8_t(buf, 4, sue_throttle_output_channel); - _mav_put_uint8_t(buf, 5, sue_throttle_reversed); - _mav_put_uint8_t(buf, 6, sue_rudder_output_channel); - _mav_put_uint8_t(buf, 7, sue_rudder_reversed); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#else - mavlink_serial_udb_extra_f19_t packet; - packet.sue_aileron_output_channel = sue_aileron_output_channel; - packet.sue_aileron_reversed = sue_aileron_reversed; - packet.sue_elevator_output_channel = sue_elevator_output_channel; - packet.sue_elevator_reversed = sue_elevator_reversed; - packet.sue_throttle_output_channel = sue_throttle_output_channel; - packet.sue_throttle_reversed = sue_throttle_reversed; - packet.sue_rudder_output_channel = sue_rudder_output_channel; - packet.sue_rudder_reversed = sue_rudder_reversed; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f19 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f19_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f19_t* serial_udb_extra_f19) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f19_send(chan, serial_udb_extra_f19->sue_aileron_output_channel, serial_udb_extra_f19->sue_aileron_reversed, serial_udb_extra_f19->sue_elevator_output_channel, serial_udb_extra_f19->sue_elevator_reversed, serial_udb_extra_f19->sue_throttle_output_channel, serial_udb_extra_f19->sue_throttle_reversed, serial_udb_extra_f19->sue_rudder_output_channel, serial_udb_extra_f19->sue_rudder_reversed); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19, (const char *)serial_udb_extra_f19, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f19_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sue_aileron_output_channel, uint8_t sue_aileron_reversed, uint8_t sue_elevator_output_channel, uint8_t sue_elevator_reversed, uint8_t sue_throttle_output_channel, uint8_t sue_throttle_reversed, uint8_t sue_rudder_output_channel, uint8_t sue_rudder_reversed) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, sue_aileron_output_channel); - _mav_put_uint8_t(buf, 1, sue_aileron_reversed); - _mav_put_uint8_t(buf, 2, sue_elevator_output_channel); - _mav_put_uint8_t(buf, 3, sue_elevator_reversed); - _mav_put_uint8_t(buf, 4, sue_throttle_output_channel); - _mav_put_uint8_t(buf, 5, sue_throttle_reversed); - _mav_put_uint8_t(buf, 6, sue_rudder_output_channel); - _mav_put_uint8_t(buf, 7, sue_rudder_reversed); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#else - mavlink_serial_udb_extra_f19_t *packet = (mavlink_serial_udb_extra_f19_t *)msgbuf; - packet->sue_aileron_output_channel = sue_aileron_output_channel; - packet->sue_aileron_reversed = sue_aileron_reversed; - packet->sue_elevator_output_channel = sue_elevator_output_channel; - packet->sue_elevator_reversed = sue_elevator_reversed; - packet->sue_throttle_output_channel = sue_throttle_output_channel; - packet->sue_throttle_reversed = sue_throttle_reversed; - packet->sue_rudder_output_channel = sue_rudder_output_channel; - packet->sue_rudder_reversed = sue_rudder_reversed; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F19 UNPACKING - - -/** - * @brief Get field sue_aileron_output_channel from serial_udb_extra_f19 message - * - * @return SUE aileron output channel - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_aileron_output_channel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field sue_aileron_reversed from serial_udb_extra_f19 message - * - * @return SUE aileron reversed - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_aileron_reversed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Get field sue_elevator_output_channel from serial_udb_extra_f19 message - * - * @return SUE elevator output channel - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_elevator_output_channel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field sue_elevator_reversed from serial_udb_extra_f19 message - * - * @return SUE elevator reversed - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_elevator_reversed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field sue_throttle_output_channel from serial_udb_extra_f19 message - * - * @return SUE throttle output channel - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_throttle_output_channel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field sue_throttle_reversed from serial_udb_extra_f19 message - * - * @return SUE throttle reversed - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_throttle_reversed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field sue_rudder_output_channel from serial_udb_extra_f19 message - * - * @return SUE rudder output channel - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_rudder_output_channel(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Get field sue_rudder_reversed from serial_udb_extra_f19 message - * - * @return SUE rudder reversed - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f19_get_sue_rudder_reversed(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 7); -} - -/** - * @brief Decode a serial_udb_extra_f19 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f19 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f19_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f19_t* serial_udb_extra_f19) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f19->sue_aileron_output_channel = mavlink_msg_serial_udb_extra_f19_get_sue_aileron_output_channel(msg); - serial_udb_extra_f19->sue_aileron_reversed = mavlink_msg_serial_udb_extra_f19_get_sue_aileron_reversed(msg); - serial_udb_extra_f19->sue_elevator_output_channel = mavlink_msg_serial_udb_extra_f19_get_sue_elevator_output_channel(msg); - serial_udb_extra_f19->sue_elevator_reversed = mavlink_msg_serial_udb_extra_f19_get_sue_elevator_reversed(msg); - serial_udb_extra_f19->sue_throttle_output_channel = mavlink_msg_serial_udb_extra_f19_get_sue_throttle_output_channel(msg); - serial_udb_extra_f19->sue_throttle_reversed = mavlink_msg_serial_udb_extra_f19_get_sue_throttle_reversed(msg); - serial_udb_extra_f19->sue_rudder_output_channel = mavlink_msg_serial_udb_extra_f19_get_sue_rudder_output_channel(msg); - serial_udb_extra_f19->sue_rudder_reversed = mavlink_msg_serial_udb_extra_f19_get_sue_rudder_reversed(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN; - memset(serial_udb_extra_f19, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_LEN); - memcpy(serial_udb_extra_f19, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f20.h b/matrixpilot/mavlink_msg_serial_udb_extra_f20.h deleted file mode 100644 index 99116ad42..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f20.h +++ /dev/null @@ -1,596 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F20 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20 186 - - -typedef struct __mavlink_serial_udb_extra_f20_t { - int16_t sue_trim_value_input_1; /*< SUE UDB PWM Trim Value on Input 1*/ - int16_t sue_trim_value_input_2; /*< SUE UDB PWM Trim Value on Input 2*/ - int16_t sue_trim_value_input_3; /*< SUE UDB PWM Trim Value on Input 3*/ - int16_t sue_trim_value_input_4; /*< SUE UDB PWM Trim Value on Input 4*/ - int16_t sue_trim_value_input_5; /*< SUE UDB PWM Trim Value on Input 5*/ - int16_t sue_trim_value_input_6; /*< SUE UDB PWM Trim Value on Input 6*/ - int16_t sue_trim_value_input_7; /*< SUE UDB PWM Trim Value on Input 7*/ - int16_t sue_trim_value_input_8; /*< SUE UDB PWM Trim Value on Input 8*/ - int16_t sue_trim_value_input_9; /*< SUE UDB PWM Trim Value on Input 9*/ - int16_t sue_trim_value_input_10; /*< SUE UDB PWM Trim Value on Input 10*/ - int16_t sue_trim_value_input_11; /*< SUE UDB PWM Trim Value on Input 11*/ - int16_t sue_trim_value_input_12; /*< SUE UDB PWM Trim Value on Input 12*/ - uint8_t sue_number_of_inputs; /*< SUE Number of Input Channels*/ -} mavlink_serial_udb_extra_f20_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN 25 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN 25 -#define MAVLINK_MSG_ID_186_LEN 25 -#define MAVLINK_MSG_ID_186_MIN_LEN 25 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC 144 -#define MAVLINK_MSG_ID_186_CRC 144 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F20 { \ - 186, \ - "SERIAL_UDB_EXTRA_F20", \ - 13, \ - { { "sue_number_of_inputs", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_serial_udb_extra_f20_t, sue_number_of_inputs) }, \ - { "sue_trim_value_input_1", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_1) }, \ - { "sue_trim_value_input_2", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_2) }, \ - { "sue_trim_value_input_3", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_3) }, \ - { "sue_trim_value_input_4", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_4) }, \ - { "sue_trim_value_input_5", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_5) }, \ - { "sue_trim_value_input_6", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_6) }, \ - { "sue_trim_value_input_7", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_7) }, \ - { "sue_trim_value_input_8", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_8) }, \ - { "sue_trim_value_input_9", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_9) }, \ - { "sue_trim_value_input_10", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_10) }, \ - { "sue_trim_value_input_11", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_11) }, \ - { "sue_trim_value_input_12", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_12) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F20 { \ - "SERIAL_UDB_EXTRA_F20", \ - 13, \ - { { "sue_number_of_inputs", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_serial_udb_extra_f20_t, sue_number_of_inputs) }, \ - { "sue_trim_value_input_1", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_1) }, \ - { "sue_trim_value_input_2", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_2) }, \ - { "sue_trim_value_input_3", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_3) }, \ - { "sue_trim_value_input_4", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_4) }, \ - { "sue_trim_value_input_5", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_5) }, \ - { "sue_trim_value_input_6", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_6) }, \ - { "sue_trim_value_input_7", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_7) }, \ - { "sue_trim_value_input_8", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_8) }, \ - { "sue_trim_value_input_9", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_9) }, \ - { "sue_trim_value_input_10", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_10) }, \ - { "sue_trim_value_input_11", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_11) }, \ - { "sue_trim_value_input_12", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f20_t, sue_trim_value_input_12) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f20 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_number_of_inputs SUE Number of Input Channels - * @param sue_trim_value_input_1 SUE UDB PWM Trim Value on Input 1 - * @param sue_trim_value_input_2 SUE UDB PWM Trim Value on Input 2 - * @param sue_trim_value_input_3 SUE UDB PWM Trim Value on Input 3 - * @param sue_trim_value_input_4 SUE UDB PWM Trim Value on Input 4 - * @param sue_trim_value_input_5 SUE UDB PWM Trim Value on Input 5 - * @param sue_trim_value_input_6 SUE UDB PWM Trim Value on Input 6 - * @param sue_trim_value_input_7 SUE UDB PWM Trim Value on Input 7 - * @param sue_trim_value_input_8 SUE UDB PWM Trim Value on Input 8 - * @param sue_trim_value_input_9 SUE UDB PWM Trim Value on Input 9 - * @param sue_trim_value_input_10 SUE UDB PWM Trim Value on Input 10 - * @param sue_trim_value_input_11 SUE UDB PWM Trim Value on Input 11 - * @param sue_trim_value_input_12 SUE UDB PWM Trim Value on Input 12 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t sue_number_of_inputs, int16_t sue_trim_value_input_1, int16_t sue_trim_value_input_2, int16_t sue_trim_value_input_3, int16_t sue_trim_value_input_4, int16_t sue_trim_value_input_5, int16_t sue_trim_value_input_6, int16_t sue_trim_value_input_7, int16_t sue_trim_value_input_8, int16_t sue_trim_value_input_9, int16_t sue_trim_value_input_10, int16_t sue_trim_value_input_11, int16_t sue_trim_value_input_12) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN]; - _mav_put_int16_t(buf, 0, sue_trim_value_input_1); - _mav_put_int16_t(buf, 2, sue_trim_value_input_2); - _mav_put_int16_t(buf, 4, sue_trim_value_input_3); - _mav_put_int16_t(buf, 6, sue_trim_value_input_4); - _mav_put_int16_t(buf, 8, sue_trim_value_input_5); - _mav_put_int16_t(buf, 10, sue_trim_value_input_6); - _mav_put_int16_t(buf, 12, sue_trim_value_input_7); - _mav_put_int16_t(buf, 14, sue_trim_value_input_8); - _mav_put_int16_t(buf, 16, sue_trim_value_input_9); - _mav_put_int16_t(buf, 18, sue_trim_value_input_10); - _mav_put_int16_t(buf, 20, sue_trim_value_input_11); - _mav_put_int16_t(buf, 22, sue_trim_value_input_12); - _mav_put_uint8_t(buf, 24, sue_number_of_inputs); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#else - mavlink_serial_udb_extra_f20_t packet; - packet.sue_trim_value_input_1 = sue_trim_value_input_1; - packet.sue_trim_value_input_2 = sue_trim_value_input_2; - packet.sue_trim_value_input_3 = sue_trim_value_input_3; - packet.sue_trim_value_input_4 = sue_trim_value_input_4; - packet.sue_trim_value_input_5 = sue_trim_value_input_5; - packet.sue_trim_value_input_6 = sue_trim_value_input_6; - packet.sue_trim_value_input_7 = sue_trim_value_input_7; - packet.sue_trim_value_input_8 = sue_trim_value_input_8; - packet.sue_trim_value_input_9 = sue_trim_value_input_9; - packet.sue_trim_value_input_10 = sue_trim_value_input_10; - packet.sue_trim_value_input_11 = sue_trim_value_input_11; - packet.sue_trim_value_input_12 = sue_trim_value_input_12; - packet.sue_number_of_inputs = sue_number_of_inputs; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f20 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_number_of_inputs SUE Number of Input Channels - * @param sue_trim_value_input_1 SUE UDB PWM Trim Value on Input 1 - * @param sue_trim_value_input_2 SUE UDB PWM Trim Value on Input 2 - * @param sue_trim_value_input_3 SUE UDB PWM Trim Value on Input 3 - * @param sue_trim_value_input_4 SUE UDB PWM Trim Value on Input 4 - * @param sue_trim_value_input_5 SUE UDB PWM Trim Value on Input 5 - * @param sue_trim_value_input_6 SUE UDB PWM Trim Value on Input 6 - * @param sue_trim_value_input_7 SUE UDB PWM Trim Value on Input 7 - * @param sue_trim_value_input_8 SUE UDB PWM Trim Value on Input 8 - * @param sue_trim_value_input_9 SUE UDB PWM Trim Value on Input 9 - * @param sue_trim_value_input_10 SUE UDB PWM Trim Value on Input 10 - * @param sue_trim_value_input_11 SUE UDB PWM Trim Value on Input 11 - * @param sue_trim_value_input_12 SUE UDB PWM Trim Value on Input 12 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t sue_number_of_inputs, int16_t sue_trim_value_input_1, int16_t sue_trim_value_input_2, int16_t sue_trim_value_input_3, int16_t sue_trim_value_input_4, int16_t sue_trim_value_input_5, int16_t sue_trim_value_input_6, int16_t sue_trim_value_input_7, int16_t sue_trim_value_input_8, int16_t sue_trim_value_input_9, int16_t sue_trim_value_input_10, int16_t sue_trim_value_input_11, int16_t sue_trim_value_input_12) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN]; - _mav_put_int16_t(buf, 0, sue_trim_value_input_1); - _mav_put_int16_t(buf, 2, sue_trim_value_input_2); - _mav_put_int16_t(buf, 4, sue_trim_value_input_3); - _mav_put_int16_t(buf, 6, sue_trim_value_input_4); - _mav_put_int16_t(buf, 8, sue_trim_value_input_5); - _mav_put_int16_t(buf, 10, sue_trim_value_input_6); - _mav_put_int16_t(buf, 12, sue_trim_value_input_7); - _mav_put_int16_t(buf, 14, sue_trim_value_input_8); - _mav_put_int16_t(buf, 16, sue_trim_value_input_9); - _mav_put_int16_t(buf, 18, sue_trim_value_input_10); - _mav_put_int16_t(buf, 20, sue_trim_value_input_11); - _mav_put_int16_t(buf, 22, sue_trim_value_input_12); - _mav_put_uint8_t(buf, 24, sue_number_of_inputs); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#else - mavlink_serial_udb_extra_f20_t packet; - packet.sue_trim_value_input_1 = sue_trim_value_input_1; - packet.sue_trim_value_input_2 = sue_trim_value_input_2; - packet.sue_trim_value_input_3 = sue_trim_value_input_3; - packet.sue_trim_value_input_4 = sue_trim_value_input_4; - packet.sue_trim_value_input_5 = sue_trim_value_input_5; - packet.sue_trim_value_input_6 = sue_trim_value_input_6; - packet.sue_trim_value_input_7 = sue_trim_value_input_7; - packet.sue_trim_value_input_8 = sue_trim_value_input_8; - packet.sue_trim_value_input_9 = sue_trim_value_input_9; - packet.sue_trim_value_input_10 = sue_trim_value_input_10; - packet.sue_trim_value_input_11 = sue_trim_value_input_11; - packet.sue_trim_value_input_12 = sue_trim_value_input_12; - packet.sue_number_of_inputs = sue_number_of_inputs; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f20 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_number_of_inputs SUE Number of Input Channels - * @param sue_trim_value_input_1 SUE UDB PWM Trim Value on Input 1 - * @param sue_trim_value_input_2 SUE UDB PWM Trim Value on Input 2 - * @param sue_trim_value_input_3 SUE UDB PWM Trim Value on Input 3 - * @param sue_trim_value_input_4 SUE UDB PWM Trim Value on Input 4 - * @param sue_trim_value_input_5 SUE UDB PWM Trim Value on Input 5 - * @param sue_trim_value_input_6 SUE UDB PWM Trim Value on Input 6 - * @param sue_trim_value_input_7 SUE UDB PWM Trim Value on Input 7 - * @param sue_trim_value_input_8 SUE UDB PWM Trim Value on Input 8 - * @param sue_trim_value_input_9 SUE UDB PWM Trim Value on Input 9 - * @param sue_trim_value_input_10 SUE UDB PWM Trim Value on Input 10 - * @param sue_trim_value_input_11 SUE UDB PWM Trim Value on Input 11 - * @param sue_trim_value_input_12 SUE UDB PWM Trim Value on Input 12 - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t sue_number_of_inputs,int16_t sue_trim_value_input_1,int16_t sue_trim_value_input_2,int16_t sue_trim_value_input_3,int16_t sue_trim_value_input_4,int16_t sue_trim_value_input_5,int16_t sue_trim_value_input_6,int16_t sue_trim_value_input_7,int16_t sue_trim_value_input_8,int16_t sue_trim_value_input_9,int16_t sue_trim_value_input_10,int16_t sue_trim_value_input_11,int16_t sue_trim_value_input_12) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN]; - _mav_put_int16_t(buf, 0, sue_trim_value_input_1); - _mav_put_int16_t(buf, 2, sue_trim_value_input_2); - _mav_put_int16_t(buf, 4, sue_trim_value_input_3); - _mav_put_int16_t(buf, 6, sue_trim_value_input_4); - _mav_put_int16_t(buf, 8, sue_trim_value_input_5); - _mav_put_int16_t(buf, 10, sue_trim_value_input_6); - _mav_put_int16_t(buf, 12, sue_trim_value_input_7); - _mav_put_int16_t(buf, 14, sue_trim_value_input_8); - _mav_put_int16_t(buf, 16, sue_trim_value_input_9); - _mav_put_int16_t(buf, 18, sue_trim_value_input_10); - _mav_put_int16_t(buf, 20, sue_trim_value_input_11); - _mav_put_int16_t(buf, 22, sue_trim_value_input_12); - _mav_put_uint8_t(buf, 24, sue_number_of_inputs); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#else - mavlink_serial_udb_extra_f20_t packet; - packet.sue_trim_value_input_1 = sue_trim_value_input_1; - packet.sue_trim_value_input_2 = sue_trim_value_input_2; - packet.sue_trim_value_input_3 = sue_trim_value_input_3; - packet.sue_trim_value_input_4 = sue_trim_value_input_4; - packet.sue_trim_value_input_5 = sue_trim_value_input_5; - packet.sue_trim_value_input_6 = sue_trim_value_input_6; - packet.sue_trim_value_input_7 = sue_trim_value_input_7; - packet.sue_trim_value_input_8 = sue_trim_value_input_8; - packet.sue_trim_value_input_9 = sue_trim_value_input_9; - packet.sue_trim_value_input_10 = sue_trim_value_input_10; - packet.sue_trim_value_input_11 = sue_trim_value_input_11; - packet.sue_trim_value_input_12 = sue_trim_value_input_12; - packet.sue_number_of_inputs = sue_number_of_inputs; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f20 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f20 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f20_t* serial_udb_extra_f20) -{ - return mavlink_msg_serial_udb_extra_f20_pack(system_id, component_id, msg, serial_udb_extra_f20->sue_number_of_inputs, serial_udb_extra_f20->sue_trim_value_input_1, serial_udb_extra_f20->sue_trim_value_input_2, serial_udb_extra_f20->sue_trim_value_input_3, serial_udb_extra_f20->sue_trim_value_input_4, serial_udb_extra_f20->sue_trim_value_input_5, serial_udb_extra_f20->sue_trim_value_input_6, serial_udb_extra_f20->sue_trim_value_input_7, serial_udb_extra_f20->sue_trim_value_input_8, serial_udb_extra_f20->sue_trim_value_input_9, serial_udb_extra_f20->sue_trim_value_input_10, serial_udb_extra_f20->sue_trim_value_input_11, serial_udb_extra_f20->sue_trim_value_input_12); -} - -/** - * @brief Encode a serial_udb_extra_f20 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f20 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f20_t* serial_udb_extra_f20) -{ - return mavlink_msg_serial_udb_extra_f20_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f20->sue_number_of_inputs, serial_udb_extra_f20->sue_trim_value_input_1, serial_udb_extra_f20->sue_trim_value_input_2, serial_udb_extra_f20->sue_trim_value_input_3, serial_udb_extra_f20->sue_trim_value_input_4, serial_udb_extra_f20->sue_trim_value_input_5, serial_udb_extra_f20->sue_trim_value_input_6, serial_udb_extra_f20->sue_trim_value_input_7, serial_udb_extra_f20->sue_trim_value_input_8, serial_udb_extra_f20->sue_trim_value_input_9, serial_udb_extra_f20->sue_trim_value_input_10, serial_udb_extra_f20->sue_trim_value_input_11, serial_udb_extra_f20->sue_trim_value_input_12); -} - -/** - * @brief Encode a serial_udb_extra_f20 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f20 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f20_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f20_t* serial_udb_extra_f20) -{ - return mavlink_msg_serial_udb_extra_f20_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f20->sue_number_of_inputs, serial_udb_extra_f20->sue_trim_value_input_1, serial_udb_extra_f20->sue_trim_value_input_2, serial_udb_extra_f20->sue_trim_value_input_3, serial_udb_extra_f20->sue_trim_value_input_4, serial_udb_extra_f20->sue_trim_value_input_5, serial_udb_extra_f20->sue_trim_value_input_6, serial_udb_extra_f20->sue_trim_value_input_7, serial_udb_extra_f20->sue_trim_value_input_8, serial_udb_extra_f20->sue_trim_value_input_9, serial_udb_extra_f20->sue_trim_value_input_10, serial_udb_extra_f20->sue_trim_value_input_11, serial_udb_extra_f20->sue_trim_value_input_12); -} - -/** - * @brief Send a serial_udb_extra_f20 message - * @param chan MAVLink channel to send the message - * - * @param sue_number_of_inputs SUE Number of Input Channels - * @param sue_trim_value_input_1 SUE UDB PWM Trim Value on Input 1 - * @param sue_trim_value_input_2 SUE UDB PWM Trim Value on Input 2 - * @param sue_trim_value_input_3 SUE UDB PWM Trim Value on Input 3 - * @param sue_trim_value_input_4 SUE UDB PWM Trim Value on Input 4 - * @param sue_trim_value_input_5 SUE UDB PWM Trim Value on Input 5 - * @param sue_trim_value_input_6 SUE UDB PWM Trim Value on Input 6 - * @param sue_trim_value_input_7 SUE UDB PWM Trim Value on Input 7 - * @param sue_trim_value_input_8 SUE UDB PWM Trim Value on Input 8 - * @param sue_trim_value_input_9 SUE UDB PWM Trim Value on Input 9 - * @param sue_trim_value_input_10 SUE UDB PWM Trim Value on Input 10 - * @param sue_trim_value_input_11 SUE UDB PWM Trim Value on Input 11 - * @param sue_trim_value_input_12 SUE UDB PWM Trim Value on Input 12 - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f20_send(mavlink_channel_t chan, uint8_t sue_number_of_inputs, int16_t sue_trim_value_input_1, int16_t sue_trim_value_input_2, int16_t sue_trim_value_input_3, int16_t sue_trim_value_input_4, int16_t sue_trim_value_input_5, int16_t sue_trim_value_input_6, int16_t sue_trim_value_input_7, int16_t sue_trim_value_input_8, int16_t sue_trim_value_input_9, int16_t sue_trim_value_input_10, int16_t sue_trim_value_input_11, int16_t sue_trim_value_input_12) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN]; - _mav_put_int16_t(buf, 0, sue_trim_value_input_1); - _mav_put_int16_t(buf, 2, sue_trim_value_input_2); - _mav_put_int16_t(buf, 4, sue_trim_value_input_3); - _mav_put_int16_t(buf, 6, sue_trim_value_input_4); - _mav_put_int16_t(buf, 8, sue_trim_value_input_5); - _mav_put_int16_t(buf, 10, sue_trim_value_input_6); - _mav_put_int16_t(buf, 12, sue_trim_value_input_7); - _mav_put_int16_t(buf, 14, sue_trim_value_input_8); - _mav_put_int16_t(buf, 16, sue_trim_value_input_9); - _mav_put_int16_t(buf, 18, sue_trim_value_input_10); - _mav_put_int16_t(buf, 20, sue_trim_value_input_11); - _mav_put_int16_t(buf, 22, sue_trim_value_input_12); - _mav_put_uint8_t(buf, 24, sue_number_of_inputs); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#else - mavlink_serial_udb_extra_f20_t packet; - packet.sue_trim_value_input_1 = sue_trim_value_input_1; - packet.sue_trim_value_input_2 = sue_trim_value_input_2; - packet.sue_trim_value_input_3 = sue_trim_value_input_3; - packet.sue_trim_value_input_4 = sue_trim_value_input_4; - packet.sue_trim_value_input_5 = sue_trim_value_input_5; - packet.sue_trim_value_input_6 = sue_trim_value_input_6; - packet.sue_trim_value_input_7 = sue_trim_value_input_7; - packet.sue_trim_value_input_8 = sue_trim_value_input_8; - packet.sue_trim_value_input_9 = sue_trim_value_input_9; - packet.sue_trim_value_input_10 = sue_trim_value_input_10; - packet.sue_trim_value_input_11 = sue_trim_value_input_11; - packet.sue_trim_value_input_12 = sue_trim_value_input_12; - packet.sue_number_of_inputs = sue_number_of_inputs; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f20 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f20_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f20_t* serial_udb_extra_f20) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f20_send(chan, serial_udb_extra_f20->sue_number_of_inputs, serial_udb_extra_f20->sue_trim_value_input_1, serial_udb_extra_f20->sue_trim_value_input_2, serial_udb_extra_f20->sue_trim_value_input_3, serial_udb_extra_f20->sue_trim_value_input_4, serial_udb_extra_f20->sue_trim_value_input_5, serial_udb_extra_f20->sue_trim_value_input_6, serial_udb_extra_f20->sue_trim_value_input_7, serial_udb_extra_f20->sue_trim_value_input_8, serial_udb_extra_f20->sue_trim_value_input_9, serial_udb_extra_f20->sue_trim_value_input_10, serial_udb_extra_f20->sue_trim_value_input_11, serial_udb_extra_f20->sue_trim_value_input_12); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20, (const char *)serial_udb_extra_f20, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f20_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sue_number_of_inputs, int16_t sue_trim_value_input_1, int16_t sue_trim_value_input_2, int16_t sue_trim_value_input_3, int16_t sue_trim_value_input_4, int16_t sue_trim_value_input_5, int16_t sue_trim_value_input_6, int16_t sue_trim_value_input_7, int16_t sue_trim_value_input_8, int16_t sue_trim_value_input_9, int16_t sue_trim_value_input_10, int16_t sue_trim_value_input_11, int16_t sue_trim_value_input_12) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int16_t(buf, 0, sue_trim_value_input_1); - _mav_put_int16_t(buf, 2, sue_trim_value_input_2); - _mav_put_int16_t(buf, 4, sue_trim_value_input_3); - _mav_put_int16_t(buf, 6, sue_trim_value_input_4); - _mav_put_int16_t(buf, 8, sue_trim_value_input_5); - _mav_put_int16_t(buf, 10, sue_trim_value_input_6); - _mav_put_int16_t(buf, 12, sue_trim_value_input_7); - _mav_put_int16_t(buf, 14, sue_trim_value_input_8); - _mav_put_int16_t(buf, 16, sue_trim_value_input_9); - _mav_put_int16_t(buf, 18, sue_trim_value_input_10); - _mav_put_int16_t(buf, 20, sue_trim_value_input_11); - _mav_put_int16_t(buf, 22, sue_trim_value_input_12); - _mav_put_uint8_t(buf, 24, sue_number_of_inputs); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#else - mavlink_serial_udb_extra_f20_t *packet = (mavlink_serial_udb_extra_f20_t *)msgbuf; - packet->sue_trim_value_input_1 = sue_trim_value_input_1; - packet->sue_trim_value_input_2 = sue_trim_value_input_2; - packet->sue_trim_value_input_3 = sue_trim_value_input_3; - packet->sue_trim_value_input_4 = sue_trim_value_input_4; - packet->sue_trim_value_input_5 = sue_trim_value_input_5; - packet->sue_trim_value_input_6 = sue_trim_value_input_6; - packet->sue_trim_value_input_7 = sue_trim_value_input_7; - packet->sue_trim_value_input_8 = sue_trim_value_input_8; - packet->sue_trim_value_input_9 = sue_trim_value_input_9; - packet->sue_trim_value_input_10 = sue_trim_value_input_10; - packet->sue_trim_value_input_11 = sue_trim_value_input_11; - packet->sue_trim_value_input_12 = sue_trim_value_input_12; - packet->sue_number_of_inputs = sue_number_of_inputs; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F20 UNPACKING - - -/** - * @brief Get field sue_number_of_inputs from serial_udb_extra_f20 message - * - * @return SUE Number of Input Channels - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f20_get_sue_number_of_inputs(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 24); -} - -/** - * @brief Get field sue_trim_value_input_1 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 0); -} - -/** - * @brief Get field sue_trim_value_input_2 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 2); -} - -/** - * @brief Get field sue_trim_value_input_3 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 3 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_3(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 4); -} - -/** - * @brief Get field sue_trim_value_input_4 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 4 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_4(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 6); -} - -/** - * @brief Get field sue_trim_value_input_5 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 5 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_5(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 8); -} - -/** - * @brief Get field sue_trim_value_input_6 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 6 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_6(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 10); -} - -/** - * @brief Get field sue_trim_value_input_7 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 7 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_7(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 12); -} - -/** - * @brief Get field sue_trim_value_input_8 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 8 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_8(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 14); -} - -/** - * @brief Get field sue_trim_value_input_9 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 9 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_9(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 16); -} - -/** - * @brief Get field sue_trim_value_input_10 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 10 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_10(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 18); -} - -/** - * @brief Get field sue_trim_value_input_11 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 11 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_11(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 20); -} - -/** - * @brief Get field sue_trim_value_input_12 from serial_udb_extra_f20 message - * - * @return SUE UDB PWM Trim Value on Input 12 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_12(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 22); -} - -/** - * @brief Decode a serial_udb_extra_f20 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f20 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f20_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f20_t* serial_udb_extra_f20) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f20->sue_trim_value_input_1 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_1(msg); - serial_udb_extra_f20->sue_trim_value_input_2 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_2(msg); - serial_udb_extra_f20->sue_trim_value_input_3 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_3(msg); - serial_udb_extra_f20->sue_trim_value_input_4 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_4(msg); - serial_udb_extra_f20->sue_trim_value_input_5 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_5(msg); - serial_udb_extra_f20->sue_trim_value_input_6 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_6(msg); - serial_udb_extra_f20->sue_trim_value_input_7 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_7(msg); - serial_udb_extra_f20->sue_trim_value_input_8 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_8(msg); - serial_udb_extra_f20->sue_trim_value_input_9 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_9(msg); - serial_udb_extra_f20->sue_trim_value_input_10 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_10(msg); - serial_udb_extra_f20->sue_trim_value_input_11 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_11(msg); - serial_udb_extra_f20->sue_trim_value_input_12 = mavlink_msg_serial_udb_extra_f20_get_sue_trim_value_input_12(msg); - serial_udb_extra_f20->sue_number_of_inputs = mavlink_msg_serial_udb_extra_f20_get_sue_number_of_inputs(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN; - memset(serial_udb_extra_f20, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_LEN); - memcpy(serial_udb_extra_f20, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f21.h b/matrixpilot/mavlink_msg_serial_udb_extra_f21.h deleted file mode 100644 index 0984b69ee..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f21.h +++ /dev/null @@ -1,400 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F21 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21 187 - - -typedef struct __mavlink_serial_udb_extra_f21_t { - int16_t sue_accel_x_offset; /*< SUE X accelerometer offset*/ - int16_t sue_accel_y_offset; /*< SUE Y accelerometer offset*/ - int16_t sue_accel_z_offset; /*< SUE Z accelerometer offset*/ - int16_t sue_gyro_x_offset; /*< SUE X gyro offset*/ - int16_t sue_gyro_y_offset; /*< SUE Y gyro offset*/ - int16_t sue_gyro_z_offset; /*< SUE Z gyro offset*/ -} mavlink_serial_udb_extra_f21_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN 12 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN 12 -#define MAVLINK_MSG_ID_187_LEN 12 -#define MAVLINK_MSG_ID_187_MIN_LEN 12 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC 134 -#define MAVLINK_MSG_ID_187_CRC 134 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F21 { \ - 187, \ - "SERIAL_UDB_EXTRA_F21", \ - 6, \ - { { "sue_accel_x_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_x_offset) }, \ - { "sue_accel_y_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_y_offset) }, \ - { "sue_accel_z_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_z_offset) }, \ - { "sue_gyro_x_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_x_offset) }, \ - { "sue_gyro_y_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_y_offset) }, \ - { "sue_gyro_z_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_z_offset) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F21 { \ - "SERIAL_UDB_EXTRA_F21", \ - 6, \ - { { "sue_accel_x_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_x_offset) }, \ - { "sue_accel_y_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_y_offset) }, \ - { "sue_accel_z_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f21_t, sue_accel_z_offset) }, \ - { "sue_gyro_x_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_x_offset) }, \ - { "sue_gyro_y_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_y_offset) }, \ - { "sue_gyro_z_offset", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f21_t, sue_gyro_z_offset) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f21 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_accel_x_offset SUE X accelerometer offset - * @param sue_accel_y_offset SUE Y accelerometer offset - * @param sue_accel_z_offset SUE Z accelerometer offset - * @param sue_gyro_x_offset SUE X gyro offset - * @param sue_gyro_y_offset SUE Y gyro offset - * @param sue_gyro_z_offset SUE Z gyro offset - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - int16_t sue_accel_x_offset, int16_t sue_accel_y_offset, int16_t sue_accel_z_offset, int16_t sue_gyro_x_offset, int16_t sue_gyro_y_offset, int16_t sue_gyro_z_offset) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_offset); - _mav_put_int16_t(buf, 2, sue_accel_y_offset); - _mav_put_int16_t(buf, 4, sue_accel_z_offset); - _mav_put_int16_t(buf, 6, sue_gyro_x_offset); - _mav_put_int16_t(buf, 8, sue_gyro_y_offset); - _mav_put_int16_t(buf, 10, sue_gyro_z_offset); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#else - mavlink_serial_udb_extra_f21_t packet; - packet.sue_accel_x_offset = sue_accel_x_offset; - packet.sue_accel_y_offset = sue_accel_y_offset; - packet.sue_accel_z_offset = sue_accel_z_offset; - packet.sue_gyro_x_offset = sue_gyro_x_offset; - packet.sue_gyro_y_offset = sue_gyro_y_offset; - packet.sue_gyro_z_offset = sue_gyro_z_offset; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f21 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_accel_x_offset SUE X accelerometer offset - * @param sue_accel_y_offset SUE Y accelerometer offset - * @param sue_accel_z_offset SUE Z accelerometer offset - * @param sue_gyro_x_offset SUE X gyro offset - * @param sue_gyro_y_offset SUE Y gyro offset - * @param sue_gyro_z_offset SUE Z gyro offset - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - int16_t sue_accel_x_offset, int16_t sue_accel_y_offset, int16_t sue_accel_z_offset, int16_t sue_gyro_x_offset, int16_t sue_gyro_y_offset, int16_t sue_gyro_z_offset) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_offset); - _mav_put_int16_t(buf, 2, sue_accel_y_offset); - _mav_put_int16_t(buf, 4, sue_accel_z_offset); - _mav_put_int16_t(buf, 6, sue_gyro_x_offset); - _mav_put_int16_t(buf, 8, sue_gyro_y_offset); - _mav_put_int16_t(buf, 10, sue_gyro_z_offset); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#else - mavlink_serial_udb_extra_f21_t packet; - packet.sue_accel_x_offset = sue_accel_x_offset; - packet.sue_accel_y_offset = sue_accel_y_offset; - packet.sue_accel_z_offset = sue_accel_z_offset; - packet.sue_gyro_x_offset = sue_gyro_x_offset; - packet.sue_gyro_y_offset = sue_gyro_y_offset; - packet.sue_gyro_z_offset = sue_gyro_z_offset; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f21 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_accel_x_offset SUE X accelerometer offset - * @param sue_accel_y_offset SUE Y accelerometer offset - * @param sue_accel_z_offset SUE Z accelerometer offset - * @param sue_gyro_x_offset SUE X gyro offset - * @param sue_gyro_y_offset SUE Y gyro offset - * @param sue_gyro_z_offset SUE Z gyro offset - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - int16_t sue_accel_x_offset,int16_t sue_accel_y_offset,int16_t sue_accel_z_offset,int16_t sue_gyro_x_offset,int16_t sue_gyro_y_offset,int16_t sue_gyro_z_offset) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_offset); - _mav_put_int16_t(buf, 2, sue_accel_y_offset); - _mav_put_int16_t(buf, 4, sue_accel_z_offset); - _mav_put_int16_t(buf, 6, sue_gyro_x_offset); - _mav_put_int16_t(buf, 8, sue_gyro_y_offset); - _mav_put_int16_t(buf, 10, sue_gyro_z_offset); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#else - mavlink_serial_udb_extra_f21_t packet; - packet.sue_accel_x_offset = sue_accel_x_offset; - packet.sue_accel_y_offset = sue_accel_y_offset; - packet.sue_accel_z_offset = sue_accel_z_offset; - packet.sue_gyro_x_offset = sue_gyro_x_offset; - packet.sue_gyro_y_offset = sue_gyro_y_offset; - packet.sue_gyro_z_offset = sue_gyro_z_offset; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f21 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f21 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f21_t* serial_udb_extra_f21) -{ - return mavlink_msg_serial_udb_extra_f21_pack(system_id, component_id, msg, serial_udb_extra_f21->sue_accel_x_offset, serial_udb_extra_f21->sue_accel_y_offset, serial_udb_extra_f21->sue_accel_z_offset, serial_udb_extra_f21->sue_gyro_x_offset, serial_udb_extra_f21->sue_gyro_y_offset, serial_udb_extra_f21->sue_gyro_z_offset); -} - -/** - * @brief Encode a serial_udb_extra_f21 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f21 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f21_t* serial_udb_extra_f21) -{ - return mavlink_msg_serial_udb_extra_f21_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f21->sue_accel_x_offset, serial_udb_extra_f21->sue_accel_y_offset, serial_udb_extra_f21->sue_accel_z_offset, serial_udb_extra_f21->sue_gyro_x_offset, serial_udb_extra_f21->sue_gyro_y_offset, serial_udb_extra_f21->sue_gyro_z_offset); -} - -/** - * @brief Encode a serial_udb_extra_f21 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f21 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f21_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f21_t* serial_udb_extra_f21) -{ - return mavlink_msg_serial_udb_extra_f21_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f21->sue_accel_x_offset, serial_udb_extra_f21->sue_accel_y_offset, serial_udb_extra_f21->sue_accel_z_offset, serial_udb_extra_f21->sue_gyro_x_offset, serial_udb_extra_f21->sue_gyro_y_offset, serial_udb_extra_f21->sue_gyro_z_offset); -} - -/** - * @brief Send a serial_udb_extra_f21 message - * @param chan MAVLink channel to send the message - * - * @param sue_accel_x_offset SUE X accelerometer offset - * @param sue_accel_y_offset SUE Y accelerometer offset - * @param sue_accel_z_offset SUE Z accelerometer offset - * @param sue_gyro_x_offset SUE X gyro offset - * @param sue_gyro_y_offset SUE Y gyro offset - * @param sue_gyro_z_offset SUE Z gyro offset - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f21_send(mavlink_channel_t chan, int16_t sue_accel_x_offset, int16_t sue_accel_y_offset, int16_t sue_accel_z_offset, int16_t sue_gyro_x_offset, int16_t sue_gyro_y_offset, int16_t sue_gyro_z_offset) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_offset); - _mav_put_int16_t(buf, 2, sue_accel_y_offset); - _mav_put_int16_t(buf, 4, sue_accel_z_offset); - _mav_put_int16_t(buf, 6, sue_gyro_x_offset); - _mav_put_int16_t(buf, 8, sue_gyro_y_offset); - _mav_put_int16_t(buf, 10, sue_gyro_z_offset); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#else - mavlink_serial_udb_extra_f21_t packet; - packet.sue_accel_x_offset = sue_accel_x_offset; - packet.sue_accel_y_offset = sue_accel_y_offset; - packet.sue_accel_z_offset = sue_accel_z_offset; - packet.sue_gyro_x_offset = sue_gyro_x_offset; - packet.sue_gyro_y_offset = sue_gyro_y_offset; - packet.sue_gyro_z_offset = sue_gyro_z_offset; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f21 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f21_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f21_t* serial_udb_extra_f21) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f21_send(chan, serial_udb_extra_f21->sue_accel_x_offset, serial_udb_extra_f21->sue_accel_y_offset, serial_udb_extra_f21->sue_accel_z_offset, serial_udb_extra_f21->sue_gyro_x_offset, serial_udb_extra_f21->sue_gyro_y_offset, serial_udb_extra_f21->sue_gyro_z_offset); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21, (const char *)serial_udb_extra_f21, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f21_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int16_t sue_accel_x_offset, int16_t sue_accel_y_offset, int16_t sue_accel_z_offset, int16_t sue_gyro_x_offset, int16_t sue_gyro_y_offset, int16_t sue_gyro_z_offset) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int16_t(buf, 0, sue_accel_x_offset); - _mav_put_int16_t(buf, 2, sue_accel_y_offset); - _mav_put_int16_t(buf, 4, sue_accel_z_offset); - _mav_put_int16_t(buf, 6, sue_gyro_x_offset); - _mav_put_int16_t(buf, 8, sue_gyro_y_offset); - _mav_put_int16_t(buf, 10, sue_gyro_z_offset); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#else - mavlink_serial_udb_extra_f21_t *packet = (mavlink_serial_udb_extra_f21_t *)msgbuf; - packet->sue_accel_x_offset = sue_accel_x_offset; - packet->sue_accel_y_offset = sue_accel_y_offset; - packet->sue_accel_z_offset = sue_accel_z_offset; - packet->sue_gyro_x_offset = sue_gyro_x_offset; - packet->sue_gyro_y_offset = sue_gyro_y_offset; - packet->sue_gyro_z_offset = sue_gyro_z_offset; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F21 UNPACKING - - -/** - * @brief Get field sue_accel_x_offset from serial_udb_extra_f21 message - * - * @return SUE X accelerometer offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_accel_x_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 0); -} - -/** - * @brief Get field sue_accel_y_offset from serial_udb_extra_f21 message - * - * @return SUE Y accelerometer offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_accel_y_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 2); -} - -/** - * @brief Get field sue_accel_z_offset from serial_udb_extra_f21 message - * - * @return SUE Z accelerometer offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_accel_z_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 4); -} - -/** - * @brief Get field sue_gyro_x_offset from serial_udb_extra_f21 message - * - * @return SUE X gyro offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_gyro_x_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 6); -} - -/** - * @brief Get field sue_gyro_y_offset from serial_udb_extra_f21 message - * - * @return SUE Y gyro offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_gyro_y_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 8); -} - -/** - * @brief Get field sue_gyro_z_offset from serial_udb_extra_f21 message - * - * @return SUE Z gyro offset - */ -static inline int16_t mavlink_msg_serial_udb_extra_f21_get_sue_gyro_z_offset(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 10); -} - -/** - * @brief Decode a serial_udb_extra_f21 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f21 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f21_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f21_t* serial_udb_extra_f21) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f21->sue_accel_x_offset = mavlink_msg_serial_udb_extra_f21_get_sue_accel_x_offset(msg); - serial_udb_extra_f21->sue_accel_y_offset = mavlink_msg_serial_udb_extra_f21_get_sue_accel_y_offset(msg); - serial_udb_extra_f21->sue_accel_z_offset = mavlink_msg_serial_udb_extra_f21_get_sue_accel_z_offset(msg); - serial_udb_extra_f21->sue_gyro_x_offset = mavlink_msg_serial_udb_extra_f21_get_sue_gyro_x_offset(msg); - serial_udb_extra_f21->sue_gyro_y_offset = mavlink_msg_serial_udb_extra_f21_get_sue_gyro_y_offset(msg); - serial_udb_extra_f21->sue_gyro_z_offset = mavlink_msg_serial_udb_extra_f21_get_sue_gyro_z_offset(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN; - memset(serial_udb_extra_f21, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_LEN); - memcpy(serial_udb_extra_f21, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f22.h b/matrixpilot/mavlink_msg_serial_udb_extra_f22.h deleted file mode 100644 index d2aa61c7c..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f22.h +++ /dev/null @@ -1,400 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F22 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22 188 - - -typedef struct __mavlink_serial_udb_extra_f22_t { - int16_t sue_accel_x_at_calibration; /*< SUE X accelerometer at calibration time*/ - int16_t sue_accel_y_at_calibration; /*< SUE Y accelerometer at calibration time*/ - int16_t sue_accel_z_at_calibration; /*< SUE Z accelerometer at calibration time*/ - int16_t sue_gyro_x_at_calibration; /*< SUE X gyro at calibration time*/ - int16_t sue_gyro_y_at_calibration; /*< SUE Y gyro at calibration time*/ - int16_t sue_gyro_z_at_calibration; /*< SUE Z gyro at calibration time*/ -} mavlink_serial_udb_extra_f22_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN 12 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN 12 -#define MAVLINK_MSG_ID_188_LEN 12 -#define MAVLINK_MSG_ID_188_MIN_LEN 12 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC 91 -#define MAVLINK_MSG_ID_188_CRC 91 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F22 { \ - 188, \ - "SERIAL_UDB_EXTRA_F22", \ - 6, \ - { { "sue_accel_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_x_at_calibration) }, \ - { "sue_accel_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_y_at_calibration) }, \ - { "sue_accel_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_z_at_calibration) }, \ - { "sue_gyro_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_x_at_calibration) }, \ - { "sue_gyro_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_y_at_calibration) }, \ - { "sue_gyro_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_z_at_calibration) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F22 { \ - "SERIAL_UDB_EXTRA_F22", \ - 6, \ - { { "sue_accel_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 0, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_x_at_calibration) }, \ - { "sue_accel_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 2, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_y_at_calibration) }, \ - { "sue_accel_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_serial_udb_extra_f22_t, sue_accel_z_at_calibration) }, \ - { "sue_gyro_x_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_x_at_calibration) }, \ - { "sue_gyro_y_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_y_at_calibration) }, \ - { "sue_gyro_z_at_calibration", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_serial_udb_extra_f22_t, sue_gyro_z_at_calibration) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f22 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_accel_x_at_calibration SUE X accelerometer at calibration time - * @param sue_accel_y_at_calibration SUE Y accelerometer at calibration time - * @param sue_accel_z_at_calibration SUE Z accelerometer at calibration time - * @param sue_gyro_x_at_calibration SUE X gyro at calibration time - * @param sue_gyro_y_at_calibration SUE Y gyro at calibration time - * @param sue_gyro_z_at_calibration SUE Z gyro at calibration time - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration); - _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration); - _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration); - _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration); - _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration); - _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#else - mavlink_serial_udb_extra_f22_t packet; - packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration; - packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration; - packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration; - packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration; - packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration; - packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f22 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_accel_x_at_calibration SUE X accelerometer at calibration time - * @param sue_accel_y_at_calibration SUE Y accelerometer at calibration time - * @param sue_accel_z_at_calibration SUE Z accelerometer at calibration time - * @param sue_gyro_x_at_calibration SUE X gyro at calibration time - * @param sue_gyro_y_at_calibration SUE Y gyro at calibration time - * @param sue_gyro_z_at_calibration SUE Z gyro at calibration time - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration); - _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration); - _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration); - _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration); - _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration); - _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#else - mavlink_serial_udb_extra_f22_t packet; - packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration; - packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration; - packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration; - packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration; - packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration; - packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f22 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_accel_x_at_calibration SUE X accelerometer at calibration time - * @param sue_accel_y_at_calibration SUE Y accelerometer at calibration time - * @param sue_accel_z_at_calibration SUE Z accelerometer at calibration time - * @param sue_gyro_x_at_calibration SUE X gyro at calibration time - * @param sue_gyro_y_at_calibration SUE Y gyro at calibration time - * @param sue_gyro_z_at_calibration SUE Z gyro at calibration time - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - int16_t sue_accel_x_at_calibration,int16_t sue_accel_y_at_calibration,int16_t sue_accel_z_at_calibration,int16_t sue_gyro_x_at_calibration,int16_t sue_gyro_y_at_calibration,int16_t sue_gyro_z_at_calibration) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration); - _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration); - _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration); - _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration); - _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration); - _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#else - mavlink_serial_udb_extra_f22_t packet; - packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration; - packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration; - packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration; - packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration; - packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration; - packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f22 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f22 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22) -{ - return mavlink_msg_serial_udb_extra_f22_pack(system_id, component_id, msg, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration); -} - -/** - * @brief Encode a serial_udb_extra_f22 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f22 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22) -{ - return mavlink_msg_serial_udb_extra_f22_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration); -} - -/** - * @brief Encode a serial_udb_extra_f22 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f22 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f22_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22) -{ - return mavlink_msg_serial_udb_extra_f22_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration); -} - -/** - * @brief Send a serial_udb_extra_f22 message - * @param chan MAVLink channel to send the message - * - * @param sue_accel_x_at_calibration SUE X accelerometer at calibration time - * @param sue_accel_y_at_calibration SUE Y accelerometer at calibration time - * @param sue_accel_z_at_calibration SUE Z accelerometer at calibration time - * @param sue_gyro_x_at_calibration SUE X gyro at calibration time - * @param sue_gyro_y_at_calibration SUE Y gyro at calibration time - * @param sue_gyro_z_at_calibration SUE Z gyro at calibration time - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f22_send(mavlink_channel_t chan, int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN]; - _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration); - _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration); - _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration); - _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration); - _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration); - _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#else - mavlink_serial_udb_extra_f22_t packet; - packet.sue_accel_x_at_calibration = sue_accel_x_at_calibration; - packet.sue_accel_y_at_calibration = sue_accel_y_at_calibration; - packet.sue_accel_z_at_calibration = sue_accel_z_at_calibration; - packet.sue_gyro_x_at_calibration = sue_gyro_x_at_calibration; - packet.sue_gyro_y_at_calibration = sue_gyro_y_at_calibration; - packet.sue_gyro_z_at_calibration = sue_gyro_z_at_calibration; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f22 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f22_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f22_send(chan, serial_udb_extra_f22->sue_accel_x_at_calibration, serial_udb_extra_f22->sue_accel_y_at_calibration, serial_udb_extra_f22->sue_accel_z_at_calibration, serial_udb_extra_f22->sue_gyro_x_at_calibration, serial_udb_extra_f22->sue_gyro_y_at_calibration, serial_udb_extra_f22->sue_gyro_z_at_calibration); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)serial_udb_extra_f22, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f22_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int16_t sue_accel_x_at_calibration, int16_t sue_accel_y_at_calibration, int16_t sue_accel_z_at_calibration, int16_t sue_gyro_x_at_calibration, int16_t sue_gyro_y_at_calibration, int16_t sue_gyro_z_at_calibration) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_int16_t(buf, 0, sue_accel_x_at_calibration); - _mav_put_int16_t(buf, 2, sue_accel_y_at_calibration); - _mav_put_int16_t(buf, 4, sue_accel_z_at_calibration); - _mav_put_int16_t(buf, 6, sue_gyro_x_at_calibration); - _mav_put_int16_t(buf, 8, sue_gyro_y_at_calibration); - _mav_put_int16_t(buf, 10, sue_gyro_z_at_calibration); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#else - mavlink_serial_udb_extra_f22_t *packet = (mavlink_serial_udb_extra_f22_t *)msgbuf; - packet->sue_accel_x_at_calibration = sue_accel_x_at_calibration; - packet->sue_accel_y_at_calibration = sue_accel_y_at_calibration; - packet->sue_accel_z_at_calibration = sue_accel_z_at_calibration; - packet->sue_gyro_x_at_calibration = sue_gyro_x_at_calibration; - packet->sue_gyro_y_at_calibration = sue_gyro_y_at_calibration; - packet->sue_gyro_z_at_calibration = sue_gyro_z_at_calibration; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F22 UNPACKING - - -/** - * @brief Get field sue_accel_x_at_calibration from serial_udb_extra_f22 message - * - * @return SUE X accelerometer at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_x_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 0); -} - -/** - * @brief Get field sue_accel_y_at_calibration from serial_udb_extra_f22 message - * - * @return SUE Y accelerometer at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_y_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 2); -} - -/** - * @brief Get field sue_accel_z_at_calibration from serial_udb_extra_f22 message - * - * @return SUE Z accelerometer at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_accel_z_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 4); -} - -/** - * @brief Get field sue_gyro_x_at_calibration from serial_udb_extra_f22 message - * - * @return SUE X gyro at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_x_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 6); -} - -/** - * @brief Get field sue_gyro_y_at_calibration from serial_udb_extra_f22 message - * - * @return SUE Y gyro at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_y_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 8); -} - -/** - * @brief Get field sue_gyro_z_at_calibration from serial_udb_extra_f22 message - * - * @return SUE Z gyro at calibration time - */ -static inline int16_t mavlink_msg_serial_udb_extra_f22_get_sue_gyro_z_at_calibration(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 10); -} - -/** - * @brief Decode a serial_udb_extra_f22 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f22 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f22_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f22_t* serial_udb_extra_f22) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f22->sue_accel_x_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_x_at_calibration(msg); - serial_udb_extra_f22->sue_accel_y_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_y_at_calibration(msg); - serial_udb_extra_f22->sue_accel_z_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_accel_z_at_calibration(msg); - serial_udb_extra_f22->sue_gyro_x_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_x_at_calibration(msg); - serial_udb_extra_f22->sue_gyro_y_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_y_at_calibration(msg); - serial_udb_extra_f22->sue_gyro_z_at_calibration = mavlink_msg_serial_udb_extra_f22_get_sue_gyro_z_at_calibration(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN; - memset(serial_udb_extra_f22, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_LEN); - memcpy(serial_udb_extra_f22, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f2_a.h b/matrixpilot/mavlink_msg_serial_udb_extra_f2_a.h deleted file mode 100644 index c5182fd73..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f2_a.h +++ /dev/null @@ -1,988 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F2_A PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A 170 - - -typedef struct __mavlink_serial_udb_extra_f2_a_t { - uint32_t sue_time; /*< Serial UDB Extra Time*/ - int32_t sue_latitude; /*< Serial UDB Extra Latitude*/ - int32_t sue_longitude; /*< Serial UDB Extra Longitude*/ - int32_t sue_altitude; /*< Serial UDB Extra Altitude*/ - uint16_t sue_waypoint_index; /*< Serial UDB Extra Waypoint Index*/ - int16_t sue_rmat0; /*< Serial UDB Extra Rmat 0*/ - int16_t sue_rmat1; /*< Serial UDB Extra Rmat 1*/ - int16_t sue_rmat2; /*< Serial UDB Extra Rmat 2*/ - int16_t sue_rmat3; /*< Serial UDB Extra Rmat 3*/ - int16_t sue_rmat4; /*< Serial UDB Extra Rmat 4*/ - int16_t sue_rmat5; /*< Serial UDB Extra Rmat 5*/ - int16_t sue_rmat6; /*< Serial UDB Extra Rmat 6*/ - int16_t sue_rmat7; /*< Serial UDB Extra Rmat 7*/ - int16_t sue_rmat8; /*< Serial UDB Extra Rmat 8*/ - uint16_t sue_cog; /*< Serial UDB Extra GPS Course Over Ground*/ - int16_t sue_sog; /*< Serial UDB Extra Speed Over Ground*/ - uint16_t sue_cpu_load; /*< Serial UDB Extra CPU Load*/ - uint16_t sue_air_speed_3DIMU; /*< Serial UDB Extra 3D IMU Air Speed*/ - int16_t sue_estimated_wind_0; /*< Serial UDB Extra Estimated Wind 0*/ - int16_t sue_estimated_wind_1; /*< Serial UDB Extra Estimated Wind 1*/ - int16_t sue_estimated_wind_2; /*< Serial UDB Extra Estimated Wind 2*/ - int16_t sue_magFieldEarth0; /*< Serial UDB Extra Magnetic Field Earth 0 */ - int16_t sue_magFieldEarth1; /*< Serial UDB Extra Magnetic Field Earth 1 */ - int16_t sue_magFieldEarth2; /*< Serial UDB Extra Magnetic Field Earth 2 */ - int16_t sue_svs; /*< Serial UDB Extra Number of Satellites in View*/ - int16_t sue_hdop; /*< Serial UDB Extra GPS Horizontal Dilution of Precision*/ - uint8_t sue_status; /*< Serial UDB Extra Status*/ -} mavlink_serial_udb_extra_f2_a_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN 61 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN 61 -#define MAVLINK_MSG_ID_170_LEN 61 -#define MAVLINK_MSG_ID_170_MIN_LEN 61 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC 103 -#define MAVLINK_MSG_ID_170_CRC 103 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_A { \ - 170, \ - "SERIAL_UDB_EXTRA_F2_A", \ - 27, \ - { { "sue_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_time) }, \ - { "sue_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_status) }, \ - { "sue_latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_latitude) }, \ - { "sue_longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_longitude) }, \ - { "sue_altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_altitude) }, \ - { "sue_waypoint_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_waypoint_index) }, \ - { "sue_rmat0", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat0) }, \ - { "sue_rmat1", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat1) }, \ - { "sue_rmat2", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat2) }, \ - { "sue_rmat3", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat3) }, \ - { "sue_rmat4", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat4) }, \ - { "sue_rmat5", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat5) }, \ - { "sue_rmat6", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat6) }, \ - { "sue_rmat7", NULL, MAVLINK_TYPE_INT16_T, 0, 32, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat7) }, \ - { "sue_rmat8", NULL, MAVLINK_TYPE_INT16_T, 0, 34, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat8) }, \ - { "sue_cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_cog) }, \ - { "sue_sog", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_sog) }, \ - { "sue_cpu_load", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_cpu_load) }, \ - { "sue_air_speed_3DIMU", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_air_speed_3DIMU) }, \ - { "sue_estimated_wind_0", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_0) }, \ - { "sue_estimated_wind_1", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_1) }, \ - { "sue_estimated_wind_2", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_2) }, \ - { "sue_magFieldEarth0", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth0) }, \ - { "sue_magFieldEarth1", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth1) }, \ - { "sue_magFieldEarth2", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth2) }, \ - { "sue_svs", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_svs) }, \ - { "sue_hdop", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_hdop) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_A { \ - "SERIAL_UDB_EXTRA_F2_A", \ - 27, \ - { { "sue_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_time) }, \ - { "sue_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 60, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_status) }, \ - { "sue_latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_latitude) }, \ - { "sue_longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_longitude) }, \ - { "sue_altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_altitude) }, \ - { "sue_waypoint_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_waypoint_index) }, \ - { "sue_rmat0", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat0) }, \ - { "sue_rmat1", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat1) }, \ - { "sue_rmat2", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat2) }, \ - { "sue_rmat3", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat3) }, \ - { "sue_rmat4", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat4) }, \ - { "sue_rmat5", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat5) }, \ - { "sue_rmat6", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat6) }, \ - { "sue_rmat7", NULL, MAVLINK_TYPE_INT16_T, 0, 32, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat7) }, \ - { "sue_rmat8", NULL, MAVLINK_TYPE_INT16_T, 0, 34, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_rmat8) }, \ - { "sue_cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_cog) }, \ - { "sue_sog", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_sog) }, \ - { "sue_cpu_load", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_cpu_load) }, \ - { "sue_air_speed_3DIMU", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_air_speed_3DIMU) }, \ - { "sue_estimated_wind_0", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_0) }, \ - { "sue_estimated_wind_1", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_1) }, \ - { "sue_estimated_wind_2", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_estimated_wind_2) }, \ - { "sue_magFieldEarth0", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth0) }, \ - { "sue_magFieldEarth1", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth1) }, \ - { "sue_magFieldEarth2", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_magFieldEarth2) }, \ - { "sue_svs", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_svs) }, \ - { "sue_hdop", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_serial_udb_extra_f2_a_t, sue_hdop) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f2_a message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_time Serial UDB Extra Time - * @param sue_status Serial UDB Extra Status - * @param sue_latitude Serial UDB Extra Latitude - * @param sue_longitude Serial UDB Extra Longitude - * @param sue_altitude Serial UDB Extra Altitude - * @param sue_waypoint_index Serial UDB Extra Waypoint Index - * @param sue_rmat0 Serial UDB Extra Rmat 0 - * @param sue_rmat1 Serial UDB Extra Rmat 1 - * @param sue_rmat2 Serial UDB Extra Rmat 2 - * @param sue_rmat3 Serial UDB Extra Rmat 3 - * @param sue_rmat4 Serial UDB Extra Rmat 4 - * @param sue_rmat5 Serial UDB Extra Rmat 5 - * @param sue_rmat6 Serial UDB Extra Rmat 6 - * @param sue_rmat7 Serial UDB Extra Rmat 7 - * @param sue_rmat8 Serial UDB Extra Rmat 8 - * @param sue_cog Serial UDB Extra GPS Course Over Ground - * @param sue_sog Serial UDB Extra Speed Over Ground - * @param sue_cpu_load Serial UDB Extra CPU Load - * @param sue_air_speed_3DIMU Serial UDB Extra 3D IMU Air Speed - * @param sue_estimated_wind_0 Serial UDB Extra Estimated Wind 0 - * @param sue_estimated_wind_1 Serial UDB Extra Estimated Wind 1 - * @param sue_estimated_wind_2 Serial UDB Extra Estimated Wind 2 - * @param sue_magFieldEarth0 Serial UDB Extra Magnetic Field Earth 0 - * @param sue_magFieldEarth1 Serial UDB Extra Magnetic Field Earth 1 - * @param sue_magFieldEarth2 Serial UDB Extra Magnetic Field Earth 2 - * @param sue_svs Serial UDB Extra Number of Satellites in View - * @param sue_hdop Serial UDB Extra GPS Horizontal Dilution of Precision - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t sue_time, uint8_t sue_status, int32_t sue_latitude, int32_t sue_longitude, int32_t sue_altitude, uint16_t sue_waypoint_index, int16_t sue_rmat0, int16_t sue_rmat1, int16_t sue_rmat2, int16_t sue_rmat3, int16_t sue_rmat4, int16_t sue_rmat5, int16_t sue_rmat6, int16_t sue_rmat7, int16_t sue_rmat8, uint16_t sue_cog, int16_t sue_sog, uint16_t sue_cpu_load, uint16_t sue_air_speed_3DIMU, int16_t sue_estimated_wind_0, int16_t sue_estimated_wind_1, int16_t sue_estimated_wind_2, int16_t sue_magFieldEarth0, int16_t sue_magFieldEarth1, int16_t sue_magFieldEarth2, int16_t sue_svs, int16_t sue_hdop) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_int32_t(buf, 4, sue_latitude); - _mav_put_int32_t(buf, 8, sue_longitude); - _mav_put_int32_t(buf, 12, sue_altitude); - _mav_put_uint16_t(buf, 16, sue_waypoint_index); - _mav_put_int16_t(buf, 18, sue_rmat0); - _mav_put_int16_t(buf, 20, sue_rmat1); - _mav_put_int16_t(buf, 22, sue_rmat2); - _mav_put_int16_t(buf, 24, sue_rmat3); - _mav_put_int16_t(buf, 26, sue_rmat4); - _mav_put_int16_t(buf, 28, sue_rmat5); - _mav_put_int16_t(buf, 30, sue_rmat6); - _mav_put_int16_t(buf, 32, sue_rmat7); - _mav_put_int16_t(buf, 34, sue_rmat8); - _mav_put_uint16_t(buf, 36, sue_cog); - _mav_put_int16_t(buf, 38, sue_sog); - _mav_put_uint16_t(buf, 40, sue_cpu_load); - _mav_put_uint16_t(buf, 42, sue_air_speed_3DIMU); - _mav_put_int16_t(buf, 44, sue_estimated_wind_0); - _mav_put_int16_t(buf, 46, sue_estimated_wind_1); - _mav_put_int16_t(buf, 48, sue_estimated_wind_2); - _mav_put_int16_t(buf, 50, sue_magFieldEarth0); - _mav_put_int16_t(buf, 52, sue_magFieldEarth1); - _mav_put_int16_t(buf, 54, sue_magFieldEarth2); - _mav_put_int16_t(buf, 56, sue_svs); - _mav_put_int16_t(buf, 58, sue_hdop); - _mav_put_uint8_t(buf, 60, sue_status); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#else - mavlink_serial_udb_extra_f2_a_t packet; - packet.sue_time = sue_time; - packet.sue_latitude = sue_latitude; - packet.sue_longitude = sue_longitude; - packet.sue_altitude = sue_altitude; - packet.sue_waypoint_index = sue_waypoint_index; - packet.sue_rmat0 = sue_rmat0; - packet.sue_rmat1 = sue_rmat1; - packet.sue_rmat2 = sue_rmat2; - packet.sue_rmat3 = sue_rmat3; - packet.sue_rmat4 = sue_rmat4; - packet.sue_rmat5 = sue_rmat5; - packet.sue_rmat6 = sue_rmat6; - packet.sue_rmat7 = sue_rmat7; - packet.sue_rmat8 = sue_rmat8; - packet.sue_cog = sue_cog; - packet.sue_sog = sue_sog; - packet.sue_cpu_load = sue_cpu_load; - packet.sue_air_speed_3DIMU = sue_air_speed_3DIMU; - packet.sue_estimated_wind_0 = sue_estimated_wind_0; - packet.sue_estimated_wind_1 = sue_estimated_wind_1; - packet.sue_estimated_wind_2 = sue_estimated_wind_2; - packet.sue_magFieldEarth0 = sue_magFieldEarth0; - packet.sue_magFieldEarth1 = sue_magFieldEarth1; - packet.sue_magFieldEarth2 = sue_magFieldEarth2; - packet.sue_svs = sue_svs; - packet.sue_hdop = sue_hdop; - packet.sue_status = sue_status; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f2_a message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_time Serial UDB Extra Time - * @param sue_status Serial UDB Extra Status - * @param sue_latitude Serial UDB Extra Latitude - * @param sue_longitude Serial UDB Extra Longitude - * @param sue_altitude Serial UDB Extra Altitude - * @param sue_waypoint_index Serial UDB Extra Waypoint Index - * @param sue_rmat0 Serial UDB Extra Rmat 0 - * @param sue_rmat1 Serial UDB Extra Rmat 1 - * @param sue_rmat2 Serial UDB Extra Rmat 2 - * @param sue_rmat3 Serial UDB Extra Rmat 3 - * @param sue_rmat4 Serial UDB Extra Rmat 4 - * @param sue_rmat5 Serial UDB Extra Rmat 5 - * @param sue_rmat6 Serial UDB Extra Rmat 6 - * @param sue_rmat7 Serial UDB Extra Rmat 7 - * @param sue_rmat8 Serial UDB Extra Rmat 8 - * @param sue_cog Serial UDB Extra GPS Course Over Ground - * @param sue_sog Serial UDB Extra Speed Over Ground - * @param sue_cpu_load Serial UDB Extra CPU Load - * @param sue_air_speed_3DIMU Serial UDB Extra 3D IMU Air Speed - * @param sue_estimated_wind_0 Serial UDB Extra Estimated Wind 0 - * @param sue_estimated_wind_1 Serial UDB Extra Estimated Wind 1 - * @param sue_estimated_wind_2 Serial UDB Extra Estimated Wind 2 - * @param sue_magFieldEarth0 Serial UDB Extra Magnetic Field Earth 0 - * @param sue_magFieldEarth1 Serial UDB Extra Magnetic Field Earth 1 - * @param sue_magFieldEarth2 Serial UDB Extra Magnetic Field Earth 2 - * @param sue_svs Serial UDB Extra Number of Satellites in View - * @param sue_hdop Serial UDB Extra GPS Horizontal Dilution of Precision - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t sue_time, uint8_t sue_status, int32_t sue_latitude, int32_t sue_longitude, int32_t sue_altitude, uint16_t sue_waypoint_index, int16_t sue_rmat0, int16_t sue_rmat1, int16_t sue_rmat2, int16_t sue_rmat3, int16_t sue_rmat4, int16_t sue_rmat5, int16_t sue_rmat6, int16_t sue_rmat7, int16_t sue_rmat8, uint16_t sue_cog, int16_t sue_sog, uint16_t sue_cpu_load, uint16_t sue_air_speed_3DIMU, int16_t sue_estimated_wind_0, int16_t sue_estimated_wind_1, int16_t sue_estimated_wind_2, int16_t sue_magFieldEarth0, int16_t sue_magFieldEarth1, int16_t sue_magFieldEarth2, int16_t sue_svs, int16_t sue_hdop) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_int32_t(buf, 4, sue_latitude); - _mav_put_int32_t(buf, 8, sue_longitude); - _mav_put_int32_t(buf, 12, sue_altitude); - _mav_put_uint16_t(buf, 16, sue_waypoint_index); - _mav_put_int16_t(buf, 18, sue_rmat0); - _mav_put_int16_t(buf, 20, sue_rmat1); - _mav_put_int16_t(buf, 22, sue_rmat2); - _mav_put_int16_t(buf, 24, sue_rmat3); - _mav_put_int16_t(buf, 26, sue_rmat4); - _mav_put_int16_t(buf, 28, sue_rmat5); - _mav_put_int16_t(buf, 30, sue_rmat6); - _mav_put_int16_t(buf, 32, sue_rmat7); - _mav_put_int16_t(buf, 34, sue_rmat8); - _mav_put_uint16_t(buf, 36, sue_cog); - _mav_put_int16_t(buf, 38, sue_sog); - _mav_put_uint16_t(buf, 40, sue_cpu_load); - _mav_put_uint16_t(buf, 42, sue_air_speed_3DIMU); - _mav_put_int16_t(buf, 44, sue_estimated_wind_0); - _mav_put_int16_t(buf, 46, sue_estimated_wind_1); - _mav_put_int16_t(buf, 48, sue_estimated_wind_2); - _mav_put_int16_t(buf, 50, sue_magFieldEarth0); - _mav_put_int16_t(buf, 52, sue_magFieldEarth1); - _mav_put_int16_t(buf, 54, sue_magFieldEarth2); - _mav_put_int16_t(buf, 56, sue_svs); - _mav_put_int16_t(buf, 58, sue_hdop); - _mav_put_uint8_t(buf, 60, sue_status); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#else - mavlink_serial_udb_extra_f2_a_t packet; - packet.sue_time = sue_time; - packet.sue_latitude = sue_latitude; - packet.sue_longitude = sue_longitude; - packet.sue_altitude = sue_altitude; - packet.sue_waypoint_index = sue_waypoint_index; - packet.sue_rmat0 = sue_rmat0; - packet.sue_rmat1 = sue_rmat1; - packet.sue_rmat2 = sue_rmat2; - packet.sue_rmat3 = sue_rmat3; - packet.sue_rmat4 = sue_rmat4; - packet.sue_rmat5 = sue_rmat5; - packet.sue_rmat6 = sue_rmat6; - packet.sue_rmat7 = sue_rmat7; - packet.sue_rmat8 = sue_rmat8; - packet.sue_cog = sue_cog; - packet.sue_sog = sue_sog; - packet.sue_cpu_load = sue_cpu_load; - packet.sue_air_speed_3DIMU = sue_air_speed_3DIMU; - packet.sue_estimated_wind_0 = sue_estimated_wind_0; - packet.sue_estimated_wind_1 = sue_estimated_wind_1; - packet.sue_estimated_wind_2 = sue_estimated_wind_2; - packet.sue_magFieldEarth0 = sue_magFieldEarth0; - packet.sue_magFieldEarth1 = sue_magFieldEarth1; - packet.sue_magFieldEarth2 = sue_magFieldEarth2; - packet.sue_svs = sue_svs; - packet.sue_hdop = sue_hdop; - packet.sue_status = sue_status; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f2_a message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_time Serial UDB Extra Time - * @param sue_status Serial UDB Extra Status - * @param sue_latitude Serial UDB Extra Latitude - * @param sue_longitude Serial UDB Extra Longitude - * @param sue_altitude Serial UDB Extra Altitude - * @param sue_waypoint_index Serial UDB Extra Waypoint Index - * @param sue_rmat0 Serial UDB Extra Rmat 0 - * @param sue_rmat1 Serial UDB Extra Rmat 1 - * @param sue_rmat2 Serial UDB Extra Rmat 2 - * @param sue_rmat3 Serial UDB Extra Rmat 3 - * @param sue_rmat4 Serial UDB Extra Rmat 4 - * @param sue_rmat5 Serial UDB Extra Rmat 5 - * @param sue_rmat6 Serial UDB Extra Rmat 6 - * @param sue_rmat7 Serial UDB Extra Rmat 7 - * @param sue_rmat8 Serial UDB Extra Rmat 8 - * @param sue_cog Serial UDB Extra GPS Course Over Ground - * @param sue_sog Serial UDB Extra Speed Over Ground - * @param sue_cpu_load Serial UDB Extra CPU Load - * @param sue_air_speed_3DIMU Serial UDB Extra 3D IMU Air Speed - * @param sue_estimated_wind_0 Serial UDB Extra Estimated Wind 0 - * @param sue_estimated_wind_1 Serial UDB Extra Estimated Wind 1 - * @param sue_estimated_wind_2 Serial UDB Extra Estimated Wind 2 - * @param sue_magFieldEarth0 Serial UDB Extra Magnetic Field Earth 0 - * @param sue_magFieldEarth1 Serial UDB Extra Magnetic Field Earth 1 - * @param sue_magFieldEarth2 Serial UDB Extra Magnetic Field Earth 2 - * @param sue_svs Serial UDB Extra Number of Satellites in View - * @param sue_hdop Serial UDB Extra GPS Horizontal Dilution of Precision - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t sue_time,uint8_t sue_status,int32_t sue_latitude,int32_t sue_longitude,int32_t sue_altitude,uint16_t sue_waypoint_index,int16_t sue_rmat0,int16_t sue_rmat1,int16_t sue_rmat2,int16_t sue_rmat3,int16_t sue_rmat4,int16_t sue_rmat5,int16_t sue_rmat6,int16_t sue_rmat7,int16_t sue_rmat8,uint16_t sue_cog,int16_t sue_sog,uint16_t sue_cpu_load,uint16_t sue_air_speed_3DIMU,int16_t sue_estimated_wind_0,int16_t sue_estimated_wind_1,int16_t sue_estimated_wind_2,int16_t sue_magFieldEarth0,int16_t sue_magFieldEarth1,int16_t sue_magFieldEarth2,int16_t sue_svs,int16_t sue_hdop) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_int32_t(buf, 4, sue_latitude); - _mav_put_int32_t(buf, 8, sue_longitude); - _mav_put_int32_t(buf, 12, sue_altitude); - _mav_put_uint16_t(buf, 16, sue_waypoint_index); - _mav_put_int16_t(buf, 18, sue_rmat0); - _mav_put_int16_t(buf, 20, sue_rmat1); - _mav_put_int16_t(buf, 22, sue_rmat2); - _mav_put_int16_t(buf, 24, sue_rmat3); - _mav_put_int16_t(buf, 26, sue_rmat4); - _mav_put_int16_t(buf, 28, sue_rmat5); - _mav_put_int16_t(buf, 30, sue_rmat6); - _mav_put_int16_t(buf, 32, sue_rmat7); - _mav_put_int16_t(buf, 34, sue_rmat8); - _mav_put_uint16_t(buf, 36, sue_cog); - _mav_put_int16_t(buf, 38, sue_sog); - _mav_put_uint16_t(buf, 40, sue_cpu_load); - _mav_put_uint16_t(buf, 42, sue_air_speed_3DIMU); - _mav_put_int16_t(buf, 44, sue_estimated_wind_0); - _mav_put_int16_t(buf, 46, sue_estimated_wind_1); - _mav_put_int16_t(buf, 48, sue_estimated_wind_2); - _mav_put_int16_t(buf, 50, sue_magFieldEarth0); - _mav_put_int16_t(buf, 52, sue_magFieldEarth1); - _mav_put_int16_t(buf, 54, sue_magFieldEarth2); - _mav_put_int16_t(buf, 56, sue_svs); - _mav_put_int16_t(buf, 58, sue_hdop); - _mav_put_uint8_t(buf, 60, sue_status); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#else - mavlink_serial_udb_extra_f2_a_t packet; - packet.sue_time = sue_time; - packet.sue_latitude = sue_latitude; - packet.sue_longitude = sue_longitude; - packet.sue_altitude = sue_altitude; - packet.sue_waypoint_index = sue_waypoint_index; - packet.sue_rmat0 = sue_rmat0; - packet.sue_rmat1 = sue_rmat1; - packet.sue_rmat2 = sue_rmat2; - packet.sue_rmat3 = sue_rmat3; - packet.sue_rmat4 = sue_rmat4; - packet.sue_rmat5 = sue_rmat5; - packet.sue_rmat6 = sue_rmat6; - packet.sue_rmat7 = sue_rmat7; - packet.sue_rmat8 = sue_rmat8; - packet.sue_cog = sue_cog; - packet.sue_sog = sue_sog; - packet.sue_cpu_load = sue_cpu_load; - packet.sue_air_speed_3DIMU = sue_air_speed_3DIMU; - packet.sue_estimated_wind_0 = sue_estimated_wind_0; - packet.sue_estimated_wind_1 = sue_estimated_wind_1; - packet.sue_estimated_wind_2 = sue_estimated_wind_2; - packet.sue_magFieldEarth0 = sue_magFieldEarth0; - packet.sue_magFieldEarth1 = sue_magFieldEarth1; - packet.sue_magFieldEarth2 = sue_magFieldEarth2; - packet.sue_svs = sue_svs; - packet.sue_hdop = sue_hdop; - packet.sue_status = sue_status; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f2_a struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_a C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_a_t* serial_udb_extra_f2_a) -{ - return mavlink_msg_serial_udb_extra_f2_a_pack(system_id, component_id, msg, serial_udb_extra_f2_a->sue_time, serial_udb_extra_f2_a->sue_status, serial_udb_extra_f2_a->sue_latitude, serial_udb_extra_f2_a->sue_longitude, serial_udb_extra_f2_a->sue_altitude, serial_udb_extra_f2_a->sue_waypoint_index, serial_udb_extra_f2_a->sue_rmat0, serial_udb_extra_f2_a->sue_rmat1, serial_udb_extra_f2_a->sue_rmat2, serial_udb_extra_f2_a->sue_rmat3, serial_udb_extra_f2_a->sue_rmat4, serial_udb_extra_f2_a->sue_rmat5, serial_udb_extra_f2_a->sue_rmat6, serial_udb_extra_f2_a->sue_rmat7, serial_udb_extra_f2_a->sue_rmat8, serial_udb_extra_f2_a->sue_cog, serial_udb_extra_f2_a->sue_sog, serial_udb_extra_f2_a->sue_cpu_load, serial_udb_extra_f2_a->sue_air_speed_3DIMU, serial_udb_extra_f2_a->sue_estimated_wind_0, serial_udb_extra_f2_a->sue_estimated_wind_1, serial_udb_extra_f2_a->sue_estimated_wind_2, serial_udb_extra_f2_a->sue_magFieldEarth0, serial_udb_extra_f2_a->sue_magFieldEarth1, serial_udb_extra_f2_a->sue_magFieldEarth2, serial_udb_extra_f2_a->sue_svs, serial_udb_extra_f2_a->sue_hdop); -} - -/** - * @brief Encode a serial_udb_extra_f2_a struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_a C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_a_t* serial_udb_extra_f2_a) -{ - return mavlink_msg_serial_udb_extra_f2_a_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f2_a->sue_time, serial_udb_extra_f2_a->sue_status, serial_udb_extra_f2_a->sue_latitude, serial_udb_extra_f2_a->sue_longitude, serial_udb_extra_f2_a->sue_altitude, serial_udb_extra_f2_a->sue_waypoint_index, serial_udb_extra_f2_a->sue_rmat0, serial_udb_extra_f2_a->sue_rmat1, serial_udb_extra_f2_a->sue_rmat2, serial_udb_extra_f2_a->sue_rmat3, serial_udb_extra_f2_a->sue_rmat4, serial_udb_extra_f2_a->sue_rmat5, serial_udb_extra_f2_a->sue_rmat6, serial_udb_extra_f2_a->sue_rmat7, serial_udb_extra_f2_a->sue_rmat8, serial_udb_extra_f2_a->sue_cog, serial_udb_extra_f2_a->sue_sog, serial_udb_extra_f2_a->sue_cpu_load, serial_udb_extra_f2_a->sue_air_speed_3DIMU, serial_udb_extra_f2_a->sue_estimated_wind_0, serial_udb_extra_f2_a->sue_estimated_wind_1, serial_udb_extra_f2_a->sue_estimated_wind_2, serial_udb_extra_f2_a->sue_magFieldEarth0, serial_udb_extra_f2_a->sue_magFieldEarth1, serial_udb_extra_f2_a->sue_magFieldEarth2, serial_udb_extra_f2_a->sue_svs, serial_udb_extra_f2_a->sue_hdop); -} - -/** - * @brief Encode a serial_udb_extra_f2_a struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_a C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_a_t* serial_udb_extra_f2_a) -{ - return mavlink_msg_serial_udb_extra_f2_a_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f2_a->sue_time, serial_udb_extra_f2_a->sue_status, serial_udb_extra_f2_a->sue_latitude, serial_udb_extra_f2_a->sue_longitude, serial_udb_extra_f2_a->sue_altitude, serial_udb_extra_f2_a->sue_waypoint_index, serial_udb_extra_f2_a->sue_rmat0, serial_udb_extra_f2_a->sue_rmat1, serial_udb_extra_f2_a->sue_rmat2, serial_udb_extra_f2_a->sue_rmat3, serial_udb_extra_f2_a->sue_rmat4, serial_udb_extra_f2_a->sue_rmat5, serial_udb_extra_f2_a->sue_rmat6, serial_udb_extra_f2_a->sue_rmat7, serial_udb_extra_f2_a->sue_rmat8, serial_udb_extra_f2_a->sue_cog, serial_udb_extra_f2_a->sue_sog, serial_udb_extra_f2_a->sue_cpu_load, serial_udb_extra_f2_a->sue_air_speed_3DIMU, serial_udb_extra_f2_a->sue_estimated_wind_0, serial_udb_extra_f2_a->sue_estimated_wind_1, serial_udb_extra_f2_a->sue_estimated_wind_2, serial_udb_extra_f2_a->sue_magFieldEarth0, serial_udb_extra_f2_a->sue_magFieldEarth1, serial_udb_extra_f2_a->sue_magFieldEarth2, serial_udb_extra_f2_a->sue_svs, serial_udb_extra_f2_a->sue_hdop); -} - -/** - * @brief Send a serial_udb_extra_f2_a message - * @param chan MAVLink channel to send the message - * - * @param sue_time Serial UDB Extra Time - * @param sue_status Serial UDB Extra Status - * @param sue_latitude Serial UDB Extra Latitude - * @param sue_longitude Serial UDB Extra Longitude - * @param sue_altitude Serial UDB Extra Altitude - * @param sue_waypoint_index Serial UDB Extra Waypoint Index - * @param sue_rmat0 Serial UDB Extra Rmat 0 - * @param sue_rmat1 Serial UDB Extra Rmat 1 - * @param sue_rmat2 Serial UDB Extra Rmat 2 - * @param sue_rmat3 Serial UDB Extra Rmat 3 - * @param sue_rmat4 Serial UDB Extra Rmat 4 - * @param sue_rmat5 Serial UDB Extra Rmat 5 - * @param sue_rmat6 Serial UDB Extra Rmat 6 - * @param sue_rmat7 Serial UDB Extra Rmat 7 - * @param sue_rmat8 Serial UDB Extra Rmat 8 - * @param sue_cog Serial UDB Extra GPS Course Over Ground - * @param sue_sog Serial UDB Extra Speed Over Ground - * @param sue_cpu_load Serial UDB Extra CPU Load - * @param sue_air_speed_3DIMU Serial UDB Extra 3D IMU Air Speed - * @param sue_estimated_wind_0 Serial UDB Extra Estimated Wind 0 - * @param sue_estimated_wind_1 Serial UDB Extra Estimated Wind 1 - * @param sue_estimated_wind_2 Serial UDB Extra Estimated Wind 2 - * @param sue_magFieldEarth0 Serial UDB Extra Magnetic Field Earth 0 - * @param sue_magFieldEarth1 Serial UDB Extra Magnetic Field Earth 1 - * @param sue_magFieldEarth2 Serial UDB Extra Magnetic Field Earth 2 - * @param sue_svs Serial UDB Extra Number of Satellites in View - * @param sue_hdop Serial UDB Extra GPS Horizontal Dilution of Precision - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f2_a_send(mavlink_channel_t chan, uint32_t sue_time, uint8_t sue_status, int32_t sue_latitude, int32_t sue_longitude, int32_t sue_altitude, uint16_t sue_waypoint_index, int16_t sue_rmat0, int16_t sue_rmat1, int16_t sue_rmat2, int16_t sue_rmat3, int16_t sue_rmat4, int16_t sue_rmat5, int16_t sue_rmat6, int16_t sue_rmat7, int16_t sue_rmat8, uint16_t sue_cog, int16_t sue_sog, uint16_t sue_cpu_load, uint16_t sue_air_speed_3DIMU, int16_t sue_estimated_wind_0, int16_t sue_estimated_wind_1, int16_t sue_estimated_wind_2, int16_t sue_magFieldEarth0, int16_t sue_magFieldEarth1, int16_t sue_magFieldEarth2, int16_t sue_svs, int16_t sue_hdop) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_int32_t(buf, 4, sue_latitude); - _mav_put_int32_t(buf, 8, sue_longitude); - _mav_put_int32_t(buf, 12, sue_altitude); - _mav_put_uint16_t(buf, 16, sue_waypoint_index); - _mav_put_int16_t(buf, 18, sue_rmat0); - _mav_put_int16_t(buf, 20, sue_rmat1); - _mav_put_int16_t(buf, 22, sue_rmat2); - _mav_put_int16_t(buf, 24, sue_rmat3); - _mav_put_int16_t(buf, 26, sue_rmat4); - _mav_put_int16_t(buf, 28, sue_rmat5); - _mav_put_int16_t(buf, 30, sue_rmat6); - _mav_put_int16_t(buf, 32, sue_rmat7); - _mav_put_int16_t(buf, 34, sue_rmat8); - _mav_put_uint16_t(buf, 36, sue_cog); - _mav_put_int16_t(buf, 38, sue_sog); - _mav_put_uint16_t(buf, 40, sue_cpu_load); - _mav_put_uint16_t(buf, 42, sue_air_speed_3DIMU); - _mav_put_int16_t(buf, 44, sue_estimated_wind_0); - _mav_put_int16_t(buf, 46, sue_estimated_wind_1); - _mav_put_int16_t(buf, 48, sue_estimated_wind_2); - _mav_put_int16_t(buf, 50, sue_magFieldEarth0); - _mav_put_int16_t(buf, 52, sue_magFieldEarth1); - _mav_put_int16_t(buf, 54, sue_magFieldEarth2); - _mav_put_int16_t(buf, 56, sue_svs); - _mav_put_int16_t(buf, 58, sue_hdop); - _mav_put_uint8_t(buf, 60, sue_status); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#else - mavlink_serial_udb_extra_f2_a_t packet; - packet.sue_time = sue_time; - packet.sue_latitude = sue_latitude; - packet.sue_longitude = sue_longitude; - packet.sue_altitude = sue_altitude; - packet.sue_waypoint_index = sue_waypoint_index; - packet.sue_rmat0 = sue_rmat0; - packet.sue_rmat1 = sue_rmat1; - packet.sue_rmat2 = sue_rmat2; - packet.sue_rmat3 = sue_rmat3; - packet.sue_rmat4 = sue_rmat4; - packet.sue_rmat5 = sue_rmat5; - packet.sue_rmat6 = sue_rmat6; - packet.sue_rmat7 = sue_rmat7; - packet.sue_rmat8 = sue_rmat8; - packet.sue_cog = sue_cog; - packet.sue_sog = sue_sog; - packet.sue_cpu_load = sue_cpu_load; - packet.sue_air_speed_3DIMU = sue_air_speed_3DIMU; - packet.sue_estimated_wind_0 = sue_estimated_wind_0; - packet.sue_estimated_wind_1 = sue_estimated_wind_1; - packet.sue_estimated_wind_2 = sue_estimated_wind_2; - packet.sue_magFieldEarth0 = sue_magFieldEarth0; - packet.sue_magFieldEarth1 = sue_magFieldEarth1; - packet.sue_magFieldEarth2 = sue_magFieldEarth2; - packet.sue_svs = sue_svs; - packet.sue_hdop = sue_hdop; - packet.sue_status = sue_status; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f2_a message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f2_a_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f2_a_t* serial_udb_extra_f2_a) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f2_a_send(chan, serial_udb_extra_f2_a->sue_time, serial_udb_extra_f2_a->sue_status, serial_udb_extra_f2_a->sue_latitude, serial_udb_extra_f2_a->sue_longitude, serial_udb_extra_f2_a->sue_altitude, serial_udb_extra_f2_a->sue_waypoint_index, serial_udb_extra_f2_a->sue_rmat0, serial_udb_extra_f2_a->sue_rmat1, serial_udb_extra_f2_a->sue_rmat2, serial_udb_extra_f2_a->sue_rmat3, serial_udb_extra_f2_a->sue_rmat4, serial_udb_extra_f2_a->sue_rmat5, serial_udb_extra_f2_a->sue_rmat6, serial_udb_extra_f2_a->sue_rmat7, serial_udb_extra_f2_a->sue_rmat8, serial_udb_extra_f2_a->sue_cog, serial_udb_extra_f2_a->sue_sog, serial_udb_extra_f2_a->sue_cpu_load, serial_udb_extra_f2_a->sue_air_speed_3DIMU, serial_udb_extra_f2_a->sue_estimated_wind_0, serial_udb_extra_f2_a->sue_estimated_wind_1, serial_udb_extra_f2_a->sue_estimated_wind_2, serial_udb_extra_f2_a->sue_magFieldEarth0, serial_udb_extra_f2_a->sue_magFieldEarth1, serial_udb_extra_f2_a->sue_magFieldEarth2, serial_udb_extra_f2_a->sue_svs, serial_udb_extra_f2_a->sue_hdop); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A, (const char *)serial_udb_extra_f2_a, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f2_a_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t sue_time, uint8_t sue_status, int32_t sue_latitude, int32_t sue_longitude, int32_t sue_altitude, uint16_t sue_waypoint_index, int16_t sue_rmat0, int16_t sue_rmat1, int16_t sue_rmat2, int16_t sue_rmat3, int16_t sue_rmat4, int16_t sue_rmat5, int16_t sue_rmat6, int16_t sue_rmat7, int16_t sue_rmat8, uint16_t sue_cog, int16_t sue_sog, uint16_t sue_cpu_load, uint16_t sue_air_speed_3DIMU, int16_t sue_estimated_wind_0, int16_t sue_estimated_wind_1, int16_t sue_estimated_wind_2, int16_t sue_magFieldEarth0, int16_t sue_magFieldEarth1, int16_t sue_magFieldEarth2, int16_t sue_svs, int16_t sue_hdop) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_int32_t(buf, 4, sue_latitude); - _mav_put_int32_t(buf, 8, sue_longitude); - _mav_put_int32_t(buf, 12, sue_altitude); - _mav_put_uint16_t(buf, 16, sue_waypoint_index); - _mav_put_int16_t(buf, 18, sue_rmat0); - _mav_put_int16_t(buf, 20, sue_rmat1); - _mav_put_int16_t(buf, 22, sue_rmat2); - _mav_put_int16_t(buf, 24, sue_rmat3); - _mav_put_int16_t(buf, 26, sue_rmat4); - _mav_put_int16_t(buf, 28, sue_rmat5); - _mav_put_int16_t(buf, 30, sue_rmat6); - _mav_put_int16_t(buf, 32, sue_rmat7); - _mav_put_int16_t(buf, 34, sue_rmat8); - _mav_put_uint16_t(buf, 36, sue_cog); - _mav_put_int16_t(buf, 38, sue_sog); - _mav_put_uint16_t(buf, 40, sue_cpu_load); - _mav_put_uint16_t(buf, 42, sue_air_speed_3DIMU); - _mav_put_int16_t(buf, 44, sue_estimated_wind_0); - _mav_put_int16_t(buf, 46, sue_estimated_wind_1); - _mav_put_int16_t(buf, 48, sue_estimated_wind_2); - _mav_put_int16_t(buf, 50, sue_magFieldEarth0); - _mav_put_int16_t(buf, 52, sue_magFieldEarth1); - _mav_put_int16_t(buf, 54, sue_magFieldEarth2); - _mav_put_int16_t(buf, 56, sue_svs); - _mav_put_int16_t(buf, 58, sue_hdop); - _mav_put_uint8_t(buf, 60, sue_status); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#else - mavlink_serial_udb_extra_f2_a_t *packet = (mavlink_serial_udb_extra_f2_a_t *)msgbuf; - packet->sue_time = sue_time; - packet->sue_latitude = sue_latitude; - packet->sue_longitude = sue_longitude; - packet->sue_altitude = sue_altitude; - packet->sue_waypoint_index = sue_waypoint_index; - packet->sue_rmat0 = sue_rmat0; - packet->sue_rmat1 = sue_rmat1; - packet->sue_rmat2 = sue_rmat2; - packet->sue_rmat3 = sue_rmat3; - packet->sue_rmat4 = sue_rmat4; - packet->sue_rmat5 = sue_rmat5; - packet->sue_rmat6 = sue_rmat6; - packet->sue_rmat7 = sue_rmat7; - packet->sue_rmat8 = sue_rmat8; - packet->sue_cog = sue_cog; - packet->sue_sog = sue_sog; - packet->sue_cpu_load = sue_cpu_load; - packet->sue_air_speed_3DIMU = sue_air_speed_3DIMU; - packet->sue_estimated_wind_0 = sue_estimated_wind_0; - packet->sue_estimated_wind_1 = sue_estimated_wind_1; - packet->sue_estimated_wind_2 = sue_estimated_wind_2; - packet->sue_magFieldEarth0 = sue_magFieldEarth0; - packet->sue_magFieldEarth1 = sue_magFieldEarth1; - packet->sue_magFieldEarth2 = sue_magFieldEarth2; - packet->sue_svs = sue_svs; - packet->sue_hdop = sue_hdop; - packet->sue_status = sue_status; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F2_A UNPACKING - - -/** - * @brief Get field sue_time from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Time - */ -static inline uint32_t mavlink_msg_serial_udb_extra_f2_a_get_sue_time(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field sue_status from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Status - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f2_a_get_sue_status(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 60); -} - -/** - * @brief Get field sue_latitude from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Latitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f2_a_get_sue_latitude(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 4); -} - -/** - * @brief Get field sue_longitude from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Longitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f2_a_get_sue_longitude(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Get field sue_altitude from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Altitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f2_a_get_sue_altitude(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field sue_waypoint_index from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Waypoint Index - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_waypoint_index(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 16); -} - -/** - * @brief Get field sue_rmat0 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 0 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat0(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 18); -} - -/** - * @brief Get field sue_rmat1 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 20); -} - -/** - * @brief Get field sue_rmat2 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 22); -} - -/** - * @brief Get field sue_rmat3 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 3 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat3(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 24); -} - -/** - * @brief Get field sue_rmat4 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 4 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat4(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 26); -} - -/** - * @brief Get field sue_rmat5 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 5 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat5(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 28); -} - -/** - * @brief Get field sue_rmat6 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 6 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat6(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 30); -} - -/** - * @brief Get field sue_rmat7 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 7 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat7(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 32); -} - -/** - * @brief Get field sue_rmat8 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Rmat 8 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat8(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 34); -} - -/** - * @brief Get field sue_cog from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra GPS Course Over Ground - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_cog(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 36); -} - -/** - * @brief Get field sue_sog from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Speed Over Ground - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_sog(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 38); -} - -/** - * @brief Get field sue_cpu_load from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra CPU Load - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_cpu_load(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 40); -} - -/** - * @brief Get field sue_air_speed_3DIMU from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra 3D IMU Air Speed - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_air_speed_3DIMU(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 42); -} - -/** - * @brief Get field sue_estimated_wind_0 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Estimated Wind 0 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_0(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 44); -} - -/** - * @brief Get field sue_estimated_wind_1 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Estimated Wind 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 46); -} - -/** - * @brief Get field sue_estimated_wind_2 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Estimated Wind 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 48); -} - -/** - * @brief Get field sue_magFieldEarth0 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Magnetic Field Earth 0 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth0(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 50); -} - -/** - * @brief Get field sue_magFieldEarth1 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Magnetic Field Earth 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 52); -} - -/** - * @brief Get field sue_magFieldEarth2 from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Magnetic Field Earth 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 54); -} - -/** - * @brief Get field sue_svs from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra Number of Satellites in View - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_svs(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 56); -} - -/** - * @brief Get field sue_hdop from serial_udb_extra_f2_a message - * - * @return Serial UDB Extra GPS Horizontal Dilution of Precision - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_a_get_sue_hdop(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 58); -} - -/** - * @brief Decode a serial_udb_extra_f2_a message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f2_a C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f2_a_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f2_a_t* serial_udb_extra_f2_a) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f2_a->sue_time = mavlink_msg_serial_udb_extra_f2_a_get_sue_time(msg); - serial_udb_extra_f2_a->sue_latitude = mavlink_msg_serial_udb_extra_f2_a_get_sue_latitude(msg); - serial_udb_extra_f2_a->sue_longitude = mavlink_msg_serial_udb_extra_f2_a_get_sue_longitude(msg); - serial_udb_extra_f2_a->sue_altitude = mavlink_msg_serial_udb_extra_f2_a_get_sue_altitude(msg); - serial_udb_extra_f2_a->sue_waypoint_index = mavlink_msg_serial_udb_extra_f2_a_get_sue_waypoint_index(msg); - serial_udb_extra_f2_a->sue_rmat0 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat0(msg); - serial_udb_extra_f2_a->sue_rmat1 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat1(msg); - serial_udb_extra_f2_a->sue_rmat2 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat2(msg); - serial_udb_extra_f2_a->sue_rmat3 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat3(msg); - serial_udb_extra_f2_a->sue_rmat4 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat4(msg); - serial_udb_extra_f2_a->sue_rmat5 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat5(msg); - serial_udb_extra_f2_a->sue_rmat6 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat6(msg); - serial_udb_extra_f2_a->sue_rmat7 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat7(msg); - serial_udb_extra_f2_a->sue_rmat8 = mavlink_msg_serial_udb_extra_f2_a_get_sue_rmat8(msg); - serial_udb_extra_f2_a->sue_cog = mavlink_msg_serial_udb_extra_f2_a_get_sue_cog(msg); - serial_udb_extra_f2_a->sue_sog = mavlink_msg_serial_udb_extra_f2_a_get_sue_sog(msg); - serial_udb_extra_f2_a->sue_cpu_load = mavlink_msg_serial_udb_extra_f2_a_get_sue_cpu_load(msg); - serial_udb_extra_f2_a->sue_air_speed_3DIMU = mavlink_msg_serial_udb_extra_f2_a_get_sue_air_speed_3DIMU(msg); - serial_udb_extra_f2_a->sue_estimated_wind_0 = mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_0(msg); - serial_udb_extra_f2_a->sue_estimated_wind_1 = mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_1(msg); - serial_udb_extra_f2_a->sue_estimated_wind_2 = mavlink_msg_serial_udb_extra_f2_a_get_sue_estimated_wind_2(msg); - serial_udb_extra_f2_a->sue_magFieldEarth0 = mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth0(msg); - serial_udb_extra_f2_a->sue_magFieldEarth1 = mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth1(msg); - serial_udb_extra_f2_a->sue_magFieldEarth2 = mavlink_msg_serial_udb_extra_f2_a_get_sue_magFieldEarth2(msg); - serial_udb_extra_f2_a->sue_svs = mavlink_msg_serial_udb_extra_f2_a_get_sue_svs(msg); - serial_udb_extra_f2_a->sue_hdop = mavlink_msg_serial_udb_extra_f2_a_get_sue_hdop(msg); - serial_udb_extra_f2_a->sue_status = mavlink_msg_serial_udb_extra_f2_a_get_sue_status(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN; - memset(serial_udb_extra_f2_a, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_LEN); - memcpy(serial_udb_extra_f2_a, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h b/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h deleted file mode 100644 index 7ff4cc44a..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f2_b.h +++ /dev/null @@ -1,1632 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F2_B PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B 171 - - -typedef struct __mavlink_serial_udb_extra_f2_b_t { - uint32_t sue_time; /*< Serial UDB Extra Time*/ - uint32_t sue_flags; /*< Serial UDB Extra Status Flags*/ - int32_t sue_barom_press; /*< SUE barometer pressure*/ - int32_t sue_barom_alt; /*< SUE barometer altitude*/ - int16_t sue_pwm_input_1; /*< Serial UDB Extra PWM Input Channel 1*/ - int16_t sue_pwm_input_2; /*< Serial UDB Extra PWM Input Channel 2*/ - int16_t sue_pwm_input_3; /*< Serial UDB Extra PWM Input Channel 3*/ - int16_t sue_pwm_input_4; /*< Serial UDB Extra PWM Input Channel 4*/ - int16_t sue_pwm_input_5; /*< Serial UDB Extra PWM Input Channel 5*/ - int16_t sue_pwm_input_6; /*< Serial UDB Extra PWM Input Channel 6*/ - int16_t sue_pwm_input_7; /*< Serial UDB Extra PWM Input Channel 7*/ - int16_t sue_pwm_input_8; /*< Serial UDB Extra PWM Input Channel 8*/ - int16_t sue_pwm_input_9; /*< Serial UDB Extra PWM Input Channel 9*/ - int16_t sue_pwm_input_10; /*< Serial UDB Extra PWM Input Channel 10*/ - int16_t sue_pwm_input_11; /*< Serial UDB Extra PWM Input Channel 11*/ - int16_t sue_pwm_input_12; /*< Serial UDB Extra PWM Input Channel 12*/ - int16_t sue_pwm_output_1; /*< Serial UDB Extra PWM Output Channel 1*/ - int16_t sue_pwm_output_2; /*< Serial UDB Extra PWM Output Channel 2*/ - int16_t sue_pwm_output_3; /*< Serial UDB Extra PWM Output Channel 3*/ - int16_t sue_pwm_output_4; /*< Serial UDB Extra PWM Output Channel 4*/ - int16_t sue_pwm_output_5; /*< Serial UDB Extra PWM Output Channel 5*/ - int16_t sue_pwm_output_6; /*< Serial UDB Extra PWM Output Channel 6*/ - int16_t sue_pwm_output_7; /*< Serial UDB Extra PWM Output Channel 7*/ - int16_t sue_pwm_output_8; /*< Serial UDB Extra PWM Output Channel 8*/ - int16_t sue_pwm_output_9; /*< Serial UDB Extra PWM Output Channel 9*/ - int16_t sue_pwm_output_10; /*< Serial UDB Extra PWM Output Channel 10*/ - int16_t sue_pwm_output_11; /*< Serial UDB Extra PWM Output Channel 11*/ - int16_t sue_pwm_output_12; /*< Serial UDB Extra PWM Output Channel 12*/ - int16_t sue_imu_location_x; /*< Serial UDB Extra IMU Location X*/ - int16_t sue_imu_location_y; /*< Serial UDB Extra IMU Location Y*/ - int16_t sue_imu_location_z; /*< Serial UDB Extra IMU Location Z*/ - int16_t sue_location_error_earth_x; /*< Serial UDB Location Error Earth X*/ - int16_t sue_location_error_earth_y; /*< Serial UDB Location Error Earth Y*/ - int16_t sue_location_error_earth_z; /*< Serial UDB Location Error Earth Z*/ - int16_t sue_osc_fails; /*< Serial UDB Extra Oscillator Failure Count*/ - int16_t sue_imu_velocity_x; /*< Serial UDB Extra IMU Velocity X*/ - int16_t sue_imu_velocity_y; /*< Serial UDB Extra IMU Velocity Y*/ - int16_t sue_imu_velocity_z; /*< Serial UDB Extra IMU Velocity Z*/ - int16_t sue_waypoint_goal_x; /*< Serial UDB Extra Current Waypoint Goal X*/ - int16_t sue_waypoint_goal_y; /*< Serial UDB Extra Current Waypoint Goal Y*/ - int16_t sue_waypoint_goal_z; /*< Serial UDB Extra Current Waypoint Goal Z*/ - int16_t sue_aero_x; /*< Aeroforce in UDB X Axis*/ - int16_t sue_aero_y; /*< Aeroforce in UDB Y Axis*/ - int16_t sue_aero_z; /*< Aeroforce in UDB Z axis*/ - int16_t sue_barom_temp; /*< SUE barometer temperature*/ - int16_t sue_bat_volt; /*< SUE battery voltage*/ - int16_t sue_bat_amp; /*< SUE battery current*/ - int16_t sue_bat_amp_hours; /*< SUE battery milli amp hours used*/ - int16_t sue_desired_height; /*< Sue autopilot desired height*/ - int16_t sue_memory_stack_free; /*< Serial UDB Extra Stack Memory Free*/ -} mavlink_serial_udb_extra_f2_b_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN 108 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN 108 -#define MAVLINK_MSG_ID_171_LEN 108 -#define MAVLINK_MSG_ID_171_MIN_LEN 108 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC 245 -#define MAVLINK_MSG_ID_171_CRC 245 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_B { \ - 171, \ - "SERIAL_UDB_EXTRA_F2_B", \ - 50, \ - { { "sue_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_time) }, \ - { "sue_pwm_input_1", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_1) }, \ - { "sue_pwm_input_2", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_2) }, \ - { "sue_pwm_input_3", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_3) }, \ - { "sue_pwm_input_4", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_4) }, \ - { "sue_pwm_input_5", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_5) }, \ - { "sue_pwm_input_6", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_6) }, \ - { "sue_pwm_input_7", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_7) }, \ - { "sue_pwm_input_8", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_8) }, \ - { "sue_pwm_input_9", NULL, MAVLINK_TYPE_INT16_T, 0, 32, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_9) }, \ - { "sue_pwm_input_10", NULL, MAVLINK_TYPE_INT16_T, 0, 34, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_10) }, \ - { "sue_pwm_input_11", NULL, MAVLINK_TYPE_INT16_T, 0, 36, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_11) }, \ - { "sue_pwm_input_12", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_12) }, \ - { "sue_pwm_output_1", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_1) }, \ - { "sue_pwm_output_2", NULL, MAVLINK_TYPE_INT16_T, 0, 42, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_2) }, \ - { "sue_pwm_output_3", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_3) }, \ - { "sue_pwm_output_4", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_4) }, \ - { "sue_pwm_output_5", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_5) }, \ - { "sue_pwm_output_6", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_6) }, \ - { "sue_pwm_output_7", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_7) }, \ - { "sue_pwm_output_8", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_8) }, \ - { "sue_pwm_output_9", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_9) }, \ - { "sue_pwm_output_10", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_10) }, \ - { "sue_pwm_output_11", NULL, MAVLINK_TYPE_INT16_T, 0, 60, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_11) }, \ - { "sue_pwm_output_12", NULL, MAVLINK_TYPE_INT16_T, 0, 62, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_12) }, \ - { "sue_imu_location_x", NULL, MAVLINK_TYPE_INT16_T, 0, 64, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_x) }, \ - { "sue_imu_location_y", NULL, MAVLINK_TYPE_INT16_T, 0, 66, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_y) }, \ - { "sue_imu_location_z", NULL, MAVLINK_TYPE_INT16_T, 0, 68, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_z) }, \ - { "sue_location_error_earth_x", NULL, MAVLINK_TYPE_INT16_T, 0, 70, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_x) }, \ - { "sue_location_error_earth_y", NULL, MAVLINK_TYPE_INT16_T, 0, 72, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_y) }, \ - { "sue_location_error_earth_z", NULL, MAVLINK_TYPE_INT16_T, 0, 74, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_z) }, \ - { "sue_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_flags) }, \ - { "sue_osc_fails", NULL, MAVLINK_TYPE_INT16_T, 0, 76, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_osc_fails) }, \ - { "sue_imu_velocity_x", NULL, MAVLINK_TYPE_INT16_T, 0, 78, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_x) }, \ - { "sue_imu_velocity_y", NULL, MAVLINK_TYPE_INT16_T, 0, 80, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_y) }, \ - { "sue_imu_velocity_z", NULL, MAVLINK_TYPE_INT16_T, 0, 82, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_z) }, \ - { "sue_waypoint_goal_x", NULL, MAVLINK_TYPE_INT16_T, 0, 84, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_x) }, \ - { "sue_waypoint_goal_y", NULL, MAVLINK_TYPE_INT16_T, 0, 86, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_y) }, \ - { "sue_waypoint_goal_z", NULL, MAVLINK_TYPE_INT16_T, 0, 88, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_z) }, \ - { "sue_aero_x", NULL, MAVLINK_TYPE_INT16_T, 0, 90, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_x) }, \ - { "sue_aero_y", NULL, MAVLINK_TYPE_INT16_T, 0, 92, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_y) }, \ - { "sue_aero_z", NULL, MAVLINK_TYPE_INT16_T, 0, 94, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_z) }, \ - { "sue_barom_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 96, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_temp) }, \ - { "sue_barom_press", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_press) }, \ - { "sue_barom_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_alt) }, \ - { "sue_bat_volt", NULL, MAVLINK_TYPE_INT16_T, 0, 98, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_volt) }, \ - { "sue_bat_amp", NULL, MAVLINK_TYPE_INT16_T, 0, 100, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_amp) }, \ - { "sue_bat_amp_hours", NULL, MAVLINK_TYPE_INT16_T, 0, 102, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_amp_hours) }, \ - { "sue_desired_height", NULL, MAVLINK_TYPE_INT16_T, 0, 104, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_desired_height) }, \ - { "sue_memory_stack_free", NULL, MAVLINK_TYPE_INT16_T, 0, 106, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_memory_stack_free) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F2_B { \ - "SERIAL_UDB_EXTRA_F2_B", \ - 50, \ - { { "sue_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_time) }, \ - { "sue_pwm_input_1", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_1) }, \ - { "sue_pwm_input_2", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_2) }, \ - { "sue_pwm_input_3", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_3) }, \ - { "sue_pwm_input_4", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_4) }, \ - { "sue_pwm_input_5", NULL, MAVLINK_TYPE_INT16_T, 0, 24, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_5) }, \ - { "sue_pwm_input_6", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_6) }, \ - { "sue_pwm_input_7", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_7) }, \ - { "sue_pwm_input_8", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_8) }, \ - { "sue_pwm_input_9", NULL, MAVLINK_TYPE_INT16_T, 0, 32, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_9) }, \ - { "sue_pwm_input_10", NULL, MAVLINK_TYPE_INT16_T, 0, 34, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_10) }, \ - { "sue_pwm_input_11", NULL, MAVLINK_TYPE_INT16_T, 0, 36, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_11) }, \ - { "sue_pwm_input_12", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_input_12) }, \ - { "sue_pwm_output_1", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_1) }, \ - { "sue_pwm_output_2", NULL, MAVLINK_TYPE_INT16_T, 0, 42, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_2) }, \ - { "sue_pwm_output_3", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_3) }, \ - { "sue_pwm_output_4", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_4) }, \ - { "sue_pwm_output_5", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_5) }, \ - { "sue_pwm_output_6", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_6) }, \ - { "sue_pwm_output_7", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_7) }, \ - { "sue_pwm_output_8", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_8) }, \ - { "sue_pwm_output_9", NULL, MAVLINK_TYPE_INT16_T, 0, 56, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_9) }, \ - { "sue_pwm_output_10", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_10) }, \ - { "sue_pwm_output_11", NULL, MAVLINK_TYPE_INT16_T, 0, 60, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_11) }, \ - { "sue_pwm_output_12", NULL, MAVLINK_TYPE_INT16_T, 0, 62, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_pwm_output_12) }, \ - { "sue_imu_location_x", NULL, MAVLINK_TYPE_INT16_T, 0, 64, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_x) }, \ - { "sue_imu_location_y", NULL, MAVLINK_TYPE_INT16_T, 0, 66, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_y) }, \ - { "sue_imu_location_z", NULL, MAVLINK_TYPE_INT16_T, 0, 68, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_location_z) }, \ - { "sue_location_error_earth_x", NULL, MAVLINK_TYPE_INT16_T, 0, 70, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_x) }, \ - { "sue_location_error_earth_y", NULL, MAVLINK_TYPE_INT16_T, 0, 72, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_y) }, \ - { "sue_location_error_earth_z", NULL, MAVLINK_TYPE_INT16_T, 0, 74, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_location_error_earth_z) }, \ - { "sue_flags", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_flags) }, \ - { "sue_osc_fails", NULL, MAVLINK_TYPE_INT16_T, 0, 76, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_osc_fails) }, \ - { "sue_imu_velocity_x", NULL, MAVLINK_TYPE_INT16_T, 0, 78, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_x) }, \ - { "sue_imu_velocity_y", NULL, MAVLINK_TYPE_INT16_T, 0, 80, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_y) }, \ - { "sue_imu_velocity_z", NULL, MAVLINK_TYPE_INT16_T, 0, 82, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_imu_velocity_z) }, \ - { "sue_waypoint_goal_x", NULL, MAVLINK_TYPE_INT16_T, 0, 84, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_x) }, \ - { "sue_waypoint_goal_y", NULL, MAVLINK_TYPE_INT16_T, 0, 86, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_y) }, \ - { "sue_waypoint_goal_z", NULL, MAVLINK_TYPE_INT16_T, 0, 88, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_waypoint_goal_z) }, \ - { "sue_aero_x", NULL, MAVLINK_TYPE_INT16_T, 0, 90, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_x) }, \ - { "sue_aero_y", NULL, MAVLINK_TYPE_INT16_T, 0, 92, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_y) }, \ - { "sue_aero_z", NULL, MAVLINK_TYPE_INT16_T, 0, 94, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_aero_z) }, \ - { "sue_barom_temp", NULL, MAVLINK_TYPE_INT16_T, 0, 96, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_temp) }, \ - { "sue_barom_press", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_press) }, \ - { "sue_barom_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_barom_alt) }, \ - { "sue_bat_volt", NULL, MAVLINK_TYPE_INT16_T, 0, 98, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_volt) }, \ - { "sue_bat_amp", NULL, MAVLINK_TYPE_INT16_T, 0, 100, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_amp) }, \ - { "sue_bat_amp_hours", NULL, MAVLINK_TYPE_INT16_T, 0, 102, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_bat_amp_hours) }, \ - { "sue_desired_height", NULL, MAVLINK_TYPE_INT16_T, 0, 104, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_desired_height) }, \ - { "sue_memory_stack_free", NULL, MAVLINK_TYPE_INT16_T, 0, 106, offsetof(mavlink_serial_udb_extra_f2_b_t, sue_memory_stack_free) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f2_b message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_time Serial UDB Extra Time - * @param sue_pwm_input_1 Serial UDB Extra PWM Input Channel 1 - * @param sue_pwm_input_2 Serial UDB Extra PWM Input Channel 2 - * @param sue_pwm_input_3 Serial UDB Extra PWM Input Channel 3 - * @param sue_pwm_input_4 Serial UDB Extra PWM Input Channel 4 - * @param sue_pwm_input_5 Serial UDB Extra PWM Input Channel 5 - * @param sue_pwm_input_6 Serial UDB Extra PWM Input Channel 6 - * @param sue_pwm_input_7 Serial UDB Extra PWM Input Channel 7 - * @param sue_pwm_input_8 Serial UDB Extra PWM Input Channel 8 - * @param sue_pwm_input_9 Serial UDB Extra PWM Input Channel 9 - * @param sue_pwm_input_10 Serial UDB Extra PWM Input Channel 10 - * @param sue_pwm_input_11 Serial UDB Extra PWM Input Channel 11 - * @param sue_pwm_input_12 Serial UDB Extra PWM Input Channel 12 - * @param sue_pwm_output_1 Serial UDB Extra PWM Output Channel 1 - * @param sue_pwm_output_2 Serial UDB Extra PWM Output Channel 2 - * @param sue_pwm_output_3 Serial UDB Extra PWM Output Channel 3 - * @param sue_pwm_output_4 Serial UDB Extra PWM Output Channel 4 - * @param sue_pwm_output_5 Serial UDB Extra PWM Output Channel 5 - * @param sue_pwm_output_6 Serial UDB Extra PWM Output Channel 6 - * @param sue_pwm_output_7 Serial UDB Extra PWM Output Channel 7 - * @param sue_pwm_output_8 Serial UDB Extra PWM Output Channel 8 - * @param sue_pwm_output_9 Serial UDB Extra PWM Output Channel 9 - * @param sue_pwm_output_10 Serial UDB Extra PWM Output Channel 10 - * @param sue_pwm_output_11 Serial UDB Extra PWM Output Channel 11 - * @param sue_pwm_output_12 Serial UDB Extra PWM Output Channel 12 - * @param sue_imu_location_x Serial UDB Extra IMU Location X - * @param sue_imu_location_y Serial UDB Extra IMU Location Y - * @param sue_imu_location_z Serial UDB Extra IMU Location Z - * @param sue_location_error_earth_x Serial UDB Location Error Earth X - * @param sue_location_error_earth_y Serial UDB Location Error Earth Y - * @param sue_location_error_earth_z Serial UDB Location Error Earth Z - * @param sue_flags Serial UDB Extra Status Flags - * @param sue_osc_fails Serial UDB Extra Oscillator Failure Count - * @param sue_imu_velocity_x Serial UDB Extra IMU Velocity X - * @param sue_imu_velocity_y Serial UDB Extra IMU Velocity Y - * @param sue_imu_velocity_z Serial UDB Extra IMU Velocity Z - * @param sue_waypoint_goal_x Serial UDB Extra Current Waypoint Goal X - * @param sue_waypoint_goal_y Serial UDB Extra Current Waypoint Goal Y - * @param sue_waypoint_goal_z Serial UDB Extra Current Waypoint Goal Z - * @param sue_aero_x Aeroforce in UDB X Axis - * @param sue_aero_y Aeroforce in UDB Y Axis - * @param sue_aero_z Aeroforce in UDB Z axis - * @param sue_barom_temp SUE barometer temperature - * @param sue_barom_press SUE barometer pressure - * @param sue_barom_alt SUE barometer altitude - * @param sue_bat_volt SUE battery voltage - * @param sue_bat_amp SUE battery current - * @param sue_bat_amp_hours SUE battery milli amp hours used - * @param sue_desired_height Sue autopilot desired height - * @param sue_memory_stack_free Serial UDB Extra Stack Memory Free - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t sue_time, int16_t sue_pwm_input_1, int16_t sue_pwm_input_2, int16_t sue_pwm_input_3, int16_t sue_pwm_input_4, int16_t sue_pwm_input_5, int16_t sue_pwm_input_6, int16_t sue_pwm_input_7, int16_t sue_pwm_input_8, int16_t sue_pwm_input_9, int16_t sue_pwm_input_10, int16_t sue_pwm_input_11, int16_t sue_pwm_input_12, int16_t sue_pwm_output_1, int16_t sue_pwm_output_2, int16_t sue_pwm_output_3, int16_t sue_pwm_output_4, int16_t sue_pwm_output_5, int16_t sue_pwm_output_6, int16_t sue_pwm_output_7, int16_t sue_pwm_output_8, int16_t sue_pwm_output_9, int16_t sue_pwm_output_10, int16_t sue_pwm_output_11, int16_t sue_pwm_output_12, int16_t sue_imu_location_x, int16_t sue_imu_location_y, int16_t sue_imu_location_z, int16_t sue_location_error_earth_x, int16_t sue_location_error_earth_y, int16_t sue_location_error_earth_z, uint32_t sue_flags, int16_t sue_osc_fails, int16_t sue_imu_velocity_x, int16_t sue_imu_velocity_y, int16_t sue_imu_velocity_z, int16_t sue_waypoint_goal_x, int16_t sue_waypoint_goal_y, int16_t sue_waypoint_goal_z, int16_t sue_aero_x, int16_t sue_aero_y, int16_t sue_aero_z, int16_t sue_barom_temp, int32_t sue_barom_press, int32_t sue_barom_alt, int16_t sue_bat_volt, int16_t sue_bat_amp, int16_t sue_bat_amp_hours, int16_t sue_desired_height, int16_t sue_memory_stack_free) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_uint32_t(buf, 4, sue_flags); - _mav_put_int32_t(buf, 8, sue_barom_press); - _mav_put_int32_t(buf, 12, sue_barom_alt); - _mav_put_int16_t(buf, 16, sue_pwm_input_1); - _mav_put_int16_t(buf, 18, sue_pwm_input_2); - _mav_put_int16_t(buf, 20, sue_pwm_input_3); - _mav_put_int16_t(buf, 22, sue_pwm_input_4); - _mav_put_int16_t(buf, 24, sue_pwm_input_5); - _mav_put_int16_t(buf, 26, sue_pwm_input_6); - _mav_put_int16_t(buf, 28, sue_pwm_input_7); - _mav_put_int16_t(buf, 30, sue_pwm_input_8); - _mav_put_int16_t(buf, 32, sue_pwm_input_9); - _mav_put_int16_t(buf, 34, sue_pwm_input_10); - _mav_put_int16_t(buf, 36, sue_pwm_input_11); - _mav_put_int16_t(buf, 38, sue_pwm_input_12); - _mav_put_int16_t(buf, 40, sue_pwm_output_1); - _mav_put_int16_t(buf, 42, sue_pwm_output_2); - _mav_put_int16_t(buf, 44, sue_pwm_output_3); - _mav_put_int16_t(buf, 46, sue_pwm_output_4); - _mav_put_int16_t(buf, 48, sue_pwm_output_5); - _mav_put_int16_t(buf, 50, sue_pwm_output_6); - _mav_put_int16_t(buf, 52, sue_pwm_output_7); - _mav_put_int16_t(buf, 54, sue_pwm_output_8); - _mav_put_int16_t(buf, 56, sue_pwm_output_9); - _mav_put_int16_t(buf, 58, sue_pwm_output_10); - _mav_put_int16_t(buf, 60, sue_pwm_output_11); - _mav_put_int16_t(buf, 62, sue_pwm_output_12); - _mav_put_int16_t(buf, 64, sue_imu_location_x); - _mav_put_int16_t(buf, 66, sue_imu_location_y); - _mav_put_int16_t(buf, 68, sue_imu_location_z); - _mav_put_int16_t(buf, 70, sue_location_error_earth_x); - _mav_put_int16_t(buf, 72, sue_location_error_earth_y); - _mav_put_int16_t(buf, 74, sue_location_error_earth_z); - _mav_put_int16_t(buf, 76, sue_osc_fails); - _mav_put_int16_t(buf, 78, sue_imu_velocity_x); - _mav_put_int16_t(buf, 80, sue_imu_velocity_y); - _mav_put_int16_t(buf, 82, sue_imu_velocity_z); - _mav_put_int16_t(buf, 84, sue_waypoint_goal_x); - _mav_put_int16_t(buf, 86, sue_waypoint_goal_y); - _mav_put_int16_t(buf, 88, sue_waypoint_goal_z); - _mav_put_int16_t(buf, 90, sue_aero_x); - _mav_put_int16_t(buf, 92, sue_aero_y); - _mav_put_int16_t(buf, 94, sue_aero_z); - _mav_put_int16_t(buf, 96, sue_barom_temp); - _mav_put_int16_t(buf, 98, sue_bat_volt); - _mav_put_int16_t(buf, 100, sue_bat_amp); - _mav_put_int16_t(buf, 102, sue_bat_amp_hours); - _mav_put_int16_t(buf, 104, sue_desired_height); - _mav_put_int16_t(buf, 106, sue_memory_stack_free); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#else - mavlink_serial_udb_extra_f2_b_t packet; - packet.sue_time = sue_time; - packet.sue_flags = sue_flags; - packet.sue_barom_press = sue_barom_press; - packet.sue_barom_alt = sue_barom_alt; - packet.sue_pwm_input_1 = sue_pwm_input_1; - packet.sue_pwm_input_2 = sue_pwm_input_2; - packet.sue_pwm_input_3 = sue_pwm_input_3; - packet.sue_pwm_input_4 = sue_pwm_input_4; - packet.sue_pwm_input_5 = sue_pwm_input_5; - packet.sue_pwm_input_6 = sue_pwm_input_6; - packet.sue_pwm_input_7 = sue_pwm_input_7; - packet.sue_pwm_input_8 = sue_pwm_input_8; - packet.sue_pwm_input_9 = sue_pwm_input_9; - packet.sue_pwm_input_10 = sue_pwm_input_10; - packet.sue_pwm_input_11 = sue_pwm_input_11; - packet.sue_pwm_input_12 = sue_pwm_input_12; - packet.sue_pwm_output_1 = sue_pwm_output_1; - packet.sue_pwm_output_2 = sue_pwm_output_2; - packet.sue_pwm_output_3 = sue_pwm_output_3; - packet.sue_pwm_output_4 = sue_pwm_output_4; - packet.sue_pwm_output_5 = sue_pwm_output_5; - packet.sue_pwm_output_6 = sue_pwm_output_6; - packet.sue_pwm_output_7 = sue_pwm_output_7; - packet.sue_pwm_output_8 = sue_pwm_output_8; - packet.sue_pwm_output_9 = sue_pwm_output_9; - packet.sue_pwm_output_10 = sue_pwm_output_10; - packet.sue_pwm_output_11 = sue_pwm_output_11; - packet.sue_pwm_output_12 = sue_pwm_output_12; - packet.sue_imu_location_x = sue_imu_location_x; - packet.sue_imu_location_y = sue_imu_location_y; - packet.sue_imu_location_z = sue_imu_location_z; - packet.sue_location_error_earth_x = sue_location_error_earth_x; - packet.sue_location_error_earth_y = sue_location_error_earth_y; - packet.sue_location_error_earth_z = sue_location_error_earth_z; - packet.sue_osc_fails = sue_osc_fails; - packet.sue_imu_velocity_x = sue_imu_velocity_x; - packet.sue_imu_velocity_y = sue_imu_velocity_y; - packet.sue_imu_velocity_z = sue_imu_velocity_z; - packet.sue_waypoint_goal_x = sue_waypoint_goal_x; - packet.sue_waypoint_goal_y = sue_waypoint_goal_y; - packet.sue_waypoint_goal_z = sue_waypoint_goal_z; - packet.sue_aero_x = sue_aero_x; - packet.sue_aero_y = sue_aero_y; - packet.sue_aero_z = sue_aero_z; - packet.sue_barom_temp = sue_barom_temp; - packet.sue_bat_volt = sue_bat_volt; - packet.sue_bat_amp = sue_bat_amp; - packet.sue_bat_amp_hours = sue_bat_amp_hours; - packet.sue_desired_height = sue_desired_height; - packet.sue_memory_stack_free = sue_memory_stack_free; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f2_b message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_time Serial UDB Extra Time - * @param sue_pwm_input_1 Serial UDB Extra PWM Input Channel 1 - * @param sue_pwm_input_2 Serial UDB Extra PWM Input Channel 2 - * @param sue_pwm_input_3 Serial UDB Extra PWM Input Channel 3 - * @param sue_pwm_input_4 Serial UDB Extra PWM Input Channel 4 - * @param sue_pwm_input_5 Serial UDB Extra PWM Input Channel 5 - * @param sue_pwm_input_6 Serial UDB Extra PWM Input Channel 6 - * @param sue_pwm_input_7 Serial UDB Extra PWM Input Channel 7 - * @param sue_pwm_input_8 Serial UDB Extra PWM Input Channel 8 - * @param sue_pwm_input_9 Serial UDB Extra PWM Input Channel 9 - * @param sue_pwm_input_10 Serial UDB Extra PWM Input Channel 10 - * @param sue_pwm_input_11 Serial UDB Extra PWM Input Channel 11 - * @param sue_pwm_input_12 Serial UDB Extra PWM Input Channel 12 - * @param sue_pwm_output_1 Serial UDB Extra PWM Output Channel 1 - * @param sue_pwm_output_2 Serial UDB Extra PWM Output Channel 2 - * @param sue_pwm_output_3 Serial UDB Extra PWM Output Channel 3 - * @param sue_pwm_output_4 Serial UDB Extra PWM Output Channel 4 - * @param sue_pwm_output_5 Serial UDB Extra PWM Output Channel 5 - * @param sue_pwm_output_6 Serial UDB Extra PWM Output Channel 6 - * @param sue_pwm_output_7 Serial UDB Extra PWM Output Channel 7 - * @param sue_pwm_output_8 Serial UDB Extra PWM Output Channel 8 - * @param sue_pwm_output_9 Serial UDB Extra PWM Output Channel 9 - * @param sue_pwm_output_10 Serial UDB Extra PWM Output Channel 10 - * @param sue_pwm_output_11 Serial UDB Extra PWM Output Channel 11 - * @param sue_pwm_output_12 Serial UDB Extra PWM Output Channel 12 - * @param sue_imu_location_x Serial UDB Extra IMU Location X - * @param sue_imu_location_y Serial UDB Extra IMU Location Y - * @param sue_imu_location_z Serial UDB Extra IMU Location Z - * @param sue_location_error_earth_x Serial UDB Location Error Earth X - * @param sue_location_error_earth_y Serial UDB Location Error Earth Y - * @param sue_location_error_earth_z Serial UDB Location Error Earth Z - * @param sue_flags Serial UDB Extra Status Flags - * @param sue_osc_fails Serial UDB Extra Oscillator Failure Count - * @param sue_imu_velocity_x Serial UDB Extra IMU Velocity X - * @param sue_imu_velocity_y Serial UDB Extra IMU Velocity Y - * @param sue_imu_velocity_z Serial UDB Extra IMU Velocity Z - * @param sue_waypoint_goal_x Serial UDB Extra Current Waypoint Goal X - * @param sue_waypoint_goal_y Serial UDB Extra Current Waypoint Goal Y - * @param sue_waypoint_goal_z Serial UDB Extra Current Waypoint Goal Z - * @param sue_aero_x Aeroforce in UDB X Axis - * @param sue_aero_y Aeroforce in UDB Y Axis - * @param sue_aero_z Aeroforce in UDB Z axis - * @param sue_barom_temp SUE barometer temperature - * @param sue_barom_press SUE barometer pressure - * @param sue_barom_alt SUE barometer altitude - * @param sue_bat_volt SUE battery voltage - * @param sue_bat_amp SUE battery current - * @param sue_bat_amp_hours SUE battery milli amp hours used - * @param sue_desired_height Sue autopilot desired height - * @param sue_memory_stack_free Serial UDB Extra Stack Memory Free - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t sue_time, int16_t sue_pwm_input_1, int16_t sue_pwm_input_2, int16_t sue_pwm_input_3, int16_t sue_pwm_input_4, int16_t sue_pwm_input_5, int16_t sue_pwm_input_6, int16_t sue_pwm_input_7, int16_t sue_pwm_input_8, int16_t sue_pwm_input_9, int16_t sue_pwm_input_10, int16_t sue_pwm_input_11, int16_t sue_pwm_input_12, int16_t sue_pwm_output_1, int16_t sue_pwm_output_2, int16_t sue_pwm_output_3, int16_t sue_pwm_output_4, int16_t sue_pwm_output_5, int16_t sue_pwm_output_6, int16_t sue_pwm_output_7, int16_t sue_pwm_output_8, int16_t sue_pwm_output_9, int16_t sue_pwm_output_10, int16_t sue_pwm_output_11, int16_t sue_pwm_output_12, int16_t sue_imu_location_x, int16_t sue_imu_location_y, int16_t sue_imu_location_z, int16_t sue_location_error_earth_x, int16_t sue_location_error_earth_y, int16_t sue_location_error_earth_z, uint32_t sue_flags, int16_t sue_osc_fails, int16_t sue_imu_velocity_x, int16_t sue_imu_velocity_y, int16_t sue_imu_velocity_z, int16_t sue_waypoint_goal_x, int16_t sue_waypoint_goal_y, int16_t sue_waypoint_goal_z, int16_t sue_aero_x, int16_t sue_aero_y, int16_t sue_aero_z, int16_t sue_barom_temp, int32_t sue_barom_press, int32_t sue_barom_alt, int16_t sue_bat_volt, int16_t sue_bat_amp, int16_t sue_bat_amp_hours, int16_t sue_desired_height, int16_t sue_memory_stack_free) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_uint32_t(buf, 4, sue_flags); - _mav_put_int32_t(buf, 8, sue_barom_press); - _mav_put_int32_t(buf, 12, sue_barom_alt); - _mav_put_int16_t(buf, 16, sue_pwm_input_1); - _mav_put_int16_t(buf, 18, sue_pwm_input_2); - _mav_put_int16_t(buf, 20, sue_pwm_input_3); - _mav_put_int16_t(buf, 22, sue_pwm_input_4); - _mav_put_int16_t(buf, 24, sue_pwm_input_5); - _mav_put_int16_t(buf, 26, sue_pwm_input_6); - _mav_put_int16_t(buf, 28, sue_pwm_input_7); - _mav_put_int16_t(buf, 30, sue_pwm_input_8); - _mav_put_int16_t(buf, 32, sue_pwm_input_9); - _mav_put_int16_t(buf, 34, sue_pwm_input_10); - _mav_put_int16_t(buf, 36, sue_pwm_input_11); - _mav_put_int16_t(buf, 38, sue_pwm_input_12); - _mav_put_int16_t(buf, 40, sue_pwm_output_1); - _mav_put_int16_t(buf, 42, sue_pwm_output_2); - _mav_put_int16_t(buf, 44, sue_pwm_output_3); - _mav_put_int16_t(buf, 46, sue_pwm_output_4); - _mav_put_int16_t(buf, 48, sue_pwm_output_5); - _mav_put_int16_t(buf, 50, sue_pwm_output_6); - _mav_put_int16_t(buf, 52, sue_pwm_output_7); - _mav_put_int16_t(buf, 54, sue_pwm_output_8); - _mav_put_int16_t(buf, 56, sue_pwm_output_9); - _mav_put_int16_t(buf, 58, sue_pwm_output_10); - _mav_put_int16_t(buf, 60, sue_pwm_output_11); - _mav_put_int16_t(buf, 62, sue_pwm_output_12); - _mav_put_int16_t(buf, 64, sue_imu_location_x); - _mav_put_int16_t(buf, 66, sue_imu_location_y); - _mav_put_int16_t(buf, 68, sue_imu_location_z); - _mav_put_int16_t(buf, 70, sue_location_error_earth_x); - _mav_put_int16_t(buf, 72, sue_location_error_earth_y); - _mav_put_int16_t(buf, 74, sue_location_error_earth_z); - _mav_put_int16_t(buf, 76, sue_osc_fails); - _mav_put_int16_t(buf, 78, sue_imu_velocity_x); - _mav_put_int16_t(buf, 80, sue_imu_velocity_y); - _mav_put_int16_t(buf, 82, sue_imu_velocity_z); - _mav_put_int16_t(buf, 84, sue_waypoint_goal_x); - _mav_put_int16_t(buf, 86, sue_waypoint_goal_y); - _mav_put_int16_t(buf, 88, sue_waypoint_goal_z); - _mav_put_int16_t(buf, 90, sue_aero_x); - _mav_put_int16_t(buf, 92, sue_aero_y); - _mav_put_int16_t(buf, 94, sue_aero_z); - _mav_put_int16_t(buf, 96, sue_barom_temp); - _mav_put_int16_t(buf, 98, sue_bat_volt); - _mav_put_int16_t(buf, 100, sue_bat_amp); - _mav_put_int16_t(buf, 102, sue_bat_amp_hours); - _mav_put_int16_t(buf, 104, sue_desired_height); - _mav_put_int16_t(buf, 106, sue_memory_stack_free); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#else - mavlink_serial_udb_extra_f2_b_t packet; - packet.sue_time = sue_time; - packet.sue_flags = sue_flags; - packet.sue_barom_press = sue_barom_press; - packet.sue_barom_alt = sue_barom_alt; - packet.sue_pwm_input_1 = sue_pwm_input_1; - packet.sue_pwm_input_2 = sue_pwm_input_2; - packet.sue_pwm_input_3 = sue_pwm_input_3; - packet.sue_pwm_input_4 = sue_pwm_input_4; - packet.sue_pwm_input_5 = sue_pwm_input_5; - packet.sue_pwm_input_6 = sue_pwm_input_6; - packet.sue_pwm_input_7 = sue_pwm_input_7; - packet.sue_pwm_input_8 = sue_pwm_input_8; - packet.sue_pwm_input_9 = sue_pwm_input_9; - packet.sue_pwm_input_10 = sue_pwm_input_10; - packet.sue_pwm_input_11 = sue_pwm_input_11; - packet.sue_pwm_input_12 = sue_pwm_input_12; - packet.sue_pwm_output_1 = sue_pwm_output_1; - packet.sue_pwm_output_2 = sue_pwm_output_2; - packet.sue_pwm_output_3 = sue_pwm_output_3; - packet.sue_pwm_output_4 = sue_pwm_output_4; - packet.sue_pwm_output_5 = sue_pwm_output_5; - packet.sue_pwm_output_6 = sue_pwm_output_6; - packet.sue_pwm_output_7 = sue_pwm_output_7; - packet.sue_pwm_output_8 = sue_pwm_output_8; - packet.sue_pwm_output_9 = sue_pwm_output_9; - packet.sue_pwm_output_10 = sue_pwm_output_10; - packet.sue_pwm_output_11 = sue_pwm_output_11; - packet.sue_pwm_output_12 = sue_pwm_output_12; - packet.sue_imu_location_x = sue_imu_location_x; - packet.sue_imu_location_y = sue_imu_location_y; - packet.sue_imu_location_z = sue_imu_location_z; - packet.sue_location_error_earth_x = sue_location_error_earth_x; - packet.sue_location_error_earth_y = sue_location_error_earth_y; - packet.sue_location_error_earth_z = sue_location_error_earth_z; - packet.sue_osc_fails = sue_osc_fails; - packet.sue_imu_velocity_x = sue_imu_velocity_x; - packet.sue_imu_velocity_y = sue_imu_velocity_y; - packet.sue_imu_velocity_z = sue_imu_velocity_z; - packet.sue_waypoint_goal_x = sue_waypoint_goal_x; - packet.sue_waypoint_goal_y = sue_waypoint_goal_y; - packet.sue_waypoint_goal_z = sue_waypoint_goal_z; - packet.sue_aero_x = sue_aero_x; - packet.sue_aero_y = sue_aero_y; - packet.sue_aero_z = sue_aero_z; - packet.sue_barom_temp = sue_barom_temp; - packet.sue_bat_volt = sue_bat_volt; - packet.sue_bat_amp = sue_bat_amp; - packet.sue_bat_amp_hours = sue_bat_amp_hours; - packet.sue_desired_height = sue_desired_height; - packet.sue_memory_stack_free = sue_memory_stack_free; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f2_b message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_time Serial UDB Extra Time - * @param sue_pwm_input_1 Serial UDB Extra PWM Input Channel 1 - * @param sue_pwm_input_2 Serial UDB Extra PWM Input Channel 2 - * @param sue_pwm_input_3 Serial UDB Extra PWM Input Channel 3 - * @param sue_pwm_input_4 Serial UDB Extra PWM Input Channel 4 - * @param sue_pwm_input_5 Serial UDB Extra PWM Input Channel 5 - * @param sue_pwm_input_6 Serial UDB Extra PWM Input Channel 6 - * @param sue_pwm_input_7 Serial UDB Extra PWM Input Channel 7 - * @param sue_pwm_input_8 Serial UDB Extra PWM Input Channel 8 - * @param sue_pwm_input_9 Serial UDB Extra PWM Input Channel 9 - * @param sue_pwm_input_10 Serial UDB Extra PWM Input Channel 10 - * @param sue_pwm_input_11 Serial UDB Extra PWM Input Channel 11 - * @param sue_pwm_input_12 Serial UDB Extra PWM Input Channel 12 - * @param sue_pwm_output_1 Serial UDB Extra PWM Output Channel 1 - * @param sue_pwm_output_2 Serial UDB Extra PWM Output Channel 2 - * @param sue_pwm_output_3 Serial UDB Extra PWM Output Channel 3 - * @param sue_pwm_output_4 Serial UDB Extra PWM Output Channel 4 - * @param sue_pwm_output_5 Serial UDB Extra PWM Output Channel 5 - * @param sue_pwm_output_6 Serial UDB Extra PWM Output Channel 6 - * @param sue_pwm_output_7 Serial UDB Extra PWM Output Channel 7 - * @param sue_pwm_output_8 Serial UDB Extra PWM Output Channel 8 - * @param sue_pwm_output_9 Serial UDB Extra PWM Output Channel 9 - * @param sue_pwm_output_10 Serial UDB Extra PWM Output Channel 10 - * @param sue_pwm_output_11 Serial UDB Extra PWM Output Channel 11 - * @param sue_pwm_output_12 Serial UDB Extra PWM Output Channel 12 - * @param sue_imu_location_x Serial UDB Extra IMU Location X - * @param sue_imu_location_y Serial UDB Extra IMU Location Y - * @param sue_imu_location_z Serial UDB Extra IMU Location Z - * @param sue_location_error_earth_x Serial UDB Location Error Earth X - * @param sue_location_error_earth_y Serial UDB Location Error Earth Y - * @param sue_location_error_earth_z Serial UDB Location Error Earth Z - * @param sue_flags Serial UDB Extra Status Flags - * @param sue_osc_fails Serial UDB Extra Oscillator Failure Count - * @param sue_imu_velocity_x Serial UDB Extra IMU Velocity X - * @param sue_imu_velocity_y Serial UDB Extra IMU Velocity Y - * @param sue_imu_velocity_z Serial UDB Extra IMU Velocity Z - * @param sue_waypoint_goal_x Serial UDB Extra Current Waypoint Goal X - * @param sue_waypoint_goal_y Serial UDB Extra Current Waypoint Goal Y - * @param sue_waypoint_goal_z Serial UDB Extra Current Waypoint Goal Z - * @param sue_aero_x Aeroforce in UDB X Axis - * @param sue_aero_y Aeroforce in UDB Y Axis - * @param sue_aero_z Aeroforce in UDB Z axis - * @param sue_barom_temp SUE barometer temperature - * @param sue_barom_press SUE barometer pressure - * @param sue_barom_alt SUE barometer altitude - * @param sue_bat_volt SUE battery voltage - * @param sue_bat_amp SUE battery current - * @param sue_bat_amp_hours SUE battery milli amp hours used - * @param sue_desired_height Sue autopilot desired height - * @param sue_memory_stack_free Serial UDB Extra Stack Memory Free - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t sue_time,int16_t sue_pwm_input_1,int16_t sue_pwm_input_2,int16_t sue_pwm_input_3,int16_t sue_pwm_input_4,int16_t sue_pwm_input_5,int16_t sue_pwm_input_6,int16_t sue_pwm_input_7,int16_t sue_pwm_input_8,int16_t sue_pwm_input_9,int16_t sue_pwm_input_10,int16_t sue_pwm_input_11,int16_t sue_pwm_input_12,int16_t sue_pwm_output_1,int16_t sue_pwm_output_2,int16_t sue_pwm_output_3,int16_t sue_pwm_output_4,int16_t sue_pwm_output_5,int16_t sue_pwm_output_6,int16_t sue_pwm_output_7,int16_t sue_pwm_output_8,int16_t sue_pwm_output_9,int16_t sue_pwm_output_10,int16_t sue_pwm_output_11,int16_t sue_pwm_output_12,int16_t sue_imu_location_x,int16_t sue_imu_location_y,int16_t sue_imu_location_z,int16_t sue_location_error_earth_x,int16_t sue_location_error_earth_y,int16_t sue_location_error_earth_z,uint32_t sue_flags,int16_t sue_osc_fails,int16_t sue_imu_velocity_x,int16_t sue_imu_velocity_y,int16_t sue_imu_velocity_z,int16_t sue_waypoint_goal_x,int16_t sue_waypoint_goal_y,int16_t sue_waypoint_goal_z,int16_t sue_aero_x,int16_t sue_aero_y,int16_t sue_aero_z,int16_t sue_barom_temp,int32_t sue_barom_press,int32_t sue_barom_alt,int16_t sue_bat_volt,int16_t sue_bat_amp,int16_t sue_bat_amp_hours,int16_t sue_desired_height,int16_t sue_memory_stack_free) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_uint32_t(buf, 4, sue_flags); - _mav_put_int32_t(buf, 8, sue_barom_press); - _mav_put_int32_t(buf, 12, sue_barom_alt); - _mav_put_int16_t(buf, 16, sue_pwm_input_1); - _mav_put_int16_t(buf, 18, sue_pwm_input_2); - _mav_put_int16_t(buf, 20, sue_pwm_input_3); - _mav_put_int16_t(buf, 22, sue_pwm_input_4); - _mav_put_int16_t(buf, 24, sue_pwm_input_5); - _mav_put_int16_t(buf, 26, sue_pwm_input_6); - _mav_put_int16_t(buf, 28, sue_pwm_input_7); - _mav_put_int16_t(buf, 30, sue_pwm_input_8); - _mav_put_int16_t(buf, 32, sue_pwm_input_9); - _mav_put_int16_t(buf, 34, sue_pwm_input_10); - _mav_put_int16_t(buf, 36, sue_pwm_input_11); - _mav_put_int16_t(buf, 38, sue_pwm_input_12); - _mav_put_int16_t(buf, 40, sue_pwm_output_1); - _mav_put_int16_t(buf, 42, sue_pwm_output_2); - _mav_put_int16_t(buf, 44, sue_pwm_output_3); - _mav_put_int16_t(buf, 46, sue_pwm_output_4); - _mav_put_int16_t(buf, 48, sue_pwm_output_5); - _mav_put_int16_t(buf, 50, sue_pwm_output_6); - _mav_put_int16_t(buf, 52, sue_pwm_output_7); - _mav_put_int16_t(buf, 54, sue_pwm_output_8); - _mav_put_int16_t(buf, 56, sue_pwm_output_9); - _mav_put_int16_t(buf, 58, sue_pwm_output_10); - _mav_put_int16_t(buf, 60, sue_pwm_output_11); - _mav_put_int16_t(buf, 62, sue_pwm_output_12); - _mav_put_int16_t(buf, 64, sue_imu_location_x); - _mav_put_int16_t(buf, 66, sue_imu_location_y); - _mav_put_int16_t(buf, 68, sue_imu_location_z); - _mav_put_int16_t(buf, 70, sue_location_error_earth_x); - _mav_put_int16_t(buf, 72, sue_location_error_earth_y); - _mav_put_int16_t(buf, 74, sue_location_error_earth_z); - _mav_put_int16_t(buf, 76, sue_osc_fails); - _mav_put_int16_t(buf, 78, sue_imu_velocity_x); - _mav_put_int16_t(buf, 80, sue_imu_velocity_y); - _mav_put_int16_t(buf, 82, sue_imu_velocity_z); - _mav_put_int16_t(buf, 84, sue_waypoint_goal_x); - _mav_put_int16_t(buf, 86, sue_waypoint_goal_y); - _mav_put_int16_t(buf, 88, sue_waypoint_goal_z); - _mav_put_int16_t(buf, 90, sue_aero_x); - _mav_put_int16_t(buf, 92, sue_aero_y); - _mav_put_int16_t(buf, 94, sue_aero_z); - _mav_put_int16_t(buf, 96, sue_barom_temp); - _mav_put_int16_t(buf, 98, sue_bat_volt); - _mav_put_int16_t(buf, 100, sue_bat_amp); - _mav_put_int16_t(buf, 102, sue_bat_amp_hours); - _mav_put_int16_t(buf, 104, sue_desired_height); - _mav_put_int16_t(buf, 106, sue_memory_stack_free); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#else - mavlink_serial_udb_extra_f2_b_t packet; - packet.sue_time = sue_time; - packet.sue_flags = sue_flags; - packet.sue_barom_press = sue_barom_press; - packet.sue_barom_alt = sue_barom_alt; - packet.sue_pwm_input_1 = sue_pwm_input_1; - packet.sue_pwm_input_2 = sue_pwm_input_2; - packet.sue_pwm_input_3 = sue_pwm_input_3; - packet.sue_pwm_input_4 = sue_pwm_input_4; - packet.sue_pwm_input_5 = sue_pwm_input_5; - packet.sue_pwm_input_6 = sue_pwm_input_6; - packet.sue_pwm_input_7 = sue_pwm_input_7; - packet.sue_pwm_input_8 = sue_pwm_input_8; - packet.sue_pwm_input_9 = sue_pwm_input_9; - packet.sue_pwm_input_10 = sue_pwm_input_10; - packet.sue_pwm_input_11 = sue_pwm_input_11; - packet.sue_pwm_input_12 = sue_pwm_input_12; - packet.sue_pwm_output_1 = sue_pwm_output_1; - packet.sue_pwm_output_2 = sue_pwm_output_2; - packet.sue_pwm_output_3 = sue_pwm_output_3; - packet.sue_pwm_output_4 = sue_pwm_output_4; - packet.sue_pwm_output_5 = sue_pwm_output_5; - packet.sue_pwm_output_6 = sue_pwm_output_6; - packet.sue_pwm_output_7 = sue_pwm_output_7; - packet.sue_pwm_output_8 = sue_pwm_output_8; - packet.sue_pwm_output_9 = sue_pwm_output_9; - packet.sue_pwm_output_10 = sue_pwm_output_10; - packet.sue_pwm_output_11 = sue_pwm_output_11; - packet.sue_pwm_output_12 = sue_pwm_output_12; - packet.sue_imu_location_x = sue_imu_location_x; - packet.sue_imu_location_y = sue_imu_location_y; - packet.sue_imu_location_z = sue_imu_location_z; - packet.sue_location_error_earth_x = sue_location_error_earth_x; - packet.sue_location_error_earth_y = sue_location_error_earth_y; - packet.sue_location_error_earth_z = sue_location_error_earth_z; - packet.sue_osc_fails = sue_osc_fails; - packet.sue_imu_velocity_x = sue_imu_velocity_x; - packet.sue_imu_velocity_y = sue_imu_velocity_y; - packet.sue_imu_velocity_z = sue_imu_velocity_z; - packet.sue_waypoint_goal_x = sue_waypoint_goal_x; - packet.sue_waypoint_goal_y = sue_waypoint_goal_y; - packet.sue_waypoint_goal_z = sue_waypoint_goal_z; - packet.sue_aero_x = sue_aero_x; - packet.sue_aero_y = sue_aero_y; - packet.sue_aero_z = sue_aero_z; - packet.sue_barom_temp = sue_barom_temp; - packet.sue_bat_volt = sue_bat_volt; - packet.sue_bat_amp = sue_bat_amp; - packet.sue_bat_amp_hours = sue_bat_amp_hours; - packet.sue_desired_height = sue_desired_height; - packet.sue_memory_stack_free = sue_memory_stack_free; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f2_b struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_b C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_b_t* serial_udb_extra_f2_b) -{ - return mavlink_msg_serial_udb_extra_f2_b_pack(system_id, component_id, msg, serial_udb_extra_f2_b->sue_time, serial_udb_extra_f2_b->sue_pwm_input_1, serial_udb_extra_f2_b->sue_pwm_input_2, serial_udb_extra_f2_b->sue_pwm_input_3, serial_udb_extra_f2_b->sue_pwm_input_4, serial_udb_extra_f2_b->sue_pwm_input_5, serial_udb_extra_f2_b->sue_pwm_input_6, serial_udb_extra_f2_b->sue_pwm_input_7, serial_udb_extra_f2_b->sue_pwm_input_8, serial_udb_extra_f2_b->sue_pwm_input_9, serial_udb_extra_f2_b->sue_pwm_input_10, serial_udb_extra_f2_b->sue_pwm_input_11, serial_udb_extra_f2_b->sue_pwm_input_12, serial_udb_extra_f2_b->sue_pwm_output_1, serial_udb_extra_f2_b->sue_pwm_output_2, serial_udb_extra_f2_b->sue_pwm_output_3, serial_udb_extra_f2_b->sue_pwm_output_4, serial_udb_extra_f2_b->sue_pwm_output_5, serial_udb_extra_f2_b->sue_pwm_output_6, serial_udb_extra_f2_b->sue_pwm_output_7, serial_udb_extra_f2_b->sue_pwm_output_8, serial_udb_extra_f2_b->sue_pwm_output_9, serial_udb_extra_f2_b->sue_pwm_output_10, serial_udb_extra_f2_b->sue_pwm_output_11, serial_udb_extra_f2_b->sue_pwm_output_12, serial_udb_extra_f2_b->sue_imu_location_x, serial_udb_extra_f2_b->sue_imu_location_y, serial_udb_extra_f2_b->sue_imu_location_z, serial_udb_extra_f2_b->sue_location_error_earth_x, serial_udb_extra_f2_b->sue_location_error_earth_y, serial_udb_extra_f2_b->sue_location_error_earth_z, serial_udb_extra_f2_b->sue_flags, serial_udb_extra_f2_b->sue_osc_fails, serial_udb_extra_f2_b->sue_imu_velocity_x, serial_udb_extra_f2_b->sue_imu_velocity_y, serial_udb_extra_f2_b->sue_imu_velocity_z, serial_udb_extra_f2_b->sue_waypoint_goal_x, serial_udb_extra_f2_b->sue_waypoint_goal_y, serial_udb_extra_f2_b->sue_waypoint_goal_z, serial_udb_extra_f2_b->sue_aero_x, serial_udb_extra_f2_b->sue_aero_y, serial_udb_extra_f2_b->sue_aero_z, serial_udb_extra_f2_b->sue_barom_temp, serial_udb_extra_f2_b->sue_barom_press, serial_udb_extra_f2_b->sue_barom_alt, serial_udb_extra_f2_b->sue_bat_volt, serial_udb_extra_f2_b->sue_bat_amp, serial_udb_extra_f2_b->sue_bat_amp_hours, serial_udb_extra_f2_b->sue_desired_height, serial_udb_extra_f2_b->sue_memory_stack_free); -} - -/** - * @brief Encode a serial_udb_extra_f2_b struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_b C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_b_t* serial_udb_extra_f2_b) -{ - return mavlink_msg_serial_udb_extra_f2_b_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f2_b->sue_time, serial_udb_extra_f2_b->sue_pwm_input_1, serial_udb_extra_f2_b->sue_pwm_input_2, serial_udb_extra_f2_b->sue_pwm_input_3, serial_udb_extra_f2_b->sue_pwm_input_4, serial_udb_extra_f2_b->sue_pwm_input_5, serial_udb_extra_f2_b->sue_pwm_input_6, serial_udb_extra_f2_b->sue_pwm_input_7, serial_udb_extra_f2_b->sue_pwm_input_8, serial_udb_extra_f2_b->sue_pwm_input_9, serial_udb_extra_f2_b->sue_pwm_input_10, serial_udb_extra_f2_b->sue_pwm_input_11, serial_udb_extra_f2_b->sue_pwm_input_12, serial_udb_extra_f2_b->sue_pwm_output_1, serial_udb_extra_f2_b->sue_pwm_output_2, serial_udb_extra_f2_b->sue_pwm_output_3, serial_udb_extra_f2_b->sue_pwm_output_4, serial_udb_extra_f2_b->sue_pwm_output_5, serial_udb_extra_f2_b->sue_pwm_output_6, serial_udb_extra_f2_b->sue_pwm_output_7, serial_udb_extra_f2_b->sue_pwm_output_8, serial_udb_extra_f2_b->sue_pwm_output_9, serial_udb_extra_f2_b->sue_pwm_output_10, serial_udb_extra_f2_b->sue_pwm_output_11, serial_udb_extra_f2_b->sue_pwm_output_12, serial_udb_extra_f2_b->sue_imu_location_x, serial_udb_extra_f2_b->sue_imu_location_y, serial_udb_extra_f2_b->sue_imu_location_z, serial_udb_extra_f2_b->sue_location_error_earth_x, serial_udb_extra_f2_b->sue_location_error_earth_y, serial_udb_extra_f2_b->sue_location_error_earth_z, serial_udb_extra_f2_b->sue_flags, serial_udb_extra_f2_b->sue_osc_fails, serial_udb_extra_f2_b->sue_imu_velocity_x, serial_udb_extra_f2_b->sue_imu_velocity_y, serial_udb_extra_f2_b->sue_imu_velocity_z, serial_udb_extra_f2_b->sue_waypoint_goal_x, serial_udb_extra_f2_b->sue_waypoint_goal_y, serial_udb_extra_f2_b->sue_waypoint_goal_z, serial_udb_extra_f2_b->sue_aero_x, serial_udb_extra_f2_b->sue_aero_y, serial_udb_extra_f2_b->sue_aero_z, serial_udb_extra_f2_b->sue_barom_temp, serial_udb_extra_f2_b->sue_barom_press, serial_udb_extra_f2_b->sue_barom_alt, serial_udb_extra_f2_b->sue_bat_volt, serial_udb_extra_f2_b->sue_bat_amp, serial_udb_extra_f2_b->sue_bat_amp_hours, serial_udb_extra_f2_b->sue_desired_height, serial_udb_extra_f2_b->sue_memory_stack_free); -} - -/** - * @brief Encode a serial_udb_extra_f2_b struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f2_b C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f2_b_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f2_b_t* serial_udb_extra_f2_b) -{ - return mavlink_msg_serial_udb_extra_f2_b_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f2_b->sue_time, serial_udb_extra_f2_b->sue_pwm_input_1, serial_udb_extra_f2_b->sue_pwm_input_2, serial_udb_extra_f2_b->sue_pwm_input_3, serial_udb_extra_f2_b->sue_pwm_input_4, serial_udb_extra_f2_b->sue_pwm_input_5, serial_udb_extra_f2_b->sue_pwm_input_6, serial_udb_extra_f2_b->sue_pwm_input_7, serial_udb_extra_f2_b->sue_pwm_input_8, serial_udb_extra_f2_b->sue_pwm_input_9, serial_udb_extra_f2_b->sue_pwm_input_10, serial_udb_extra_f2_b->sue_pwm_input_11, serial_udb_extra_f2_b->sue_pwm_input_12, serial_udb_extra_f2_b->sue_pwm_output_1, serial_udb_extra_f2_b->sue_pwm_output_2, serial_udb_extra_f2_b->sue_pwm_output_3, serial_udb_extra_f2_b->sue_pwm_output_4, serial_udb_extra_f2_b->sue_pwm_output_5, serial_udb_extra_f2_b->sue_pwm_output_6, serial_udb_extra_f2_b->sue_pwm_output_7, serial_udb_extra_f2_b->sue_pwm_output_8, serial_udb_extra_f2_b->sue_pwm_output_9, serial_udb_extra_f2_b->sue_pwm_output_10, serial_udb_extra_f2_b->sue_pwm_output_11, serial_udb_extra_f2_b->sue_pwm_output_12, serial_udb_extra_f2_b->sue_imu_location_x, serial_udb_extra_f2_b->sue_imu_location_y, serial_udb_extra_f2_b->sue_imu_location_z, serial_udb_extra_f2_b->sue_location_error_earth_x, serial_udb_extra_f2_b->sue_location_error_earth_y, serial_udb_extra_f2_b->sue_location_error_earth_z, serial_udb_extra_f2_b->sue_flags, serial_udb_extra_f2_b->sue_osc_fails, serial_udb_extra_f2_b->sue_imu_velocity_x, serial_udb_extra_f2_b->sue_imu_velocity_y, serial_udb_extra_f2_b->sue_imu_velocity_z, serial_udb_extra_f2_b->sue_waypoint_goal_x, serial_udb_extra_f2_b->sue_waypoint_goal_y, serial_udb_extra_f2_b->sue_waypoint_goal_z, serial_udb_extra_f2_b->sue_aero_x, serial_udb_extra_f2_b->sue_aero_y, serial_udb_extra_f2_b->sue_aero_z, serial_udb_extra_f2_b->sue_barom_temp, serial_udb_extra_f2_b->sue_barom_press, serial_udb_extra_f2_b->sue_barom_alt, serial_udb_extra_f2_b->sue_bat_volt, serial_udb_extra_f2_b->sue_bat_amp, serial_udb_extra_f2_b->sue_bat_amp_hours, serial_udb_extra_f2_b->sue_desired_height, serial_udb_extra_f2_b->sue_memory_stack_free); -} - -/** - * @brief Send a serial_udb_extra_f2_b message - * @param chan MAVLink channel to send the message - * - * @param sue_time Serial UDB Extra Time - * @param sue_pwm_input_1 Serial UDB Extra PWM Input Channel 1 - * @param sue_pwm_input_2 Serial UDB Extra PWM Input Channel 2 - * @param sue_pwm_input_3 Serial UDB Extra PWM Input Channel 3 - * @param sue_pwm_input_4 Serial UDB Extra PWM Input Channel 4 - * @param sue_pwm_input_5 Serial UDB Extra PWM Input Channel 5 - * @param sue_pwm_input_6 Serial UDB Extra PWM Input Channel 6 - * @param sue_pwm_input_7 Serial UDB Extra PWM Input Channel 7 - * @param sue_pwm_input_8 Serial UDB Extra PWM Input Channel 8 - * @param sue_pwm_input_9 Serial UDB Extra PWM Input Channel 9 - * @param sue_pwm_input_10 Serial UDB Extra PWM Input Channel 10 - * @param sue_pwm_input_11 Serial UDB Extra PWM Input Channel 11 - * @param sue_pwm_input_12 Serial UDB Extra PWM Input Channel 12 - * @param sue_pwm_output_1 Serial UDB Extra PWM Output Channel 1 - * @param sue_pwm_output_2 Serial UDB Extra PWM Output Channel 2 - * @param sue_pwm_output_3 Serial UDB Extra PWM Output Channel 3 - * @param sue_pwm_output_4 Serial UDB Extra PWM Output Channel 4 - * @param sue_pwm_output_5 Serial UDB Extra PWM Output Channel 5 - * @param sue_pwm_output_6 Serial UDB Extra PWM Output Channel 6 - * @param sue_pwm_output_7 Serial UDB Extra PWM Output Channel 7 - * @param sue_pwm_output_8 Serial UDB Extra PWM Output Channel 8 - * @param sue_pwm_output_9 Serial UDB Extra PWM Output Channel 9 - * @param sue_pwm_output_10 Serial UDB Extra PWM Output Channel 10 - * @param sue_pwm_output_11 Serial UDB Extra PWM Output Channel 11 - * @param sue_pwm_output_12 Serial UDB Extra PWM Output Channel 12 - * @param sue_imu_location_x Serial UDB Extra IMU Location X - * @param sue_imu_location_y Serial UDB Extra IMU Location Y - * @param sue_imu_location_z Serial UDB Extra IMU Location Z - * @param sue_location_error_earth_x Serial UDB Location Error Earth X - * @param sue_location_error_earth_y Serial UDB Location Error Earth Y - * @param sue_location_error_earth_z Serial UDB Location Error Earth Z - * @param sue_flags Serial UDB Extra Status Flags - * @param sue_osc_fails Serial UDB Extra Oscillator Failure Count - * @param sue_imu_velocity_x Serial UDB Extra IMU Velocity X - * @param sue_imu_velocity_y Serial UDB Extra IMU Velocity Y - * @param sue_imu_velocity_z Serial UDB Extra IMU Velocity Z - * @param sue_waypoint_goal_x Serial UDB Extra Current Waypoint Goal X - * @param sue_waypoint_goal_y Serial UDB Extra Current Waypoint Goal Y - * @param sue_waypoint_goal_z Serial UDB Extra Current Waypoint Goal Z - * @param sue_aero_x Aeroforce in UDB X Axis - * @param sue_aero_y Aeroforce in UDB Y Axis - * @param sue_aero_z Aeroforce in UDB Z axis - * @param sue_barom_temp SUE barometer temperature - * @param sue_barom_press SUE barometer pressure - * @param sue_barom_alt SUE barometer altitude - * @param sue_bat_volt SUE battery voltage - * @param sue_bat_amp SUE battery current - * @param sue_bat_amp_hours SUE battery milli amp hours used - * @param sue_desired_height Sue autopilot desired height - * @param sue_memory_stack_free Serial UDB Extra Stack Memory Free - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f2_b_send(mavlink_channel_t chan, uint32_t sue_time, int16_t sue_pwm_input_1, int16_t sue_pwm_input_2, int16_t sue_pwm_input_3, int16_t sue_pwm_input_4, int16_t sue_pwm_input_5, int16_t sue_pwm_input_6, int16_t sue_pwm_input_7, int16_t sue_pwm_input_8, int16_t sue_pwm_input_9, int16_t sue_pwm_input_10, int16_t sue_pwm_input_11, int16_t sue_pwm_input_12, int16_t sue_pwm_output_1, int16_t sue_pwm_output_2, int16_t sue_pwm_output_3, int16_t sue_pwm_output_4, int16_t sue_pwm_output_5, int16_t sue_pwm_output_6, int16_t sue_pwm_output_7, int16_t sue_pwm_output_8, int16_t sue_pwm_output_9, int16_t sue_pwm_output_10, int16_t sue_pwm_output_11, int16_t sue_pwm_output_12, int16_t sue_imu_location_x, int16_t sue_imu_location_y, int16_t sue_imu_location_z, int16_t sue_location_error_earth_x, int16_t sue_location_error_earth_y, int16_t sue_location_error_earth_z, uint32_t sue_flags, int16_t sue_osc_fails, int16_t sue_imu_velocity_x, int16_t sue_imu_velocity_y, int16_t sue_imu_velocity_z, int16_t sue_waypoint_goal_x, int16_t sue_waypoint_goal_y, int16_t sue_waypoint_goal_z, int16_t sue_aero_x, int16_t sue_aero_y, int16_t sue_aero_z, int16_t sue_barom_temp, int32_t sue_barom_press, int32_t sue_barom_alt, int16_t sue_bat_volt, int16_t sue_bat_amp, int16_t sue_bat_amp_hours, int16_t sue_desired_height, int16_t sue_memory_stack_free) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN]; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_uint32_t(buf, 4, sue_flags); - _mav_put_int32_t(buf, 8, sue_barom_press); - _mav_put_int32_t(buf, 12, sue_barom_alt); - _mav_put_int16_t(buf, 16, sue_pwm_input_1); - _mav_put_int16_t(buf, 18, sue_pwm_input_2); - _mav_put_int16_t(buf, 20, sue_pwm_input_3); - _mav_put_int16_t(buf, 22, sue_pwm_input_4); - _mav_put_int16_t(buf, 24, sue_pwm_input_5); - _mav_put_int16_t(buf, 26, sue_pwm_input_6); - _mav_put_int16_t(buf, 28, sue_pwm_input_7); - _mav_put_int16_t(buf, 30, sue_pwm_input_8); - _mav_put_int16_t(buf, 32, sue_pwm_input_9); - _mav_put_int16_t(buf, 34, sue_pwm_input_10); - _mav_put_int16_t(buf, 36, sue_pwm_input_11); - _mav_put_int16_t(buf, 38, sue_pwm_input_12); - _mav_put_int16_t(buf, 40, sue_pwm_output_1); - _mav_put_int16_t(buf, 42, sue_pwm_output_2); - _mav_put_int16_t(buf, 44, sue_pwm_output_3); - _mav_put_int16_t(buf, 46, sue_pwm_output_4); - _mav_put_int16_t(buf, 48, sue_pwm_output_5); - _mav_put_int16_t(buf, 50, sue_pwm_output_6); - _mav_put_int16_t(buf, 52, sue_pwm_output_7); - _mav_put_int16_t(buf, 54, sue_pwm_output_8); - _mav_put_int16_t(buf, 56, sue_pwm_output_9); - _mav_put_int16_t(buf, 58, sue_pwm_output_10); - _mav_put_int16_t(buf, 60, sue_pwm_output_11); - _mav_put_int16_t(buf, 62, sue_pwm_output_12); - _mav_put_int16_t(buf, 64, sue_imu_location_x); - _mav_put_int16_t(buf, 66, sue_imu_location_y); - _mav_put_int16_t(buf, 68, sue_imu_location_z); - _mav_put_int16_t(buf, 70, sue_location_error_earth_x); - _mav_put_int16_t(buf, 72, sue_location_error_earth_y); - _mav_put_int16_t(buf, 74, sue_location_error_earth_z); - _mav_put_int16_t(buf, 76, sue_osc_fails); - _mav_put_int16_t(buf, 78, sue_imu_velocity_x); - _mav_put_int16_t(buf, 80, sue_imu_velocity_y); - _mav_put_int16_t(buf, 82, sue_imu_velocity_z); - _mav_put_int16_t(buf, 84, sue_waypoint_goal_x); - _mav_put_int16_t(buf, 86, sue_waypoint_goal_y); - _mav_put_int16_t(buf, 88, sue_waypoint_goal_z); - _mav_put_int16_t(buf, 90, sue_aero_x); - _mav_put_int16_t(buf, 92, sue_aero_y); - _mav_put_int16_t(buf, 94, sue_aero_z); - _mav_put_int16_t(buf, 96, sue_barom_temp); - _mav_put_int16_t(buf, 98, sue_bat_volt); - _mav_put_int16_t(buf, 100, sue_bat_amp); - _mav_put_int16_t(buf, 102, sue_bat_amp_hours); - _mav_put_int16_t(buf, 104, sue_desired_height); - _mav_put_int16_t(buf, 106, sue_memory_stack_free); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#else - mavlink_serial_udb_extra_f2_b_t packet; - packet.sue_time = sue_time; - packet.sue_flags = sue_flags; - packet.sue_barom_press = sue_barom_press; - packet.sue_barom_alt = sue_barom_alt; - packet.sue_pwm_input_1 = sue_pwm_input_1; - packet.sue_pwm_input_2 = sue_pwm_input_2; - packet.sue_pwm_input_3 = sue_pwm_input_3; - packet.sue_pwm_input_4 = sue_pwm_input_4; - packet.sue_pwm_input_5 = sue_pwm_input_5; - packet.sue_pwm_input_6 = sue_pwm_input_6; - packet.sue_pwm_input_7 = sue_pwm_input_7; - packet.sue_pwm_input_8 = sue_pwm_input_8; - packet.sue_pwm_input_9 = sue_pwm_input_9; - packet.sue_pwm_input_10 = sue_pwm_input_10; - packet.sue_pwm_input_11 = sue_pwm_input_11; - packet.sue_pwm_input_12 = sue_pwm_input_12; - packet.sue_pwm_output_1 = sue_pwm_output_1; - packet.sue_pwm_output_2 = sue_pwm_output_2; - packet.sue_pwm_output_3 = sue_pwm_output_3; - packet.sue_pwm_output_4 = sue_pwm_output_4; - packet.sue_pwm_output_5 = sue_pwm_output_5; - packet.sue_pwm_output_6 = sue_pwm_output_6; - packet.sue_pwm_output_7 = sue_pwm_output_7; - packet.sue_pwm_output_8 = sue_pwm_output_8; - packet.sue_pwm_output_9 = sue_pwm_output_9; - packet.sue_pwm_output_10 = sue_pwm_output_10; - packet.sue_pwm_output_11 = sue_pwm_output_11; - packet.sue_pwm_output_12 = sue_pwm_output_12; - packet.sue_imu_location_x = sue_imu_location_x; - packet.sue_imu_location_y = sue_imu_location_y; - packet.sue_imu_location_z = sue_imu_location_z; - packet.sue_location_error_earth_x = sue_location_error_earth_x; - packet.sue_location_error_earth_y = sue_location_error_earth_y; - packet.sue_location_error_earth_z = sue_location_error_earth_z; - packet.sue_osc_fails = sue_osc_fails; - packet.sue_imu_velocity_x = sue_imu_velocity_x; - packet.sue_imu_velocity_y = sue_imu_velocity_y; - packet.sue_imu_velocity_z = sue_imu_velocity_z; - packet.sue_waypoint_goal_x = sue_waypoint_goal_x; - packet.sue_waypoint_goal_y = sue_waypoint_goal_y; - packet.sue_waypoint_goal_z = sue_waypoint_goal_z; - packet.sue_aero_x = sue_aero_x; - packet.sue_aero_y = sue_aero_y; - packet.sue_aero_z = sue_aero_z; - packet.sue_barom_temp = sue_barom_temp; - packet.sue_bat_volt = sue_bat_volt; - packet.sue_bat_amp = sue_bat_amp; - packet.sue_bat_amp_hours = sue_bat_amp_hours; - packet.sue_desired_height = sue_desired_height; - packet.sue_memory_stack_free = sue_memory_stack_free; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f2_b message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f2_b_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f2_b_t* serial_udb_extra_f2_b) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f2_b_send(chan, serial_udb_extra_f2_b->sue_time, serial_udb_extra_f2_b->sue_pwm_input_1, serial_udb_extra_f2_b->sue_pwm_input_2, serial_udb_extra_f2_b->sue_pwm_input_3, serial_udb_extra_f2_b->sue_pwm_input_4, serial_udb_extra_f2_b->sue_pwm_input_5, serial_udb_extra_f2_b->sue_pwm_input_6, serial_udb_extra_f2_b->sue_pwm_input_7, serial_udb_extra_f2_b->sue_pwm_input_8, serial_udb_extra_f2_b->sue_pwm_input_9, serial_udb_extra_f2_b->sue_pwm_input_10, serial_udb_extra_f2_b->sue_pwm_input_11, serial_udb_extra_f2_b->sue_pwm_input_12, serial_udb_extra_f2_b->sue_pwm_output_1, serial_udb_extra_f2_b->sue_pwm_output_2, serial_udb_extra_f2_b->sue_pwm_output_3, serial_udb_extra_f2_b->sue_pwm_output_4, serial_udb_extra_f2_b->sue_pwm_output_5, serial_udb_extra_f2_b->sue_pwm_output_6, serial_udb_extra_f2_b->sue_pwm_output_7, serial_udb_extra_f2_b->sue_pwm_output_8, serial_udb_extra_f2_b->sue_pwm_output_9, serial_udb_extra_f2_b->sue_pwm_output_10, serial_udb_extra_f2_b->sue_pwm_output_11, serial_udb_extra_f2_b->sue_pwm_output_12, serial_udb_extra_f2_b->sue_imu_location_x, serial_udb_extra_f2_b->sue_imu_location_y, serial_udb_extra_f2_b->sue_imu_location_z, serial_udb_extra_f2_b->sue_location_error_earth_x, serial_udb_extra_f2_b->sue_location_error_earth_y, serial_udb_extra_f2_b->sue_location_error_earth_z, serial_udb_extra_f2_b->sue_flags, serial_udb_extra_f2_b->sue_osc_fails, serial_udb_extra_f2_b->sue_imu_velocity_x, serial_udb_extra_f2_b->sue_imu_velocity_y, serial_udb_extra_f2_b->sue_imu_velocity_z, serial_udb_extra_f2_b->sue_waypoint_goal_x, serial_udb_extra_f2_b->sue_waypoint_goal_y, serial_udb_extra_f2_b->sue_waypoint_goal_z, serial_udb_extra_f2_b->sue_aero_x, serial_udb_extra_f2_b->sue_aero_y, serial_udb_extra_f2_b->sue_aero_z, serial_udb_extra_f2_b->sue_barom_temp, serial_udb_extra_f2_b->sue_barom_press, serial_udb_extra_f2_b->sue_barom_alt, serial_udb_extra_f2_b->sue_bat_volt, serial_udb_extra_f2_b->sue_bat_amp, serial_udb_extra_f2_b->sue_bat_amp_hours, serial_udb_extra_f2_b->sue_desired_height, serial_udb_extra_f2_b->sue_memory_stack_free); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, (const char *)serial_udb_extra_f2_b, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f2_b_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t sue_time, int16_t sue_pwm_input_1, int16_t sue_pwm_input_2, int16_t sue_pwm_input_3, int16_t sue_pwm_input_4, int16_t sue_pwm_input_5, int16_t sue_pwm_input_6, int16_t sue_pwm_input_7, int16_t sue_pwm_input_8, int16_t sue_pwm_input_9, int16_t sue_pwm_input_10, int16_t sue_pwm_input_11, int16_t sue_pwm_input_12, int16_t sue_pwm_output_1, int16_t sue_pwm_output_2, int16_t sue_pwm_output_3, int16_t sue_pwm_output_4, int16_t sue_pwm_output_5, int16_t sue_pwm_output_6, int16_t sue_pwm_output_7, int16_t sue_pwm_output_8, int16_t sue_pwm_output_9, int16_t sue_pwm_output_10, int16_t sue_pwm_output_11, int16_t sue_pwm_output_12, int16_t sue_imu_location_x, int16_t sue_imu_location_y, int16_t sue_imu_location_z, int16_t sue_location_error_earth_x, int16_t sue_location_error_earth_y, int16_t sue_location_error_earth_z, uint32_t sue_flags, int16_t sue_osc_fails, int16_t sue_imu_velocity_x, int16_t sue_imu_velocity_y, int16_t sue_imu_velocity_z, int16_t sue_waypoint_goal_x, int16_t sue_waypoint_goal_y, int16_t sue_waypoint_goal_z, int16_t sue_aero_x, int16_t sue_aero_y, int16_t sue_aero_z, int16_t sue_barom_temp, int32_t sue_barom_press, int32_t sue_barom_alt, int16_t sue_bat_volt, int16_t sue_bat_amp, int16_t sue_bat_amp_hours, int16_t sue_desired_height, int16_t sue_memory_stack_free) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, sue_time); - _mav_put_uint32_t(buf, 4, sue_flags); - _mav_put_int32_t(buf, 8, sue_barom_press); - _mav_put_int32_t(buf, 12, sue_barom_alt); - _mav_put_int16_t(buf, 16, sue_pwm_input_1); - _mav_put_int16_t(buf, 18, sue_pwm_input_2); - _mav_put_int16_t(buf, 20, sue_pwm_input_3); - _mav_put_int16_t(buf, 22, sue_pwm_input_4); - _mav_put_int16_t(buf, 24, sue_pwm_input_5); - _mav_put_int16_t(buf, 26, sue_pwm_input_6); - _mav_put_int16_t(buf, 28, sue_pwm_input_7); - _mav_put_int16_t(buf, 30, sue_pwm_input_8); - _mav_put_int16_t(buf, 32, sue_pwm_input_9); - _mav_put_int16_t(buf, 34, sue_pwm_input_10); - _mav_put_int16_t(buf, 36, sue_pwm_input_11); - _mav_put_int16_t(buf, 38, sue_pwm_input_12); - _mav_put_int16_t(buf, 40, sue_pwm_output_1); - _mav_put_int16_t(buf, 42, sue_pwm_output_2); - _mav_put_int16_t(buf, 44, sue_pwm_output_3); - _mav_put_int16_t(buf, 46, sue_pwm_output_4); - _mav_put_int16_t(buf, 48, sue_pwm_output_5); - _mav_put_int16_t(buf, 50, sue_pwm_output_6); - _mav_put_int16_t(buf, 52, sue_pwm_output_7); - _mav_put_int16_t(buf, 54, sue_pwm_output_8); - _mav_put_int16_t(buf, 56, sue_pwm_output_9); - _mav_put_int16_t(buf, 58, sue_pwm_output_10); - _mav_put_int16_t(buf, 60, sue_pwm_output_11); - _mav_put_int16_t(buf, 62, sue_pwm_output_12); - _mav_put_int16_t(buf, 64, sue_imu_location_x); - _mav_put_int16_t(buf, 66, sue_imu_location_y); - _mav_put_int16_t(buf, 68, sue_imu_location_z); - _mav_put_int16_t(buf, 70, sue_location_error_earth_x); - _mav_put_int16_t(buf, 72, sue_location_error_earth_y); - _mav_put_int16_t(buf, 74, sue_location_error_earth_z); - _mav_put_int16_t(buf, 76, sue_osc_fails); - _mav_put_int16_t(buf, 78, sue_imu_velocity_x); - _mav_put_int16_t(buf, 80, sue_imu_velocity_y); - _mav_put_int16_t(buf, 82, sue_imu_velocity_z); - _mav_put_int16_t(buf, 84, sue_waypoint_goal_x); - _mav_put_int16_t(buf, 86, sue_waypoint_goal_y); - _mav_put_int16_t(buf, 88, sue_waypoint_goal_z); - _mav_put_int16_t(buf, 90, sue_aero_x); - _mav_put_int16_t(buf, 92, sue_aero_y); - _mav_put_int16_t(buf, 94, sue_aero_z); - _mav_put_int16_t(buf, 96, sue_barom_temp); - _mav_put_int16_t(buf, 98, sue_bat_volt); - _mav_put_int16_t(buf, 100, sue_bat_amp); - _mav_put_int16_t(buf, 102, sue_bat_amp_hours); - _mav_put_int16_t(buf, 104, sue_desired_height); - _mav_put_int16_t(buf, 106, sue_memory_stack_free); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#else - mavlink_serial_udb_extra_f2_b_t *packet = (mavlink_serial_udb_extra_f2_b_t *)msgbuf; - packet->sue_time = sue_time; - packet->sue_flags = sue_flags; - packet->sue_barom_press = sue_barom_press; - packet->sue_barom_alt = sue_barom_alt; - packet->sue_pwm_input_1 = sue_pwm_input_1; - packet->sue_pwm_input_2 = sue_pwm_input_2; - packet->sue_pwm_input_3 = sue_pwm_input_3; - packet->sue_pwm_input_4 = sue_pwm_input_4; - packet->sue_pwm_input_5 = sue_pwm_input_5; - packet->sue_pwm_input_6 = sue_pwm_input_6; - packet->sue_pwm_input_7 = sue_pwm_input_7; - packet->sue_pwm_input_8 = sue_pwm_input_8; - packet->sue_pwm_input_9 = sue_pwm_input_9; - packet->sue_pwm_input_10 = sue_pwm_input_10; - packet->sue_pwm_input_11 = sue_pwm_input_11; - packet->sue_pwm_input_12 = sue_pwm_input_12; - packet->sue_pwm_output_1 = sue_pwm_output_1; - packet->sue_pwm_output_2 = sue_pwm_output_2; - packet->sue_pwm_output_3 = sue_pwm_output_3; - packet->sue_pwm_output_4 = sue_pwm_output_4; - packet->sue_pwm_output_5 = sue_pwm_output_5; - packet->sue_pwm_output_6 = sue_pwm_output_6; - packet->sue_pwm_output_7 = sue_pwm_output_7; - packet->sue_pwm_output_8 = sue_pwm_output_8; - packet->sue_pwm_output_9 = sue_pwm_output_9; - packet->sue_pwm_output_10 = sue_pwm_output_10; - packet->sue_pwm_output_11 = sue_pwm_output_11; - packet->sue_pwm_output_12 = sue_pwm_output_12; - packet->sue_imu_location_x = sue_imu_location_x; - packet->sue_imu_location_y = sue_imu_location_y; - packet->sue_imu_location_z = sue_imu_location_z; - packet->sue_location_error_earth_x = sue_location_error_earth_x; - packet->sue_location_error_earth_y = sue_location_error_earth_y; - packet->sue_location_error_earth_z = sue_location_error_earth_z; - packet->sue_osc_fails = sue_osc_fails; - packet->sue_imu_velocity_x = sue_imu_velocity_x; - packet->sue_imu_velocity_y = sue_imu_velocity_y; - packet->sue_imu_velocity_z = sue_imu_velocity_z; - packet->sue_waypoint_goal_x = sue_waypoint_goal_x; - packet->sue_waypoint_goal_y = sue_waypoint_goal_y; - packet->sue_waypoint_goal_z = sue_waypoint_goal_z; - packet->sue_aero_x = sue_aero_x; - packet->sue_aero_y = sue_aero_y; - packet->sue_aero_z = sue_aero_z; - packet->sue_barom_temp = sue_barom_temp; - packet->sue_bat_volt = sue_bat_volt; - packet->sue_bat_amp = sue_bat_amp; - packet->sue_bat_amp_hours = sue_bat_amp_hours; - packet->sue_desired_height = sue_desired_height; - packet->sue_memory_stack_free = sue_memory_stack_free; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F2_B UNPACKING - - -/** - * @brief Get field sue_time from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Time - */ -static inline uint32_t mavlink_msg_serial_udb_extra_f2_b_get_sue_time(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field sue_pwm_input_1 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 16); -} - -/** - * @brief Get field sue_pwm_input_2 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 18); -} - -/** - * @brief Get field sue_pwm_input_3 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 3 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_3(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 20); -} - -/** - * @brief Get field sue_pwm_input_4 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 4 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_4(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 22); -} - -/** - * @brief Get field sue_pwm_input_5 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 5 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_5(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 24); -} - -/** - * @brief Get field sue_pwm_input_6 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 6 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_6(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 26); -} - -/** - * @brief Get field sue_pwm_input_7 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 7 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_7(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 28); -} - -/** - * @brief Get field sue_pwm_input_8 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 8 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_8(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 30); -} - -/** - * @brief Get field sue_pwm_input_9 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 9 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_9(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 32); -} - -/** - * @brief Get field sue_pwm_input_10 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 10 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_10(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 34); -} - -/** - * @brief Get field sue_pwm_input_11 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 11 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_11(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 36); -} - -/** - * @brief Get field sue_pwm_input_12 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Input Channel 12 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_12(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 38); -} - -/** - * @brief Get field sue_pwm_output_1 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 1 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_1(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 40); -} - -/** - * @brief Get field sue_pwm_output_2 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 2 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_2(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 42); -} - -/** - * @brief Get field sue_pwm_output_3 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 3 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_3(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 44); -} - -/** - * @brief Get field sue_pwm_output_4 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 4 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_4(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 46); -} - -/** - * @brief Get field sue_pwm_output_5 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 5 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_5(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 48); -} - -/** - * @brief Get field sue_pwm_output_6 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 6 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_6(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 50); -} - -/** - * @brief Get field sue_pwm_output_7 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 7 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_7(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 52); -} - -/** - * @brief Get field sue_pwm_output_8 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 8 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_8(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 54); -} - -/** - * @brief Get field sue_pwm_output_9 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 9 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_9(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 56); -} - -/** - * @brief Get field sue_pwm_output_10 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 10 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_10(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 58); -} - -/** - * @brief Get field sue_pwm_output_11 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 11 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_11(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 60); -} - -/** - * @brief Get field sue_pwm_output_12 from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra PWM Output Channel 12 - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_12(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 62); -} - -/** - * @brief Get field sue_imu_location_x from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Location X - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 64); -} - -/** - * @brief Get field sue_imu_location_y from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Location Y - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 66); -} - -/** - * @brief Get field sue_imu_location_z from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Location Z - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 68); -} - -/** - * @brief Get field sue_location_error_earth_x from serial_udb_extra_f2_b message - * - * @return Serial UDB Location Error Earth X - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 70); -} - -/** - * @brief Get field sue_location_error_earth_y from serial_udb_extra_f2_b message - * - * @return Serial UDB Location Error Earth Y - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 72); -} - -/** - * @brief Get field sue_location_error_earth_z from serial_udb_extra_f2_b message - * - * @return Serial UDB Location Error Earth Z - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 74); -} - -/** - * @brief Get field sue_flags from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Status Flags - */ -static inline uint32_t mavlink_msg_serial_udb_extra_f2_b_get_sue_flags(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 4); -} - -/** - * @brief Get field sue_osc_fails from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Oscillator Failure Count - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_osc_fails(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 76); -} - -/** - * @brief Get field sue_imu_velocity_x from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Velocity X - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 78); -} - -/** - * @brief Get field sue_imu_velocity_y from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Velocity Y - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 80); -} - -/** - * @brief Get field sue_imu_velocity_z from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra IMU Velocity Z - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 82); -} - -/** - * @brief Get field sue_waypoint_goal_x from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Current Waypoint Goal X - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 84); -} - -/** - * @brief Get field sue_waypoint_goal_y from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Current Waypoint Goal Y - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 86); -} - -/** - * @brief Get field sue_waypoint_goal_z from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Current Waypoint Goal Z - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 88); -} - -/** - * @brief Get field sue_aero_x from serial_udb_extra_f2_b message - * - * @return Aeroforce in UDB X Axis - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_x(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 90); -} - -/** - * @brief Get field sue_aero_y from serial_udb_extra_f2_b message - * - * @return Aeroforce in UDB Y Axis - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_y(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 92); -} - -/** - * @brief Get field sue_aero_z from serial_udb_extra_f2_b message - * - * @return Aeroforce in UDB Z axis - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_z(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 94); -} - -/** - * @brief Get field sue_barom_temp from serial_udb_extra_f2_b message - * - * @return SUE barometer temperature - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_temp(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 96); -} - -/** - * @brief Get field sue_barom_press from serial_udb_extra_f2_b message - * - * @return SUE barometer pressure - */ -static inline int32_t mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_press(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 8); -} - -/** - * @brief Get field sue_barom_alt from serial_udb_extra_f2_b message - * - * @return SUE barometer altitude - */ -static inline int32_t mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_alt(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int32_t(msg, 12); -} - -/** - * @brief Get field sue_bat_volt from serial_udb_extra_f2_b message - * - * @return SUE battery voltage - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_volt(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 98); -} - -/** - * @brief Get field sue_bat_amp from serial_udb_extra_f2_b message - * - * @return SUE battery current - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_amp(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 100); -} - -/** - * @brief Get field sue_bat_amp_hours from serial_udb_extra_f2_b message - * - * @return SUE battery milli amp hours used - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_amp_hours(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 102); -} - -/** - * @brief Get field sue_desired_height from serial_udb_extra_f2_b message - * - * @return Sue autopilot desired height - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_desired_height(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 104); -} - -/** - * @brief Get field sue_memory_stack_free from serial_udb_extra_f2_b message - * - * @return Serial UDB Extra Stack Memory Free - */ -static inline int16_t mavlink_msg_serial_udb_extra_f2_b_get_sue_memory_stack_free(const mavlink_message_t* msg) -{ - return _MAV_RETURN_int16_t(msg, 106); -} - -/** - * @brief Decode a serial_udb_extra_f2_b message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f2_b C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f2_b_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f2_b_t* serial_udb_extra_f2_b) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f2_b->sue_time = mavlink_msg_serial_udb_extra_f2_b_get_sue_time(msg); - serial_udb_extra_f2_b->sue_flags = mavlink_msg_serial_udb_extra_f2_b_get_sue_flags(msg); - serial_udb_extra_f2_b->sue_barom_press = mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_press(msg); - serial_udb_extra_f2_b->sue_barom_alt = mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_alt(msg); - serial_udb_extra_f2_b->sue_pwm_input_1 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_1(msg); - serial_udb_extra_f2_b->sue_pwm_input_2 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_2(msg); - serial_udb_extra_f2_b->sue_pwm_input_3 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_3(msg); - serial_udb_extra_f2_b->sue_pwm_input_4 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_4(msg); - serial_udb_extra_f2_b->sue_pwm_input_5 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_5(msg); - serial_udb_extra_f2_b->sue_pwm_input_6 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_6(msg); - serial_udb_extra_f2_b->sue_pwm_input_7 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_7(msg); - serial_udb_extra_f2_b->sue_pwm_input_8 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_8(msg); - serial_udb_extra_f2_b->sue_pwm_input_9 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_9(msg); - serial_udb_extra_f2_b->sue_pwm_input_10 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_10(msg); - serial_udb_extra_f2_b->sue_pwm_input_11 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_11(msg); - serial_udb_extra_f2_b->sue_pwm_input_12 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_input_12(msg); - serial_udb_extra_f2_b->sue_pwm_output_1 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_1(msg); - serial_udb_extra_f2_b->sue_pwm_output_2 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_2(msg); - serial_udb_extra_f2_b->sue_pwm_output_3 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_3(msg); - serial_udb_extra_f2_b->sue_pwm_output_4 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_4(msg); - serial_udb_extra_f2_b->sue_pwm_output_5 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_5(msg); - serial_udb_extra_f2_b->sue_pwm_output_6 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_6(msg); - serial_udb_extra_f2_b->sue_pwm_output_7 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_7(msg); - serial_udb_extra_f2_b->sue_pwm_output_8 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_8(msg); - serial_udb_extra_f2_b->sue_pwm_output_9 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_9(msg); - serial_udb_extra_f2_b->sue_pwm_output_10 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_10(msg); - serial_udb_extra_f2_b->sue_pwm_output_11 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_11(msg); - serial_udb_extra_f2_b->sue_pwm_output_12 = mavlink_msg_serial_udb_extra_f2_b_get_sue_pwm_output_12(msg); - serial_udb_extra_f2_b->sue_imu_location_x = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_x(msg); - serial_udb_extra_f2_b->sue_imu_location_y = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_y(msg); - serial_udb_extra_f2_b->sue_imu_location_z = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_location_z(msg); - serial_udb_extra_f2_b->sue_location_error_earth_x = mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_x(msg); - serial_udb_extra_f2_b->sue_location_error_earth_y = mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_y(msg); - serial_udb_extra_f2_b->sue_location_error_earth_z = mavlink_msg_serial_udb_extra_f2_b_get_sue_location_error_earth_z(msg); - serial_udb_extra_f2_b->sue_osc_fails = mavlink_msg_serial_udb_extra_f2_b_get_sue_osc_fails(msg); - serial_udb_extra_f2_b->sue_imu_velocity_x = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_x(msg); - serial_udb_extra_f2_b->sue_imu_velocity_y = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_y(msg); - serial_udb_extra_f2_b->sue_imu_velocity_z = mavlink_msg_serial_udb_extra_f2_b_get_sue_imu_velocity_z(msg); - serial_udb_extra_f2_b->sue_waypoint_goal_x = mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_x(msg); - serial_udb_extra_f2_b->sue_waypoint_goal_y = mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_y(msg); - serial_udb_extra_f2_b->sue_waypoint_goal_z = mavlink_msg_serial_udb_extra_f2_b_get_sue_waypoint_goal_z(msg); - serial_udb_extra_f2_b->sue_aero_x = mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_x(msg); - serial_udb_extra_f2_b->sue_aero_y = mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_y(msg); - serial_udb_extra_f2_b->sue_aero_z = mavlink_msg_serial_udb_extra_f2_b_get_sue_aero_z(msg); - serial_udb_extra_f2_b->sue_barom_temp = mavlink_msg_serial_udb_extra_f2_b_get_sue_barom_temp(msg); - serial_udb_extra_f2_b->sue_bat_volt = mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_volt(msg); - serial_udb_extra_f2_b->sue_bat_amp = mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_amp(msg); - serial_udb_extra_f2_b->sue_bat_amp_hours = mavlink_msg_serial_udb_extra_f2_b_get_sue_bat_amp_hours(msg); - serial_udb_extra_f2_b->sue_desired_height = mavlink_msg_serial_udb_extra_f2_b_get_sue_desired_height(msg); - serial_udb_extra_f2_b->sue_memory_stack_free = mavlink_msg_serial_udb_extra_f2_b_get_sue_memory_stack_free(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN; - memset(serial_udb_extra_f2_b, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_LEN); - memcpy(serial_udb_extra_f2_b, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f4.h b/matrixpilot/mavlink_msg_serial_udb_extra_f4.h deleted file mode 100644 index 3db7c9d4c..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f4.h +++ /dev/null @@ -1,512 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F4 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4 172 - - -typedef struct __mavlink_serial_udb_extra_f4_t { - uint8_t sue_ROLL_STABILIZATION_AILERONS; /*< Serial UDB Extra Roll Stabilization with Ailerons Enabled*/ - uint8_t sue_ROLL_STABILIZATION_RUDDER; /*< Serial UDB Extra Roll Stabilization with Rudder Enabled*/ - uint8_t sue_PITCH_STABILIZATION; /*< Serial UDB Extra Pitch Stabilization Enabled*/ - uint8_t sue_YAW_STABILIZATION_RUDDER; /*< Serial UDB Extra Yaw Stabilization using Rudder Enabled*/ - uint8_t sue_YAW_STABILIZATION_AILERON; /*< Serial UDB Extra Yaw Stabilization using Ailerons Enabled*/ - uint8_t sue_AILERON_NAVIGATION; /*< Serial UDB Extra Navigation with Ailerons Enabled*/ - uint8_t sue_RUDDER_NAVIGATION; /*< Serial UDB Extra Navigation with Rudder Enabled*/ - uint8_t sue_ALTITUDEHOLD_STABILIZED; /*< Serial UDB Extra Type of Alitude Hold when in Stabilized Mode*/ - uint8_t sue_ALTITUDEHOLD_WAYPOINT; /*< Serial UDB Extra Type of Alitude Hold when in Waypoint Mode*/ - uint8_t sue_RACING_MODE; /*< Serial UDB Extra Firmware racing mode enabled*/ -} mavlink_serial_udb_extra_f4_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN 10 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN 10 -#define MAVLINK_MSG_ID_172_LEN 10 -#define MAVLINK_MSG_ID_172_MIN_LEN 10 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC 191 -#define MAVLINK_MSG_ID_172_CRC 191 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F4 { \ - 172, \ - "SERIAL_UDB_EXTRA_F4", \ - 10, \ - { { "sue_ROLL_STABILIZATION_AILERONS", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_serial_udb_extra_f4_t, sue_ROLL_STABILIZATION_AILERONS) }, \ - { "sue_ROLL_STABILIZATION_RUDDER", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_serial_udb_extra_f4_t, sue_ROLL_STABILIZATION_RUDDER) }, \ - { "sue_PITCH_STABILIZATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_serial_udb_extra_f4_t, sue_PITCH_STABILIZATION) }, \ - { "sue_YAW_STABILIZATION_RUDDER", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_serial_udb_extra_f4_t, sue_YAW_STABILIZATION_RUDDER) }, \ - { "sue_YAW_STABILIZATION_AILERON", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_serial_udb_extra_f4_t, sue_YAW_STABILIZATION_AILERON) }, \ - { "sue_AILERON_NAVIGATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_serial_udb_extra_f4_t, sue_AILERON_NAVIGATION) }, \ - { "sue_RUDDER_NAVIGATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_udb_extra_f4_t, sue_RUDDER_NAVIGATION) }, \ - { "sue_ALTITUDEHOLD_STABILIZED", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_udb_extra_f4_t, sue_ALTITUDEHOLD_STABILIZED) }, \ - { "sue_ALTITUDEHOLD_WAYPOINT", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_serial_udb_extra_f4_t, sue_ALTITUDEHOLD_WAYPOINT) }, \ - { "sue_RACING_MODE", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_serial_udb_extra_f4_t, sue_RACING_MODE) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F4 { \ - "SERIAL_UDB_EXTRA_F4", \ - 10, \ - { { "sue_ROLL_STABILIZATION_AILERONS", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_serial_udb_extra_f4_t, sue_ROLL_STABILIZATION_AILERONS) }, \ - { "sue_ROLL_STABILIZATION_RUDDER", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_serial_udb_extra_f4_t, sue_ROLL_STABILIZATION_RUDDER) }, \ - { "sue_PITCH_STABILIZATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_serial_udb_extra_f4_t, sue_PITCH_STABILIZATION) }, \ - { "sue_YAW_STABILIZATION_RUDDER", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_serial_udb_extra_f4_t, sue_YAW_STABILIZATION_RUDDER) }, \ - { "sue_YAW_STABILIZATION_AILERON", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_serial_udb_extra_f4_t, sue_YAW_STABILIZATION_AILERON) }, \ - { "sue_AILERON_NAVIGATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_serial_udb_extra_f4_t, sue_AILERON_NAVIGATION) }, \ - { "sue_RUDDER_NAVIGATION", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_serial_udb_extra_f4_t, sue_RUDDER_NAVIGATION) }, \ - { "sue_ALTITUDEHOLD_STABILIZED", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_serial_udb_extra_f4_t, sue_ALTITUDEHOLD_STABILIZED) }, \ - { "sue_ALTITUDEHOLD_WAYPOINT", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_serial_udb_extra_f4_t, sue_ALTITUDEHOLD_WAYPOINT) }, \ - { "sue_RACING_MODE", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_serial_udb_extra_f4_t, sue_RACING_MODE) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f4 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_ROLL_STABILIZATION_AILERONS Serial UDB Extra Roll Stabilization with Ailerons Enabled - * @param sue_ROLL_STABILIZATION_RUDDER Serial UDB Extra Roll Stabilization with Rudder Enabled - * @param sue_PITCH_STABILIZATION Serial UDB Extra Pitch Stabilization Enabled - * @param sue_YAW_STABILIZATION_RUDDER Serial UDB Extra Yaw Stabilization using Rudder Enabled - * @param sue_YAW_STABILIZATION_AILERON Serial UDB Extra Yaw Stabilization using Ailerons Enabled - * @param sue_AILERON_NAVIGATION Serial UDB Extra Navigation with Ailerons Enabled - * @param sue_RUDDER_NAVIGATION Serial UDB Extra Navigation with Rudder Enabled - * @param sue_ALTITUDEHOLD_STABILIZED Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - * @param sue_ALTITUDEHOLD_WAYPOINT Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - * @param sue_RACING_MODE Serial UDB Extra Firmware racing mode enabled - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t sue_ROLL_STABILIZATION_AILERONS, uint8_t sue_ROLL_STABILIZATION_RUDDER, uint8_t sue_PITCH_STABILIZATION, uint8_t sue_YAW_STABILIZATION_RUDDER, uint8_t sue_YAW_STABILIZATION_AILERON, uint8_t sue_AILERON_NAVIGATION, uint8_t sue_RUDDER_NAVIGATION, uint8_t sue_ALTITUDEHOLD_STABILIZED, uint8_t sue_ALTITUDEHOLD_WAYPOINT, uint8_t sue_RACING_MODE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN]; - _mav_put_uint8_t(buf, 0, sue_ROLL_STABILIZATION_AILERONS); - _mav_put_uint8_t(buf, 1, sue_ROLL_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 2, sue_PITCH_STABILIZATION); - _mav_put_uint8_t(buf, 3, sue_YAW_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 4, sue_YAW_STABILIZATION_AILERON); - _mav_put_uint8_t(buf, 5, sue_AILERON_NAVIGATION); - _mav_put_uint8_t(buf, 6, sue_RUDDER_NAVIGATION); - _mav_put_uint8_t(buf, 7, sue_ALTITUDEHOLD_STABILIZED); - _mav_put_uint8_t(buf, 8, sue_ALTITUDEHOLD_WAYPOINT); - _mav_put_uint8_t(buf, 9, sue_RACING_MODE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#else - mavlink_serial_udb_extra_f4_t packet; - packet.sue_ROLL_STABILIZATION_AILERONS = sue_ROLL_STABILIZATION_AILERONS; - packet.sue_ROLL_STABILIZATION_RUDDER = sue_ROLL_STABILIZATION_RUDDER; - packet.sue_PITCH_STABILIZATION = sue_PITCH_STABILIZATION; - packet.sue_YAW_STABILIZATION_RUDDER = sue_YAW_STABILIZATION_RUDDER; - packet.sue_YAW_STABILIZATION_AILERON = sue_YAW_STABILIZATION_AILERON; - packet.sue_AILERON_NAVIGATION = sue_AILERON_NAVIGATION; - packet.sue_RUDDER_NAVIGATION = sue_RUDDER_NAVIGATION; - packet.sue_ALTITUDEHOLD_STABILIZED = sue_ALTITUDEHOLD_STABILIZED; - packet.sue_ALTITUDEHOLD_WAYPOINT = sue_ALTITUDEHOLD_WAYPOINT; - packet.sue_RACING_MODE = sue_RACING_MODE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f4 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_ROLL_STABILIZATION_AILERONS Serial UDB Extra Roll Stabilization with Ailerons Enabled - * @param sue_ROLL_STABILIZATION_RUDDER Serial UDB Extra Roll Stabilization with Rudder Enabled - * @param sue_PITCH_STABILIZATION Serial UDB Extra Pitch Stabilization Enabled - * @param sue_YAW_STABILIZATION_RUDDER Serial UDB Extra Yaw Stabilization using Rudder Enabled - * @param sue_YAW_STABILIZATION_AILERON Serial UDB Extra Yaw Stabilization using Ailerons Enabled - * @param sue_AILERON_NAVIGATION Serial UDB Extra Navigation with Ailerons Enabled - * @param sue_RUDDER_NAVIGATION Serial UDB Extra Navigation with Rudder Enabled - * @param sue_ALTITUDEHOLD_STABILIZED Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - * @param sue_ALTITUDEHOLD_WAYPOINT Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - * @param sue_RACING_MODE Serial UDB Extra Firmware racing mode enabled - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t sue_ROLL_STABILIZATION_AILERONS, uint8_t sue_ROLL_STABILIZATION_RUDDER, uint8_t sue_PITCH_STABILIZATION, uint8_t sue_YAW_STABILIZATION_RUDDER, uint8_t sue_YAW_STABILIZATION_AILERON, uint8_t sue_AILERON_NAVIGATION, uint8_t sue_RUDDER_NAVIGATION, uint8_t sue_ALTITUDEHOLD_STABILIZED, uint8_t sue_ALTITUDEHOLD_WAYPOINT, uint8_t sue_RACING_MODE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN]; - _mav_put_uint8_t(buf, 0, sue_ROLL_STABILIZATION_AILERONS); - _mav_put_uint8_t(buf, 1, sue_ROLL_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 2, sue_PITCH_STABILIZATION); - _mav_put_uint8_t(buf, 3, sue_YAW_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 4, sue_YAW_STABILIZATION_AILERON); - _mav_put_uint8_t(buf, 5, sue_AILERON_NAVIGATION); - _mav_put_uint8_t(buf, 6, sue_RUDDER_NAVIGATION); - _mav_put_uint8_t(buf, 7, sue_ALTITUDEHOLD_STABILIZED); - _mav_put_uint8_t(buf, 8, sue_ALTITUDEHOLD_WAYPOINT); - _mav_put_uint8_t(buf, 9, sue_RACING_MODE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#else - mavlink_serial_udb_extra_f4_t packet; - packet.sue_ROLL_STABILIZATION_AILERONS = sue_ROLL_STABILIZATION_AILERONS; - packet.sue_ROLL_STABILIZATION_RUDDER = sue_ROLL_STABILIZATION_RUDDER; - packet.sue_PITCH_STABILIZATION = sue_PITCH_STABILIZATION; - packet.sue_YAW_STABILIZATION_RUDDER = sue_YAW_STABILIZATION_RUDDER; - packet.sue_YAW_STABILIZATION_AILERON = sue_YAW_STABILIZATION_AILERON; - packet.sue_AILERON_NAVIGATION = sue_AILERON_NAVIGATION; - packet.sue_RUDDER_NAVIGATION = sue_RUDDER_NAVIGATION; - packet.sue_ALTITUDEHOLD_STABILIZED = sue_ALTITUDEHOLD_STABILIZED; - packet.sue_ALTITUDEHOLD_WAYPOINT = sue_ALTITUDEHOLD_WAYPOINT; - packet.sue_RACING_MODE = sue_RACING_MODE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f4 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_ROLL_STABILIZATION_AILERONS Serial UDB Extra Roll Stabilization with Ailerons Enabled - * @param sue_ROLL_STABILIZATION_RUDDER Serial UDB Extra Roll Stabilization with Rudder Enabled - * @param sue_PITCH_STABILIZATION Serial UDB Extra Pitch Stabilization Enabled - * @param sue_YAW_STABILIZATION_RUDDER Serial UDB Extra Yaw Stabilization using Rudder Enabled - * @param sue_YAW_STABILIZATION_AILERON Serial UDB Extra Yaw Stabilization using Ailerons Enabled - * @param sue_AILERON_NAVIGATION Serial UDB Extra Navigation with Ailerons Enabled - * @param sue_RUDDER_NAVIGATION Serial UDB Extra Navigation with Rudder Enabled - * @param sue_ALTITUDEHOLD_STABILIZED Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - * @param sue_ALTITUDEHOLD_WAYPOINT Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - * @param sue_RACING_MODE Serial UDB Extra Firmware racing mode enabled - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t sue_ROLL_STABILIZATION_AILERONS,uint8_t sue_ROLL_STABILIZATION_RUDDER,uint8_t sue_PITCH_STABILIZATION,uint8_t sue_YAW_STABILIZATION_RUDDER,uint8_t sue_YAW_STABILIZATION_AILERON,uint8_t sue_AILERON_NAVIGATION,uint8_t sue_RUDDER_NAVIGATION,uint8_t sue_ALTITUDEHOLD_STABILIZED,uint8_t sue_ALTITUDEHOLD_WAYPOINT,uint8_t sue_RACING_MODE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN]; - _mav_put_uint8_t(buf, 0, sue_ROLL_STABILIZATION_AILERONS); - _mav_put_uint8_t(buf, 1, sue_ROLL_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 2, sue_PITCH_STABILIZATION); - _mav_put_uint8_t(buf, 3, sue_YAW_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 4, sue_YAW_STABILIZATION_AILERON); - _mav_put_uint8_t(buf, 5, sue_AILERON_NAVIGATION); - _mav_put_uint8_t(buf, 6, sue_RUDDER_NAVIGATION); - _mav_put_uint8_t(buf, 7, sue_ALTITUDEHOLD_STABILIZED); - _mav_put_uint8_t(buf, 8, sue_ALTITUDEHOLD_WAYPOINT); - _mav_put_uint8_t(buf, 9, sue_RACING_MODE); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#else - mavlink_serial_udb_extra_f4_t packet; - packet.sue_ROLL_STABILIZATION_AILERONS = sue_ROLL_STABILIZATION_AILERONS; - packet.sue_ROLL_STABILIZATION_RUDDER = sue_ROLL_STABILIZATION_RUDDER; - packet.sue_PITCH_STABILIZATION = sue_PITCH_STABILIZATION; - packet.sue_YAW_STABILIZATION_RUDDER = sue_YAW_STABILIZATION_RUDDER; - packet.sue_YAW_STABILIZATION_AILERON = sue_YAW_STABILIZATION_AILERON; - packet.sue_AILERON_NAVIGATION = sue_AILERON_NAVIGATION; - packet.sue_RUDDER_NAVIGATION = sue_RUDDER_NAVIGATION; - packet.sue_ALTITUDEHOLD_STABILIZED = sue_ALTITUDEHOLD_STABILIZED; - packet.sue_ALTITUDEHOLD_WAYPOINT = sue_ALTITUDEHOLD_WAYPOINT; - packet.sue_RACING_MODE = sue_RACING_MODE; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f4 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f4 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f4_t* serial_udb_extra_f4) -{ - return mavlink_msg_serial_udb_extra_f4_pack(system_id, component_id, msg, serial_udb_extra_f4->sue_ROLL_STABILIZATION_AILERONS, serial_udb_extra_f4->sue_ROLL_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_PITCH_STABILIZATION, serial_udb_extra_f4->sue_YAW_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_YAW_STABILIZATION_AILERON, serial_udb_extra_f4->sue_AILERON_NAVIGATION, serial_udb_extra_f4->sue_RUDDER_NAVIGATION, serial_udb_extra_f4->sue_ALTITUDEHOLD_STABILIZED, serial_udb_extra_f4->sue_ALTITUDEHOLD_WAYPOINT, serial_udb_extra_f4->sue_RACING_MODE); -} - -/** - * @brief Encode a serial_udb_extra_f4 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f4 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f4_t* serial_udb_extra_f4) -{ - return mavlink_msg_serial_udb_extra_f4_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f4->sue_ROLL_STABILIZATION_AILERONS, serial_udb_extra_f4->sue_ROLL_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_PITCH_STABILIZATION, serial_udb_extra_f4->sue_YAW_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_YAW_STABILIZATION_AILERON, serial_udb_extra_f4->sue_AILERON_NAVIGATION, serial_udb_extra_f4->sue_RUDDER_NAVIGATION, serial_udb_extra_f4->sue_ALTITUDEHOLD_STABILIZED, serial_udb_extra_f4->sue_ALTITUDEHOLD_WAYPOINT, serial_udb_extra_f4->sue_RACING_MODE); -} - -/** - * @brief Encode a serial_udb_extra_f4 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f4 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f4_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f4_t* serial_udb_extra_f4) -{ - return mavlink_msg_serial_udb_extra_f4_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f4->sue_ROLL_STABILIZATION_AILERONS, serial_udb_extra_f4->sue_ROLL_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_PITCH_STABILIZATION, serial_udb_extra_f4->sue_YAW_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_YAW_STABILIZATION_AILERON, serial_udb_extra_f4->sue_AILERON_NAVIGATION, serial_udb_extra_f4->sue_RUDDER_NAVIGATION, serial_udb_extra_f4->sue_ALTITUDEHOLD_STABILIZED, serial_udb_extra_f4->sue_ALTITUDEHOLD_WAYPOINT, serial_udb_extra_f4->sue_RACING_MODE); -} - -/** - * @brief Send a serial_udb_extra_f4 message - * @param chan MAVLink channel to send the message - * - * @param sue_ROLL_STABILIZATION_AILERONS Serial UDB Extra Roll Stabilization with Ailerons Enabled - * @param sue_ROLL_STABILIZATION_RUDDER Serial UDB Extra Roll Stabilization with Rudder Enabled - * @param sue_PITCH_STABILIZATION Serial UDB Extra Pitch Stabilization Enabled - * @param sue_YAW_STABILIZATION_RUDDER Serial UDB Extra Yaw Stabilization using Rudder Enabled - * @param sue_YAW_STABILIZATION_AILERON Serial UDB Extra Yaw Stabilization using Ailerons Enabled - * @param sue_AILERON_NAVIGATION Serial UDB Extra Navigation with Ailerons Enabled - * @param sue_RUDDER_NAVIGATION Serial UDB Extra Navigation with Rudder Enabled - * @param sue_ALTITUDEHOLD_STABILIZED Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - * @param sue_ALTITUDEHOLD_WAYPOINT Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - * @param sue_RACING_MODE Serial UDB Extra Firmware racing mode enabled - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f4_send(mavlink_channel_t chan, uint8_t sue_ROLL_STABILIZATION_AILERONS, uint8_t sue_ROLL_STABILIZATION_RUDDER, uint8_t sue_PITCH_STABILIZATION, uint8_t sue_YAW_STABILIZATION_RUDDER, uint8_t sue_YAW_STABILIZATION_AILERON, uint8_t sue_AILERON_NAVIGATION, uint8_t sue_RUDDER_NAVIGATION, uint8_t sue_ALTITUDEHOLD_STABILIZED, uint8_t sue_ALTITUDEHOLD_WAYPOINT, uint8_t sue_RACING_MODE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN]; - _mav_put_uint8_t(buf, 0, sue_ROLL_STABILIZATION_AILERONS); - _mav_put_uint8_t(buf, 1, sue_ROLL_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 2, sue_PITCH_STABILIZATION); - _mav_put_uint8_t(buf, 3, sue_YAW_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 4, sue_YAW_STABILIZATION_AILERON); - _mav_put_uint8_t(buf, 5, sue_AILERON_NAVIGATION); - _mav_put_uint8_t(buf, 6, sue_RUDDER_NAVIGATION); - _mav_put_uint8_t(buf, 7, sue_ALTITUDEHOLD_STABILIZED); - _mav_put_uint8_t(buf, 8, sue_ALTITUDEHOLD_WAYPOINT); - _mav_put_uint8_t(buf, 9, sue_RACING_MODE); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#else - mavlink_serial_udb_extra_f4_t packet; - packet.sue_ROLL_STABILIZATION_AILERONS = sue_ROLL_STABILIZATION_AILERONS; - packet.sue_ROLL_STABILIZATION_RUDDER = sue_ROLL_STABILIZATION_RUDDER; - packet.sue_PITCH_STABILIZATION = sue_PITCH_STABILIZATION; - packet.sue_YAW_STABILIZATION_RUDDER = sue_YAW_STABILIZATION_RUDDER; - packet.sue_YAW_STABILIZATION_AILERON = sue_YAW_STABILIZATION_AILERON; - packet.sue_AILERON_NAVIGATION = sue_AILERON_NAVIGATION; - packet.sue_RUDDER_NAVIGATION = sue_RUDDER_NAVIGATION; - packet.sue_ALTITUDEHOLD_STABILIZED = sue_ALTITUDEHOLD_STABILIZED; - packet.sue_ALTITUDEHOLD_WAYPOINT = sue_ALTITUDEHOLD_WAYPOINT; - packet.sue_RACING_MODE = sue_RACING_MODE; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f4 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f4_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f4_t* serial_udb_extra_f4) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f4_send(chan, serial_udb_extra_f4->sue_ROLL_STABILIZATION_AILERONS, serial_udb_extra_f4->sue_ROLL_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_PITCH_STABILIZATION, serial_udb_extra_f4->sue_YAW_STABILIZATION_RUDDER, serial_udb_extra_f4->sue_YAW_STABILIZATION_AILERON, serial_udb_extra_f4->sue_AILERON_NAVIGATION, serial_udb_extra_f4->sue_RUDDER_NAVIGATION, serial_udb_extra_f4->sue_ALTITUDEHOLD_STABILIZED, serial_udb_extra_f4->sue_ALTITUDEHOLD_WAYPOINT, serial_udb_extra_f4->sue_RACING_MODE); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4, (const char *)serial_udb_extra_f4, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f4_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t sue_ROLL_STABILIZATION_AILERONS, uint8_t sue_ROLL_STABILIZATION_RUDDER, uint8_t sue_PITCH_STABILIZATION, uint8_t sue_YAW_STABILIZATION_RUDDER, uint8_t sue_YAW_STABILIZATION_AILERON, uint8_t sue_AILERON_NAVIGATION, uint8_t sue_RUDDER_NAVIGATION, uint8_t sue_ALTITUDEHOLD_STABILIZED, uint8_t sue_ALTITUDEHOLD_WAYPOINT, uint8_t sue_RACING_MODE) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, sue_ROLL_STABILIZATION_AILERONS); - _mav_put_uint8_t(buf, 1, sue_ROLL_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 2, sue_PITCH_STABILIZATION); - _mav_put_uint8_t(buf, 3, sue_YAW_STABILIZATION_RUDDER); - _mav_put_uint8_t(buf, 4, sue_YAW_STABILIZATION_AILERON); - _mav_put_uint8_t(buf, 5, sue_AILERON_NAVIGATION); - _mav_put_uint8_t(buf, 6, sue_RUDDER_NAVIGATION); - _mav_put_uint8_t(buf, 7, sue_ALTITUDEHOLD_STABILIZED); - _mav_put_uint8_t(buf, 8, sue_ALTITUDEHOLD_WAYPOINT); - _mav_put_uint8_t(buf, 9, sue_RACING_MODE); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#else - mavlink_serial_udb_extra_f4_t *packet = (mavlink_serial_udb_extra_f4_t *)msgbuf; - packet->sue_ROLL_STABILIZATION_AILERONS = sue_ROLL_STABILIZATION_AILERONS; - packet->sue_ROLL_STABILIZATION_RUDDER = sue_ROLL_STABILIZATION_RUDDER; - packet->sue_PITCH_STABILIZATION = sue_PITCH_STABILIZATION; - packet->sue_YAW_STABILIZATION_RUDDER = sue_YAW_STABILIZATION_RUDDER; - packet->sue_YAW_STABILIZATION_AILERON = sue_YAW_STABILIZATION_AILERON; - packet->sue_AILERON_NAVIGATION = sue_AILERON_NAVIGATION; - packet->sue_RUDDER_NAVIGATION = sue_RUDDER_NAVIGATION; - packet->sue_ALTITUDEHOLD_STABILIZED = sue_ALTITUDEHOLD_STABILIZED; - packet->sue_ALTITUDEHOLD_WAYPOINT = sue_ALTITUDEHOLD_WAYPOINT; - packet->sue_RACING_MODE = sue_RACING_MODE; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F4 UNPACKING - - -/** - * @brief Get field sue_ROLL_STABILIZATION_AILERONS from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Roll Stabilization with Ailerons Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_ROLL_STABILIZATION_AILERONS(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field sue_ROLL_STABILIZATION_RUDDER from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Roll Stabilization with Rudder Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_ROLL_STABILIZATION_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Get field sue_PITCH_STABILIZATION from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Pitch Stabilization Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_PITCH_STABILIZATION(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field sue_YAW_STABILIZATION_RUDDER from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Yaw Stabilization using Rudder Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_YAW_STABILIZATION_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field sue_YAW_STABILIZATION_AILERON from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Yaw Stabilization using Ailerons Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_YAW_STABILIZATION_AILERON(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field sue_AILERON_NAVIGATION from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Navigation with Ailerons Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_AILERON_NAVIGATION(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 5); -} - -/** - * @brief Get field sue_RUDDER_NAVIGATION from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Navigation with Rudder Enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_RUDDER_NAVIGATION(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Get field sue_ALTITUDEHOLD_STABILIZED from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_ALTITUDEHOLD_STABILIZED(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 7); -} - -/** - * @brief Get field sue_ALTITUDEHOLD_WAYPOINT from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_ALTITUDEHOLD_WAYPOINT(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 8); -} - -/** - * @brief Get field sue_RACING_MODE from serial_udb_extra_f4 message - * - * @return Serial UDB Extra Firmware racing mode enabled - */ -static inline uint8_t mavlink_msg_serial_udb_extra_f4_get_sue_RACING_MODE(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 9); -} - -/** - * @brief Decode a serial_udb_extra_f4 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f4 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f4_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f4_t* serial_udb_extra_f4) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f4->sue_ROLL_STABILIZATION_AILERONS = mavlink_msg_serial_udb_extra_f4_get_sue_ROLL_STABILIZATION_AILERONS(msg); - serial_udb_extra_f4->sue_ROLL_STABILIZATION_RUDDER = mavlink_msg_serial_udb_extra_f4_get_sue_ROLL_STABILIZATION_RUDDER(msg); - serial_udb_extra_f4->sue_PITCH_STABILIZATION = mavlink_msg_serial_udb_extra_f4_get_sue_PITCH_STABILIZATION(msg); - serial_udb_extra_f4->sue_YAW_STABILIZATION_RUDDER = mavlink_msg_serial_udb_extra_f4_get_sue_YAW_STABILIZATION_RUDDER(msg); - serial_udb_extra_f4->sue_YAW_STABILIZATION_AILERON = mavlink_msg_serial_udb_extra_f4_get_sue_YAW_STABILIZATION_AILERON(msg); - serial_udb_extra_f4->sue_AILERON_NAVIGATION = mavlink_msg_serial_udb_extra_f4_get_sue_AILERON_NAVIGATION(msg); - serial_udb_extra_f4->sue_RUDDER_NAVIGATION = mavlink_msg_serial_udb_extra_f4_get_sue_RUDDER_NAVIGATION(msg); - serial_udb_extra_f4->sue_ALTITUDEHOLD_STABILIZED = mavlink_msg_serial_udb_extra_f4_get_sue_ALTITUDEHOLD_STABILIZED(msg); - serial_udb_extra_f4->sue_ALTITUDEHOLD_WAYPOINT = mavlink_msg_serial_udb_extra_f4_get_sue_ALTITUDEHOLD_WAYPOINT(msg); - serial_udb_extra_f4->sue_RACING_MODE = mavlink_msg_serial_udb_extra_f4_get_sue_RACING_MODE(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN; - memset(serial_udb_extra_f4, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_LEN); - memcpy(serial_udb_extra_f4, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f5.h b/matrixpilot/mavlink_msg_serial_udb_extra_f5.h deleted file mode 100644 index a53bfbf66..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f5.h +++ /dev/null @@ -1,344 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F5 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5 173 - - -typedef struct __mavlink_serial_udb_extra_f5_t { - float sue_YAWKP_AILERON; /*< Serial UDB YAWKP_AILERON Gain for Proporional control of navigation*/ - float sue_YAWKD_AILERON; /*< Serial UDB YAWKD_AILERON Gain for Rate control of navigation*/ - float sue_ROLLKP; /*< Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization*/ - float sue_ROLLKD; /*< Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization*/ -} mavlink_serial_udb_extra_f5_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN 16 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN 16 -#define MAVLINK_MSG_ID_173_LEN 16 -#define MAVLINK_MSG_ID_173_MIN_LEN 16 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC 54 -#define MAVLINK_MSG_ID_173_CRC 54 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F5 { \ - 173, \ - "SERIAL_UDB_EXTRA_F5", \ - 4, \ - { { "sue_YAWKP_AILERON", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f5_t, sue_YAWKP_AILERON) }, \ - { "sue_YAWKD_AILERON", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f5_t, sue_YAWKD_AILERON) }, \ - { "sue_ROLLKP", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f5_t, sue_ROLLKP) }, \ - { "sue_ROLLKD", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f5_t, sue_ROLLKD) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F5 { \ - "SERIAL_UDB_EXTRA_F5", \ - 4, \ - { { "sue_YAWKP_AILERON", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f5_t, sue_YAWKP_AILERON) }, \ - { "sue_YAWKD_AILERON", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f5_t, sue_YAWKD_AILERON) }, \ - { "sue_ROLLKP", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f5_t, sue_ROLLKP) }, \ - { "sue_ROLLKD", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f5_t, sue_ROLLKD) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f5 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_YAWKP_AILERON Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - * @param sue_YAWKD_AILERON Serial UDB YAWKD_AILERON Gain for Rate control of navigation - * @param sue_ROLLKP Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - * @param sue_ROLLKD Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float sue_YAWKP_AILERON, float sue_YAWKD_AILERON, float sue_ROLLKP, float sue_ROLLKD) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_AILERON); - _mav_put_float(buf, 4, sue_YAWKD_AILERON); - _mav_put_float(buf, 8, sue_ROLLKP); - _mav_put_float(buf, 12, sue_ROLLKD); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#else - mavlink_serial_udb_extra_f5_t packet; - packet.sue_YAWKP_AILERON = sue_YAWKP_AILERON; - packet.sue_YAWKD_AILERON = sue_YAWKD_AILERON; - packet.sue_ROLLKP = sue_ROLLKP; - packet.sue_ROLLKD = sue_ROLLKD; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f5 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_YAWKP_AILERON Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - * @param sue_YAWKD_AILERON Serial UDB YAWKD_AILERON Gain for Rate control of navigation - * @param sue_ROLLKP Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - * @param sue_ROLLKD Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float sue_YAWKP_AILERON, float sue_YAWKD_AILERON, float sue_ROLLKP, float sue_ROLLKD) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_AILERON); - _mav_put_float(buf, 4, sue_YAWKD_AILERON); - _mav_put_float(buf, 8, sue_ROLLKP); - _mav_put_float(buf, 12, sue_ROLLKD); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#else - mavlink_serial_udb_extra_f5_t packet; - packet.sue_YAWKP_AILERON = sue_YAWKP_AILERON; - packet.sue_YAWKD_AILERON = sue_YAWKD_AILERON; - packet.sue_ROLLKP = sue_ROLLKP; - packet.sue_ROLLKD = sue_ROLLKD; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f5 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_YAWKP_AILERON Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - * @param sue_YAWKD_AILERON Serial UDB YAWKD_AILERON Gain for Rate control of navigation - * @param sue_ROLLKP Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - * @param sue_ROLLKD Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float sue_YAWKP_AILERON,float sue_YAWKD_AILERON,float sue_ROLLKP,float sue_ROLLKD) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_AILERON); - _mav_put_float(buf, 4, sue_YAWKD_AILERON); - _mav_put_float(buf, 8, sue_ROLLKP); - _mav_put_float(buf, 12, sue_ROLLKD); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#else - mavlink_serial_udb_extra_f5_t packet; - packet.sue_YAWKP_AILERON = sue_YAWKP_AILERON; - packet.sue_YAWKD_AILERON = sue_YAWKD_AILERON; - packet.sue_ROLLKP = sue_ROLLKP; - packet.sue_ROLLKD = sue_ROLLKD; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f5 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f5 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f5_t* serial_udb_extra_f5) -{ - return mavlink_msg_serial_udb_extra_f5_pack(system_id, component_id, msg, serial_udb_extra_f5->sue_YAWKP_AILERON, serial_udb_extra_f5->sue_YAWKD_AILERON, serial_udb_extra_f5->sue_ROLLKP, serial_udb_extra_f5->sue_ROLLKD); -} - -/** - * @brief Encode a serial_udb_extra_f5 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f5 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f5_t* serial_udb_extra_f5) -{ - return mavlink_msg_serial_udb_extra_f5_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f5->sue_YAWKP_AILERON, serial_udb_extra_f5->sue_YAWKD_AILERON, serial_udb_extra_f5->sue_ROLLKP, serial_udb_extra_f5->sue_ROLLKD); -} - -/** - * @brief Encode a serial_udb_extra_f5 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f5 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f5_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f5_t* serial_udb_extra_f5) -{ - return mavlink_msg_serial_udb_extra_f5_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f5->sue_YAWKP_AILERON, serial_udb_extra_f5->sue_YAWKD_AILERON, serial_udb_extra_f5->sue_ROLLKP, serial_udb_extra_f5->sue_ROLLKD); -} - -/** - * @brief Send a serial_udb_extra_f5 message - * @param chan MAVLink channel to send the message - * - * @param sue_YAWKP_AILERON Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - * @param sue_YAWKD_AILERON Serial UDB YAWKD_AILERON Gain for Rate control of navigation - * @param sue_ROLLKP Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - * @param sue_ROLLKD Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f5_send(mavlink_channel_t chan, float sue_YAWKP_AILERON, float sue_YAWKD_AILERON, float sue_ROLLKP, float sue_ROLLKD) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_AILERON); - _mav_put_float(buf, 4, sue_YAWKD_AILERON); - _mav_put_float(buf, 8, sue_ROLLKP); - _mav_put_float(buf, 12, sue_ROLLKD); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#else - mavlink_serial_udb_extra_f5_t packet; - packet.sue_YAWKP_AILERON = sue_YAWKP_AILERON; - packet.sue_YAWKD_AILERON = sue_YAWKD_AILERON; - packet.sue_ROLLKP = sue_ROLLKP; - packet.sue_ROLLKD = sue_ROLLKD; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f5 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f5_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f5_t* serial_udb_extra_f5) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f5_send(chan, serial_udb_extra_f5->sue_YAWKP_AILERON, serial_udb_extra_f5->sue_YAWKD_AILERON, serial_udb_extra_f5->sue_ROLLKP, serial_udb_extra_f5->sue_ROLLKD); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, (const char *)serial_udb_extra_f5, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f5_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float sue_YAWKP_AILERON, float sue_YAWKD_AILERON, float sue_ROLLKP, float sue_ROLLKD) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, sue_YAWKP_AILERON); - _mav_put_float(buf, 4, sue_YAWKD_AILERON); - _mav_put_float(buf, 8, sue_ROLLKP); - _mav_put_float(buf, 12, sue_ROLLKD); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#else - mavlink_serial_udb_extra_f5_t *packet = (mavlink_serial_udb_extra_f5_t *)msgbuf; - packet->sue_YAWKP_AILERON = sue_YAWKP_AILERON; - packet->sue_YAWKD_AILERON = sue_YAWKD_AILERON; - packet->sue_ROLLKP = sue_ROLLKP; - packet->sue_ROLLKD = sue_ROLLKD; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F5 UNPACKING - - -/** - * @brief Get field sue_YAWKP_AILERON from serial_udb_extra_f5 message - * - * @return Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - */ -static inline float mavlink_msg_serial_udb_extra_f5_get_sue_YAWKP_AILERON(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field sue_YAWKD_AILERON from serial_udb_extra_f5 message - * - * @return Serial UDB YAWKD_AILERON Gain for Rate control of navigation - */ -static inline float mavlink_msg_serial_udb_extra_f5_get_sue_YAWKD_AILERON(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field sue_ROLLKP from serial_udb_extra_f5 message - * - * @return Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - */ -static inline float mavlink_msg_serial_udb_extra_f5_get_sue_ROLLKP(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field sue_ROLLKD from serial_udb_extra_f5 message - * - * @return Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - */ -static inline float mavlink_msg_serial_udb_extra_f5_get_sue_ROLLKD(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Decode a serial_udb_extra_f5 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f5 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f5_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f5_t* serial_udb_extra_f5) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f5->sue_YAWKP_AILERON = mavlink_msg_serial_udb_extra_f5_get_sue_YAWKP_AILERON(msg); - serial_udb_extra_f5->sue_YAWKD_AILERON = mavlink_msg_serial_udb_extra_f5_get_sue_YAWKD_AILERON(msg); - serial_udb_extra_f5->sue_ROLLKP = mavlink_msg_serial_udb_extra_f5_get_sue_ROLLKP(msg); - serial_udb_extra_f5->sue_ROLLKD = mavlink_msg_serial_udb_extra_f5_get_sue_ROLLKD(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN; - memset(serial_udb_extra_f5, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_LEN); - memcpy(serial_udb_extra_f5, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f6.h b/matrixpilot/mavlink_msg_serial_udb_extra_f6.h deleted file mode 100644 index a8d3bc9cc..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f6.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F6 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6 174 - - -typedef struct __mavlink_serial_udb_extra_f6_t { - float sue_PITCHGAIN; /*< Serial UDB Extra PITCHGAIN Proportional Control*/ - float sue_PITCHKD; /*< Serial UDB Extra Pitch Rate Control*/ - float sue_RUDDER_ELEV_MIX; /*< Serial UDB Extra Rudder to Elevator Mix*/ - float sue_ROLL_ELEV_MIX; /*< Serial UDB Extra Roll to Elevator Mix*/ - float sue_ELEVATOR_BOOST; /*< Gain For Boosting Manual Elevator control When Plane Stabilized*/ -} mavlink_serial_udb_extra_f6_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN 20 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN 20 -#define MAVLINK_MSG_ID_174_LEN 20 -#define MAVLINK_MSG_ID_174_MIN_LEN 20 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC 54 -#define MAVLINK_MSG_ID_174_CRC 54 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F6 { \ - 174, \ - "SERIAL_UDB_EXTRA_F6", \ - 5, \ - { { "sue_PITCHGAIN", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f6_t, sue_PITCHGAIN) }, \ - { "sue_PITCHKD", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f6_t, sue_PITCHKD) }, \ - { "sue_RUDDER_ELEV_MIX", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f6_t, sue_RUDDER_ELEV_MIX) }, \ - { "sue_ROLL_ELEV_MIX", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f6_t, sue_ROLL_ELEV_MIX) }, \ - { "sue_ELEVATOR_BOOST", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f6_t, sue_ELEVATOR_BOOST) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F6 { \ - "SERIAL_UDB_EXTRA_F6", \ - 5, \ - { { "sue_PITCHGAIN", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f6_t, sue_PITCHGAIN) }, \ - { "sue_PITCHKD", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f6_t, sue_PITCHKD) }, \ - { "sue_RUDDER_ELEV_MIX", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f6_t, sue_RUDDER_ELEV_MIX) }, \ - { "sue_ROLL_ELEV_MIX", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f6_t, sue_ROLL_ELEV_MIX) }, \ - { "sue_ELEVATOR_BOOST", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f6_t, sue_ELEVATOR_BOOST) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f6 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_PITCHGAIN Serial UDB Extra PITCHGAIN Proportional Control - * @param sue_PITCHKD Serial UDB Extra Pitch Rate Control - * @param sue_RUDDER_ELEV_MIX Serial UDB Extra Rudder to Elevator Mix - * @param sue_ROLL_ELEV_MIX Serial UDB Extra Roll to Elevator Mix - * @param sue_ELEVATOR_BOOST Gain For Boosting Manual Elevator control When Plane Stabilized - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float sue_PITCHGAIN, float sue_PITCHKD, float sue_RUDDER_ELEV_MIX, float sue_ROLL_ELEV_MIX, float sue_ELEVATOR_BOOST) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN]; - _mav_put_float(buf, 0, sue_PITCHGAIN); - _mav_put_float(buf, 4, sue_PITCHKD); - _mav_put_float(buf, 8, sue_RUDDER_ELEV_MIX); - _mav_put_float(buf, 12, sue_ROLL_ELEV_MIX); - _mav_put_float(buf, 16, sue_ELEVATOR_BOOST); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#else - mavlink_serial_udb_extra_f6_t packet; - packet.sue_PITCHGAIN = sue_PITCHGAIN; - packet.sue_PITCHKD = sue_PITCHKD; - packet.sue_RUDDER_ELEV_MIX = sue_RUDDER_ELEV_MIX; - packet.sue_ROLL_ELEV_MIX = sue_ROLL_ELEV_MIX; - packet.sue_ELEVATOR_BOOST = sue_ELEVATOR_BOOST; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f6 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_PITCHGAIN Serial UDB Extra PITCHGAIN Proportional Control - * @param sue_PITCHKD Serial UDB Extra Pitch Rate Control - * @param sue_RUDDER_ELEV_MIX Serial UDB Extra Rudder to Elevator Mix - * @param sue_ROLL_ELEV_MIX Serial UDB Extra Roll to Elevator Mix - * @param sue_ELEVATOR_BOOST Gain For Boosting Manual Elevator control When Plane Stabilized - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float sue_PITCHGAIN, float sue_PITCHKD, float sue_RUDDER_ELEV_MIX, float sue_ROLL_ELEV_MIX, float sue_ELEVATOR_BOOST) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN]; - _mav_put_float(buf, 0, sue_PITCHGAIN); - _mav_put_float(buf, 4, sue_PITCHKD); - _mav_put_float(buf, 8, sue_RUDDER_ELEV_MIX); - _mav_put_float(buf, 12, sue_ROLL_ELEV_MIX); - _mav_put_float(buf, 16, sue_ELEVATOR_BOOST); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#else - mavlink_serial_udb_extra_f6_t packet; - packet.sue_PITCHGAIN = sue_PITCHGAIN; - packet.sue_PITCHKD = sue_PITCHKD; - packet.sue_RUDDER_ELEV_MIX = sue_RUDDER_ELEV_MIX; - packet.sue_ROLL_ELEV_MIX = sue_ROLL_ELEV_MIX; - packet.sue_ELEVATOR_BOOST = sue_ELEVATOR_BOOST; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f6 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_PITCHGAIN Serial UDB Extra PITCHGAIN Proportional Control - * @param sue_PITCHKD Serial UDB Extra Pitch Rate Control - * @param sue_RUDDER_ELEV_MIX Serial UDB Extra Rudder to Elevator Mix - * @param sue_ROLL_ELEV_MIX Serial UDB Extra Roll to Elevator Mix - * @param sue_ELEVATOR_BOOST Gain For Boosting Manual Elevator control When Plane Stabilized - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float sue_PITCHGAIN,float sue_PITCHKD,float sue_RUDDER_ELEV_MIX,float sue_ROLL_ELEV_MIX,float sue_ELEVATOR_BOOST) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN]; - _mav_put_float(buf, 0, sue_PITCHGAIN); - _mav_put_float(buf, 4, sue_PITCHKD); - _mav_put_float(buf, 8, sue_RUDDER_ELEV_MIX); - _mav_put_float(buf, 12, sue_ROLL_ELEV_MIX); - _mav_put_float(buf, 16, sue_ELEVATOR_BOOST); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#else - mavlink_serial_udb_extra_f6_t packet; - packet.sue_PITCHGAIN = sue_PITCHGAIN; - packet.sue_PITCHKD = sue_PITCHKD; - packet.sue_RUDDER_ELEV_MIX = sue_RUDDER_ELEV_MIX; - packet.sue_ROLL_ELEV_MIX = sue_ROLL_ELEV_MIX; - packet.sue_ELEVATOR_BOOST = sue_ELEVATOR_BOOST; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f6 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f6 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f6_t* serial_udb_extra_f6) -{ - return mavlink_msg_serial_udb_extra_f6_pack(system_id, component_id, msg, serial_udb_extra_f6->sue_PITCHGAIN, serial_udb_extra_f6->sue_PITCHKD, serial_udb_extra_f6->sue_RUDDER_ELEV_MIX, serial_udb_extra_f6->sue_ROLL_ELEV_MIX, serial_udb_extra_f6->sue_ELEVATOR_BOOST); -} - -/** - * @brief Encode a serial_udb_extra_f6 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f6 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f6_t* serial_udb_extra_f6) -{ - return mavlink_msg_serial_udb_extra_f6_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f6->sue_PITCHGAIN, serial_udb_extra_f6->sue_PITCHKD, serial_udb_extra_f6->sue_RUDDER_ELEV_MIX, serial_udb_extra_f6->sue_ROLL_ELEV_MIX, serial_udb_extra_f6->sue_ELEVATOR_BOOST); -} - -/** - * @brief Encode a serial_udb_extra_f6 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f6 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f6_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f6_t* serial_udb_extra_f6) -{ - return mavlink_msg_serial_udb_extra_f6_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f6->sue_PITCHGAIN, serial_udb_extra_f6->sue_PITCHKD, serial_udb_extra_f6->sue_RUDDER_ELEV_MIX, serial_udb_extra_f6->sue_ROLL_ELEV_MIX, serial_udb_extra_f6->sue_ELEVATOR_BOOST); -} - -/** - * @brief Send a serial_udb_extra_f6 message - * @param chan MAVLink channel to send the message - * - * @param sue_PITCHGAIN Serial UDB Extra PITCHGAIN Proportional Control - * @param sue_PITCHKD Serial UDB Extra Pitch Rate Control - * @param sue_RUDDER_ELEV_MIX Serial UDB Extra Rudder to Elevator Mix - * @param sue_ROLL_ELEV_MIX Serial UDB Extra Roll to Elevator Mix - * @param sue_ELEVATOR_BOOST Gain For Boosting Manual Elevator control When Plane Stabilized - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f6_send(mavlink_channel_t chan, float sue_PITCHGAIN, float sue_PITCHKD, float sue_RUDDER_ELEV_MIX, float sue_ROLL_ELEV_MIX, float sue_ELEVATOR_BOOST) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN]; - _mav_put_float(buf, 0, sue_PITCHGAIN); - _mav_put_float(buf, 4, sue_PITCHKD); - _mav_put_float(buf, 8, sue_RUDDER_ELEV_MIX); - _mav_put_float(buf, 12, sue_ROLL_ELEV_MIX); - _mav_put_float(buf, 16, sue_ELEVATOR_BOOST); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#else - mavlink_serial_udb_extra_f6_t packet; - packet.sue_PITCHGAIN = sue_PITCHGAIN; - packet.sue_PITCHKD = sue_PITCHKD; - packet.sue_RUDDER_ELEV_MIX = sue_RUDDER_ELEV_MIX; - packet.sue_ROLL_ELEV_MIX = sue_ROLL_ELEV_MIX; - packet.sue_ELEVATOR_BOOST = sue_ELEVATOR_BOOST; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f6 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f6_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f6_t* serial_udb_extra_f6) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f6_send(chan, serial_udb_extra_f6->sue_PITCHGAIN, serial_udb_extra_f6->sue_PITCHKD, serial_udb_extra_f6->sue_RUDDER_ELEV_MIX, serial_udb_extra_f6->sue_ROLL_ELEV_MIX, serial_udb_extra_f6->sue_ELEVATOR_BOOST); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6, (const char *)serial_udb_extra_f6, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f6_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float sue_PITCHGAIN, float sue_PITCHKD, float sue_RUDDER_ELEV_MIX, float sue_ROLL_ELEV_MIX, float sue_ELEVATOR_BOOST) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, sue_PITCHGAIN); - _mav_put_float(buf, 4, sue_PITCHKD); - _mav_put_float(buf, 8, sue_RUDDER_ELEV_MIX); - _mav_put_float(buf, 12, sue_ROLL_ELEV_MIX); - _mav_put_float(buf, 16, sue_ELEVATOR_BOOST); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#else - mavlink_serial_udb_extra_f6_t *packet = (mavlink_serial_udb_extra_f6_t *)msgbuf; - packet->sue_PITCHGAIN = sue_PITCHGAIN; - packet->sue_PITCHKD = sue_PITCHKD; - packet->sue_RUDDER_ELEV_MIX = sue_RUDDER_ELEV_MIX; - packet->sue_ROLL_ELEV_MIX = sue_ROLL_ELEV_MIX; - packet->sue_ELEVATOR_BOOST = sue_ELEVATOR_BOOST; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F6 UNPACKING - - -/** - * @brief Get field sue_PITCHGAIN from serial_udb_extra_f6 message - * - * @return Serial UDB Extra PITCHGAIN Proportional Control - */ -static inline float mavlink_msg_serial_udb_extra_f6_get_sue_PITCHGAIN(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field sue_PITCHKD from serial_udb_extra_f6 message - * - * @return Serial UDB Extra Pitch Rate Control - */ -static inline float mavlink_msg_serial_udb_extra_f6_get_sue_PITCHKD(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field sue_RUDDER_ELEV_MIX from serial_udb_extra_f6 message - * - * @return Serial UDB Extra Rudder to Elevator Mix - */ -static inline float mavlink_msg_serial_udb_extra_f6_get_sue_RUDDER_ELEV_MIX(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field sue_ROLL_ELEV_MIX from serial_udb_extra_f6 message - * - * @return Serial UDB Extra Roll to Elevator Mix - */ -static inline float mavlink_msg_serial_udb_extra_f6_get_sue_ROLL_ELEV_MIX(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field sue_ELEVATOR_BOOST from serial_udb_extra_f6 message - * - * @return Gain For Boosting Manual Elevator control When Plane Stabilized - */ -static inline float mavlink_msg_serial_udb_extra_f6_get_sue_ELEVATOR_BOOST(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Decode a serial_udb_extra_f6 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f6 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f6_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f6_t* serial_udb_extra_f6) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f6->sue_PITCHGAIN = mavlink_msg_serial_udb_extra_f6_get_sue_PITCHGAIN(msg); - serial_udb_extra_f6->sue_PITCHKD = mavlink_msg_serial_udb_extra_f6_get_sue_PITCHKD(msg); - serial_udb_extra_f6->sue_RUDDER_ELEV_MIX = mavlink_msg_serial_udb_extra_f6_get_sue_RUDDER_ELEV_MIX(msg); - serial_udb_extra_f6->sue_ROLL_ELEV_MIX = mavlink_msg_serial_udb_extra_f6_get_sue_ROLL_ELEV_MIX(msg); - serial_udb_extra_f6->sue_ELEVATOR_BOOST = mavlink_msg_serial_udb_extra_f6_get_sue_ELEVATOR_BOOST(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN; - memset(serial_udb_extra_f6, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_LEN); - memcpy(serial_udb_extra_f6, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f7.h b/matrixpilot/mavlink_msg_serial_udb_extra_f7.h deleted file mode 100644 index fd5e654a3..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f7.h +++ /dev/null @@ -1,400 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F7 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7 175 - - -typedef struct __mavlink_serial_udb_extra_f7_t { - float sue_YAWKP_RUDDER; /*< Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation*/ - float sue_YAWKD_RUDDER; /*< Serial UDB YAWKD_RUDDER Gain for Rate control of navigation*/ - float sue_ROLLKP_RUDDER; /*< Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization*/ - float sue_ROLLKD_RUDDER; /*< Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization*/ - float sue_RUDDER_BOOST; /*< SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized*/ - float sue_RTL_PITCH_DOWN; /*< Serial UDB Extra Return To Landing - Angle to Pitch Plane Down*/ -} mavlink_serial_udb_extra_f7_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN 24 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN 24 -#define MAVLINK_MSG_ID_175_LEN 24 -#define MAVLINK_MSG_ID_175_MIN_LEN 24 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC 171 -#define MAVLINK_MSG_ID_175_CRC 171 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F7 { \ - 175, \ - "SERIAL_UDB_EXTRA_F7", \ - 6, \ - { { "sue_YAWKP_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f7_t, sue_YAWKP_RUDDER) }, \ - { "sue_YAWKD_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f7_t, sue_YAWKD_RUDDER) }, \ - { "sue_ROLLKP_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f7_t, sue_ROLLKP_RUDDER) }, \ - { "sue_ROLLKD_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f7_t, sue_ROLLKD_RUDDER) }, \ - { "sue_RUDDER_BOOST", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f7_t, sue_RUDDER_BOOST) }, \ - { "sue_RTL_PITCH_DOWN", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_serial_udb_extra_f7_t, sue_RTL_PITCH_DOWN) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F7 { \ - "SERIAL_UDB_EXTRA_F7", \ - 6, \ - { { "sue_YAWKP_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f7_t, sue_YAWKP_RUDDER) }, \ - { "sue_YAWKD_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f7_t, sue_YAWKD_RUDDER) }, \ - { "sue_ROLLKP_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f7_t, sue_ROLLKP_RUDDER) }, \ - { "sue_ROLLKD_RUDDER", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f7_t, sue_ROLLKD_RUDDER) }, \ - { "sue_RUDDER_BOOST", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f7_t, sue_RUDDER_BOOST) }, \ - { "sue_RTL_PITCH_DOWN", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_serial_udb_extra_f7_t, sue_RTL_PITCH_DOWN) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f7 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_YAWKP_RUDDER Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - * @param sue_YAWKD_RUDDER Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - * @param sue_ROLLKP_RUDDER Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - * @param sue_ROLLKD_RUDDER Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - * @param sue_RUDDER_BOOST SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - * @param sue_RTL_PITCH_DOWN Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float sue_YAWKP_RUDDER, float sue_YAWKD_RUDDER, float sue_ROLLKP_RUDDER, float sue_ROLLKD_RUDDER, float sue_RUDDER_BOOST, float sue_RTL_PITCH_DOWN) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_RUDDER); - _mav_put_float(buf, 4, sue_YAWKD_RUDDER); - _mav_put_float(buf, 8, sue_ROLLKP_RUDDER); - _mav_put_float(buf, 12, sue_ROLLKD_RUDDER); - _mav_put_float(buf, 16, sue_RUDDER_BOOST); - _mav_put_float(buf, 20, sue_RTL_PITCH_DOWN); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#else - mavlink_serial_udb_extra_f7_t packet; - packet.sue_YAWKP_RUDDER = sue_YAWKP_RUDDER; - packet.sue_YAWKD_RUDDER = sue_YAWKD_RUDDER; - packet.sue_ROLLKP_RUDDER = sue_ROLLKP_RUDDER; - packet.sue_ROLLKD_RUDDER = sue_ROLLKD_RUDDER; - packet.sue_RUDDER_BOOST = sue_RUDDER_BOOST; - packet.sue_RTL_PITCH_DOWN = sue_RTL_PITCH_DOWN; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f7 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_YAWKP_RUDDER Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - * @param sue_YAWKD_RUDDER Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - * @param sue_ROLLKP_RUDDER Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - * @param sue_ROLLKD_RUDDER Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - * @param sue_RUDDER_BOOST SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - * @param sue_RTL_PITCH_DOWN Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float sue_YAWKP_RUDDER, float sue_YAWKD_RUDDER, float sue_ROLLKP_RUDDER, float sue_ROLLKD_RUDDER, float sue_RUDDER_BOOST, float sue_RTL_PITCH_DOWN) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_RUDDER); - _mav_put_float(buf, 4, sue_YAWKD_RUDDER); - _mav_put_float(buf, 8, sue_ROLLKP_RUDDER); - _mav_put_float(buf, 12, sue_ROLLKD_RUDDER); - _mav_put_float(buf, 16, sue_RUDDER_BOOST); - _mav_put_float(buf, 20, sue_RTL_PITCH_DOWN); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#else - mavlink_serial_udb_extra_f7_t packet; - packet.sue_YAWKP_RUDDER = sue_YAWKP_RUDDER; - packet.sue_YAWKD_RUDDER = sue_YAWKD_RUDDER; - packet.sue_ROLLKP_RUDDER = sue_ROLLKP_RUDDER; - packet.sue_ROLLKD_RUDDER = sue_ROLLKD_RUDDER; - packet.sue_RUDDER_BOOST = sue_RUDDER_BOOST; - packet.sue_RTL_PITCH_DOWN = sue_RTL_PITCH_DOWN; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f7 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_YAWKP_RUDDER Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - * @param sue_YAWKD_RUDDER Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - * @param sue_ROLLKP_RUDDER Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - * @param sue_ROLLKD_RUDDER Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - * @param sue_RUDDER_BOOST SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - * @param sue_RTL_PITCH_DOWN Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float sue_YAWKP_RUDDER,float sue_YAWKD_RUDDER,float sue_ROLLKP_RUDDER,float sue_ROLLKD_RUDDER,float sue_RUDDER_BOOST,float sue_RTL_PITCH_DOWN) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_RUDDER); - _mav_put_float(buf, 4, sue_YAWKD_RUDDER); - _mav_put_float(buf, 8, sue_ROLLKP_RUDDER); - _mav_put_float(buf, 12, sue_ROLLKD_RUDDER); - _mav_put_float(buf, 16, sue_RUDDER_BOOST); - _mav_put_float(buf, 20, sue_RTL_PITCH_DOWN); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#else - mavlink_serial_udb_extra_f7_t packet; - packet.sue_YAWKP_RUDDER = sue_YAWKP_RUDDER; - packet.sue_YAWKD_RUDDER = sue_YAWKD_RUDDER; - packet.sue_ROLLKP_RUDDER = sue_ROLLKP_RUDDER; - packet.sue_ROLLKD_RUDDER = sue_ROLLKD_RUDDER; - packet.sue_RUDDER_BOOST = sue_RUDDER_BOOST; - packet.sue_RTL_PITCH_DOWN = sue_RTL_PITCH_DOWN; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f7 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f7 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f7_t* serial_udb_extra_f7) -{ - return mavlink_msg_serial_udb_extra_f7_pack(system_id, component_id, msg, serial_udb_extra_f7->sue_YAWKP_RUDDER, serial_udb_extra_f7->sue_YAWKD_RUDDER, serial_udb_extra_f7->sue_ROLLKP_RUDDER, serial_udb_extra_f7->sue_ROLLKD_RUDDER, serial_udb_extra_f7->sue_RUDDER_BOOST, serial_udb_extra_f7->sue_RTL_PITCH_DOWN); -} - -/** - * @brief Encode a serial_udb_extra_f7 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f7 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f7_t* serial_udb_extra_f7) -{ - return mavlink_msg_serial_udb_extra_f7_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f7->sue_YAWKP_RUDDER, serial_udb_extra_f7->sue_YAWKD_RUDDER, serial_udb_extra_f7->sue_ROLLKP_RUDDER, serial_udb_extra_f7->sue_ROLLKD_RUDDER, serial_udb_extra_f7->sue_RUDDER_BOOST, serial_udb_extra_f7->sue_RTL_PITCH_DOWN); -} - -/** - * @brief Encode a serial_udb_extra_f7 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f7 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f7_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f7_t* serial_udb_extra_f7) -{ - return mavlink_msg_serial_udb_extra_f7_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f7->sue_YAWKP_RUDDER, serial_udb_extra_f7->sue_YAWKD_RUDDER, serial_udb_extra_f7->sue_ROLLKP_RUDDER, serial_udb_extra_f7->sue_ROLLKD_RUDDER, serial_udb_extra_f7->sue_RUDDER_BOOST, serial_udb_extra_f7->sue_RTL_PITCH_DOWN); -} - -/** - * @brief Send a serial_udb_extra_f7 message - * @param chan MAVLink channel to send the message - * - * @param sue_YAWKP_RUDDER Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - * @param sue_YAWKD_RUDDER Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - * @param sue_ROLLKP_RUDDER Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - * @param sue_ROLLKD_RUDDER Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - * @param sue_RUDDER_BOOST SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - * @param sue_RTL_PITCH_DOWN Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f7_send(mavlink_channel_t chan, float sue_YAWKP_RUDDER, float sue_YAWKD_RUDDER, float sue_ROLLKP_RUDDER, float sue_ROLLKD_RUDDER, float sue_RUDDER_BOOST, float sue_RTL_PITCH_DOWN) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN]; - _mav_put_float(buf, 0, sue_YAWKP_RUDDER); - _mav_put_float(buf, 4, sue_YAWKD_RUDDER); - _mav_put_float(buf, 8, sue_ROLLKP_RUDDER); - _mav_put_float(buf, 12, sue_ROLLKD_RUDDER); - _mav_put_float(buf, 16, sue_RUDDER_BOOST); - _mav_put_float(buf, 20, sue_RTL_PITCH_DOWN); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#else - mavlink_serial_udb_extra_f7_t packet; - packet.sue_YAWKP_RUDDER = sue_YAWKP_RUDDER; - packet.sue_YAWKD_RUDDER = sue_YAWKD_RUDDER; - packet.sue_ROLLKP_RUDDER = sue_ROLLKP_RUDDER; - packet.sue_ROLLKD_RUDDER = sue_ROLLKD_RUDDER; - packet.sue_RUDDER_BOOST = sue_RUDDER_BOOST; - packet.sue_RTL_PITCH_DOWN = sue_RTL_PITCH_DOWN; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f7 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f7_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f7_t* serial_udb_extra_f7) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f7_send(chan, serial_udb_extra_f7->sue_YAWKP_RUDDER, serial_udb_extra_f7->sue_YAWKD_RUDDER, serial_udb_extra_f7->sue_ROLLKP_RUDDER, serial_udb_extra_f7->sue_ROLLKD_RUDDER, serial_udb_extra_f7->sue_RUDDER_BOOST, serial_udb_extra_f7->sue_RTL_PITCH_DOWN); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7, (const char *)serial_udb_extra_f7, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f7_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float sue_YAWKP_RUDDER, float sue_YAWKD_RUDDER, float sue_ROLLKP_RUDDER, float sue_ROLLKD_RUDDER, float sue_RUDDER_BOOST, float sue_RTL_PITCH_DOWN) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, sue_YAWKP_RUDDER); - _mav_put_float(buf, 4, sue_YAWKD_RUDDER); - _mav_put_float(buf, 8, sue_ROLLKP_RUDDER); - _mav_put_float(buf, 12, sue_ROLLKD_RUDDER); - _mav_put_float(buf, 16, sue_RUDDER_BOOST); - _mav_put_float(buf, 20, sue_RTL_PITCH_DOWN); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#else - mavlink_serial_udb_extra_f7_t *packet = (mavlink_serial_udb_extra_f7_t *)msgbuf; - packet->sue_YAWKP_RUDDER = sue_YAWKP_RUDDER; - packet->sue_YAWKD_RUDDER = sue_YAWKD_RUDDER; - packet->sue_ROLLKP_RUDDER = sue_ROLLKP_RUDDER; - packet->sue_ROLLKD_RUDDER = sue_ROLLKD_RUDDER; - packet->sue_RUDDER_BOOST = sue_RUDDER_BOOST; - packet->sue_RTL_PITCH_DOWN = sue_RTL_PITCH_DOWN; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F7 UNPACKING - - -/** - * @brief Get field sue_YAWKP_RUDDER from serial_udb_extra_f7 message - * - * @return Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_YAWKP_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field sue_YAWKD_RUDDER from serial_udb_extra_f7 message - * - * @return Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_YAWKD_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field sue_ROLLKP_RUDDER from serial_udb_extra_f7 message - * - * @return Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_ROLLKP_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field sue_ROLLKD_RUDDER from serial_udb_extra_f7 message - * - * @return Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_ROLLKD_RUDDER(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field sue_RUDDER_BOOST from serial_udb_extra_f7 message - * - * @return SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_RUDDER_BOOST(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field sue_RTL_PITCH_DOWN from serial_udb_extra_f7 message - * - * @return Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - */ -static inline float mavlink_msg_serial_udb_extra_f7_get_sue_RTL_PITCH_DOWN(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 20); -} - -/** - * @brief Decode a serial_udb_extra_f7 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f7 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f7_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f7_t* serial_udb_extra_f7) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f7->sue_YAWKP_RUDDER = mavlink_msg_serial_udb_extra_f7_get_sue_YAWKP_RUDDER(msg); - serial_udb_extra_f7->sue_YAWKD_RUDDER = mavlink_msg_serial_udb_extra_f7_get_sue_YAWKD_RUDDER(msg); - serial_udb_extra_f7->sue_ROLLKP_RUDDER = mavlink_msg_serial_udb_extra_f7_get_sue_ROLLKP_RUDDER(msg); - serial_udb_extra_f7->sue_ROLLKD_RUDDER = mavlink_msg_serial_udb_extra_f7_get_sue_ROLLKD_RUDDER(msg); - serial_udb_extra_f7->sue_RUDDER_BOOST = mavlink_msg_serial_udb_extra_f7_get_sue_RUDDER_BOOST(msg); - serial_udb_extra_f7->sue_RTL_PITCH_DOWN = mavlink_msg_serial_udb_extra_f7_get_sue_RTL_PITCH_DOWN(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN; - memset(serial_udb_extra_f7, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_LEN); - memcpy(serial_udb_extra_f7, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/mavlink_msg_serial_udb_extra_f8.h b/matrixpilot/mavlink_msg_serial_udb_extra_f8.h deleted file mode 100644 index 9372c7787..000000000 --- a/matrixpilot/mavlink_msg_serial_udb_extra_f8.h +++ /dev/null @@ -1,428 +0,0 @@ -#pragma once -// MESSAGE SERIAL_UDB_EXTRA_F8 PACKING - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8 176 - - -typedef struct __mavlink_serial_udb_extra_f8_t { - float sue_HEIGHT_TARGET_MAX; /*< Serial UDB Extra HEIGHT_TARGET_MAX*/ - float sue_HEIGHT_TARGET_MIN; /*< Serial UDB Extra HEIGHT_TARGET_MIN*/ - float sue_ALT_HOLD_THROTTLE_MIN; /*< Serial UDB Extra ALT_HOLD_THROTTLE_MIN*/ - float sue_ALT_HOLD_THROTTLE_MAX; /*< Serial UDB Extra ALT_HOLD_THROTTLE_MAX*/ - float sue_ALT_HOLD_PITCH_MIN; /*< Serial UDB Extra ALT_HOLD_PITCH_MIN*/ - float sue_ALT_HOLD_PITCH_MAX; /*< Serial UDB Extra ALT_HOLD_PITCH_MAX*/ - float sue_ALT_HOLD_PITCH_HIGH; /*< Serial UDB Extra ALT_HOLD_PITCH_HIGH*/ -} mavlink_serial_udb_extra_f8_t; - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN 28 -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN 28 -#define MAVLINK_MSG_ID_176_LEN 28 -#define MAVLINK_MSG_ID_176_MIN_LEN 28 - -#define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC 142 -#define MAVLINK_MSG_ID_176_CRC 142 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F8 { \ - 176, \ - "SERIAL_UDB_EXTRA_F8", \ - 7, \ - { { "sue_HEIGHT_TARGET_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f8_t, sue_HEIGHT_TARGET_MAX) }, \ - { "sue_HEIGHT_TARGET_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f8_t, sue_HEIGHT_TARGET_MIN) }, \ - { "sue_ALT_HOLD_THROTTLE_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_THROTTLE_MIN) }, \ - { "sue_ALT_HOLD_THROTTLE_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_THROTTLE_MAX) }, \ - { "sue_ALT_HOLD_PITCH_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_MIN) }, \ - { "sue_ALT_HOLD_PITCH_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_MAX) }, \ - { "sue_ALT_HOLD_PITCH_HIGH", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_HIGH) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F8 { \ - "SERIAL_UDB_EXTRA_F8", \ - 7, \ - { { "sue_HEIGHT_TARGET_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_serial_udb_extra_f8_t, sue_HEIGHT_TARGET_MAX) }, \ - { "sue_HEIGHT_TARGET_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_serial_udb_extra_f8_t, sue_HEIGHT_TARGET_MIN) }, \ - { "sue_ALT_HOLD_THROTTLE_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_THROTTLE_MIN) }, \ - { "sue_ALT_HOLD_THROTTLE_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_THROTTLE_MAX) }, \ - { "sue_ALT_HOLD_PITCH_MIN", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_MIN) }, \ - { "sue_ALT_HOLD_PITCH_MAX", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_MAX) }, \ - { "sue_ALT_HOLD_PITCH_HIGH", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_serial_udb_extra_f8_t, sue_ALT_HOLD_PITCH_HIGH) }, \ - } \ -} -#endif - -/** - * @brief Pack a serial_udb_extra_f8 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param sue_HEIGHT_TARGET_MAX Serial UDB Extra HEIGHT_TARGET_MAX - * @param sue_HEIGHT_TARGET_MIN Serial UDB Extra HEIGHT_TARGET_MIN - * @param sue_ALT_HOLD_THROTTLE_MIN Serial UDB Extra ALT_HOLD_THROTTLE_MIN - * @param sue_ALT_HOLD_THROTTLE_MAX Serial UDB Extra ALT_HOLD_THROTTLE_MAX - * @param sue_ALT_HOLD_PITCH_MIN Serial UDB Extra ALT_HOLD_PITCH_MIN - * @param sue_ALT_HOLD_PITCH_MAX Serial UDB Extra ALT_HOLD_PITCH_MAX - * @param sue_ALT_HOLD_PITCH_HIGH Serial UDB Extra ALT_HOLD_PITCH_HIGH - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - float sue_HEIGHT_TARGET_MAX, float sue_HEIGHT_TARGET_MIN, float sue_ALT_HOLD_THROTTLE_MIN, float sue_ALT_HOLD_THROTTLE_MAX, float sue_ALT_HOLD_PITCH_MIN, float sue_ALT_HOLD_PITCH_MAX, float sue_ALT_HOLD_PITCH_HIGH) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN]; - _mav_put_float(buf, 0, sue_HEIGHT_TARGET_MAX); - _mav_put_float(buf, 4, sue_HEIGHT_TARGET_MIN); - _mav_put_float(buf, 8, sue_ALT_HOLD_THROTTLE_MIN); - _mav_put_float(buf, 12, sue_ALT_HOLD_THROTTLE_MAX); - _mav_put_float(buf, 16, sue_ALT_HOLD_PITCH_MIN); - _mav_put_float(buf, 20, sue_ALT_HOLD_PITCH_MAX); - _mav_put_float(buf, 24, sue_ALT_HOLD_PITCH_HIGH); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#else - mavlink_serial_udb_extra_f8_t packet; - packet.sue_HEIGHT_TARGET_MAX = sue_HEIGHT_TARGET_MAX; - packet.sue_HEIGHT_TARGET_MIN = sue_HEIGHT_TARGET_MIN; - packet.sue_ALT_HOLD_THROTTLE_MIN = sue_ALT_HOLD_THROTTLE_MIN; - packet.sue_ALT_HOLD_THROTTLE_MAX = sue_ALT_HOLD_THROTTLE_MAX; - packet.sue_ALT_HOLD_PITCH_MIN = sue_ALT_HOLD_PITCH_MIN; - packet.sue_ALT_HOLD_PITCH_MAX = sue_ALT_HOLD_PITCH_MAX; - packet.sue_ALT_HOLD_PITCH_HIGH = sue_ALT_HOLD_PITCH_HIGH; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -} - -/** - * @brief Pack a serial_udb_extra_f8 message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param sue_HEIGHT_TARGET_MAX Serial UDB Extra HEIGHT_TARGET_MAX - * @param sue_HEIGHT_TARGET_MIN Serial UDB Extra HEIGHT_TARGET_MIN - * @param sue_ALT_HOLD_THROTTLE_MIN Serial UDB Extra ALT_HOLD_THROTTLE_MIN - * @param sue_ALT_HOLD_THROTTLE_MAX Serial UDB Extra ALT_HOLD_THROTTLE_MAX - * @param sue_ALT_HOLD_PITCH_MIN Serial UDB Extra ALT_HOLD_PITCH_MIN - * @param sue_ALT_HOLD_PITCH_MAX Serial UDB Extra ALT_HOLD_PITCH_MAX - * @param sue_ALT_HOLD_PITCH_HIGH Serial UDB Extra ALT_HOLD_PITCH_HIGH - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - float sue_HEIGHT_TARGET_MAX, float sue_HEIGHT_TARGET_MIN, float sue_ALT_HOLD_THROTTLE_MIN, float sue_ALT_HOLD_THROTTLE_MAX, float sue_ALT_HOLD_PITCH_MIN, float sue_ALT_HOLD_PITCH_MAX, float sue_ALT_HOLD_PITCH_HIGH) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN]; - _mav_put_float(buf, 0, sue_HEIGHT_TARGET_MAX); - _mav_put_float(buf, 4, sue_HEIGHT_TARGET_MIN); - _mav_put_float(buf, 8, sue_ALT_HOLD_THROTTLE_MIN); - _mav_put_float(buf, 12, sue_ALT_HOLD_THROTTLE_MAX); - _mav_put_float(buf, 16, sue_ALT_HOLD_PITCH_MIN); - _mav_put_float(buf, 20, sue_ALT_HOLD_PITCH_MAX); - _mav_put_float(buf, 24, sue_ALT_HOLD_PITCH_HIGH); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#else - mavlink_serial_udb_extra_f8_t packet; - packet.sue_HEIGHT_TARGET_MAX = sue_HEIGHT_TARGET_MAX; - packet.sue_HEIGHT_TARGET_MIN = sue_HEIGHT_TARGET_MIN; - packet.sue_ALT_HOLD_THROTTLE_MIN = sue_ALT_HOLD_THROTTLE_MIN; - packet.sue_ALT_HOLD_THROTTLE_MAX = sue_ALT_HOLD_THROTTLE_MAX; - packet.sue_ALT_HOLD_PITCH_MIN = sue_ALT_HOLD_PITCH_MIN; - packet.sue_ALT_HOLD_PITCH_MAX = sue_ALT_HOLD_PITCH_MAX; - packet.sue_ALT_HOLD_PITCH_HIGH = sue_ALT_HOLD_PITCH_HIGH; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#endif -} - -/** - * @brief Pack a serial_udb_extra_f8 message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param sue_HEIGHT_TARGET_MAX Serial UDB Extra HEIGHT_TARGET_MAX - * @param sue_HEIGHT_TARGET_MIN Serial UDB Extra HEIGHT_TARGET_MIN - * @param sue_ALT_HOLD_THROTTLE_MIN Serial UDB Extra ALT_HOLD_THROTTLE_MIN - * @param sue_ALT_HOLD_THROTTLE_MAX Serial UDB Extra ALT_HOLD_THROTTLE_MAX - * @param sue_ALT_HOLD_PITCH_MIN Serial UDB Extra ALT_HOLD_PITCH_MIN - * @param sue_ALT_HOLD_PITCH_MAX Serial UDB Extra ALT_HOLD_PITCH_MAX - * @param sue_ALT_HOLD_PITCH_HIGH Serial UDB Extra ALT_HOLD_PITCH_HIGH - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - float sue_HEIGHT_TARGET_MAX,float sue_HEIGHT_TARGET_MIN,float sue_ALT_HOLD_THROTTLE_MIN,float sue_ALT_HOLD_THROTTLE_MAX,float sue_ALT_HOLD_PITCH_MIN,float sue_ALT_HOLD_PITCH_MAX,float sue_ALT_HOLD_PITCH_HIGH) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN]; - _mav_put_float(buf, 0, sue_HEIGHT_TARGET_MAX); - _mav_put_float(buf, 4, sue_HEIGHT_TARGET_MIN); - _mav_put_float(buf, 8, sue_ALT_HOLD_THROTTLE_MIN); - _mav_put_float(buf, 12, sue_ALT_HOLD_THROTTLE_MAX); - _mav_put_float(buf, 16, sue_ALT_HOLD_PITCH_MIN); - _mav_put_float(buf, 20, sue_ALT_HOLD_PITCH_MAX); - _mav_put_float(buf, 24, sue_ALT_HOLD_PITCH_HIGH); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#else - mavlink_serial_udb_extra_f8_t packet; - packet.sue_HEIGHT_TARGET_MAX = sue_HEIGHT_TARGET_MAX; - packet.sue_HEIGHT_TARGET_MIN = sue_HEIGHT_TARGET_MIN; - packet.sue_ALT_HOLD_THROTTLE_MIN = sue_ALT_HOLD_THROTTLE_MIN; - packet.sue_ALT_HOLD_THROTTLE_MAX = sue_ALT_HOLD_THROTTLE_MAX; - packet.sue_ALT_HOLD_PITCH_MIN = sue_ALT_HOLD_PITCH_MIN; - packet.sue_ALT_HOLD_PITCH_MAX = sue_ALT_HOLD_PITCH_MAX; - packet.sue_ALT_HOLD_PITCH_HIGH = sue_ALT_HOLD_PITCH_HIGH; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -} - -/** - * @brief Encode a serial_udb_extra_f8 struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f8 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f8_t* serial_udb_extra_f8) -{ - return mavlink_msg_serial_udb_extra_f8_pack(system_id, component_id, msg, serial_udb_extra_f8->sue_HEIGHT_TARGET_MAX, serial_udb_extra_f8->sue_HEIGHT_TARGET_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MIN, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_HIGH); -} - -/** - * @brief Encode a serial_udb_extra_f8 struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f8 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f8_t* serial_udb_extra_f8) -{ - return mavlink_msg_serial_udb_extra_f8_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f8->sue_HEIGHT_TARGET_MAX, serial_udb_extra_f8->sue_HEIGHT_TARGET_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MIN, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_HIGH); -} - -/** - * @brief Encode a serial_udb_extra_f8 struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param serial_udb_extra_f8 C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_serial_udb_extra_f8_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_serial_udb_extra_f8_t* serial_udb_extra_f8) -{ - return mavlink_msg_serial_udb_extra_f8_pack_status(system_id, component_id, _status, msg, serial_udb_extra_f8->sue_HEIGHT_TARGET_MAX, serial_udb_extra_f8->sue_HEIGHT_TARGET_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MIN, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_HIGH); -} - -/** - * @brief Send a serial_udb_extra_f8 message - * @param chan MAVLink channel to send the message - * - * @param sue_HEIGHT_TARGET_MAX Serial UDB Extra HEIGHT_TARGET_MAX - * @param sue_HEIGHT_TARGET_MIN Serial UDB Extra HEIGHT_TARGET_MIN - * @param sue_ALT_HOLD_THROTTLE_MIN Serial UDB Extra ALT_HOLD_THROTTLE_MIN - * @param sue_ALT_HOLD_THROTTLE_MAX Serial UDB Extra ALT_HOLD_THROTTLE_MAX - * @param sue_ALT_HOLD_PITCH_MIN Serial UDB Extra ALT_HOLD_PITCH_MIN - * @param sue_ALT_HOLD_PITCH_MAX Serial UDB Extra ALT_HOLD_PITCH_MAX - * @param sue_ALT_HOLD_PITCH_HIGH Serial UDB Extra ALT_HOLD_PITCH_HIGH - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_serial_udb_extra_f8_send(mavlink_channel_t chan, float sue_HEIGHT_TARGET_MAX, float sue_HEIGHT_TARGET_MIN, float sue_ALT_HOLD_THROTTLE_MIN, float sue_ALT_HOLD_THROTTLE_MAX, float sue_ALT_HOLD_PITCH_MIN, float sue_ALT_HOLD_PITCH_MAX, float sue_ALT_HOLD_PITCH_HIGH) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN]; - _mav_put_float(buf, 0, sue_HEIGHT_TARGET_MAX); - _mav_put_float(buf, 4, sue_HEIGHT_TARGET_MIN); - _mav_put_float(buf, 8, sue_ALT_HOLD_THROTTLE_MIN); - _mav_put_float(buf, 12, sue_ALT_HOLD_THROTTLE_MAX); - _mav_put_float(buf, 16, sue_ALT_HOLD_PITCH_MIN); - _mav_put_float(buf, 20, sue_ALT_HOLD_PITCH_MAX); - _mav_put_float(buf, 24, sue_ALT_HOLD_PITCH_HIGH); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#else - mavlink_serial_udb_extra_f8_t packet; - packet.sue_HEIGHT_TARGET_MAX = sue_HEIGHT_TARGET_MAX; - packet.sue_HEIGHT_TARGET_MIN = sue_HEIGHT_TARGET_MIN; - packet.sue_ALT_HOLD_THROTTLE_MIN = sue_ALT_HOLD_THROTTLE_MIN; - packet.sue_ALT_HOLD_THROTTLE_MAX = sue_ALT_HOLD_THROTTLE_MAX; - packet.sue_ALT_HOLD_PITCH_MIN = sue_ALT_HOLD_PITCH_MIN; - packet.sue_ALT_HOLD_PITCH_MAX = sue_ALT_HOLD_PITCH_MAX; - packet.sue_ALT_HOLD_PITCH_HIGH = sue_ALT_HOLD_PITCH_HIGH; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#endif -} - -/** - * @brief Send a serial_udb_extra_f8 message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_serial_udb_extra_f8_send_struct(mavlink_channel_t chan, const mavlink_serial_udb_extra_f8_t* serial_udb_extra_f8) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_serial_udb_extra_f8_send(chan, serial_udb_extra_f8->sue_HEIGHT_TARGET_MAX, serial_udb_extra_f8->sue_HEIGHT_TARGET_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MIN, serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MIN, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MAX, serial_udb_extra_f8->sue_ALT_HOLD_PITCH_HIGH); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8, (const char *)serial_udb_extra_f8, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_serial_udb_extra_f8_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float sue_HEIGHT_TARGET_MAX, float sue_HEIGHT_TARGET_MIN, float sue_ALT_HOLD_THROTTLE_MIN, float sue_ALT_HOLD_THROTTLE_MAX, float sue_ALT_HOLD_PITCH_MIN, float sue_ALT_HOLD_PITCH_MAX, float sue_ALT_HOLD_PITCH_HIGH) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_float(buf, 0, sue_HEIGHT_TARGET_MAX); - _mav_put_float(buf, 4, sue_HEIGHT_TARGET_MIN); - _mav_put_float(buf, 8, sue_ALT_HOLD_THROTTLE_MIN); - _mav_put_float(buf, 12, sue_ALT_HOLD_THROTTLE_MAX); - _mav_put_float(buf, 16, sue_ALT_HOLD_PITCH_MIN); - _mav_put_float(buf, 20, sue_ALT_HOLD_PITCH_MAX); - _mav_put_float(buf, 24, sue_ALT_HOLD_PITCH_HIGH); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#else - mavlink_serial_udb_extra_f8_t *packet = (mavlink_serial_udb_extra_f8_t *)msgbuf; - packet->sue_HEIGHT_TARGET_MAX = sue_HEIGHT_TARGET_MAX; - packet->sue_HEIGHT_TARGET_MIN = sue_HEIGHT_TARGET_MIN; - packet->sue_ALT_HOLD_THROTTLE_MIN = sue_ALT_HOLD_THROTTLE_MIN; - packet->sue_ALT_HOLD_THROTTLE_MAX = sue_ALT_HOLD_THROTTLE_MAX; - packet->sue_ALT_HOLD_PITCH_MIN = sue_ALT_HOLD_PITCH_MIN; - packet->sue_ALT_HOLD_PITCH_MAX = sue_ALT_HOLD_PITCH_MAX; - packet->sue_ALT_HOLD_PITCH_HIGH = sue_ALT_HOLD_PITCH_HIGH; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SERIAL_UDB_EXTRA_F8 UNPACKING - - -/** - * @brief Get field sue_HEIGHT_TARGET_MAX from serial_udb_extra_f8 message - * - * @return Serial UDB Extra HEIGHT_TARGET_MAX - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_HEIGHT_TARGET_MAX(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 0); -} - -/** - * @brief Get field sue_HEIGHT_TARGET_MIN from serial_udb_extra_f8 message - * - * @return Serial UDB Extra HEIGHT_TARGET_MIN - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_HEIGHT_TARGET_MIN(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 4); -} - -/** - * @brief Get field sue_ALT_HOLD_THROTTLE_MIN from serial_udb_extra_f8 message - * - * @return Serial UDB Extra ALT_HOLD_THROTTLE_MIN - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_THROTTLE_MIN(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 8); -} - -/** - * @brief Get field sue_ALT_HOLD_THROTTLE_MAX from serial_udb_extra_f8 message - * - * @return Serial UDB Extra ALT_HOLD_THROTTLE_MAX - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_THROTTLE_MAX(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 12); -} - -/** - * @brief Get field sue_ALT_HOLD_PITCH_MIN from serial_udb_extra_f8 message - * - * @return Serial UDB Extra ALT_HOLD_PITCH_MIN - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_MIN(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 16); -} - -/** - * @brief Get field sue_ALT_HOLD_PITCH_MAX from serial_udb_extra_f8 message - * - * @return Serial UDB Extra ALT_HOLD_PITCH_MAX - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_MAX(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 20); -} - -/** - * @brief Get field sue_ALT_HOLD_PITCH_HIGH from serial_udb_extra_f8 message - * - * @return Serial UDB Extra ALT_HOLD_PITCH_HIGH - */ -static inline float mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_HIGH(const mavlink_message_t* msg) -{ - return _MAV_RETURN_float(msg, 24); -} - -/** - * @brief Decode a serial_udb_extra_f8 message into a struct - * - * @param msg The message to decode - * @param serial_udb_extra_f8 C-struct to decode the message contents into - */ -static inline void mavlink_msg_serial_udb_extra_f8_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f8_t* serial_udb_extra_f8) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - serial_udb_extra_f8->sue_HEIGHT_TARGET_MAX = mavlink_msg_serial_udb_extra_f8_get_sue_HEIGHT_TARGET_MAX(msg); - serial_udb_extra_f8->sue_HEIGHT_TARGET_MIN = mavlink_msg_serial_udb_extra_f8_get_sue_HEIGHT_TARGET_MIN(msg); - serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MIN = mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_THROTTLE_MIN(msg); - serial_udb_extra_f8->sue_ALT_HOLD_THROTTLE_MAX = mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_THROTTLE_MAX(msg); - serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MIN = mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_MIN(msg); - serial_udb_extra_f8->sue_ALT_HOLD_PITCH_MAX = mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_MAX(msg); - serial_udb_extra_f8->sue_ALT_HOLD_PITCH_HIGH = mavlink_msg_serial_udb_extra_f8_get_sue_ALT_HOLD_PITCH_HIGH(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN? msg->len : MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN; - memset(serial_udb_extra_f8, 0, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_LEN); - memcpy(serial_udb_extra_f8, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/matrixpilot/testsuite.h b/matrixpilot/testsuite.h deleted file mode 100644 index bb3534da5..000000000 --- a/matrixpilot/testsuite.h +++ /dev/null @@ -1,1845 +0,0 @@ -/** @file - * @brief MAVLink comm protocol testsuite generated from matrixpilot.xml - * @see https://mavlink.io/en/ - */ -#pragma once -#ifndef MATRIXPILOT_TESTSUITE_H -#define MATRIXPILOT_TESTSUITE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MAVLINK_TEST_ALL -#define MAVLINK_TEST_ALL -static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); -static void mavlink_test_matrixpilot(uint8_t, uint8_t, mavlink_message_t *last_msg); - -static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ - mavlink_test_common(system_id, component_id, last_msg); - mavlink_test_matrixpilot(system_id, component_id, last_msg); -} -#endif - -#include "../common/testsuite.h" - - -static void mavlink_test_flexifunction_set(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_SET >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_set_t packet_in = { - 5,72 - }; - mavlink_flexifunction_set_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_SET_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_set_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_set_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_set_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component ); - mavlink_msg_flexifunction_set_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_set_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component ); - mavlink_msg_flexifunction_set_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_read_req_t packet_in = { - 17235,17339,17,84 - }; - mavlink_flexifunction_read_req_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.read_req_type = packet_in.read_req_type; - packet1.data_index = packet_in.data_index; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_READ_REQ_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_read_req_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_read_req_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_read_req_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.read_req_type , packet1.data_index ); - mavlink_msg_flexifunction_read_req_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_read_req_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.read_req_type , packet1.data_index ); - mavlink_msg_flexifunction_read_req_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_buffer_function_t packet_in = { - 17235,17339,17443,17547,29,96,{ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 } - }; - mavlink_flexifunction_buffer_function_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.func_index = packet_in.func_index; - packet1.func_count = packet_in.func_count; - packet1.data_address = packet_in.data_address; - packet1.data_size = packet_in.data_size; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - mav_array_memcpy(packet1.data, packet_in.data, sizeof(int8_t)*48); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.func_count , packet1.data_address , packet1.data_size , packet1.data ); - mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.func_count , packet1.data_address , packet1.data_size , packet1.data ); - mavlink_msg_flexifunction_buffer_function_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_buffer_function_ack_t packet_in = { - 17235,17339,17,84 - }; - mavlink_flexifunction_buffer_function_ack_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.func_index = packet_in.func_index; - packet1.result = packet_in.result; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_ACK_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_ack_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.result ); - mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_buffer_function_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.func_index , packet1.result ); - mavlink_msg_flexifunction_buffer_function_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_directory_t packet_in = { - 5,72,139,206,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131 } - }; - mavlink_flexifunction_directory_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.directory_type = packet_in.directory_type; - packet1.start_index = packet_in.start_index; - packet1.count = packet_in.count; - - mav_array_memcpy(packet1.directory_data, packet_in.directory_data, sizeof(int8_t)*48); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_directory_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.directory_data ); - mavlink_msg_flexifunction_directory_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.directory_data ); - mavlink_msg_flexifunction_directory_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_directory_ack_t packet_in = { - 17235,139,206,17,84,151 - }; - mavlink_flexifunction_directory_ack_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.result = packet_in.result; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.directory_type = packet_in.directory_type; - packet1.start_index = packet_in.start_index; - packet1.count = packet_in.count; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_DIRECTORY_ACK_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_ack_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_ack_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.result ); - mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_directory_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.directory_type , packet1.start_index , packet1.count , packet1.result ); - mavlink_msg_flexifunction_directory_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_command_t packet_in = { - 5,72,139 - }; - mavlink_flexifunction_command_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - packet1.command_type = packet_in.command_type; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_command_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.command_type ); - mavlink_msg_flexifunction_command_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.command_type ); - mavlink_msg_flexifunction_command_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_flexifunction_command_ack_t packet_in = { - 17235,17339 - }; - mavlink_flexifunction_command_ack_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.command_type = packet_in.command_type; - packet1.result = packet_in.result; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_ack_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_ack_pack(system_id, component_id, &msg , packet1.command_type , packet1.result ); - mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_flexifunction_command_ack_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.command_type , packet1.result ); - mavlink_msg_flexifunction_command_ack_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f2_a_t packet_in = { - 963497464,963497672,963497880,963498088,18067,18171,18275,18379,18483,18587,18691,18795,18899,19003,19107,19211,19315,19419,19523,19627,19731,19835,19939,20043,20147,20251,185 - }; - mavlink_serial_udb_extra_f2_a_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_time = packet_in.sue_time; - packet1.sue_latitude = packet_in.sue_latitude; - packet1.sue_longitude = packet_in.sue_longitude; - packet1.sue_altitude = packet_in.sue_altitude; - packet1.sue_waypoint_index = packet_in.sue_waypoint_index; - packet1.sue_rmat0 = packet_in.sue_rmat0; - packet1.sue_rmat1 = packet_in.sue_rmat1; - packet1.sue_rmat2 = packet_in.sue_rmat2; - packet1.sue_rmat3 = packet_in.sue_rmat3; - packet1.sue_rmat4 = packet_in.sue_rmat4; - packet1.sue_rmat5 = packet_in.sue_rmat5; - packet1.sue_rmat6 = packet_in.sue_rmat6; - packet1.sue_rmat7 = packet_in.sue_rmat7; - packet1.sue_rmat8 = packet_in.sue_rmat8; - packet1.sue_cog = packet_in.sue_cog; - packet1.sue_sog = packet_in.sue_sog; - packet1.sue_cpu_load = packet_in.sue_cpu_load; - packet1.sue_air_speed_3DIMU = packet_in.sue_air_speed_3DIMU; - packet1.sue_estimated_wind_0 = packet_in.sue_estimated_wind_0; - packet1.sue_estimated_wind_1 = packet_in.sue_estimated_wind_1; - packet1.sue_estimated_wind_2 = packet_in.sue_estimated_wind_2; - packet1.sue_magFieldEarth0 = packet_in.sue_magFieldEarth0; - packet1.sue_magFieldEarth1 = packet_in.sue_magFieldEarth1; - packet1.sue_magFieldEarth2 = packet_in.sue_magFieldEarth2; - packet1.sue_svs = packet_in.sue_svs; - packet1.sue_hdop = packet_in.sue_hdop; - packet1.sue_status = packet_in.sue_status; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_A_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_a_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_a_pack(system_id, component_id, &msg , packet1.sue_time , packet1.sue_status , packet1.sue_latitude , packet1.sue_longitude , packet1.sue_altitude , packet1.sue_waypoint_index , packet1.sue_rmat0 , packet1.sue_rmat1 , packet1.sue_rmat2 , packet1.sue_rmat3 , packet1.sue_rmat4 , packet1.sue_rmat5 , packet1.sue_rmat6 , packet1.sue_rmat7 , packet1.sue_rmat8 , packet1.sue_cog , packet1.sue_sog , packet1.sue_cpu_load , packet1.sue_air_speed_3DIMU , packet1.sue_estimated_wind_0 , packet1.sue_estimated_wind_1 , packet1.sue_estimated_wind_2 , packet1.sue_magFieldEarth0 , packet1.sue_magFieldEarth1 , packet1.sue_magFieldEarth2 , packet1.sue_svs , packet1.sue_hdop ); - mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_a_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_time , packet1.sue_status , packet1.sue_latitude , packet1.sue_longitude , packet1.sue_altitude , packet1.sue_waypoint_index , packet1.sue_rmat0 , packet1.sue_rmat1 , packet1.sue_rmat2 , packet1.sue_rmat3 , packet1.sue_rmat4 , packet1.sue_rmat5 , packet1.sue_rmat6 , packet1.sue_rmat7 , packet1.sue_rmat8 , packet1.sue_cog , packet1.sue_sog , packet1.sue_cpu_load , packet1.sue_air_speed_3DIMU , packet1.sue_estimated_wind_0 , packet1.sue_estimated_wind_1 , packet1.sue_estimated_wind_2 , packet1.sue_magFieldEarth0 , packet1.sue_magFieldEarth1 , packet1.sue_magFieldEarth2 , packet1.sue_svs , packet1.sue_hdop ); - mavlink_msg_serial_udb_extra_f2_a_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f2_b_t packet_in = { - 963497464,963497672,963497880,963498088,18067,18171,18275,18379,18483,18587,18691,18795,18899,19003,19107,19211,19315,19419,19523,19627,19731,19835,19939,20043,20147,20251,20355,20459,20563,20667,20771,20875,20979,21083,21187,21291,21395,21499,21603,21707,21811,21915,22019,22123,22227,22331,22435,22539,22643,22747 - }; - mavlink_serial_udb_extra_f2_b_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_time = packet_in.sue_time; - packet1.sue_flags = packet_in.sue_flags; - packet1.sue_barom_press = packet_in.sue_barom_press; - packet1.sue_barom_alt = packet_in.sue_barom_alt; - packet1.sue_pwm_input_1 = packet_in.sue_pwm_input_1; - packet1.sue_pwm_input_2 = packet_in.sue_pwm_input_2; - packet1.sue_pwm_input_3 = packet_in.sue_pwm_input_3; - packet1.sue_pwm_input_4 = packet_in.sue_pwm_input_4; - packet1.sue_pwm_input_5 = packet_in.sue_pwm_input_5; - packet1.sue_pwm_input_6 = packet_in.sue_pwm_input_6; - packet1.sue_pwm_input_7 = packet_in.sue_pwm_input_7; - packet1.sue_pwm_input_8 = packet_in.sue_pwm_input_8; - packet1.sue_pwm_input_9 = packet_in.sue_pwm_input_9; - packet1.sue_pwm_input_10 = packet_in.sue_pwm_input_10; - packet1.sue_pwm_input_11 = packet_in.sue_pwm_input_11; - packet1.sue_pwm_input_12 = packet_in.sue_pwm_input_12; - packet1.sue_pwm_output_1 = packet_in.sue_pwm_output_1; - packet1.sue_pwm_output_2 = packet_in.sue_pwm_output_2; - packet1.sue_pwm_output_3 = packet_in.sue_pwm_output_3; - packet1.sue_pwm_output_4 = packet_in.sue_pwm_output_4; - packet1.sue_pwm_output_5 = packet_in.sue_pwm_output_5; - packet1.sue_pwm_output_6 = packet_in.sue_pwm_output_6; - packet1.sue_pwm_output_7 = packet_in.sue_pwm_output_7; - packet1.sue_pwm_output_8 = packet_in.sue_pwm_output_8; - packet1.sue_pwm_output_9 = packet_in.sue_pwm_output_9; - packet1.sue_pwm_output_10 = packet_in.sue_pwm_output_10; - packet1.sue_pwm_output_11 = packet_in.sue_pwm_output_11; - packet1.sue_pwm_output_12 = packet_in.sue_pwm_output_12; - packet1.sue_imu_location_x = packet_in.sue_imu_location_x; - packet1.sue_imu_location_y = packet_in.sue_imu_location_y; - packet1.sue_imu_location_z = packet_in.sue_imu_location_z; - packet1.sue_location_error_earth_x = packet_in.sue_location_error_earth_x; - packet1.sue_location_error_earth_y = packet_in.sue_location_error_earth_y; - packet1.sue_location_error_earth_z = packet_in.sue_location_error_earth_z; - packet1.sue_osc_fails = packet_in.sue_osc_fails; - packet1.sue_imu_velocity_x = packet_in.sue_imu_velocity_x; - packet1.sue_imu_velocity_y = packet_in.sue_imu_velocity_y; - packet1.sue_imu_velocity_z = packet_in.sue_imu_velocity_z; - packet1.sue_waypoint_goal_x = packet_in.sue_waypoint_goal_x; - packet1.sue_waypoint_goal_y = packet_in.sue_waypoint_goal_y; - packet1.sue_waypoint_goal_z = packet_in.sue_waypoint_goal_z; - packet1.sue_aero_x = packet_in.sue_aero_x; - packet1.sue_aero_y = packet_in.sue_aero_y; - packet1.sue_aero_z = packet_in.sue_aero_z; - packet1.sue_barom_temp = packet_in.sue_barom_temp; - packet1.sue_bat_volt = packet_in.sue_bat_volt; - packet1.sue_bat_amp = packet_in.sue_bat_amp; - packet1.sue_bat_amp_hours = packet_in.sue_bat_amp_hours; - packet1.sue_desired_height = packet_in.sue_desired_height; - packet1.sue_memory_stack_free = packet_in.sue_memory_stack_free; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F2_B_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_b_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_b_pack(system_id, component_id, &msg , packet1.sue_time , packet1.sue_pwm_input_1 , packet1.sue_pwm_input_2 , packet1.sue_pwm_input_3 , packet1.sue_pwm_input_4 , packet1.sue_pwm_input_5 , packet1.sue_pwm_input_6 , packet1.sue_pwm_input_7 , packet1.sue_pwm_input_8 , packet1.sue_pwm_input_9 , packet1.sue_pwm_input_10 , packet1.sue_pwm_input_11 , packet1.sue_pwm_input_12 , packet1.sue_pwm_output_1 , packet1.sue_pwm_output_2 , packet1.sue_pwm_output_3 , packet1.sue_pwm_output_4 , packet1.sue_pwm_output_5 , packet1.sue_pwm_output_6 , packet1.sue_pwm_output_7 , packet1.sue_pwm_output_8 , packet1.sue_pwm_output_9 , packet1.sue_pwm_output_10 , packet1.sue_pwm_output_11 , packet1.sue_pwm_output_12 , packet1.sue_imu_location_x , packet1.sue_imu_location_y , packet1.sue_imu_location_z , packet1.sue_location_error_earth_x , packet1.sue_location_error_earth_y , packet1.sue_location_error_earth_z , packet1.sue_flags , packet1.sue_osc_fails , packet1.sue_imu_velocity_x , packet1.sue_imu_velocity_y , packet1.sue_imu_velocity_z , packet1.sue_waypoint_goal_x , packet1.sue_waypoint_goal_y , packet1.sue_waypoint_goal_z , packet1.sue_aero_x , packet1.sue_aero_y , packet1.sue_aero_z , packet1.sue_barom_temp , packet1.sue_barom_press , packet1.sue_barom_alt , packet1.sue_bat_volt , packet1.sue_bat_amp , packet1.sue_bat_amp_hours , packet1.sue_desired_height , packet1.sue_memory_stack_free ); - mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f2_b_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_time , packet1.sue_pwm_input_1 , packet1.sue_pwm_input_2 , packet1.sue_pwm_input_3 , packet1.sue_pwm_input_4 , packet1.sue_pwm_input_5 , packet1.sue_pwm_input_6 , packet1.sue_pwm_input_7 , packet1.sue_pwm_input_8 , packet1.sue_pwm_input_9 , packet1.sue_pwm_input_10 , packet1.sue_pwm_input_11 , packet1.sue_pwm_input_12 , packet1.sue_pwm_output_1 , packet1.sue_pwm_output_2 , packet1.sue_pwm_output_3 , packet1.sue_pwm_output_4 , packet1.sue_pwm_output_5 , packet1.sue_pwm_output_6 , packet1.sue_pwm_output_7 , packet1.sue_pwm_output_8 , packet1.sue_pwm_output_9 , packet1.sue_pwm_output_10 , packet1.sue_pwm_output_11 , packet1.sue_pwm_output_12 , packet1.sue_imu_location_x , packet1.sue_imu_location_y , packet1.sue_imu_location_z , packet1.sue_location_error_earth_x , packet1.sue_location_error_earth_y , packet1.sue_location_error_earth_z , packet1.sue_flags , packet1.sue_osc_fails , packet1.sue_imu_velocity_x , packet1.sue_imu_velocity_y , packet1.sue_imu_velocity_z , packet1.sue_waypoint_goal_x , packet1.sue_waypoint_goal_y , packet1.sue_waypoint_goal_z , packet1.sue_aero_x , packet1.sue_aero_y , packet1.sue_aero_z , packet1.sue_barom_temp , packet1.sue_barom_press , packet1.sue_barom_alt , packet1.sue_bat_volt , packet1.sue_bat_amp , packet1.sue_bat_amp_hours , packet1.sue_desired_height , packet1.sue_memory_stack_free ); - mavlink_msg_serial_udb_extra_f2_b_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f4_t packet_in = { - 5,72,139,206,17,84,151,218,29,96 - }; - mavlink_serial_udb_extra_f4_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_ROLL_STABILIZATION_AILERONS = packet_in.sue_ROLL_STABILIZATION_AILERONS; - packet1.sue_ROLL_STABILIZATION_RUDDER = packet_in.sue_ROLL_STABILIZATION_RUDDER; - packet1.sue_PITCH_STABILIZATION = packet_in.sue_PITCH_STABILIZATION; - packet1.sue_YAW_STABILIZATION_RUDDER = packet_in.sue_YAW_STABILIZATION_RUDDER; - packet1.sue_YAW_STABILIZATION_AILERON = packet_in.sue_YAW_STABILIZATION_AILERON; - packet1.sue_AILERON_NAVIGATION = packet_in.sue_AILERON_NAVIGATION; - packet1.sue_RUDDER_NAVIGATION = packet_in.sue_RUDDER_NAVIGATION; - packet1.sue_ALTITUDEHOLD_STABILIZED = packet_in.sue_ALTITUDEHOLD_STABILIZED; - packet1.sue_ALTITUDEHOLD_WAYPOINT = packet_in.sue_ALTITUDEHOLD_WAYPOINT; - packet1.sue_RACING_MODE = packet_in.sue_RACING_MODE; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F4_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f4_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f4_pack(system_id, component_id, &msg , packet1.sue_ROLL_STABILIZATION_AILERONS , packet1.sue_ROLL_STABILIZATION_RUDDER , packet1.sue_PITCH_STABILIZATION , packet1.sue_YAW_STABILIZATION_RUDDER , packet1.sue_YAW_STABILIZATION_AILERON , packet1.sue_AILERON_NAVIGATION , packet1.sue_RUDDER_NAVIGATION , packet1.sue_ALTITUDEHOLD_STABILIZED , packet1.sue_ALTITUDEHOLD_WAYPOINT , packet1.sue_RACING_MODE ); - mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f4_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ROLL_STABILIZATION_AILERONS , packet1.sue_ROLL_STABILIZATION_RUDDER , packet1.sue_PITCH_STABILIZATION , packet1.sue_YAW_STABILIZATION_RUDDER , packet1.sue_YAW_STABILIZATION_AILERON , packet1.sue_AILERON_NAVIGATION , packet1.sue_RUDDER_NAVIGATION , packet1.sue_ALTITUDEHOLD_STABILIZED , packet1.sue_ALTITUDEHOLD_WAYPOINT , packet1.sue_RACING_MODE ); - mavlink_msg_serial_udb_extra_f4_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f5_t packet_in = { - 17.0,45.0,73.0,101.0 - }; - mavlink_serial_udb_extra_f5_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_YAWKP_AILERON = packet_in.sue_YAWKP_AILERON; - packet1.sue_YAWKD_AILERON = packet_in.sue_YAWKD_AILERON; - packet1.sue_ROLLKP = packet_in.sue_ROLLKP; - packet1.sue_ROLLKD = packet_in.sue_ROLLKD; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F5_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f5_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f5_pack(system_id, component_id, &msg , packet1.sue_YAWKP_AILERON , packet1.sue_YAWKD_AILERON , packet1.sue_ROLLKP , packet1.sue_ROLLKD ); - mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f5_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_YAWKP_AILERON , packet1.sue_YAWKD_AILERON , packet1.sue_ROLLKP , packet1.sue_ROLLKD ); - mavlink_msg_serial_udb_extra_f5_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f6_t packet_in = { - 17.0,45.0,73.0,101.0,129.0 - }; - mavlink_serial_udb_extra_f6_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_PITCHGAIN = packet_in.sue_PITCHGAIN; - packet1.sue_PITCHKD = packet_in.sue_PITCHKD; - packet1.sue_RUDDER_ELEV_MIX = packet_in.sue_RUDDER_ELEV_MIX; - packet1.sue_ROLL_ELEV_MIX = packet_in.sue_ROLL_ELEV_MIX; - packet1.sue_ELEVATOR_BOOST = packet_in.sue_ELEVATOR_BOOST; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F6_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f6_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f6_pack(system_id, component_id, &msg , packet1.sue_PITCHGAIN , packet1.sue_PITCHKD , packet1.sue_RUDDER_ELEV_MIX , packet1.sue_ROLL_ELEV_MIX , packet1.sue_ELEVATOR_BOOST ); - mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f6_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_PITCHGAIN , packet1.sue_PITCHKD , packet1.sue_RUDDER_ELEV_MIX , packet1.sue_ROLL_ELEV_MIX , packet1.sue_ELEVATOR_BOOST ); - mavlink_msg_serial_udb_extra_f6_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f7_t packet_in = { - 17.0,45.0,73.0,101.0,129.0,157.0 - }; - mavlink_serial_udb_extra_f7_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_YAWKP_RUDDER = packet_in.sue_YAWKP_RUDDER; - packet1.sue_YAWKD_RUDDER = packet_in.sue_YAWKD_RUDDER; - packet1.sue_ROLLKP_RUDDER = packet_in.sue_ROLLKP_RUDDER; - packet1.sue_ROLLKD_RUDDER = packet_in.sue_ROLLKD_RUDDER; - packet1.sue_RUDDER_BOOST = packet_in.sue_RUDDER_BOOST; - packet1.sue_RTL_PITCH_DOWN = packet_in.sue_RTL_PITCH_DOWN; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F7_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f7_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f7_pack(system_id, component_id, &msg , packet1.sue_YAWKP_RUDDER , packet1.sue_YAWKD_RUDDER , packet1.sue_ROLLKP_RUDDER , packet1.sue_ROLLKD_RUDDER , packet1.sue_RUDDER_BOOST , packet1.sue_RTL_PITCH_DOWN ); - mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f7_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_YAWKP_RUDDER , packet1.sue_YAWKD_RUDDER , packet1.sue_ROLLKP_RUDDER , packet1.sue_ROLLKD_RUDDER , packet1.sue_RUDDER_BOOST , packet1.sue_RTL_PITCH_DOWN ); - mavlink_msg_serial_udb_extra_f7_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f8_t packet_in = { - 17.0,45.0,73.0,101.0,129.0,157.0,185.0 - }; - mavlink_serial_udb_extra_f8_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_HEIGHT_TARGET_MAX = packet_in.sue_HEIGHT_TARGET_MAX; - packet1.sue_HEIGHT_TARGET_MIN = packet_in.sue_HEIGHT_TARGET_MIN; - packet1.sue_ALT_HOLD_THROTTLE_MIN = packet_in.sue_ALT_HOLD_THROTTLE_MIN; - packet1.sue_ALT_HOLD_THROTTLE_MAX = packet_in.sue_ALT_HOLD_THROTTLE_MAX; - packet1.sue_ALT_HOLD_PITCH_MIN = packet_in.sue_ALT_HOLD_PITCH_MIN; - packet1.sue_ALT_HOLD_PITCH_MAX = packet_in.sue_ALT_HOLD_PITCH_MAX; - packet1.sue_ALT_HOLD_PITCH_HIGH = packet_in.sue_ALT_HOLD_PITCH_HIGH; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F8_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f8_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f8_pack(system_id, component_id, &msg , packet1.sue_HEIGHT_TARGET_MAX , packet1.sue_HEIGHT_TARGET_MIN , packet1.sue_ALT_HOLD_THROTTLE_MIN , packet1.sue_ALT_HOLD_THROTTLE_MAX , packet1.sue_ALT_HOLD_PITCH_MIN , packet1.sue_ALT_HOLD_PITCH_MAX , packet1.sue_ALT_HOLD_PITCH_HIGH ); - mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f8_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_HEIGHT_TARGET_MAX , packet1.sue_HEIGHT_TARGET_MIN , packet1.sue_ALT_HOLD_THROTTLE_MIN , packet1.sue_ALT_HOLD_THROTTLE_MAX , packet1.sue_ALT_HOLD_PITCH_MIN , packet1.sue_ALT_HOLD_PITCH_MAX , packet1.sue_ALT_HOLD_PITCH_HIGH ); - mavlink_msg_serial_udb_extra_f8_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f13_t packet_in = { - 963497464,963497672,963497880,17859 - }; - mavlink_serial_udb_extra_f13_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_lat_origin = packet_in.sue_lat_origin; - packet1.sue_lon_origin = packet_in.sue_lon_origin; - packet1.sue_alt_origin = packet_in.sue_alt_origin; - packet1.sue_week_no = packet_in.sue_week_no; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F13_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f13_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f13_pack(system_id, component_id, &msg , packet1.sue_week_no , packet1.sue_lat_origin , packet1.sue_lon_origin , packet1.sue_alt_origin ); - mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f13_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_week_no , packet1.sue_lat_origin , packet1.sue_lon_origin , packet1.sue_alt_origin ); - mavlink_msg_serial_udb_extra_f13_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f14_t packet_in = { - 963497464,17443,17547,17651,163,230,41,108,175,242,53 - }; - mavlink_serial_udb_extra_f14_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_TRAP_SOURCE = packet_in.sue_TRAP_SOURCE; - packet1.sue_RCON = packet_in.sue_RCON; - packet1.sue_TRAP_FLAGS = packet_in.sue_TRAP_FLAGS; - packet1.sue_osc_fail_count = packet_in.sue_osc_fail_count; - packet1.sue_WIND_ESTIMATION = packet_in.sue_WIND_ESTIMATION; - packet1.sue_GPS_TYPE = packet_in.sue_GPS_TYPE; - packet1.sue_DR = packet_in.sue_DR; - packet1.sue_BOARD_TYPE = packet_in.sue_BOARD_TYPE; - packet1.sue_AIRFRAME = packet_in.sue_AIRFRAME; - packet1.sue_CLOCK_CONFIG = packet_in.sue_CLOCK_CONFIG; - packet1.sue_FLIGHT_PLAN_TYPE = packet_in.sue_FLIGHT_PLAN_TYPE; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F14_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f14_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f14_pack(system_id, component_id, &msg , packet1.sue_WIND_ESTIMATION , packet1.sue_GPS_TYPE , packet1.sue_DR , packet1.sue_BOARD_TYPE , packet1.sue_AIRFRAME , packet1.sue_RCON , packet1.sue_TRAP_FLAGS , packet1.sue_TRAP_SOURCE , packet1.sue_osc_fail_count , packet1.sue_CLOCK_CONFIG , packet1.sue_FLIGHT_PLAN_TYPE ); - mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f14_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_WIND_ESTIMATION , packet1.sue_GPS_TYPE , packet1.sue_DR , packet1.sue_BOARD_TYPE , packet1.sue_AIRFRAME , packet1.sue_RCON , packet1.sue_TRAP_FLAGS , packet1.sue_TRAP_SOURCE , packet1.sue_osc_fail_count , packet1.sue_CLOCK_CONFIG , packet1.sue_FLIGHT_PLAN_TYPE ); - mavlink_msg_serial_udb_extra_f14_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f15_t packet_in = { - { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },{ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144 } - }; - mavlink_serial_udb_extra_f15_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - - mav_array_memcpy(packet1.sue_ID_VEHICLE_MODEL_NAME, packet_in.sue_ID_VEHICLE_MODEL_NAME, sizeof(uint8_t)*40); - mav_array_memcpy(packet1.sue_ID_VEHICLE_REGISTRATION, packet_in.sue_ID_VEHICLE_REGISTRATION, sizeof(uint8_t)*20); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F15_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f15_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f15_pack(system_id, component_id, &msg , packet1.sue_ID_VEHICLE_MODEL_NAME , packet1.sue_ID_VEHICLE_REGISTRATION ); - mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f15_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ID_VEHICLE_MODEL_NAME , packet1.sue_ID_VEHICLE_REGISTRATION ); - mavlink_msg_serial_udb_extra_f15_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f16_t packet_in = { - { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },{ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194 } - }; - mavlink_serial_udb_extra_f16_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - - mav_array_memcpy(packet1.sue_ID_LEAD_PILOT, packet_in.sue_ID_LEAD_PILOT, sizeof(uint8_t)*40); - mav_array_memcpy(packet1.sue_ID_DIY_DRONES_URL, packet_in.sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f16_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f16_pack(system_id, component_id, &msg , packet1.sue_ID_LEAD_PILOT , packet1.sue_ID_DIY_DRONES_URL ); - mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f16_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_ID_LEAD_PILOT , packet1.sue_ID_DIY_DRONES_URL ); - mavlink_msg_serial_udb_extra_f16_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_ALTITUDES >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_altitudes_t packet_in = { - 963497464,963497672,963497880,963498088,963498296,963498504,963498712 - }; - mavlink_altitudes_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.alt_gps = packet_in.alt_gps; - packet1.alt_imu = packet_in.alt_imu; - packet1.alt_barometric = packet_in.alt_barometric; - packet1.alt_optical_flow = packet_in.alt_optical_flow; - packet1.alt_range_finder = packet_in.alt_range_finder; - packet1.alt_extra = packet_in.alt_extra; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_ALTITUDES_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_ALTITUDES_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_altitudes_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_altitudes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_altitudes_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.alt_gps , packet1.alt_imu , packet1.alt_barometric , packet1.alt_optical_flow , packet1.alt_range_finder , packet1.alt_extra ); - mavlink_msg_altitudes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_altitudes_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.alt_gps , packet1.alt_imu , packet1.alt_barometric , packet1.alt_optical_flow , packet1.alt_range_finder , packet1.alt_extra ); - mavlink_msg_altitudes_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_AIRSPEEDS >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_airspeeds_t packet_in = { - 963497464,17443,17547,17651,17755,17859,17963 - }; - mavlink_airspeeds_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.airspeed_imu = packet_in.airspeed_imu; - packet1.airspeed_pitot = packet_in.airspeed_pitot; - packet1.airspeed_hot_wire = packet_in.airspeed_hot_wire; - packet1.airspeed_ultrasonic = packet_in.airspeed_ultrasonic; - packet1.aoa = packet_in.aoa; - packet1.aoy = packet_in.aoy; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airspeeds_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_airspeeds_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airspeeds_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.airspeed_imu , packet1.airspeed_pitot , packet1.airspeed_hot_wire , packet1.airspeed_ultrasonic , packet1.aoa , packet1.aoy ); - mavlink_msg_airspeeds_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_airspeeds_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.airspeed_imu , packet1.airspeed_pitot , packet1.airspeed_hot_wire , packet1.airspeed_ultrasonic , packet1.aoa , packet1.aoy ); - mavlink_msg_airspeeds_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f17_t packet_in = { - 17.0,45.0,73.0 - }; - mavlink_serial_udb_extra_f17_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_feed_forward = packet_in.sue_feed_forward; - packet1.sue_turn_rate_nav = packet_in.sue_turn_rate_nav; - packet1.sue_turn_rate_fbw = packet_in.sue_turn_rate_fbw; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F17_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f17_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f17_pack(system_id, component_id, &msg , packet1.sue_feed_forward , packet1.sue_turn_rate_nav , packet1.sue_turn_rate_fbw ); - mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f17_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_feed_forward , packet1.sue_turn_rate_nav , packet1.sue_turn_rate_fbw ); - mavlink_msg_serial_udb_extra_f17_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f18_t packet_in = { - 17.0,45.0,73.0,101.0,129.0 - }; - mavlink_serial_udb_extra_f18_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.angle_of_attack_normal = packet_in.angle_of_attack_normal; - packet1.angle_of_attack_inverted = packet_in.angle_of_attack_inverted; - packet1.elevator_trim_normal = packet_in.elevator_trim_normal; - packet1.elevator_trim_inverted = packet_in.elevator_trim_inverted; - packet1.reference_speed = packet_in.reference_speed; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F18_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f18_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f18_pack(system_id, component_id, &msg , packet1.angle_of_attack_normal , packet1.angle_of_attack_inverted , packet1.elevator_trim_normal , packet1.elevator_trim_inverted , packet1.reference_speed ); - mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f18_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.angle_of_attack_normal , packet1.angle_of_attack_inverted , packet1.elevator_trim_normal , packet1.elevator_trim_inverted , packet1.reference_speed ); - mavlink_msg_serial_udb_extra_f18_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f19_t packet_in = { - 5,72,139,206,17,84,151,218 - }; - mavlink_serial_udb_extra_f19_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_aileron_output_channel = packet_in.sue_aileron_output_channel; - packet1.sue_aileron_reversed = packet_in.sue_aileron_reversed; - packet1.sue_elevator_output_channel = packet_in.sue_elevator_output_channel; - packet1.sue_elevator_reversed = packet_in.sue_elevator_reversed; - packet1.sue_throttle_output_channel = packet_in.sue_throttle_output_channel; - packet1.sue_throttle_reversed = packet_in.sue_throttle_reversed; - packet1.sue_rudder_output_channel = packet_in.sue_rudder_output_channel; - packet1.sue_rudder_reversed = packet_in.sue_rudder_reversed; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F19_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f19_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f19_pack(system_id, component_id, &msg , packet1.sue_aileron_output_channel , packet1.sue_aileron_reversed , packet1.sue_elevator_output_channel , packet1.sue_elevator_reversed , packet1.sue_throttle_output_channel , packet1.sue_throttle_reversed , packet1.sue_rudder_output_channel , packet1.sue_rudder_reversed ); - mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f19_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_aileron_output_channel , packet1.sue_aileron_reversed , packet1.sue_elevator_output_channel , packet1.sue_elevator_reversed , packet1.sue_throttle_output_channel , packet1.sue_throttle_reversed , packet1.sue_rudder_output_channel , packet1.sue_rudder_reversed ); - mavlink_msg_serial_udb_extra_f19_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f20_t packet_in = { - 17235,17339,17443,17547,17651,17755,17859,17963,18067,18171,18275,18379,77 - }; - mavlink_serial_udb_extra_f20_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_trim_value_input_1 = packet_in.sue_trim_value_input_1; - packet1.sue_trim_value_input_2 = packet_in.sue_trim_value_input_2; - packet1.sue_trim_value_input_3 = packet_in.sue_trim_value_input_3; - packet1.sue_trim_value_input_4 = packet_in.sue_trim_value_input_4; - packet1.sue_trim_value_input_5 = packet_in.sue_trim_value_input_5; - packet1.sue_trim_value_input_6 = packet_in.sue_trim_value_input_6; - packet1.sue_trim_value_input_7 = packet_in.sue_trim_value_input_7; - packet1.sue_trim_value_input_8 = packet_in.sue_trim_value_input_8; - packet1.sue_trim_value_input_9 = packet_in.sue_trim_value_input_9; - packet1.sue_trim_value_input_10 = packet_in.sue_trim_value_input_10; - packet1.sue_trim_value_input_11 = packet_in.sue_trim_value_input_11; - packet1.sue_trim_value_input_12 = packet_in.sue_trim_value_input_12; - packet1.sue_number_of_inputs = packet_in.sue_number_of_inputs; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F20_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f20_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f20_pack(system_id, component_id, &msg , packet1.sue_number_of_inputs , packet1.sue_trim_value_input_1 , packet1.sue_trim_value_input_2 , packet1.sue_trim_value_input_3 , packet1.sue_trim_value_input_4 , packet1.sue_trim_value_input_5 , packet1.sue_trim_value_input_6 , packet1.sue_trim_value_input_7 , packet1.sue_trim_value_input_8 , packet1.sue_trim_value_input_9 , packet1.sue_trim_value_input_10 , packet1.sue_trim_value_input_11 , packet1.sue_trim_value_input_12 ); - mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f20_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_number_of_inputs , packet1.sue_trim_value_input_1 , packet1.sue_trim_value_input_2 , packet1.sue_trim_value_input_3 , packet1.sue_trim_value_input_4 , packet1.sue_trim_value_input_5 , packet1.sue_trim_value_input_6 , packet1.sue_trim_value_input_7 , packet1.sue_trim_value_input_8 , packet1.sue_trim_value_input_9 , packet1.sue_trim_value_input_10 , packet1.sue_trim_value_input_11 , packet1.sue_trim_value_input_12 ); - mavlink_msg_serial_udb_extra_f20_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f21_t packet_in = { - 17235,17339,17443,17547,17651,17755 - }; - mavlink_serial_udb_extra_f21_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_accel_x_offset = packet_in.sue_accel_x_offset; - packet1.sue_accel_y_offset = packet_in.sue_accel_y_offset; - packet1.sue_accel_z_offset = packet_in.sue_accel_z_offset; - packet1.sue_gyro_x_offset = packet_in.sue_gyro_x_offset; - packet1.sue_gyro_y_offset = packet_in.sue_gyro_y_offset; - packet1.sue_gyro_z_offset = packet_in.sue_gyro_z_offset; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F21_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f21_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f21_pack(system_id, component_id, &msg , packet1.sue_accel_x_offset , packet1.sue_accel_y_offset , packet1.sue_accel_z_offset , packet1.sue_gyro_x_offset , packet1.sue_gyro_y_offset , packet1.sue_gyro_z_offset ); - mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f21_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_accel_x_offset , packet1.sue_accel_y_offset , packet1.sue_accel_z_offset , packet1.sue_gyro_x_offset , packet1.sue_gyro_y_offset , packet1.sue_gyro_z_offset ); - mavlink_msg_serial_udb_extra_f21_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22 >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_serial_udb_extra_f22_t packet_in = { - 17235,17339,17443,17547,17651,17755 - }; - mavlink_serial_udb_extra_f22_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.sue_accel_x_at_calibration = packet_in.sue_accel_x_at_calibration; - packet1.sue_accel_y_at_calibration = packet_in.sue_accel_y_at_calibration; - packet1.sue_accel_z_at_calibration = packet_in.sue_accel_z_at_calibration; - packet1.sue_gyro_x_at_calibration = packet_in.sue_gyro_x_at_calibration; - packet1.sue_gyro_y_at_calibration = packet_in.sue_gyro_y_at_calibration; - packet1.sue_gyro_z_at_calibration = packet_in.sue_gyro_z_at_calibration; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F22_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f22_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f22_pack(system_id, component_id, &msg , packet1.sue_accel_x_at_calibration , packet1.sue_accel_y_at_calibration , packet1.sue_accel_z_at_calibration , packet1.sue_gyro_x_at_calibration , packet1.sue_gyro_y_at_calibration , packet1.sue_gyro_z_at_calibration ); - mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_serial_udb_extra_f22_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.sue_accel_x_at_calibration , packet1.sue_accel_y_at_calibration , packet1.sue_accel_z_at_calibration , packet1.sue_gyro_x_at_calibration , packet1.sue_gyro_y_at_calibration , packet1.sue_gyro_z_at_calibration ); - mavlink_msg_serial_udb_extra_f22_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; itimestamp) { signing->last_status = MAVLINK_SIGNING_STATUS_OLD_TIMESTAMP; - return false; + // return false; } // add new stream signing_streams->stream[i].sysid = msg->sysid; @@ -191,7 +191,7 @@ MAVLINK_HELPER bool mavlink_signature_check(mavlink_signing_t *signing, if (tstamp.t64 <= last_tstamp.t64) { // repeating old timestamp signing->last_status = MAVLINK_SIGNING_STATUS_REPLAY; - return false; + // return false; } } diff --git a/message_definitions/ASLUAV.xml b/message_definitions/ASLUAV.xml deleted file mode 100644 index 4e80a5ac7..000000000 --- a/message_definitions/ASLUAV.xml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - common.xml - - - - - Mission command to reset Maximum Power Point Tracker (MPPT) - MPPT number - Empty - Empty - Empty - Empty - Empty - Empty - - - Mission command to perform a power cycle on payload - Complete power cycle - VISensor power cycle - Empty - Empty - Empty - Empty - Empty - - - - - no service - - - link type unknown - - - 2G (GSM/GRPS/EDGE) link - - - 3G link (WCDMA/HSDPA/HSPA) - - - 4G link (LTE) - - - - - not specified - - - HUAWEI LTE USB Stick E3372 - - - - - - Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value. - UTC time, seconds elapsed since 01.01.1970 - Microseconds elapsed since vehicle boot - System ID - Component ID - The coordinate system of the COMMAND, as defined by MAV_FRAME enum - The scheduled action for the mission item, as defined by MAV_CMD enum - false:0, true:1 - autocontinue to next wp - PARAM1, see MAV_CMD enum - PARAM2, see MAV_CMD enum - PARAM3, see MAV_CMD enum - PARAM4, see MAV_CMD enum - PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 - PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 - PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame). - - - Send a command with up to seven parameters to the MAV and additional metadata - UTC time, seconds elapsed since 01.01.1970 - Microseconds elapsed since vehicle boot - System which should execute the command - Component which should execute the command, 0 for all components - Command ID, as defined by MAV_CMD enum. - 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) - Parameter 1, as defined by MAV_CMD enum. - Parameter 2, as defined by MAV_CMD enum. - Parameter 3, as defined by MAV_CMD enum. - Parameter 4, as defined by MAV_CMD enum. - Parameter 5, as defined by MAV_CMD enum. - Parameter 6, as defined by MAV_CMD enum. - Parameter 7, as defined by MAV_CMD enum. - - - Voltage and current sensor data - Power board voltage sensor reading - Power board current sensor reading - Board current sensor 1 reading - Board current sensor 2 reading - - - Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking - MPPT last timestamp - MPPT1 voltage - MPPT1 current - MPPT1 pwm - MPPT1 status - MPPT2 voltage - MPPT2 current - MPPT2 pwm - MPPT2 status - MPPT3 voltage - MPPT3 current - MPPT3 pwm - MPPT3 status - - - ASL-fixed-wing controller data - Timestamp - ASLCTRL control-mode (manual, stabilized, auto, etc...) - See sourcecode for a description of these values... - - - Pitch angle - Pitch angle reference - - - - - - - Airspeed reference - - Yaw angle - Yaw angle reference - Roll angle - Roll angle reference - - - - - - - - - ASL-fixed-wing controller debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - Debug data - - - Extended state information for ASLUAVs - Status of the position-indicator LEDs - Status of the IRIDIUM satellite communication system - Status vector for up to 8 servos - Motor RPM - - - - Extended EKF state estimates for ASLUAVs - Time since system start - Magnitude of wind velocity (in lateral inertial plane) - Wind heading angle from North - Z (Down) component of inertial wind velocity - Magnitude of air velocity - Sideslip angle - Angle of attack - - - Off-board controls/commands for ASLUAVs - Time since system start - Elevator command [~] - Throttle command [~] - Throttle 2 command [~] - Left aileron command [~] - Right aileron command [~] - Rudder command [~] - Off-board computer status - - - Atmospheric sensors (temperature, humidity, ...) - Time since system boot - Ambient temperature - Relative humidity - - - Battery pack monitoring data for Li-Ion batteries - Time since system start - Battery pack temperature - Battery pack voltage - Battery pack current - Battery pack state-of-charge - Battery monitor status report bits in Hex - Battery monitor serial number in Hex - Battery monitor safetystatus report bits in Hex - Battery monitor operation status report bits in Hex - Battery pack cell 1 voltage - Battery pack cell 2 voltage - Battery pack cell 3 voltage - Battery pack cell 4 voltage - Battery pack cell 5 voltage - Battery pack cell 6 voltage - - - Fixed-wing soaring (i.e. thermal seeking) data - Timestamp - Timestamp since last mode change - Thermal core updraft strength - Thermal radius - Thermal center latitude - Thermal center longitude - Variance W - Variance R - Variance Lat - Variance Lon - Suggested loiter radius - Suggested loiter direction - Distance to soar point - Expected sink rate at current airspeed, roll and throttle - Measurement / updraft speed at current/local airplane position - Measurement / roll angle tracking error - Expected measurement 1 - Expected measurement 2 - Thermal drift (from estimator prediction step only) - Thermal drift (from estimator prediction step only) - Total specific energy change (filtered) - Debug variable 1 - Debug variable 2 - Control Mode [-] - Data valid [-] - - - Monitoring of sensorpod status - Timestamp in linuxtime (since 1.1.1970) - Rate of ROS topic 1 - Rate of ROS topic 2 - Rate of ROS topic 3 - Rate of ROS topic 4 - Number of recording nodes - Temperature of sensorpod CPU in - Free space available in recordings directory in [Gb] * 1e2 - - - Monitoring of power board status - Timestamp - Power board status register - Power board leds status - Power board system voltage - Power board servo voltage - Power board digital voltage - Power board left motor current sensor - Power board right motor current sensor - Power board analog current sensor - Power board digital current sensor - Power board extension current sensor - Power board aux current sensor - - - Status of GSM modem (connected to onboard computer) - Timestamp (of OBC) - GSM modem used - GSM link type - RSSI as reported by modem (unconverted) - RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted) - SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted) - RSRQ (LTE only) as reported by modem (unconverted) - - - - Status of the SatCom link - Timestamp - Timestamp of the last successful sbd session - Number of failed sessions - Number of successful sessions - Signal quality - Ring call pending - Transmission session pending - Receiving session pending - - - Calibrated airflow angle measurements - Timestamp - Angle of attack - Angle of attack measurement valid - Sideslip angle - Sideslip angle measurement valid - - - diff --git a/message_definitions/AVSSUAS.xml b/message_definitions/AVSSUAS.xml deleted file mode 100644 index 7138758a4..000000000 --- a/message_definitions/AVSSUAS.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - common.xml - 2 - 1 - - - - - AVSS defined command. Set PRS arm statuses. - PRS arm statuses - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Gets PRS arm statuses - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Get the PRS battery voltage in millivolts - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Get the PRS error statuses. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Set the ATS arming altitude in meters. - ATS arming altitude - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Get the ATS arming altitude in meters. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - AVSS defined command. Shuts down the PRS system. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - - - AVSS defined command failure reason. PRS not steady. - - - AVSS defined command failure reason. PRS DTM not armed. - - - AVSS defined command failure reason. PRS OTM not armed. - - - - - In manual control mode - - - In attitude mode - - - In GPS mode - - - In hotpoint mode - - - In assisted takeoff mode - - - In auto takeoff mode - - - In auto landing mode - - - In go home mode - - - In sdk control mode - - - In sport mode - - - In force auto landing mode - - - In tripod mode - - - In search mode - - - In engine mode - - - - - In manual control mode - - - In auto takeoff mode - - - In auto landing mode - - - In go home mode - - - In drop mode - - - - - - AVSS PRS system status. - Timestamp (time since PRS boot). - PRS error statuses - Estimated battery run-time without a remote connection and PRS battery voltage - PRS arm statuses - PRS battery charge statuses - - - Drone position. - Timestamp (time since FC boot). - Latitude, expressed - Longitude, expressed - Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar - This altitude is measured by a barometer - - - Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0). - Timestamp (time since FC boot). - Quaternion component 1, w (1 in null-rotation) - Quaternion component 2, x (0 in null-rotation) - Quaternion component 3, y (0 in null-rotation) - Quaternion component 4, z (0 in null-rotation) - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - - - Drone operation mode. - Timestamp (time since FC boot). - DJI M300 operation mode - horsefly operation mode - - - diff --git a/message_definitions/all.xml b/message_definitions/all.xml deleted file mode 100644 index d6113938e..000000000 --- a/message_definitions/all.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - ardupilotmega.xml - - ASLUAV.xml - - common.xml - development.xml - - icarous.xml - - - minimal.xml - - - python_array_test.xml - standard.xml - test.xml - ualberta.xml - - uAvionix.xml - - storm32.xml - - AVSSUAS.xml - - cubepilot.xml - - csAirLink.xml - - - - - diff --git a/message_definitions/ardupilotmega.xml b/message_definitions/ardupilotmega.xml deleted file mode 100644 index 9743ef102..000000000 --- a/message_definitions/ardupilotmega.xml +++ /dev/null @@ -1,1775 +0,0 @@ - - - common.xml - - uAvionix.xml - icarous.xml - cubepilot.xml - csAirLink.xml - 2 - - - - - - - - - - - - - - - - - - - - - Set the distance to be repeated on mission resume - Distance. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Control attached liquid sprayer - 0: disable sprayer. 1: enable sprayer. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Pass instructions onto scripting, a script should be checking for a new command - uint16 ID value to be passed to scripting - float value to be passed to scripting - float value to be passed to scripting - float value to be passed to scripting - Empty. - Empty. - Empty. - - - Execute auxiliary function - Auxiliary Function. - Switch Level. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowing the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up. - Altitude. - Descent speed. - How long to wiggle the control surfaces to prevent them seizing up. - Empty. - Empty. - Empty. - Empty. - - - A system wide power-off event has been initiated. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - - FLY button has been clicked. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - FLY button has been held for 1.5 seconds. - Takeoff altitude. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - PAUSE button has been clicked. - 1 if Solo is in a shot mode, 0 otherwise. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Magnetometer calibration based on fixed position - in earth field given by inclination, declination and intensity. - Magnetic declination. - Magnetic inclination. - Magnetic intensity. - Yaw. - Empty. - Empty. - Empty. - - - Magnetometer calibration based on fixed expected field values. - Field strength X. - Field strength Y. - Field strength Z. - Empty. - Empty. - Empty. - Empty. - - - - Set EKF sensor source set. - Source Set Id. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Initiate a magnetometer calibration. - Bitmask of magnetometers to calibrate. Use 0 to calibrate all sensors that can be started (sensors may not start if disabled, unhealthy, etc.). The command will NACK if calibration does not start for a sensor explicitly specified by the bitmask. - Automatically retry on failure (0=no retry, 1=retry). - Save without user input (0=require input, 1=autosave). - Delay. - Autoreboot (0=user reboot, 1=autoreboot). - Empty. - Empty. - - - Accept a magnetometer calibration. - Bitmask of magnetometers that calibration is accepted (0 means all). - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Cancel a running magnetometer calibration. - Bitmask of magnetometers to cancel a running calibration (0 means all). - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Used when doing accelerometer calibration. When sent to the GCS tells it what position to put the vehicle in. When sent to the vehicle says what position the vehicle is in. - Position. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Reply with the version banner. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Command autopilot to get into factory test/diagnostic mode. - 0: activate test mode, 1: exit test mode. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Causes the gimbal to reset and boot as if it was just powered on. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Reports progress and success or failure of gimbal axis calibration procedure. - Gimbal axis we're reporting calibration progress for. - Current calibration progress for this axis. - Status of the calibration. - Empty. - Empty. - Empty. - Empty. - - - Starts commutation calibration on the gimbal. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Erases gimbal application and parameters. - Magic number. - Magic number. - Magic number. - Magic number. - Magic number. - Magic number. - Magic number. - - - - Update the bootloader - Empty - Empty - Empty - Empty - Magic number - set to 290876 to actually flash - Empty - Empty - - - Reset battery capacity for batteries that accumulate consumed battery via integration. - Bitmask of batteries to reset. Least significant bit is for the first battery. - Battery percentage remaining to set. - - - Issue a trap signal to the autopilot process, presumably to enter the debugger. - Magic number - set to 32451 to actually trap. - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Control onboard scripting. - Scripting command to execute - - - Scripting command as NAV command with wait for completion. - integer command number (0 to 255) - timeout for operation in seconds. Zero means no timeout (0 to 255) - argument1. - argument2. - Empty - Empty - Empty - - - Maintain an attitude for a specified time. - Time to maintain specified attitude and climb rate - Roll angle in degrees (positive is lean right, negative is lean left) - Pitch angle in degrees (positive is lean back, negative is lean forward) - Yaw angle - Climb rate - Empty - Empty - - - Change flight speed at a given rate. This slews the vehicle at a controllable rate between it's previous speed and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) - Airspeed or groundspeed. - Target Speed - Acceleration rate, 0 to take effect instantly - Empty - Empty - Empty - Empty - - - Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) - Empty - Empty - Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt. - Empty - Empty - Empty - Target Altitude - - - Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) - course-over-ground or raw vehicle heading. - Target heading. - Maximum centripetal accelearation, ie rate of change, toward new heading. - Empty - Empty - Empty - Empty - - - - - - Start a REPL session. - - - End a REPL session. - - - Stop execution of scripts. - - - Stop execution of scripts and restart. - - - - - - Pre-initialization. - - - Disabled. - - - Checking limits. - - - A limit has been breached. - - - Taking action e.g. Return/RTL. - - - We're no longer in breach of a limit. - - - - - - Pre-initialization. - - - Disabled. - - - Checking limits. - - - - - Flags in RALLY_POINT message. - - Flag set when requiring favorable winds for landing. - - - Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. - - - - - - Camera heartbeat, announce camera component ID at 1Hz. - - - Camera image triggered. - - - Camera connection lost. - - - Camera unknown error. - - - Camera battery low. Parameter p1 shows reported voltage. - - - Camera storage low. Parameter p1 shows reported shots remaining. - - - Camera storage low. Parameter p1 shows reported video minutes remaining. - - - - - - Shooting photos, not video. - - - Shooting video, not stills. - - - Unable to achieve requested exposure (e.g. shutter speed too low). - - - Closed loop feedback from camera, we know for sure it has successfully taken a picture. - - - Open loop camera, an image trigger has been requested but we can't know for sure it has successfully taken a picture. - - - - - - Gimbal is powered on but has not started initializing yet. - - - Gimbal is currently running calibration on the pitch axis. - - - Gimbal is currently running calibration on the roll axis. - - - Gimbal is currently running calibration on the yaw axis. - - - Gimbal has finished calibrating and initializing, but is relaxed pending reception of first rate command from copter. - - - Gimbal is actively stabilizing. - - - Gimbal is relaxed because it missed more than 10 expected rate command messages in a row. Gimbal will move back to active mode when it receives a new rate command. - - - - - Gimbal yaw axis. - - - Gimbal pitch axis. - - - Gimbal roll axis. - - - - - Axis calibration is in progress. - - - Axis calibration succeeded. - - - Axis calibration failed. - - - - - Whether or not this axis requires calibration is unknown at this time. - - - This axis requires calibration. - - - This axis does not require calibration. - - - - - - No GoPro connected. - - - The detected GoPro is not HeroBus compatible. - - - A HeroBus compatible GoPro is connected. - - - An unrecoverable error was encountered with the connected GoPro, it may require a power cycle. - - - - - - GoPro is currently recording. - - - - - The write message with ID indicated succeeded. - - - The write message with ID indicated failed. - - - - - (Get/Set). - - - (Get/Set). - - - (___/Set). - - - (Get/___). - - - (Get/___). - - - (Get/Set). - - - - (Get/Set). - - - (Get/Set). - - - (Get/Set). - - - (Get/Set). - - - (Get/Set) Hero 3+ Only. - - - (Get/Set) Hero 3+ Only. - - - (Get/Set) Hero 3+ Only. - - - (Get/Set) Hero 3+ Only. - - - (Get/Set) Hero 3+ Only. - - - (Get/Set). - - - - (Get/Set). - - - - - Video mode. - - - Photo mode. - - - Burst mode, Hero 3+ only. - - - Time lapse mode, Hero 3+ only. - - - Multi shot mode, Hero 4 only. - - - Playback mode, Hero 4 only, silver only except when LCD or HDMI is connected to black. - - - Playback mode, Hero 4 only. - - - Mode not yet known. - - - - - 848 x 480 (480p). - - - 1280 x 720 (720p). - - - 1280 x 960 (960p). - - - 1920 x 1080 (1080p). - - - 1920 x 1440 (1440p). - - - 2704 x 1440 (2.7k-17:9). - - - 2704 x 1524 (2.7k-16:9). - - - 2704 x 2028 (2.7k-4:3). - - - 3840 x 2160 (4k-16:9). - - - 4096 x 2160 (4k-17:9). - - - 1280 x 720 (720p-SuperView). - - - 1920 x 1080 (1080p-SuperView). - - - 2704 x 1520 (2.7k-SuperView). - - - 3840 x 2160 (4k-SuperView). - - - - - 12 FPS. - - - 15 FPS. - - - 24 FPS. - - - 25 FPS. - - - 30 FPS. - - - 48 FPS. - - - 50 FPS. - - - 60 FPS. - - - 80 FPS. - - - 90 FPS. - - - 100 FPS. - - - 120 FPS. - - - 240 FPS. - - - 12.5 FPS. - - - - - 0x00: Wide. - - - 0x01: Medium. - - - 0x02: Narrow. - - - - - 0=NTSC, 1=PAL. - - - - - 5MP Medium. - - - 7MP Medium. - - - 7MP Wide. - - - 10MP Wide. - - - 12MP Wide. - - - - - Auto. - - - 3000K. - - - 5500K. - - - 6500K. - - - Camera Raw. - - - - - Auto. - - - Neutral. - - - - - ISO 400. - - - ISO 800 (Only Hero 4). - - - ISO 1600. - - - ISO 3200 (Only Hero 4). - - - ISO 6400. - - - - - Low Sharpness. - - - Medium Sharpness. - - - High Sharpness. - - - - - -5.0 EV (Hero 3+ Only). - - - -4.5 EV (Hero 3+ Only). - - - -4.0 EV (Hero 3+ Only). - - - -3.5 EV (Hero 3+ Only). - - - -3.0 EV (Hero 3+ Only). - - - -2.5 EV (Hero 3+ Only). - - - -2.0 EV. - - - -1.5 EV. - - - -1.0 EV. - - - -0.5 EV. - - - 0.0 EV. - - - +0.5 EV. - - - +1.0 EV. - - - +1.5 EV. - - - +2.0 EV. - - - +2.5 EV (Hero 3+ Only). - - - +3.0 EV (Hero 3+ Only). - - - +3.5 EV (Hero 3+ Only). - - - +4.0 EV (Hero 3+ Only). - - - +4.5 EV (Hero 3+ Only). - - - +5.0 EV (Hero 3+ Only). - - - - - Charging disabled. - - - Charging enabled. - - - - - Unknown gopro model. - - - Hero 3+ Silver (HeroBus not supported by GoPro). - - - Hero 3+ Black. - - - Hero 4 Silver. - - - Hero 4 Black. - - - - - 3 Shots / 1 Second. - - - 5 Shots / 1 Second. - - - 10 Shots / 1 Second. - - - 10 Shots / 2 Second. - - - 10 Shots / 3 Second (Hero 4 Only). - - - 30 Shots / 1 Second. - - - 30 Shots / 2 Second. - - - 30 Shots / 3 Second. - - - 30 Shots / 6 Second. - - - - - Switch Low. - - - Switch Middle. - - - Switch High. - - - - - - LED patterns off (return control to regular vehicle control). - - - LEDs show pattern during firmware update. - - - Custom Pattern using custom bytes fields. - - - - - Flags in EKF_STATUS message. - - Set if EKF's attitude estimate is good. - - - Set if EKF's horizontal velocity estimate is good. - - - Set if EKF's vertical velocity estimate is good. - - - Set if EKF's horizontal position (relative) estimate is good. - - - Set if EKF's horizontal position (absolute) estimate is good. - - - Set if EKF's vertical position (absolute) estimate is good. - - - Set if EKF's vertical position (above ground) estimate is good. - - - EKF is in constant position mode and does not know it's absolute or relative position. - - - Set if EKF's predicted horizontal position (relative) estimate is good. - - - Set if EKF's predicted horizontal position (absolute) estimate is good. - - - Set if EKF has never been healthy. - - - - - - - - - - - - Special ACK block numbers control activation of dataflash log streaming. - - - - UAV to stop sending DataFlash blocks. - - - - UAV to start sending DataFlash blocks. - - - - - Possible remote log data block statuses. - - This block has NOT been received. - - - This block has been received. - - - - Bus types for device operations. - - I2C Device operation. - - - SPI Device operation. - - - - Deepstall flight stage. - - Flying to the landing point. - - - Building an estimate of the wind. - - - Waiting to breakout of the loiter to fly the approach. - - - Flying to the first arc point to turn around to the landing point. - - - Turning around back to the deepstall landing point. - - - Approaching the landing point. - - - Stalling and steering towards the land point. - - - - A mapping of plane flight modes for custom_mode field of heartbeat. - - - - - - - - - - - - - - - - - - - - - - - - - - - A mapping of copter flight modes for custom_mode field of heartbeat. - - - - - - - - - - - - - - - - - - - - - - - - - - - - A mapping of sub flight modes for custom_mode field of heartbeat. - - - - - - - - - - - - A mapping of rover flight modes for custom_mode field of heartbeat. - - - - - - - - - - - - - - - A mapping of antenna tracker flight modes for custom_mode field of heartbeat. - - - - - - - - - The type of parameter for the OSD parameter editor. - - - - - - - - - - - - The error type for the OSD parameter editor. - - - - - - - - - Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process. - Magnetometer X offset. - Magnetometer Y offset. - Magnetometer Z offset. - Magnetic declination. - Raw pressure from barometer. - Raw temperature from barometer. - Gyro X calibration. - Gyro Y calibration. - Gyro Z calibration. - Accel X calibration. - Accel Y calibration. - Accel Z calibration. - - - - Set the magnetometer offsets - System ID. - Component ID. - Magnetometer X offset. - Magnetometer Y offset. - Magnetometer Z offset. - - - State of autopilot RAM. - Heap top. - Free memory. - - Free memory (32 bit). - - - Raw ADC output. - ADC output 1. - ADC output 2. - ADC output 3. - ADC output 4. - ADC output 5. - ADC output 6. - - - - Configure on-board Camera Control System. - System ID. - Component ID. - Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore). - Divisor number //e.g. 1000 means 1/1000 (0 means ignore). - F stop number x 10 //e.g. 28 means 2.8 (0 means ignore). - ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore). - Exposure type enumeration from 1 to N (0 means ignore). - Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once. - Main engine cut-off time before camera trigger (0 means no cut-off). - Extra parameters enumeration (0 means ignore). - Correspondent value to given extra_param. - - - Control on-board Camera Control System to take shots. - System ID. - Component ID. - 0: stop, 1: start or keep it up //Session control e.g. show/hide lens. - 1 to N //Zoom's absolute position (0 means ignore). - -100 to 100 //Zooming step value to offset zoom from the current position. - 0: unlock focus or keep unlocked, 1: lock focus or keep locked, 3: re-lock focus. - 0: ignore, 1: shot or start filming. - Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once. - Extra parameters enumeration (0 means ignore). - Correspondent value to given extra_param. - - - - Message to configure a camera mount, directional antenna, etc. - System ID. - Component ID. - Mount operating mode. - (1 = yes, 0 = no). - (1 = yes, 0 = no). - (1 = yes, 0 = no). - - - Message to control a camera mount, directional antenna, etc. - System ID. - Component ID. - Pitch (centi-degrees) or lat (degE7), depending on mount mode. - Roll (centi-degrees) or lon (degE7) depending on mount mode. - Yaw (centi-degrees) or alt (cm) depending on mount mode. - If "1" it will save current trimmed position on EEPROM (just valid for NEUTRAL and LANDING). - - - Message with some status from autopilot to GCS about camera or antenna mount. - System ID. - Component ID. - Pitch. - Roll. - Yaw. - - Mount operating mode. - - - - A fence point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS. - System ID. - Component ID. - Point index (first point is 1, 0 is for return point). - Total number of points (for sanity checking). - Latitude of point. - Longitude of point. - - - Request a current fence point from MAV. - System ID. - Component ID. - Point index (first point is 1, 0 is for return point). - - - Status of DCM attitude estimator. - X gyro drift estimate. - Y gyro drift estimate. - Z gyro drift estimate. - Average accel_weight. - Average renormalisation value. - Average error_roll_pitch value. - Average error_yaw value. - - - Status of simulation environment, if used. - Roll angle. - Pitch angle. - Yaw angle. - X acceleration. - Y acceleration. - Z acceleration. - Angular speed around X axis. - Angular speed around Y axis. - Angular speed around Z axis. - Latitude. - Longitude. - - - Status of key hardware. - Board voltage. - I2C error count. - - - Status generated by radio. - Local signal strength. - Remote signal strength. - How full the tx buffer is. - Background noise level. - Remote background noise level. - Receive errors. - Count of error corrected packets. - - - - Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled. - State of AP_Limits. - Time (since boot) of last breach. - Time (since boot) of last recovery action. - Time (since boot) of last successful recovery. - Time (since boot) of last all-clear. - Number of fence breaches. - AP_Limit_Module bitfield of enabled modules. - AP_Limit_Module bitfield of required modules. - AP_Limit_Module bitfield of triggered modules. - - - Wind estimation. - Wind direction (that wind is coming from). - Wind speed in ground plane. - Vertical wind speed. - - - Data packet, size 16. - Data type. - Data length. - Raw data. - - - Data packet, size 32. - Data type. - Data length. - Raw data. - - - Data packet, size 64. - Data type. - Data length. - Raw data. - - - Data packet, size 96. - Data type. - Data length. - Raw data. - - - Rangefinder reporting. - Distance. - Raw voltage if available, zero otherwise. - - - Airspeed auto-calibration. - GPS velocity north. - GPS velocity east. - GPS velocity down. - Differential pressure. - Estimated to true airspeed ratio. - Airspeed ratio. - EKF state x. - EKF state y. - EKF state z. - EKF Pax. - EKF Pby. - EKF Pcz. - - - - A rally point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS. - System ID. - Component ID. - Point index (first point is 0). - Total number of points (for sanity checking). - Latitude of point. - Longitude of point. - Transit / loiter altitude relative to home. - - Break altitude relative to home. - Heading to aim for when landing. - Configuration flags. - - - Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid. - System ID. - Component ID. - Point index (first point is 0). - - - Status of compassmot calibration. - Throttle. - Current. - Interference. - Motor Compensation X. - Motor Compensation Y. - Motor Compensation Z. - - - Status of secondary AHRS filter if available. - Roll angle. - Pitch angle. - Yaw angle. - Altitude (MSL). - Latitude. - Longitude. - - - - Camera Event. - Image timestamp (since UNIX epoch, according to camera clock). - System ID. - - Camera ID. - - Image index. - - Event type. - Parameter 1 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum). - Parameter 2 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum). - Parameter 3 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum). - Parameter 4 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum). - - - - Camera Capture Feedback. - Image timestamp (since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB). - System ID. - - Camera ID. - - Image index. - - Latitude. - Longitude. - Altitude (MSL). - Altitude (Relative to HOME location). - Camera Roll angle (earth frame, +-180). - - Camera Pitch angle (earth frame, +-180). - - Camera Yaw (earth frame, 0-360, true). - - Focal Length. - - Feedback flags. - - - Completed image captures. - - - - 2nd Battery status - Voltage. - Battery current, -1: autopilot does not measure the current. - - - Status of third AHRS filter if available. This is for ANU research group (Ali and Sean). - Roll angle. - Pitch angle. - Yaw angle. - Altitude (MSL). - Latitude. - Longitude. - Test variable1. - Test variable2. - Test variable3. - Test variable4. - - - Request the autopilot version from the system/component. - System ID. - Component ID. - - - - Send a block of log data to remote location. - System ID. - Component ID. - Log data block sequence number. - Log data block. - - - Send Status of each log block that autopilot board might have sent. - System ID. - Component ID. - Log data block sequence number. - Log data block status. - - - Control vehicle LEDs. - System ID. - Component ID. - Instance (LED instance to control or 255 for all LEDs). - Pattern (see LED_PATTERN_ENUM). - Custom Byte Length. - Custom Bytes. - - - Reports progress of compass calibration. - Compass being calibrated. - Bitmask of compasses being calibrated. - Calibration Status. - Attempt number. - Completion percentage. - Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid). - Body frame direction vector for display. - Body frame direction vector for display. - Body frame direction vector for display. - - - - - EKF Status message including flags and variances. - Flags. - - Velocity variance. - - Horizontal Position variance. - Vertical Position variance. - Compass variance. - Terrain Altitude variance. - - Airspeed variance. - - - - PID tuning information. - Axis. - Desired rate. - Achieved rate. - FF component. - P component. - I component. - D component. - - Slew rate. - P/D oscillation modifier. - - - Deepstall path planning. - Landing latitude. - Landing longitude. - Final heading start point, latitude. - Final heading start point, longitude. - Arc entry point, latitude. - Arc entry point, longitude. - Altitude. - Distance the aircraft expects to travel during the deepstall. - Deepstall cross track error (only valid when in DEEPSTALL_STAGE_LAND). - Deepstall stage. - - - 3 axis gimbal measurements. - System ID. - Component ID. - Time since last update. - Delta angle X. - Delta angle Y. - Delta angle X. - Delta velocity X. - Delta velocity Y. - Delta velocity Z. - Joint ROLL. - Joint EL. - Joint AZ. - - - Control message for rate gimbal. - System ID. - Component ID. - Demanded angular rate X. - Demanded angular rate Y. - Demanded angular rate Z. - - - 100 Hz gimbal torque command telemetry. - System ID. - Component ID. - Roll Torque Command. - Elevation Torque Command. - Azimuth Torque Command. - - - - Heartbeat from a HeroBus attached GoPro. - Status. - Current capture mode. - Additional status bits. - - - - Request a GOPRO_COMMAND response from the GoPro. - System ID. - Component ID. - Command ID. - - - Response from a GOPRO_COMMAND get request. - Command ID. - Status. - Value. - - - Request to set a GOPRO_COMMAND with a desired. - System ID. - Component ID. - Command ID. - Value. - - - Response from a GOPRO_COMMAND set request. - Command ID. - Status. - - - - - RPM sensor output. - RPM Sensor1. - RPM Sensor2. - - - - Read registers for a device. - System ID. - Component ID. - Request ID - copied to reply. - The bus type. - Bus number. - Bus address. - Name of device on bus (for SPI). - First register to read. - Count of registers to read. - - Bank number. - - - Read registers reply. - Request ID - copied from request. - 0 for success, anything else is failure code. - Starting register. - Count of bytes read. - Reply data. - - Bank number. - - - Write registers for a device. - System ID. - Component ID. - Request ID - copied to reply. - The bus type. - Bus number. - Bus address. - Name of device on bus (for SPI). - First register to write. - Count of registers to write. - Write data. - - Bank number. - - - Write registers reply. - Request ID - copied from request. - 0 for success, anything else is failure code. - - - - Adaptive Controller tuning information. - Axis. - Desired rate. - Achieved rate. - Error between model and vehicle. - Theta estimated state predictor. - Omega estimated state predictor. - Sigma estimated state predictor. - Theta derivative. - Omega derivative. - Sigma derivative. - Projection operator value. - Projection operator derivative. - u adaptive controlled output command. - - - - Camera vision based attitude and position deltas. - Timestamp (synced to UNIX time or since system boot). - Time since the last reported camera frame. - Defines a rotation vector [roll, pitch, yaw] to the current MAV_FRAME_BODY_FRD from the previous MAV_FRAME_BODY_FRD. - Change in position to the current MAV_FRAME_BODY_FRD from the previous FRAME_BODY_FRD rotated to the current MAV_FRAME_BODY_FRD. - Normalised confidence value from 0 to 100. - - - - Angle of Attack and Side Slip Angle. - Timestamp (since boot or Unix epoch). - Angle of Attack. - Side Slip Angle. - - - ESC Telemetry Data for ESCs 1 to 4, matching data sent by BLHeli ESCs. - Temperature. - Voltage. - Current. - Total current. - RPM (eRPM). - count of telemetry packets received (wraps at 65535). - - - ESC Telemetry Data for ESCs 5 to 8, matching data sent by BLHeli ESCs. - Temperature. - Voltage. - Current. - Total current. - RPM (eRPM). - count of telemetry packets received (wraps at 65535). - - - ESC Telemetry Data for ESCs 9 to 12, matching data sent by BLHeli ESCs. - Temperature. - Voltage. - Current. - Total current. - RPM (eRPM). - count of telemetry packets received (wraps at 65535). - - - Configure an OSD parameter slot. - System ID. - Component ID. - Request ID - copied to reply. - OSD parameter screen index. - OSD parameter display index. - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Config type. - OSD parameter minimum value. - OSD parameter maximum value. - OSD parameter increment. - - - Configure OSD parameter reply. - Request ID - copied from request. - Config error type. - - - Read a configured an OSD parameter slot. - System ID. - Component ID. - Request ID - copied to reply. - OSD parameter screen index. - OSD parameter display index. - - - Read configured OSD parameter reply. - Request ID - copied from request. - Config error type. - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Config type. - OSD parameter minimum value. - OSD parameter maximum value. - OSD parameter increment. - - - - - Obstacle located as a 3D vector. - Timestamp (time since system boot). - Class id of the distance sensor type. - Coordinate frame of reference. - Unique ID given to each obstacle so that its movement can be tracked. Use UINT16_MAX if object ID is unknown or cannot be determined. - X position of the obstacle. - Y position of the obstacle. - Z position of the obstacle. - Minimum distance the sensor can measure. - Maximum distance the sensor can measure. - - - Water depth - Timestamp (time since system boot) - Onboard ID of the sensor - Sensor data healthy (0=unhealthy, 1=healthy) - Latitude - Longitude - Altitude (MSL) of vehicle - Roll angle - Pitch angle - Yaw angle - Distance (uncorrected) - Water temperature - - - The MCU status, giving MCU temperature and voltage. The min and max voltages are to allow for detecting power supply instability. - MCU instance - MCU Internal temperature - MCU voltage - MCU voltage minimum - MCU voltage maximum - - - diff --git a/message_definitions/common.xml b/message_definitions/common.xml deleted file mode 100644 index 11b44a7a6..000000000 --- a/message_definitions/common.xml +++ /dev/null @@ -1,7853 +0,0 @@ - - - standard.xml - 3 - 0 - - - These values define the type of firmware release. These values indicate the first version or release of this type. For example the first alpha release would be 64, the second would be 65. - - development release - - - alpha release - - - beta release - - - release candidate - - - official stable release - - - - Flags to report failure cases over the high latency telemetry. - - GPS failure. - - - Differential pressure sensor failure. - - - Absolute pressure sensor failure. - - - Accelerometer sensor failure. - - - Gyroscope sensor failure. - - - Magnetometer sensor failure. - - - Terrain subsystem failure. - - - Battery failure/critical low battery. - - - RC receiver failure/no RC connection. - - - Offboard link failure. - - - Engine failure. - - - Geofence violation. - - - Estimator failure, for example measurement rejection or large variances. - - - Mission failure. - - - - Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution. - - Hold at the current position. - - - Continue with the next item in mission execution. - - - Hold at the current position of the system - - - Hold at the position specified in the parameters of the DO_HOLD action - - - - These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it - simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override. - - System is not ready to fly, booting, calibrating, etc. No flag is set. - - - System is allowed to be active, under assisted RC control. - - - System is allowed to be active, under assisted RC control. - - - System is allowed to be active, under manual (RC) control, no stabilization - - - System is allowed to be active, under manual (RC) control, no stabilization - - - System is allowed to be active, under autonomous control, manual setpoint - - - System is allowed to be active, under autonomous control, manual setpoint - - - System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints) - - - System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints) - - - UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. - - - UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. - - - - These encode the sensors whose status is sent as part of the SYS_STATUS message. - - 0x01 3D gyro - - - 0x02 3D accelerometer - - - 0x04 3D magnetometer - - - 0x08 absolute pressure - - - 0x10 differential pressure - - - 0x20 GPS - - - 0x40 optical flow - - - 0x80 computer vision position - - - 0x100 laser based position - - - 0x200 external ground truth (Vicon or Leica) - - - 0x400 3D angular rate control - - - 0x800 attitude stabilization - - - 0x1000 yaw position - - - 0x2000 z/altitude control - - - 0x4000 x/y position control - - - 0x8000 motor outputs / control - - - 0x10000 RC receiver - - - 0x20000 2nd 3D gyro - - - 0x40000 2nd 3D accelerometer - - - 0x80000 2nd 3D magnetometer - - - 0x100000 geofence - - - 0x200000 AHRS subsystem health - - - 0x400000 Terrain subsystem health - - - 0x800000 Motors are reversed - - - 0x1000000 Logging - - - 0x2000000 Battery - - - 0x4000000 Proximity - - - 0x8000000 Satellite Communication - - - 0x10000000 pre-arm check status. Always healthy when armed - - - 0x20000000 Avoidance/collision prevention - - - 0x40000000 propulsion (actuator, esc, motor or propellor) - - - 0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only) - - - - These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields. - - 0x01 Recovery system (parachute, balloon, retracts etc) - - - - Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles. - - Global frames use the following naming conventions: - - "GLOBAL": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default. - The following modifiers may be used with "GLOBAL": - - "RELATIVE_ALT": Altitude is relative to the vehicle home position rather than MSL. - - "TERRAIN_ALT": Altitude is relative to ground level rather than MSL. - - "INT": Latitude/longitude (in degrees) are scaled by multiplying by 1E7. - - Local frames use the following naming conventions: - - "LOCAL": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator ("EKF"). - - "BODY": Origin of local frame travels with the vehicle. NOTE, "BODY" does NOT indicate alignment of frame axis with vehicle attitude. - - "OFFSET": Deprecated synonym for "BODY" (origin travels with the vehicle). Not to be used for new frames. - - Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED). - - - Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL). - - - NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth. - - - NOT a coordinate frame, indicates a mission command. - - - - Global (WGS84) coordinate frame + altitude relative to the home position. - - - - ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth. - - - Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. - Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL). - - - Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. - Global (WGS84) coordinate frame (scaled) + altitude relative to the home position. - - - NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle. - - - - Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values. - - - - This is the same as MAV_FRAME_BODY_FRD. - - - Global (WGS84) coordinate frame with AGL altitude (altitude at ground level). - - - Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. - Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level). - - - FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle. - - - - MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up). - - - - MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down). - - - - MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up). - - - - MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down). - - - - MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up). - - - - MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down). - - - - MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up). - - - FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane. - - - FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane. - - - - - - - - - - - - - - - - - - - - - - - - - Actions following geofence breach. - - Disable fenced mode. If used in a plan this would mean the next fence is disabled. - - - Fly to geofence MAV_CMD_NAV_FENCE_RETURN_POINT in GUIDED mode. Note: This action is only supported by ArduPlane, and may not be supported in all versions. - - - Report fence breach, but don't take action - - - Fly to geofence MAV_CMD_NAV_FENCE_RETURN_POINT with manual throttle control in GUIDED mode. Note: This action is only supported by ArduPlane, and may not be supported in all versions. - - - Return/RTL mode. - - - Hold at current location. - - - Termination failsafe. Motors are shut down (some flight stacks may trigger other failsafe actions). - - - Land at current location. - - - - - No last fence breach - - - Breached minimum altitude - - - Breached maximum altitude - - - Breached fence boundary - - - - - Actions being taken to mitigate/prevent fence breach - - Unknown - - - No actions being taken - - - Velocity limiting active to prevent breach - - - - - - All fence types - - - Maximum altitude fence - - - Circle fence - - - Polygon fence - - - Minimum altitude fence - - - - - - Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages. - - Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization - - - Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory. - - - Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization - - - Load neutral position and start RC Roll,Pitch,Yaw control with stabilization - - - Load neutral position and start to point to Lat,Lon,Alt - - - Gimbal tracks system with specified system ID - - - Gimbal tracks home position - - - - Gimbal device (low level) capability flags (bitmap). - - Gimbal device supports a retracted position. - - - Gimbal device supports a horizontal, forward looking position, stabilized. - - - Gimbal device supports rotating around roll axis. - - - Gimbal device supports to follow a roll angle relative to the vehicle. - - - Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized). - - - Gimbal device supports rotating around pitch axis. - - - Gimbal device supports to follow a pitch angle relative to the vehicle. - - - Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized). - - - Gimbal device supports rotating around yaw axis. - - - Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default). - - - Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available). - - - Gimbal device supports yawing/panning infinitely (e.g. using slip disk). - - - Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME. - - - Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation. - - - - Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags. - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME. - - - Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS. - - - Gimbal manager supports to point to a local position. - - - Gimbal manager supports to point to a global latitude, longitude, altitude position. - - - - Flags for gimbal device (lower level) operation. - - Set to retracted safe position (no stabilization), takes precedence over all other flags. - - - Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation. - - - Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal. - - - Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal. - - - Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward). - - - Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward). - - - Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North). - - - Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored). - - - The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored. - - - The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation. - - - - Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS. - - Based on GIMBAL_DEVICE_FLAGS_RETRACT. - - - Based on GIMBAL_DEVICE_FLAGS_NEUTRAL. - - - Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK. - - - Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK. - - - Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK. - - - Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME. - - - Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME. - - - Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME. - - - Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE. - - - Based on GIMBAL_DEVICE_FLAGS_RC_MIXED. - - - - Gimbal device (low level) error flags (bitmap, 0 means no error) - - Gimbal device is limited by hardware roll limit. - - - Gimbal device is limited by hardware pitch limit. - - - Gimbal device is limited by hardware yaw limit. - - - There is an error with the gimbal encoders. - - - There is an error with the gimbal power source. - - - There is an error with the gimbal motors. - - - There is an error with the gimbal's software. - - - There is an error with the gimbal's communication. - - - Gimbal device is currently calibrating. - - - Gimbal device is not assigned to a gimbal manager. - - - - - Gripper actions. - - Gripper release cargo. - - - Gripper grab onto cargo. - - - - - Winch actions. - - Allow motor to freewheel. - - - Wind or unwind specified length of line, optionally using specified rate. - - - Wind or unwind line at specified rate. - - - Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored. - - - Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored. - - - Engage motor and hold current position. Only action and instance command parameters are used, others are ignored. - - - Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored. - - - Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored. - - - Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored. - - - Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored - - - - - Generalized UAVCAN node health - - The node is functioning properly. - - - A critical parameter went out of range or the node has encountered a minor failure. - - - The node has encountered a major failure. - - - The node has suffered a fatal malfunction. - - - - - Generalized UAVCAN node mode - - The node is performing its primary functions. - - - The node is initializing; this mode is entered immediately after startup. - - - The node is under maintenance. - - - The node is in the process of updating its software. - - - The node is no longer available online. - - - - - Indicates the ESC connection type. - - Traditional PPM ESC. - - - Serial Bus connected ESC. - - - One Shot PPM ESC. - - - I2C ESC. - - - CAN-Bus ESC. - - - DShot ESC. - - - - - Flags to report ESC failures. - - No ESC failure. - - - Over current failure. - - - Over voltage failure. - - - Over temperature failure. - - - Over RPM failure. - - - Inconsistent command failure i.e. out of bounds. - - - Motor stuck failure. - - - Generic ESC failure. - - - - Flags to indicate the status of camera storage. - - Storage is missing (no microSD card loaded for example.) - - - Storage present but unformatted. - - - Storage present and ready. - - - Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored. - - - - Flags to indicate the type of storage. - - Storage type is not known. - - - Storage type is USB device. - - - Storage type is SD card. - - - Storage type is microSD card. - - - Storage type is CFast. - - - Storage type is CFexpress. - - - Storage type is XQD. - - - Storage type is HD mass storage type. - - - Storage type is other, not listed type. - - - - Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE). - - Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported). - - - Storage for saving photos. - - - Storage for saving videos. - - - Storage for saving logs. - - - - Yaw behaviour during orbit flight. - - Vehicle front points to the center (default). - - - Vehicle front holds heading when message received. - - - Yaw uncontrolled. - - - Vehicle front follows flight path (tangential to circle). - - - Yaw controlled by RC input. - - - Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded. - - - - Possible responses from a WIFI_CONFIG_AP message. - - Undefined response. Likely an indicative of a system that doesn't support this request. - - - Changes accepted. - - - Changes rejected. - - - Invalid Mode. - - - Invalid SSID. - - - Invalid Password. - - - - Possible responses from a CELLULAR_CONFIG message. - - Changes accepted. - - - Invalid APN. - - - Invalid PIN. - - - Changes rejected. - - - PUK is required to unblock SIM card. - - - - WiFi Mode. - - WiFi mode is undefined. - - - WiFi configured as an access point. - - - WiFi configured as a station connected to an existing local WiFi network. - - - WiFi disabled. - - - - Supported component metadata types. These are used in the "general" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages. - - General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI. - - - Parameter meta data. - - - Meta data that specifies which commands and command parameters the vehicle supports. (WIP) - - - Meta data that specifies external non-MAVLink peripherals. - - - Meta data for the events interface. - - - Meta data for actuator configuration (motors, servos and vehicle geometry) and testing. - - - - Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands. - - Do nothing. - - - Command the actuator to beep now. - - - Permanently set the actuator (ESC) to 3D mode (reversible thrust). - - - Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust). - - - Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise). - - - Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1). - - - - Actuator output function. Values greater or equal to 1000 are autopilot-specific. - - No function (disabled). - - - Motor 1 - - - Motor 2 - - - Motor 3 - - - Motor 4 - - - Motor 5 - - - Motor 6 - - - Motor 7 - - - Motor 8 - - - Motor 9 - - - Motor 10 - - - Motor 11 - - - Motor 12 - - - Motor 13 - - - Motor 14 - - - Motor 15 - - - Motor 16 - - - Servo 1 - - - Servo 2 - - - Servo 3 - - - Servo 4 - - - Servo 5 - - - Servo 6 - - - Servo 7 - - - Servo 8 - - - Servo 9 - - - Servo 10 - - - Servo 11 - - - Servo 12 - - - Servo 13 - - - Servo 14 - - - Servo 15 - - - Servo 16 - - - - Enable axes that will be tuned via autotuning. Used in MAV_CMD_DO_AUTOTUNE_ENABLE. - - Flight stack tunes axis according to its default settings. - - - Autotune roll axis. - - - Autotune pitch axis. - - - Autotune yaw axis. - - - - - Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. - (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.) - - - Read all parameters from persistent storage. Replaces values in volatile storage. - - - Write all parameter values to persistent storage (flash/EEPROM) - - - Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics. - - - Reset only sensor calibration parameters to factory defaults (or firmware default if not available) - - - Reset all parameters, including operation counters, to default values - - - - - Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. - (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.) - - - Read current mission data from persistent storage - - - Write current mission data to persistent storage - - - Erase all mission data stored on the vehicle (both persistent and volatile storage) - - - - - - - - Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries - - Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION). - Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing) - Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached) - 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control. - Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude - Longitude - Altitude - - - Loiter around this waypoint an unlimited amount of time - Empty - Empty - Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise - Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude - Longitude - Altitude - - - Loiter around this waypoint for X turns - Number of turns. - Leave loiter circle only once heading towards the next waypoint (0 = False) - Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise - Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour. - Latitude - Longitude - Altitude - - - Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. - Loiter time (only starts once Lat, Lon and Alt is reached). - Leave loiter circle only once heading towards the next waypoint (0 = False) - Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise. - Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour. - Latitude - Longitude - Altitude - - - Return to launch location - Empty - Empty - Empty - Empty - Empty - Empty - Empty - - - Land at location. - Minimum target altitude if landing is aborted (0 = undefined/use system default). - Precision land mode. - Empty. - Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude. - Longitude. - Landing altitude (ground level in current frame). - - - Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. - Minimum pitch (if airspeed sensor present), desired pitch without sensor - Empty - Empty - Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude - Longitude - Altitude - - - Land at local position (local frame only) - Landing target number (if available) - Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land - Landing descend rate - Desired yaw angle - Y-axis position - X-axis position - Z-axis / ground level position - - - Takeoff from local position (local frame only) - Minimum pitch (if airspeed sensor present), desired pitch without sensor - Empty - Takeoff ascend rate - Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these - Y-axis position - X-axis position - Z-axis position - - - Vehicle following, i.e. this waypoint represents the position of a moving vehicle - Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation - Ground speed of vehicle to be followed - Radius around waypoint. If positive loiter clockwise, else counter-clockwise - Desired yaw angle. - Latitude - Longitude - Altitude - - - Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. - Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude. - Empty - Empty - Empty - Empty - Empty - Desired altitude - - - Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. - Leave loiter circle only once heading towards the next waypoint (0 = False) - Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter. - Empty - Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour. - Latitude - Longitude - Altitude - - - Begin following a target - System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode. - Reserved - Reserved - Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home. - Altitude above home. (used if mode=2) - Reserved - Time to land in which the MAV should go to the default position hold mode after a message RX timeout. - - - Reposition the MAV after a follow target command has been sent - Camera q1 (where 0 is on the ray from the camera to the tracking device) - Camera q2 - Camera q3 - Camera q4 - altitude offset from target - X offset from target - Y offset from target - - - - - Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. - Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting. - Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting. - Yaw behavior of the vehicle. - Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting. - Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting. - Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting. - Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude. - - - - Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. - Region of interest mode. - Waypoint index/ target ID. (see MAV_ROI enum) - ROI index (allows a vehicle to manage multiple ROI's) - Empty - x the location of the fixed ROI (see MAV_FRAME) - y - z - - - Control autonomous path planning on the MAV. - 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning - 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid - Empty - Yaw angle at goal - Latitude/X of goal - Longitude/Y of goal - Altitude/Z of goal - - - Navigate to waypoint using a spline path. - Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing) - Empty - Empty - Empty - Latitude/X of goal - Longitude/Y of goal - Altitude/Z of goal - - - Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). - Empty - Front transition heading. - Empty - Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude - Longitude - Altitude - - - Land using VTOL mode - Landing behaviour. - Empty - Approach altitude (with the same reference as the Altitude field). NaN if unspecified. - Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). - Latitude - Longitude - Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value). - - - - hand control over to an external controller - On / Off (> 0.5f on) - Empty - Empty - Empty - Empty - Empty - Empty - - - Delay the next navigation command a number of seconds or until a specified time - Delay (-1 to enable time-of-day fields) - hour (24h format, UTC, -1 to ignore) - minute (24h format, UTC, -1 to ignore) - second (24h format, UTC, -1 to ignore) - Empty - Empty - Empty - - - Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. - Maximum distance to descend. - Empty - Empty - Empty - Latitude - Longitude - Altitude - - - NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration - Empty - Empty - Empty - Empty - Empty - Empty - Empty - - - Delay mission state machine. - Delay - Empty - Empty - Empty - Empty - Empty - Empty - - - Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. - Descent / Ascend rate. - Empty - Empty - Empty - Empty - Empty - Target Altitude - - - Delay mission state machine until within desired distance of next NAV point. - Distance. - Empty - Empty - Empty - Empty - Empty - Empty - - - Reach a certain target angle. - target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3. - angular speed - direction: -1: counter clockwise, 0: shortest direction, 1: clockwise - 0: absolute angle, 1: relative offset - Empty - Empty - Empty - - - NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration - Empty - Empty - Empty - Empty - Empty - Empty - Empty - - - Set system mode. - Mode - Custom mode - this is system specific, please refer to the individual autopilot specifications for details. - Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details. - Empty - Empty - Empty - Empty - - - Jump to the desired command in the mission list. Repeat this action only the specified number of times - Sequence number - Repeat count - Empty - Empty - Empty - Empty - Empty - - - Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change - Speed type of value set in param2 (such as airspeed, ground speed, and so on) - Speed (-1 indicates no change, -2 indicates return to default vehicle speed) - Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value) - - - - - - - - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - - Use current (1=use current location, 0=use specified location) - Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll. - Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch. - Yaw angle. NaN to use default heading. Range: -180..180 degrees. - Latitude - Longitude - Altitude - - - - Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. - Parameter number - Parameter value - Empty - Empty - Empty - Empty - Empty - - - Set a relay to a condition. - Relay instance number. - Setting. (1=on, 0=off, others possible depending on system hardware) - Empty - Empty - Empty - Empty - Empty - - - Cycle a relay on and off for a desired number of cycles with a desired period. - Relay instance number. - Cycle count. - Cycle time. - Empty - Empty - Empty - Empty - - - Set a servo to a desired PWM value. - Servo instance number. - Pulse Width Modulation. - Empty - Empty - Empty - Empty - Empty - - - Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. - Servo instance number. - Pulse Width Modulation. - Cycle count. - Cycle time. - Empty - Empty - Empty - - - Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - - Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED. - Empty - Empty - Empty - Empty - Empty - Empty - - - Change altitude set point. - Altitude. - Frame of new altitude. - Empty - Empty - Empty - Empty - Empty - - - Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). - Actuator 1 value, scaled from [-1 to 1]. NaN to ignore. - Actuator 2 value, scaled from [-1 to 1]. NaN to ignore. - Actuator 3 value, scaled from [-1 to 1]. NaN to ignore. - Actuator 4 value, scaled from [-1 to 1]. NaN to ignore. - Actuator 5 value, scaled from [-1 to 1]. NaN to ignore. - Actuator 6 value, scaled from [-1 to 1]. NaN to ignore. - Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7) - - - - - Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - - Empty - Empty - Empty - Empty - Latitudee. 0: not used. - Longitudee. 0: not used. - Altitudee. 0: not used. - - - Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - - Empty - Empty - Empty - Empty - Latitude - Longitude - Altitude - - - Mission command to perform a landing from a rally point. - Break altitude - Landing speed - Empty - Empty - Empty - Empty - Empty - - - Mission command to safely abort an autonomous landing. - Altitude - Empty - Empty - Empty - Empty - Empty - Empty - - - Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). - Ground speed, less than 0 (-1) for default - Bitmask of option flags. - Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. - Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise) - Latitude - Longitude - Altitude - - - If in a GPS controlled position mode, hold the current position or continue. - 0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius. - Reserved - Reserved - Reserved - Reserved - Reserved - Reserved - - - Set moving direction to forward or reverse. - Direction (0=Forward, 1=Reverse) - Empty - Empty - Empty - Empty - Empty - Empty - - - Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Empty - Empty - Empty - Latitude of ROI location - Longitude of ROI location - Altitude of ROI location - - - Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Empty - Empty - Empty - Pitch offset from next waypoint, positive pitching up - Roll offset from next waypoint, positive rolling to the right - Yaw offset from next waypoint, positive yawing to the right - - - Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Empty - Empty - Empty - Empty - Empty - Empty - - - Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. - System ID - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - - - Control onboard camera system. - Camera ID (-1 for all) - Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw - Transmission mode: 0: video stream, >0: single images every n seconds - Recording: 0: disabled, 1: enabled compressed, 2: enabled raw - Empty - Empty - Empty - - - - Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. - Region of interest mode. - Waypoint index/ target ID (depends on param 1). - Region of interest index. (allows a vehicle to manage multiple ROI's) - Empty - MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude - MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude - MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude - - - - Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). - Modes: P, TV, AV, M, Etc. - Shutter speed: Divisor number for one second. - Aperture: F stop number. - ISO number e.g. 80, 100, 200, Etc. - Exposure type enumerator. - Command Identity. - Main engine cut-off time before camera trigger. (0 means no cut-off) - - - Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). - Session control e.g. show/hide lens - Zoom's absolute position - Zooming step value to offset zoom from the current position - Focus Locking, Unlocking or Re-locking - Shooting Command - Command Identity - Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count. - - - - This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. - Mission command to configure a camera or antenna mount - Mount operation mode - stabilize roll? (1 = yes, 0 = no) - stabilize pitch? (1 = yes, 0 = no) - stabilize yaw? (1 = yes, 0 = no) - roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame) - pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame) - yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame) - - - - This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and MAV_CMD_DO_SET_ROI_*. The message can still be used to communicate with legacy gimbals implementing it. - Mission command to control a camera or antenna mount - pitch depending on mount mode (degrees or degrees/second depending on pitch input). - roll depending on mount mode (degrees or degrees/second depending on roll input). - yaw depending on mount mode (degrees or degrees/second depending on yaw input). - altitude depending on mount mode. - latitude, set if appropriate mount mode. - longitude, set if appropriate mount mode. - Mount mode. - - - Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. - Camera trigger distance. 0 to stop triggering. - Camera shutter integration time. -1 or 0 to ignore - Trigger camera once immediately. (0 = no trigger, 1 = trigger) - Empty - Empty - Empty - Empty - - - - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - - enable? (0=disable, 1=enable, 2=disable_floor_only) - Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2 - Empty - Empty - Empty - Empty - Empty - - - Mission item/command to release a parachute or enable/disable auto release. - Action - Empty - Empty - Empty - Empty - Empty - Empty - - - Command to perform motor test. - Motor instance number (from 1 to max number of motors on the vehicle). - Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.) - Throttle value. - Timeout between tests that are run in sequence. - Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests. - Motor test order. - Empty - - - Change to/from inverted flight. - Inverted flight. (0=normal, 1=inverted) - Empty - Empty - Empty - Empty - Empty - Empty - - - Mission command to operate a gripper. - Gripper instance number. - Gripper action to perform. - Empty - Empty - Empty - Empty - Empty - - - Enable/disable autotune. - Enable (1: enable, 0:disable). - Specify which axis are autotuned. 0 indicates autopilot default settings. - Empty. - Empty. - Empty. - Empty. - Empty. - - - Sets a desired vehicle turn angle and speed change. - Yaw angle to adjust steering by. - Speed. - Final angle. (0=absolute, 1=relative) - Empty - Empty - Empty - Empty - - - Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. - Camera trigger cycle time. -1 or 0 to ignore. - Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore. - Empty - Empty - Empty - Empty - Empty - - - - Mission command to control a camera or antenna mount, using a quaternion as reference. - quaternion param q1, w (1 in null-rotation) - quaternion param q2, x (0 in null-rotation) - quaternion param q3, y (0 in null-rotation) - quaternion param q4, z (0 in null-rotation) - Empty - Empty - Empty - - - set id of master controller - System ID - Component ID - Empty - Empty - Empty - Empty - Empty - - - Set limits for external control - Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout. - Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit. - Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit. - Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit. - Empty - Empty - Empty - - - Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines - 0: Stop engine, 1:Start Engine - 0: Warm start, 1:Cold start. Controls use of choke where applicable - Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay. - Empty - Empty - Empty - Empty - - - - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - - Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item). - Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused". - Empty - Empty - Empty - Empty - Empty - - - NOP - This command is only used to mark the upper limit of the DO commands in the enumeration - Empty - Empty - Empty - Empty - Empty - Empty - Empty - - - Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. - 1: gyro calibration, 3: gyro temperature calibration - 1: magnetometer calibration - 1: ground pressure calibration - 1: radio RC calibration, 2: RC trim calibration - 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration - 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration - 1: ESC calibration, 3: barometer temperature calibration - - - Set sensor offsets. This command will be only accepted if in pre-flight mode. - Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer - X axis offset (or generic dimension 1), in the sensor's raw units - Y axis offset (or generic dimension 2), in the sensor's raw units - Z axis offset (or generic dimension 3), in the sensor's raw units - Generic dimension 4, in the sensor's raw units - Generic dimension 5, in the sensor's raw units - Generic dimension 6, in the sensor's raw units - - - Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). - 1: Trigger actuator ID assignment and direction mapping. 0: Cancel command. - Reserved - Reserved - Reserved - Reserved - Reserved - Reserved - - - Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. - Action to perform on the persistent parameter storage - Action to perform on the persistent mission storage - Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging) - Reserved - Empty - Empty - Empty - - - Request the reboot or shutdown of system components. - 0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded. - 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded. - 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded - MAVLink Component ID targeted in param3 (0 for all components). - Reserved (set to 0) - Reserved (set to 0) - WIP: ID (e.g. camera ID -1 for all IDs) - - - - Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. - MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission. - MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position. - Coordinate frame of hold point. - Desired yaw angle. - Latitude/X position. - Longitude/Y position. - Altitude/Z position. - - - Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. - Camera trigger distance. 0 to stop triggering. - Camera shutter integration time. 0 to ignore - The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore. - Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5). - Angle limits that the camera can be rolled to left and right of center. - Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis. - Empty - - - start running a mission - first_item: the first mission item to run - last_item: the last mission item to run (after this item is run, the mission ends) - - - Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. - Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors). - Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately. - - - Actuator Output function - - - - - Actuator configuration command. - Actuator configuration action - - - - Actuator Output function - - - - - Arms / Disarms a component - 0: disarm, 1: arm - 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight) - - - Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - - - - Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). - 0: Illuminators OFF, 1: Illuminators ON - - - Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). - Mode - 0%: Off, 100%: Max Brightness - Strobe period in seconds where 0 means strobing is not used - Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used - - - - Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. - Reserved - Reserved - Reserved - Reserved - Reserved - Reserved - Reserved - - - Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. - The unit which is affected by the failure. - The type how the failure manifests itself. - Instance affected by failure (0 to signal all). - - - Starts receiver pairing. - 0:Spektrum. - RC type. - - - - - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - - The MAVLink message ID - - - Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. - The MAVLink message ID - The interval between two messages. -1: disable. 0: request default rate (which may be zero). - Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast. - - - Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). - The MAVLink message ID of the requested message. - Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0). - The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0). - The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0). - The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0). - The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0). - Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast. - - - - Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message - 1: Request supported protocol versions by all nodes on the network - Reserved (all remaining params) - - - - Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message - 1: Request autopilot version - Reserved (all remaining params) - - - - Request camera information (CAMERA_INFORMATION). - 0: No action 1: Request camera capabilities - Reserved (all remaining params) - - - - Request camera settings (CAMERA_SETTINGS). - 0: No Action 1: Request camera settings - Reserved (all remaining params) - - - - Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. - Storage ID (0 for all, 1 for first, 2 for second, etc.) - 0: No Action 1: Request storage information - Reserved (all remaining params) - - - Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. - Storage ID (1 for first, 2 for second, etc.) - Format storage (and reset image log). 0: No action 1: Format storage - Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log - Reserved (all remaining params) - - - - Request camera capture status (CAMERA_CAPTURE_STATUS) - 0: No Action 1: Request camera capture status - Reserved (all remaining params) - - - - Request flight information (FLIGHT_INFORMATION) - 1: Request flight information - Reserved (all remaining params) - - - Reset all camera settings to Factory Default - 0: No Action 1: Reset all settings - Reserved (all remaining params) - - - Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. - Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission - Camera mode - - - - - - Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). - Zoom type - Zoom value. The range of valid values depend on the zoom type. - - - - - - Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). - Focus type - Focus value - - - - - - Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. - Storage ID (1 for first, 2 for second, etc.) - Usage flags - - - Set camera source. Changes the camera's active sources on cameras with multiple image sensors. - Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras. - Primary Source - Secondary Source. If non-zero the second source will be displayed as picture-in-picture. - - - Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. - Tag. - - - Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. - Target tag to jump to. - Repeat count. - - - - Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. - Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode). - Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode). - Pitch rate (positive to pitch up). - Yaw rate (positive to yaw to the right). - Gimbal manager flags to use. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - - - Gimbal configuration to set which sysid/compid is in primary and secondary control. - Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control). - Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control). - Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control). - Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control). - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - - - Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - - Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission - Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds). - Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE. - Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted. - - - - - - Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - - Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission - - - - - - - - - - Re-request a CAMERA_IMAGE_CAPTURED message. - Sequence number for missing CAMERA_IMAGE_CAPTURED message - - - - - - - - - Enable or disable on-board camera triggering system. - Trigger enable/disable (0 for disable, 1 for start), -1 to ignore - 1 to reset the trigger sequence, -1 or 0 to ignore - 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore - - - If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. - Point to track x value (normalized 0..1, 0 is left, 1 is right). - Point to track y value (normalized 0..1, 0 is top, 1 is bottom). - Point radius (normalized 0..1, 0 is one pixel, 1 is full image width). - - - If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. - Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right). - Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom). - Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right). - Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom). - - - Stops ongoing tracking. - - - Starts video capture (recording). - Video Stream ID (0 for all streams) - Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency) - - - - - - - - Stop the current video capture (recording). - Video Stream ID (0 for all streams) - - - - - - - - - Start video streaming - Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.) - - - Stop the given video stream - Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.) - - - - Request video stream information (VIDEO_STREAM_INFORMATION) - Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.) - - - - Request video stream status (VIDEO_STREAM_STATUS) - Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.) - - - Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) - Format: 0: ULog - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - - - Request to stop streaming log data over MAVLink - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - - - - Landing gear ID (default: 0, -1 for all) - Landing gear position (Down: 0, Up: 1, NaN for no change) - - - - - - - - Request to start/stop transmitting over the high latency telemetry - Control transmission over high latency telemetry (0: stop, 1: start) - Empty - Empty - Empty - Empty - Empty - Empty - - - Create a panorama at the current position - Viewing angle horizontal of the panorama (+- 0.5 the total angle) - Viewing angle vertical of panorama. - Speed of the horizontal rotation. - Speed of the vertical rotation. - - - Request VTOL transition - The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used. - Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command. - - - Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - - Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle - - - This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - - - - This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - - Radius of desired circle in CIRCLE_MODE - User defined - User defined - User defined - Target latitude of center of circle in CIRCLE_MODE - Target longitude of center of circle in CIRCLE_MODE - - - - - Delay mission state machine until gate has been reached. - Geometry: 0: orthogonal to path between previous and next waypoint. - Altitude: 0: ignore altitude - Empty - Empty - Latitude - Longitude - Altitude - - - Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. - Reserved - Reserved - Reserved - Reserved - Latitude - Longitude - Altitude - - - Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - - Polygon vertex count - Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon - Reserved - Reserved - Latitude - Longitude - Reserved - - - Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - - Polygon vertex count - Reserved - Reserved - Reserved - Latitude - Longitude - Reserved - - - Circular fence area. The vehicle must stay inside this area. - - Radius. - Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group - Reserved - Reserved - Latitude - Longitude - Reserved - - - Circular fence area. The vehicle must stay outside this area. - - Radius. - Reserved - Reserved - Reserved - Latitude - Longitude - Reserved - - - - Rally point. You can have multiple rally points defined. - - Reserved - Reserved - Reserved - Reserved - Latitude - Longitude - Altitude - - - - - Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - - - - Change state of safety switch. - New safety switch state. - Empty. - Empty. - Empty - Empty. - Empty. - Empty. - - - Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - Reserved (set to 0) - - - - - - - Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. - Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list. - Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will. - Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will. - Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will. - Latitude. - Longitude. - Altitude (MSL) - - - - Control the payload deployment. - Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests. - Reserved - Reserved - Reserved - Reserved - Reserved - Reserved - - - - Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. - Yaw of vehicle in earth frame. - CompassMask, 0 for all. - Latitude. - Longitude. - Empty. - Empty. - Empty. - - - Command to operate winch. - Winch instance number. - Action to perform. - Length of line to release (negative to wind). - Release rate (negative to wind). - Empty. - Empty. - Empty. - - - - Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. - Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy. - The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known. - estimated one standard deviation accuracy of the measurement. Set to NaN if not known. - Empty - Latitude - Longitude - Altitude, not used. Should be sent as NaN. May be supported in a future version of this message. - - - - - User defined waypoint item. Ground Station will show the Vehicle as flying through this item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined waypoint item. Ground Station will show the Vehicle as flying through this item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined waypoint item. Ground Station will show the Vehicle as flying through this item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined waypoint item. Ground Station will show the Vehicle as flying through this item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined waypoint item. Ground Station will show the Vehicle as flying through this item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. - User defined - User defined - User defined - User defined - Latitude unscaled - Longitude unscaled - Altitude (MSL) - - - User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. - User defined - User defined - User defined - User defined - User defined - User defined - User defined - - - - Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages - Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus). - Empty. - Empty. - Empty. - Empty. - Empty. - Empty. - - - - - A data stream is not a fixed set of messages, but rather a - recommendation to the autopilot software. Individual autopilots may or may not obey - the recommended messages. - - Enable all data streams - - - Enable IMU_RAW, GPS_RAW, GPS_STATUS packets. - - - Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS - - - Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW - - - Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. - - - Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages. - - - Dependent on the autopilot - - - Dependent on the autopilot - - - Dependent on the autopilot - - - - - The ROI (region of interest) for the vehicle. This can be - be used by the vehicle for camera/vehicle attitude alignment (see - MAV_CMD_NAV_ROI). - - No region of interest. - - - Point toward next waypoint, with optional pitch/roll/yaw offset. - - - Point toward given waypoint. - - - Point toward fixed location. - - - Point toward of given id. - - - - Specifies the datatype of a MAVLink parameter. - - 8-bit unsigned integer - - - 8-bit signed integer - - - 16-bit unsigned integer - - - 16-bit signed integer - - - 32-bit unsigned integer - - - 32-bit signed integer - - - 64-bit unsigned integer - - - 64-bit signed integer - - - 32-bit floating-point - - - 64-bit floating-point - - - - Specifies the datatype of a MAVLink extended parameter. - - 8-bit unsigned integer - - - 8-bit signed integer - - - 16-bit unsigned integer - - - 16-bit signed integer - - - 32-bit unsigned integer - - - 32-bit signed integer - - - 64-bit unsigned integer - - - 64-bit signed integer - - - 32-bit floating-point - - - 64-bit floating-point - - - Custom Type - - - - Result from a MAVLink command (MAV_CMD) - - Command is valid (is supported and has valid parameters), and was executed. - - - Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work. - - - Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work. - - - Command is not supported (unknown). - - - Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc. - - - Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation. - - - Command has been cancelled (as a result of receiving a COMMAND_CANCEL message). - - - Command is only accepted when sent as a COMMAND_LONG. - - - Command is only accepted when sent as a COMMAND_INT. - - - Command is invalid because a frame is required and the specified frame is not supported. - - - - Result of mission operation (in a MISSION_ACK message). - - mission accepted OK - - - Generic error / not accepting mission commands at all right now. - - - Coordinate frame is not supported. - - - Command is not supported. - - - Mission items exceed storage space. - - - One of the parameters has an invalid value. - - - param1 has an invalid value. - - - param2 has an invalid value. - - - param3 has an invalid value. - - - param4 has an invalid value. - - - x / param5 has an invalid value. - - - y / param6 has an invalid value. - - - z / param7 has an invalid value. - - - Mission item received out of sequence - - - Not accepting any mission commands from this communication partner. - - - Current mission operation cancelled (e.g. mission upload, mission download). - - - - Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: http://www.kiwisyslog.com/kb/info:-syslog-message-levels/. - - System is unusable. This is a "panic" condition. - - - Action should be taken immediately. Indicates error in non-critical systems. - - - Action must be taken immediately. Indicates failure in a primary system. - - - Indicates an error in secondary/redundant systems. - - - Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning. - - - An unusual event has occurred, though not an error condition. This should be investigated for the root cause. - - - Normal operational messages. Useful for logging. No action is required for these messages. - - - Useful non-operational messages that can assist in debugging. These should not occur during normal operation. - - - - Power supply status flags (bitmask) - - main brick power supply valid - - - main servo power supply valid for FMU - - - USB power is connected - - - peripheral supply is in over-current state - - - hi-power peripheral supply is in over-current state - - - Power status has changed since boot - - - - SERIAL_CONTROL device types - - First telemetry port - - - Second telemetry port - - - First GPS port - - - Second GPS port - - - system shell - - - SERIAL0 - - - SERIAL1 - - - SERIAL2 - - - SERIAL3 - - - SERIAL4 - - - SERIAL5 - - - SERIAL6 - - - SERIAL7 - - - SERIAL8 - - - SERIAL9 - - - - SERIAL_CONTROL flags (bitmask) - - Set if this is a reply - - - Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message - - - Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set - - - Block on writes to the serial port - - - Send multiple replies until port is drained - - - - Enumeration of distance sensor types - - Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units - - - Ultrasound rangefinder, e.g. MaxBotix units - - - Infrared rangefinder, e.g. Sharp units - - - Radar type, e.g. uLanding units - - - Broken or unknown type, e.g. analog units - - - - Enumeration of sensor orientation, according to its rotations - - Roll: 0, Pitch: 0, Yaw: 0 - - - Roll: 0, Pitch: 0, Yaw: 45 - - - Roll: 0, Pitch: 0, Yaw: 90 - - - Roll: 0, Pitch: 0, Yaw: 135 - - - Roll: 0, Pitch: 0, Yaw: 180 - - - Roll: 0, Pitch: 0, Yaw: 225 - - - Roll: 0, Pitch: 0, Yaw: 270 - - - Roll: 0, Pitch: 0, Yaw: 315 - - - Roll: 180, Pitch: 0, Yaw: 0 - - - Roll: 180, Pitch: 0, Yaw: 45 - - - Roll: 180, Pitch: 0, Yaw: 90 - - - Roll: 180, Pitch: 0, Yaw: 135 - - - Roll: 0, Pitch: 180, Yaw: 0 - - - Roll: 180, Pitch: 0, Yaw: 225 - - - Roll: 180, Pitch: 0, Yaw: 270 - - - Roll: 180, Pitch: 0, Yaw: 315 - - - Roll: 90, Pitch: 0, Yaw: 0 - - - Roll: 90, Pitch: 0, Yaw: 45 - - - Roll: 90, Pitch: 0, Yaw: 90 - - - Roll: 90, Pitch: 0, Yaw: 135 - - - Roll: 270, Pitch: 0, Yaw: 0 - - - Roll: 270, Pitch: 0, Yaw: 45 - - - Roll: 270, Pitch: 0, Yaw: 90 - - - Roll: 270, Pitch: 0, Yaw: 135 - - - Roll: 0, Pitch: 90, Yaw: 0 - - - Roll: 0, Pitch: 270, Yaw: 0 - - - Roll: 0, Pitch: 180, Yaw: 90 - - - Roll: 0, Pitch: 180, Yaw: 270 - - - Roll: 90, Pitch: 90, Yaw: 0 - - - Roll: 180, Pitch: 90, Yaw: 0 - - - Roll: 270, Pitch: 90, Yaw: 0 - - - Roll: 90, Pitch: 180, Yaw: 0 - - - Roll: 270, Pitch: 180, Yaw: 0 - - - Roll: 90, Pitch: 270, Yaw: 0 - - - Roll: 180, Pitch: 270, Yaw: 0 - - - Roll: 270, Pitch: 270, Yaw: 0 - - - Roll: 90, Pitch: 180, Yaw: 90 - - - Roll: 90, Pitch: 0, Yaw: 270 - - - Roll: 90, Pitch: 68, Yaw: 293 - - - Pitch: 315 - - - Roll: 90, Pitch: 315 - - - Custom orientation - - - - Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability. - - Autopilot supports the MISSION_ITEM float message type. - Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead. - - - - - Autopilot supports the new param float message type. - - - Autopilot supports MISSION_ITEM_INT scaled integer message type. - Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated). - - - - Autopilot supports COMMAND_INT scaled integer message type. - - - Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. - Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported. - - - - Autopilot supports the File Transfer Protocol v1: https://mavlink.io/en/services/ftp.html. - - - Autopilot supports commanding attitude offboard. - - - Autopilot supports commanding position and velocity targets in local NED frame. - - - Autopilot supports commanding position and velocity targets in global scaled integers. - - - Autopilot supports terrain protocol / data handling. - - - Reserved for future use. - - - Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination). - - - Autopilot supports onboard compass calibration. - - - Autopilot supports MAVLink version 2. - - - Autopilot supports mission fence protocol. - - - Autopilot supports mission rally point protocol. - - - Reserved for future use. - - - Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. - Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported. - - - - - Type of mission items being requested/sent in mission protocol. - - Items are mission commands for main mission. - - - Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items. - - - Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items. - - - Only used in MISSION_CLEAR_ALL to clear all mission types. - - - - Enumeration of estimator types - - Unknown type of the estimator. - - - This is a naive estimator without any real covariance feedback. - - - Computer vision based estimate. Might be up to scale. - - - Visual-inertial estimate. - - - Plain GPS estimate. - - - Estimator integrating GPS and inertial sensing. - - - Estimate from external motion capturing system. - - - Estimator based on lidar sensor input. - - - Estimator on autopilot. - - - - Enumeration of battery types - - Not specified. - - - Lithium polymer battery - - - Lithium-iron-phosphate battery - - - Lithium-ION battery - - - Nickel metal hydride battery - - - - Enumeration of battery functions - - Battery function is unknown - - - Battery supports all flight systems - - - Battery for the propulsion system - - - Avionics battery - - - Payload battery - - - - Enumeration for battery charge states. - - Low battery state is not provided - - - Battery is not in low state. Normal operation. - - - Battery state is low, warn and monitor close. - - - Battery state is critical, return or abort immediately. - - - Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage. - - - Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT. - - - Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT. - - - Battery is charging. - - - - Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight. - - Battery mode not supported/unknown battery mode/normal operation. - - - Battery is auto discharging (towards storage level). - - - Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits). - - - - Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set. - - Battery has deep discharged. - - - Voltage spikes. - - - One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used). - - - Over-current fault. - - - Over-temperature fault. - - - Under-temperature fault. - - - Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage). - - - Battery firmware is not compatible with current autopilot firmware. - - - Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s). - - - - Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly). - - Generator is off. - - - Generator is ready to start generating power. - - - Generator is generating power. - - - Generator is charging the batteries (generating enough power to charge and provide the load). - - - Generator is operating at a reduced maximum power. - - - Generator is providing the maximum output. - - - Generator is near the maximum operating temperature, cooling is insufficient. - - - Generator hit the maximum operating temperature and shutdown. - - - Power electronics are near the maximum operating temperature, cooling is insufficient. - - - Power electronics hit the maximum operating temperature and shutdown. - - - Power electronics experienced a fault and shutdown. - - - The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening. - - - Generator controller having communication problems. - - - Power electronic or generator cooling system error. - - - Generator controller power rail experienced a fault. - - - Generator controller exceeded the overcurrent threshold and shutdown to prevent damage. - - - Generator controller detected a high current going into the batteries and shutdown to prevent battery damage. - - - Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating. - - - Batteries are under voltage (generator will not start). - - - Generator start is inhibited by e.g. a safety switch. - - - Generator requires maintenance. - - - Generator is not ready to generate yet. - - - Generator is idle. - - - - Enumeration of VTOL states - - MAV is not configured as VTOL - - - VTOL is in transition from multicopter to fixed-wing - - - VTOL is in transition from fixed-wing to multicopter - - - VTOL is in multicopter state - - - VTOL is in fixed-wing state - - - - Enumeration of landed detector states - - MAV landed state is unknown - - - MAV is landed (on ground) - - - MAV is in air - - - MAV currently taking off - - - MAV currently landing - - - - Enumeration of the ADSB altimeter types - - Altitude reported from a Baro source using QNH reference - - - Altitude reported from a GNSS source - - - - ADSB classification for the type of vehicle emitting the transponder signal - - - - - - - - - - - - - - - - - - - - - - - These flags indicate status such as data validity of each data source. Set = data valid - - - - - - - - - - - - - Bitmap of options for the MAV_CMD_DO_REPOSITION - - The aircraft should immediately transition into guided. This should not be set for follow me applications - - - - Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED - - Airspeed - - - Groundspeed - - - Climb speed - - - Descent speed - - - - - Flags in ESTIMATOR_STATUS message - - True if the attitude estimate is good - - - True if the horizontal velocity estimate is good - - - True if the vertical velocity estimate is good - - - True if the horizontal position (relative) estimate is good - - - True if the horizontal position (absolute) estimate is good - - - True if the vertical position (absolute) estimate is good - - - True if the vertical position (above ground) estimate is good - - - True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow) - - - True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate - - - True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate - - - True if the EKF has detected a GPS glitch - - - True if the EKF has detected bad accelerometer data - - - - - Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST. - - Default autopilot motor test method. - - - Motor numbers are specified as their index in a predefined vehicle-specific sequence. - - - Motor numbers are specified as the output as labeled on the board. - - - - - Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST. - - Throttle as a percentage (0 ~ 100) - - - Throttle as an absolute PWM value (normally in range of 1000~2000). - - - Throttle pass-through from pilot's transmitter. - - - Per-motor compass calibration test. - - - - - - ignore altitude field - - - ignore hdop field - - - ignore vdop field - - - ignore horizontal velocity field (vn and ve) - - - ignore vertical velocity field (vd) - - - ignore speed accuracy field - - - ignore horizontal accuracy field - - - ignore vertical accuracy field - - - - Possible actions an aircraft can take to avoid a collision. - - Ignore any potential collisions - - - Report potential collision - - - Ascend or Descend to avoid threat - - - Move horizontally to avoid threat - - - Aircraft to move perpendicular to the collision's velocity vector - - - Aircraft to fly directly back to its launch point - - - Aircraft to stop in place - - - - Aircraft-rated danger from this threat. - - Not a threat - - - Craft is mildly concerned about this threat - - - Craft is panicking, and may take actions to avoid threat - - - - Source of information about this collision. - - ID field references ADSB_VEHICLE packets - - - ID field references MAVLink SRC ID - - - - Type of GPS fix - - No GPS connected - - - No position information, GPS is connected - - - 2D position - - - 3D position - - - DGPS/SBAS aided 3D position - - - RTK float, 3D position - - - RTK Fixed, 3D position - - - Static fixed, typically used for base stations - - - PPP, 3D position. - - - - RTK GPS baseline coordinate system, used for RTK corrections - - Earth-centered, Earth-fixed - - - RTK basestation centered, north, east, down - - - - Type of landing target - - Landing target signaled by light beacon (ex: IR-LOCK) - - - Landing target signaled by radio beacon (ex: ILS, NDB) - - - Landing target represented by a fiducial marker (ex: ARTag) - - - Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square) - - - - Direction of VTOL transition - - Respect the heading configuration of the vehicle. - - - Use the heading pointing towards the next waypoint. - - - Use the heading on takeoff (while sitting on the ground). - - - Use the specified heading in parameter 4. - - - Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active). - - - - Camera capability flags (Bitmap) - - Camera is able to record video - - - Camera is able to capture images - - - Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE) - - - Camera can capture images while in video mode - - - Camera can capture videos while in Photo/Image mode - - - Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE) - - - Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM) - - - Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS) - - - Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info) - - - Camera supports tracking of a point on the camera view. - - - Camera supports tracking of a selection rectangle on the camera view. - - - Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS). - - - - Stream status flags (Bitmap) - - Stream is active (running) - - - Stream is thermal imaging - - - - Video stream types - - Stream is RTSP - - - Stream is RTP UDP (URI gives the port number) - - - Stream is MPEG on TCP - - - Stream is MPEG TS (URI gives the port number) - - - - Video stream encodings - - Stream encoding is unknown - - - Stream encoding is H.264 - - - Stream encoding is H.265 - - - - Camera tracking status flags - - Camera is not tracking - - - Camera is tracking - - - Camera tracking in error state - - - - Camera tracking modes - - Not tracking - - - Target is a point - - - Target is a rectangle - - - - Camera tracking target data (shows where tracked target is within image) - - No target data - - - Target data embedded in image data (proprietary) - - - Target data rendered in image - - - Target data within status message (Point or Rectangle) - - - - Zoom types for MAV_CMD_SET_CAMERA_ZOOM - - Zoom one step increment (-1 for wide, 1 for tele) - - - Continuous zoom up/down until stopped (-1 for wide, 1 for tele, 0 to stop zooming) - - - Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0) - - - Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera) - - - Zoom value as horizontal field of view in degrees. - - - - Focus types for MAV_CMD_SET_CAMERA_FOCUS - - Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity). - - - Continuous focus up/down until stopped (-1 for focusing in, 1 for focusing out towards infinity, 0 to stop focusing) - - - Focus value as proportion of full camera focus range (a value between 0.0 and 100.0) - - - Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera). - - - Focus automatically. - - - Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S. - - - Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C. - - - - Camera sources for MAV_CMD_SET_CAMERA_SOURCE - - Default camera source. - - - RGB camera source. - - - IR camera source. - - - NDVI camera source. - - - - Result from PARAM_EXT_SET message (or a PARAM_SET within a transaction). - - Parameter value ACCEPTED and SET - - - Parameter value UNKNOWN/UNSUPPORTED - - - Parameter failed to set - - - Parameter value received but not yet set/accepted. A subsequent PARAM_ACK_TRANSACTION or PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent. - - - - Camera Modes. - - Camera is in image/photo capture mode. - - - Camera is in video capture mode. - - - Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys. - - - - - Not a specific reason - - - Authorizer will send the error as string to GCS - - - At least one waypoint have a invalid value - - - Timeout in the authorizer process(in case it depends on network) - - - Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied. - - - Weather is not good to fly - - - - RC type - - Spektrum DSM2 - - - Spektrum DSMX - - - - Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration. - - Ignore position x - - - Ignore position y - - - Ignore position z - - - Ignore velocity x - - - Ignore velocity y - - - Ignore velocity z - - - Ignore acceleration x - - - Ignore acceleration y - - - Ignore acceleration z - - - Use force instead of acceleration - - - Ignore yaw - - - Ignore yaw rate - - - - Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored. - - Ignore body roll rate - - - Ignore body pitch rate - - - Ignore body yaw rate - - - Use 3D body thrust setpoint instead of throttle - - - Ignore throttle - - - Ignore attitude - - - - Airborne status of UAS. - - The flight state can't be determined. - - - UAS on ground. - - - UAS airborne. - - - UAS is in an emergency flight state. - - - UAS has no active controls. - - - - Flags for the global position report. - - The field time contains valid data. - - - The field uas_id contains valid data. - - - The fields lat, lon and h_acc contain valid data. - - - The fields alt and v_acc contain valid data. - - - The field relative_alt contains valid data. - - - The fields vx and vy contain valid data. - - - The field vz contains valid data. - - - The fields next_lat, next_lon and next_alt contain valid data. - - - - - These flags encode the cellular network status - - State unknown or not reportable. - - - Modem is unusable - - - Modem is being initialized - - - Modem is locked - - - Modem is not enabled and is powered down - - - Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state - - - Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state - - - Modem is enabled and powered on but not registered with a network provider and not available for data connections - - - Modem is searching for a network provider to register - - - Modem is registered with a network provider, and data connections and messaging may be available for use - - - Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated - - - Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered - - - One or more packet data bearers is active and connected - - - - These flags are used to diagnose the failure state of CELLULAR_STATUS - - No error - - - Error state is unknown - - - SIM is required for the modem but missing - - - SIM is available, but not usable for connection - - - - Cellular network radio type - - - - - - - - Precision land modes (used in MAV_CMD_NAV_LAND). - - Normal (non-precision) landing. - - - Use precision landing if beacon detected when land command accepted, otherwise land normally. - - - Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found). - - - - - Parachute actions. Trigger release and enable/disable auto-release. - - Disable auto-release of parachute (i.e. release triggered by crash detectors). - - - Enable auto-release of parachute. - - - Release parachute and kill motors. - - - - - Encoding of payload unknown. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - Registered for STorM32 gimbal controller. - - - - - No type defined. - - - Manufacturer Serial Number (ANSI/CTA-2063 format). - - - CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]. - - - UTM (Unmanned Traffic Management) assigned UUID (RFC4122). - - - A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO. - - - - - No UA (Unmanned Aircraft) type defined. - - - Aeroplane/Airplane. Fixed wing. - - - Helicopter or multirotor. - - - Gyroplane. - - - VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically. - - - Ornithopter. - - - Glider. - - - Kite. - - - Free Balloon. - - - Captive Balloon. - - - Airship. E.g. a blimp. - - - Free Fall/Parachute (unpowered). - - - Rocket. - - - Tethered powered aircraft. - - - Ground Obstacle. - - - Other type of aircraft not listed earlier. - - - - - The status of the (UA) Unmanned Aircraft is undefined. - - - The UA is on the ground. - - - The UA is in the air. - - - The UA is having an emergency. - - - The remote ID system is failing or unreliable in some way. - - - - - The height field is relative to the take-off location. - - - The height field is relative to ground. - - - - - The horizontal accuracy is unknown. - - - The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km. - - - The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km. - - - The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km. - - - The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km. - - - The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m. - - - The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m. - - - The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m. - - - The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m. - - - The horizontal accuracy is smaller than 30 meter. - - - The horizontal accuracy is smaller than 10 meter. - - - The horizontal accuracy is smaller than 3 meter. - - - The horizontal accuracy is smaller than 1 meter. - - - - - The vertical accuracy is unknown. - - - The vertical accuracy is smaller than 150 meter. - - - The vertical accuracy is smaller than 45 meter. - - - The vertical accuracy is smaller than 25 meter. - - - The vertical accuracy is smaller than 10 meter. - - - The vertical accuracy is smaller than 3 meter. - - - The vertical accuracy is smaller than 1 meter. - - - - - The speed accuracy is unknown. - - - The speed accuracy is smaller than 10 meters per second. - - - The speed accuracy is smaller than 3 meters per second. - - - The speed accuracy is smaller than 1 meters per second. - - - The speed accuracy is smaller than 0.3 meters per second. - - - - - The timestamp accuracy is unknown. - - - The timestamp accuracy is smaller than or equal to 0.1 second. - - - The timestamp accuracy is smaller than or equal to 0.2 second. - - - The timestamp accuracy is smaller than or equal to 0.3 second. - - - The timestamp accuracy is smaller than or equal to 0.4 second. - - - The timestamp accuracy is smaller than or equal to 0.5 second. - - - The timestamp accuracy is smaller than or equal to 0.6 second. - - - The timestamp accuracy is smaller than or equal to 0.7 second. - - - The timestamp accuracy is smaller than or equal to 0.8 second. - - - The timestamp accuracy is smaller than or equal to 0.9 second. - - - The timestamp accuracy is smaller than or equal to 1.0 second. - - - The timestamp accuracy is smaller than or equal to 1.1 second. - - - The timestamp accuracy is smaller than or equal to 1.2 second. - - - The timestamp accuracy is smaller than or equal to 1.3 second. - - - The timestamp accuracy is smaller than or equal to 1.4 second. - - - The timestamp accuracy is smaller than or equal to 1.5 second. - - - - - No authentication type is specified. - - - Signature for the UAS (Unmanned Aircraft System) ID. - - - Signature for the Operator ID. - - - Signature for the entire message set. - - - Authentication is provided by Network Remote ID. - - - The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO. - - - - - Optional free-form text description of the purpose of the flight. - - - Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY. - - - Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY. - - - - - The location/altitude of the operator is the same as the take-off location. - - - The location/altitude of the operator is dynamic. E.g. based on live GNSS data. - - - The location/altitude of the operator are fixed values. - - - - - The classification type for the UA is undeclared. - - - The classification type for the UA follows EU (European Union) specifications. - - - - - The category for the UA, according to the EU specification, is undeclared. - - - The category for the UA, according to the EU specification, is the Open category. - - - The category for the UA, according to the EU specification, is the Specific category. - - - The category for the UA, according to the EU specification, is the Certified category. - - - - - The class for the UA, according to the EU specification, is undeclared. - - - The class for the UA, according to the EU specification, is Class 0. - - - The class for the UA, according to the EU specification, is Class 1. - - - The class for the UA, according to the EU specification, is Class 2. - - - The class for the UA, according to the EU specification, is Class 3. - - - The class for the UA, according to the EU specification, is Class 4. - - - The class for the UA, according to the EU specification, is Class 5. - - - The class for the UA, according to the EU specification, is Class 6. - - - - - CAA (Civil Aviation Authority) registered operator ID. - - - - - Passing arming checks. - - - Generic arming failure, see error string for details. - - - - Tune formats (used for vehicle buzzer/tone generation). - - Format is QBasic 1.1 Play: https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm. - - - Format is Modern Music Markup Language (MML): https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML. - - - - - Type of AIS vessel, enum duplicated from AIS standard, https://gpsd.gitlab.io/gpsd/AIVDM.html - - Not available (default). - - - - - - - - - - - - - - - - - - - - - - Wing In Ground effect. - - - - - - - - - - - - - - Towing: length exceeds 200m or breadth exceeds 25m. - - - Dredging or other underwater ops. - - - - - - - - - High Speed Craft. - - - - - - - - - - - - - Search And Rescue vessel. - - - - - Anti-pollution equipment. - - - - - - - Noncombatant ship according to RR Resolution No. 18. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Navigational status of AIS vessel, enum duplicated from AIS standard, https://gpsd.gitlab.io/gpsd/AIVDM.html - - Under way using engine. - - - - - - - - - - - - - - - - Search And Rescue Transponder. - - - Not available (default). - - - - These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid. - - 1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m. - - - - - 1 = Velocity over 52.5765m/s (102.2 knots) - - - - Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s - - - - Distance to bow is larger than 511m - - - Distance to stern is larger than 511m - - - Distance to port side is larger than 63m - - - Distance to starboard side is larger than 63m - - - - - - - List of possible units where failures can be injected. - - - - - - - - - - - - - - - - - - - List of possible failure type to inject. - - No failure injected, used to reset a previous failure. - - - Sets unit off, so completely non-responsive. - - - Unit is stuck e.g. keeps reporting the same value. - - - Unit is reporting complete garbage. - - - Unit is consistently wrong. - - - Unit is slow, so e.g. reporting at slower than expected rate. - - - Data of unit is delayed in time. - - - Unit is sometimes working, sometimes not. - - - - - Default autopilot landing behaviour. - - - Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground. - The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.). - - - - Land in multicopter mode on reaching the landing coordinates (the whole landing is by "hover descent"). - - - - Winch status flags used in WINCH_STATUS - - Winch is healthy - - - Winch line is fully retracted - - - Winch motor is moving - - - Winch clutch is engaged allowing motor to move freely. - - - Winch is locked by locking mechanism. - - - Winch is gravity dropping payload. - - - Winch is arresting payload descent. - - - Winch is using torque measurements to sense the ground. - - - Winch is returning to the fully retracted position. - - - Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING. - - - Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold. - - - Winch is engaging the locking mechanism. - - - Winch is spooling on line. - - - Winch is loading a payload. - - - - - - - - - - - - - - Reason for an event error response. - - The requested event is not available (anymore). - - - - Flags for CURRENT_EVENT_SEQUENCE. - - A sequence reset has happened (e.g. vehicle reboot). - - - - Flags in the HIL_SENSOR message indicate which fields have updated since the last message - - None of the fields in HIL_SENSOR have been updated - - - The value in the xacc field has been updated - - - The value in the yacc field has been updated - - - The value in the zacc field has been updated - - - The value in the xgyro field has been updated - - - The value in the ygyro field has been updated - - - The value in the zgyro field has been updated - - - The value in the xmag field has been updated - - - The value in the ymag field has been updated - - - The value in the zmag field has been updated - - - The value in the abs_pressure field has been updated - - - The value in the diff_pressure field has been updated - - - The value in the pressure_alt field has been updated - - - The value in the temperature field has been updated - - - Full reset of attitude/position/velocities/etc was performed in sim (Bit 31). - - - - Flags in the HIGHRES_IMU message indicate which fields have updated since the last message - - None of the fields in HIGHRES_IMU have been updated - - - The value in the xacc field has been updated - - - The value in the yacc field has been updated - - - The value in the zacc field has been updated since - - - The value in the xgyro field has been updated - - - The value in the ygyro field has been updated - - - The value in the zgyro field has been updated - - - The value in the xmag field has been updated - - - The value in the ymag field has been updated - - - The value in the zmag field has been updated - - - The value in the abs_pressure field has been updated - - - The value in the diff_pressure field has been updated - - - The value in the pressure_alt field has been updated - - - The value in the temperature field has been updated - - - All fields in HIGHRES_IMU have been updated. - - - - - - - - - MAV FTP error codes (https://mavlink.io/en/services/ftp.html) - - None: No error - - - Fail: Unknown failure - - - FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. - This is a file-system error number understood by the server operating system. - - - InvalidDataSize: Payload size is invalid - - - InvalidSession: Session is not currently open - - - NoSessionsAvailable: All available sessions are already in use - - - EOF: Offset past end of file for ListDirectory and ReadFile commands - - - UnknownCommand: Unknown command / opcode - - - FileExists: File/directory already exists - - - FileProtected: File/directory is write protected - - - FileNotFound: File/directory not found - - - - MAV FTP opcodes: https://mavlink.io/en/services/ftp.html - - None. Ignored, always ACKed - - - TerminateSession: Terminates open Read session - - - ResetSessions: Terminates all open read sessions - - - ListDirectory. List files and directories in path from offset - - - OpenFileRO: Opens file at path for reading, returns session - - - ReadFile: Reads size bytes from offset in session - - - CreateFile: Creates file at path for writing, returns session - - - WriteFile: Writes size bytes to offset in session - - - RemoveFile: Remove file at path - - - CreateDirectory: Creates directory at path - - - RemoveDirectory: Removes directory at path. The directory must be empty. - - - OpenFileWO: Opens file at path for writing, returns session - - - TruncateFile: Truncate file at path to offset length - - - Rename: Rename path1 to path2 - - - CalcFileCRC32: Calculate CRC32 for file at path - - - BurstReadFile: Burst download session file - - - ACK: ACK response - - - NAK: NAK response - - - - - States of the mission state machine. - Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended). - They may not all be relevant on all vehicles. - - - The mission status reporting is not supported. - - - No mission on the vehicle. - - - Mission has not started. This is the case after a mission has uploaded but not yet started executing. - - - Mission is active, and will execute mission items when in auto mode. - - - Mission is paused when in auto mode. - - - Mission has executed all mission items. - - - - - Possible safety switch states. - - - Safety switch is engaged and vehicle should be safe to approach. - - - Safety switch is NOT engaged and motors, propellers and other actuators should be considered active. - - - - Modes of illuminator - - Illuminator mode is not specified/unknown - - - Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings - - - Illuminator behavior is controlled by external factors: e.g. an external hardware signal - - - - Illuminator module error flags (bitmap, 0 means no error) - - Illuminator thermal throttling error. - - - Illuminator over temperature shutdown error. - - - Illuminator thermistor failure. - - - - - - The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout. - Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. - Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000 - Battery voltage, UINT16_MAX: Voltage not sent by autopilot - Battery current, -1: Current not sent by autopilot - Battery energy remaining, -1: Battery remaining energy not sent by autopilot - Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) - Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) - Autopilot-specific errors - Autopilot-specific errors - Autopilot-specific errors - Autopilot-specific errors - - Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. - Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. - Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. - - - The system time is the time of the master clock, typically the computer clock of the main onboard computer. - Timestamp (UNIX epoch time). - Timestamp (time since system boot). - - - to be removed / merged with SYSTEM_TIME - A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at https://mavlink.io/en/services/ping.html - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - PING sequence - 0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system - 0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component. - - - Request to control this MAV - System the GCS requests control for - 0: request control of this MAV, 1: Release control of this MAV - 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch. - Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-" - - - Accept / deny control of this MAV - ID of the GCS this message - 0: request control of this MAV, 1: Release control of this MAV - 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control - - - Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety. - key - - - - - Status generated in each node in the communication chain and injected into MAVLink stream. - Timestamp (time since system boot). - Remaining free transmit buffer space - Remaining free receive buffer space - Transmit rate - Receive rate - Number of bytes that could not be parsed correctly. - Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX - Receive buffer overflows. This number wraps around as it reaches UINT16_MAX - Messages sent - Messages received (estimated from counting seq) - Messages lost (estimated from counting seq) - - - Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead - Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component. - The system setting the mode - The new base mode. - The new autopilot-specific mode. This field can be ignored by an autopilot. - - - - - Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code. - System ID - Component ID - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) - - - Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html - System ID - Component ID - - - Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Onboard parameter value - Onboard parameter type. - Total number of onboard parameters - Index of this onboard parameter - - - Set a parameter value (write new value to permanent storage). - The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html. - PARAM_SET may also be called within the context of a transaction (started with MAV_CMD_PARAM_TRANSACTION). Within a transaction the receiving component should respond with PARAM_ACK_TRANSACTION to the setter component (instead of broadcasting PARAM_VALUE), and PARAM_SET should be re-sent if this is ACK not received. - System ID - Component ID - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Onboard parameter value - Onboard parameter type. - - - The global position, as returned by the Global Positioning System (GPS). This is - NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - GPS fix type. - Latitude (WGS84, EGM96 ellipsoid) - Longitude (WGS84, EGM96 ellipsoid) - Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. - GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS ground speed. If unknown, set to: UINT16_MAX - Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - Number of satellites visible. If unknown, set to UINT8_MAX - - Altitude (above WGS84, EGM96 ellipsoid). Positive for up. - Position uncertainty. - Altitude uncertainty. - Speed uncertainty. - Heading / track uncertainty - Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. - - - The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites. - Number of satellites visible - Global satellite ID - 0: Satellite not used, 1: used for localization - Elevation (0: right on top of receiver, 90: on the horizon) of satellite - Direction of satellite, 0: 0 deg, 255: 360 deg. - Signal to noise ratio of satellite - - - The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units - Timestamp (time since system boot). - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - X Magnetic field - Y Magnetic field - Z Magnetic field - - Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C). - - - The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - X acceleration (raw) - Y acceleration (raw) - Z acceleration (raw) - Angular speed around X axis (raw) - Angular speed around Y axis (raw) - Angular speed around Z axis (raw) - X Magnetic field (raw) - Y Magnetic field (raw) - Z Magnetic field (raw) - - Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) - Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C). - - - The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Absolute pressure (raw) - Differential pressure 1 (raw, 0 if nonexistent) - Differential pressure 2 (raw, 0 if nonexistent) - Raw Temperature measurement (raw) - - - The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field. - Timestamp (time since system boot). - Absolute pressure - Differential pressure 1 - Absolute pressure temperature - - Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. - - - The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic). - Timestamp (time since system boot). - Roll angle (-pi..+pi) - Pitch angle (-pi..+pi) - Yaw angle (-pi..+pi) - Roll angular speed - Pitch angular speed - Yaw angular speed - - - The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0). - Timestamp (time since system boot). - Quaternion component 1, w (1 in null-rotation) - Quaternion component 2, x (0 in null-rotation) - Quaternion component 3, y (0 in null-rotation) - Quaternion component 4, z (0 in null-rotation) - Roll angular speed - Pitch angular speed - Yaw angular speed - - Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode. - - - The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) - Timestamp (time since system boot). - X Position - Y Position - Z Position - X Speed - Y Speed - Z Speed - - - The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It - is designed as scaled integer message since the resolution of float is not sufficient. - Timestamp (time since system boot). - Latitude, expressed - Longitude, expressed - Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. - Altitude above home - Ground X Speed (Latitude, positive north) - Ground Y Speed (Longitude, positive east) - Ground Z Speed (Altitude, positive down) - Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - - - The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX. - Timestamp (time since system boot). - Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX. - RC channel 1 value scaled. - RC channel 2 value scaled. - RC channel 3 value scaled. - RC channel 4 value scaled. - RC channel 5 value scaled. - RC channel 6 value scaled. - RC channel 7 value scaled. - RC channel 8 value scaled. - Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - - - The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification. - Timestamp (time since system boot). - Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX. - RC channel 1 value. - RC channel 2 value. - RC channel 3 value. - RC channel 4 value. - RC channel 5 value. - RC channel 6 value. - RC channel 7 value. - RC channel 8 value. - Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - - - Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX. - Servo output 1 value - Servo output 2 value - Servo output 3 value - Servo output 4 value - Servo output 5 value - Servo output 6 value - Servo output 7 value - Servo output 8 value - - Servo output 9 value - Servo output 10 value - Servo output 11 value - Servo output 12 value - Servo output 13 value - Servo output 14 value - Servo output 15 value - Servo output 16 value - - - Request a partial list of mission items from the system/component. https://mavlink.io/en/services/mission.html. If start and end index are the same, just send one waypoint. - System ID - Component ID - Start index - End index, -1 by default (-1: send list to end). Else a valid index of the list - - Mission type. - - - This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED! - System ID - Component ID - Start index. Must be smaller / equal to the largest index of the current onboard list. - End index, equal or greater than start index. - - Mission type. - - - - Message encoding a mission item. This message is emitted to announce - the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also https://mavlink.io/en/services/mission.html. - System ID - Component ID - Sequence - The coordinate system of the waypoint. - The scheduled action for the waypoint. - false:0, true:1 - Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. - PARAM1, see MAV_CMD enum - PARAM2, see MAV_CMD enum - PARAM3, see MAV_CMD enum - PARAM4, see MAV_CMD enum - PARAM5 / local: X coordinate, global: latitude - PARAM6 / local: Y coordinate, global: longitude - PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame). - - Mission type. - - - A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). - Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. https://mavlink.io/en/services/mission.html - System ID - Component ID - Sequence - - Mission type. - - - - - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2). - - This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this message must not trigger a switch to mission mode. - - System ID - Component ID - Sequence - - - - Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running). - This message should be streamed all the time (nominally at 1Hz). - This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or SET_MISSION_CURRENT. - - Sequence - - Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle. - Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported. - Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode). - Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK). - Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK). - Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK). - - - Request the overall list of mission items from the system/component. - System ID - Component ID - - Mission type. - - - This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints. - System ID - Component ID - Number of mission items in the sequence - - Mission type. - Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). - This field is used when downloading a plan from a vehicle to a GCS. - 0 on upload to the vehicle from GCS. - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). - - - - Delete all mission items at once. - System ID - Component ID - - Mission type. - - - A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint. - Sequence - - - Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero). - System ID - Component ID - Mission result. - - Mission type. - Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). - The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. - The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). - 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). - 0 if plan ids are not supported. - The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. - - - - Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor. - System ID - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message. - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - Bind a RC channel to a parameter. The parameter should change according to the RC channel value. - System ID - Component ID - Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. - Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC. - Initial parameter value - Scale, maps the RC range [-1, 1] to a parameter value - Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) - Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) - - - Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. https://mavlink.io/en/services/mission.html - System ID - Component ID - Sequence - - Mission type. - - - - Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations. - System ID - Component ID - Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. - x position 1 / Latitude 1 - y position 1 / Longitude 1 - z position 1 / Altitude 1 - x position 2 / Latitude 2 - y position 2 / Longitude 2 - z position 2 / Altitude 2 - - - Read out the safety zone the MAV currently assumes. - Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. - x position 1 / Latitude 1 - y position 1 / Longitude 1 - z position 1 / Altitude 1 - x position 2 / Latitude 2 - y position 2 / Longitude 2 - z position 2 / Altitude 2 - - - The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) - Roll angular speed - Pitch angular speed - Yaw angular speed - Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array. - - - The state of the navigation and position controller. - Current desired roll - Current desired pitch - Current desired heading - Bearing to current waypoint/target - Distance to active waypoint - Current altitude error - Current airspeed error - Current crosstrack error on x-y plane - - - The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Class id of the estimator this estimate originated from. - Latitude - Longitude - Altitude in meters above MSL - Altitude above ground - Ground X Speed (Latitude) - Ground Y Speed (Longitude) - Ground Z Speed (Altitude) - Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array. - - - The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Class id of the estimator this estimate originated from. - X Position - Y Position - Z Position - X Speed - Y Speed - Z Speed - X Acceleration - Y Acceleration - Z Acceleration - Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array. - - - The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification. - Timestamp (time since system boot). - Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available. - RC channel 1 value. - RC channel 2 value. - RC channel 3 value. - RC channel 4 value. - RC channel 5 value. - RC channel 6 value. - RC channel 7 value. - RC channel 8 value. - RC channel 9 value. - RC channel 10 value. - RC channel 11 value. - RC channel 12 value. - RC channel 13 value. - RC channel 14 value. - RC channel 15 value. - RC channel 16 value. - RC channel 17 value. - RC channel 18 value. - Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - - - - Request a data stream. - The target requested to send the message stream. - The target requested to send the message stream. - The ID of the requested data stream - The requested message rate - 1 to start sending, 0 to stop sending. - - - - Data stream status information. - The ID of the requested data stream - The message rate - 1 stream is enabled, 0 stream is stopped. - - - This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask - The system to be controlled. - X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. - Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. - Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. - R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. - A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. - - A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16. - Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6 - Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid. - Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid. - Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset. - Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset. - Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset. - Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset. - Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset. - Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset. - - - The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. Note carefully the semantic differences between the first 8 channels and the subsequent channels - System ID - Component ID - RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio. - - RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio. - - - Message encoding a mission item. This message is emitted to announce - the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also https://mavlink.io/en/services/mission.html. - System ID - Component ID - Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). - The coordinate system of the waypoint. - The scheduled action for the waypoint. - false:0, true:1 - Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes. - PARAM1, see MAV_CMD enum - PARAM2, see MAV_CMD enum - PARAM3, see MAV_CMD enum - PARAM4, see MAV_CMD enum - PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 - PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 - PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. - - Mission type. - - - Metrics typically displayed on a HUD for fixed wing aircraft. - Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed. - Current ground speed. - Current heading in compass units (0-360, 0=north). - Current throttle setting (0 to 100). - Current altitude (MSL). - Current climb rate. - - - Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at https://mavlink.io/en/services/command.html - System ID - Component ID - The coordinate system of the COMMAND. - The scheduled action for the mission item. - Not used. - Not used (set 0). - PARAM1, see MAV_CMD enum - PARAM2, see MAV_CMD enum - PARAM3, see MAV_CMD enum - PARAM4, see MAV_CMD enum - PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 - PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 - PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame). - - - Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at https://mavlink.io/en/services/command.html - System which should execute the command - Component which should execute the command, 0 for all components - Command ID (of command to send). - 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) - Parameter 1 (for the specific command). - Parameter 2 (for the specific command). - Parameter 3 (for the specific command). - Parameter 4 (for the specific command). - Parameter 5 (for the specific command). - Parameter 6 (for the specific command). - Parameter 7 (for the specific command). - - - Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at https://mavlink.io/en/services/command.html - Command ID (of acknowledged command). - Result of command. - - The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. - Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). - System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. - - - - - Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at https://mavlink.io/en/services/command.html - System executing long running command. Should not be broadcast (0). - Component executing long running command. - Command ID (of command to cancel). - - - Setpoint in roll, pitch, yaw and thrust from the operator - Timestamp (time since system boot). - Desired roll rate - Desired pitch rate - Desired yaw rate - Collective thrust, normalized to 0 .. 1 - Flight mode switch position, 0.. 255 - Override mode switch position, 0.. 255 - - - Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system). - Timestamp (time since system boot). - System ID - Component ID - Bitmap to indicate which dimensions should be ignored by the vehicle. - Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD - Body roll rate - Body pitch rate - Body yaw rate - Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - - 3D thrust setpoint in the body NED frame, normalized to -1 .. 1 - - - Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way. - Timestamp (time since system boot). - Bitmap to indicate which dimensions should be ignored by the vehicle. - Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Body roll rate - Body pitch rate - Body yaw rate - Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) - - - Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system). - Timestamp (time since system boot). - System ID - Component ID - Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 - Bitmap to indicate which dimensions should be ignored by the vehicle. - X Position in NED frame - Y Position in NED frame - Z Position in NED frame (note, altitude is negative in NED) - X velocity in NED frame - Y velocity in NED frame - Z velocity in NED frame - X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - yaw setpoint - yaw rate setpoint - - - Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way. - Timestamp (time since system boot). - Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 - Bitmap to indicate which dimensions should be ignored by the vehicle. - X Position in NED frame - Y Position in NED frame - Z Position in NED frame (note, altitude is negative in NED) - X velocity in NED frame - Y velocity in NED frame - Z velocity in NED frame - X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - yaw setpoint - yaw rate setpoint - - - Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system). - Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - System ID - Component ID - Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) - Bitmap to indicate which dimensions should be ignored by the vehicle. - Latitude in WGS84 frame - Longitude in WGS84 frame - Altitude (MSL, Relative to home, or AGL - depending on frame) - X velocity in NED frame - Y velocity in NED frame - Z velocity in NED frame - X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - yaw setpoint - yaw rate setpoint - - - Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way. - Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. - Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) - Bitmap to indicate which dimensions should be ignored by the vehicle. - Latitude in WGS84 frame - Longitude in WGS84 frame - Altitude (MSL, AGL or relative to home altitude, depending on frame) - X velocity in NED frame - Y velocity in NED frame - Z velocity in NED frame - X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N - yaw setpoint - yaw rate setpoint - - - The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) - Timestamp (time since system boot). - X Position - Y Position - Z Position - Roll - Pitch - Yaw - - - Suffers from missing airspeed fields and singularities due to Euler angles - Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Roll angle - Pitch angle - Yaw angle - Body frame roll / phi angular speed - Body frame pitch / theta angular speed - Body frame yaw / psi angular speed - Latitude - Longitude - Altitude - Ground X Speed (Latitude) - Ground Y Speed (Longitude) - Ground Z Speed (Altitude) - X acceleration - Y acceleration - Z acceleration - - - Sent from autopilot to simulation. Hardware in the loop control outputs - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Control output -1 .. 1 - Control output -1 .. 1 - Control output -1 .. 1 - Throttle 0 .. 1 - Aux 1, -1 .. 1 - Aux 2, -1 .. 1 - Aux 3, -1 .. 1 - Aux 4, -1 .. 1 - System mode. - Navigation mode (MAV_NAV_MODE) - - - Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - RC channel 1 value - RC channel 2 value - RC channel 3 value - RC channel 4 value - RC channel 5 value - RC channel 6 value - RC channel 7 value - RC channel 8 value - RC channel 9 value - RC channel 10 value - RC channel 11 value - RC channel 12 value - Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - - - Sent from autopilot to simulation. Hardware in the loop control outputs (replacement for HIL_CONTROLS) - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Control outputs -1 .. 1. Channel assignment depends on the simulated hardware. - System mode. Includes arming state. - Flags as bitfield, 1: indicate simulation using lockstep. - - - Optical flow from a flow sensor (e.g. optical mouse sensor) - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Sensor ID - Flow in x-sensor direction - Flow in y-sensor direction - Flow in x-sensor direction, angular-speed compensated - Flow in y-sensor direction, angular-speed compensated - Optical flow quality / confidence. 0: bad, 255: maximum quality - Ground distance. Positive value: distance known. Negative value: Unknown distance - - Flow rate about X axis - Flow rate about Y axis - - - Global position/attitude estimate from a vision source. - Timestamp (UNIX time or since system boot) - Global X position - Global Y position - Global Z position - Roll angle - Pitch angle - Yaw angle - - Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps. - - - Local position/attitude estimate from a vision source. - Timestamp (UNIX time or time since system boot) - Local X position - Local Y position - Local Z position - Roll angle - Pitch angle - Yaw angle - - Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps. - - - Speed estimate from a vision source. - Timestamp (UNIX time or time since system boot) - Global X speed - Global Y speed - Global Z speed - - Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array. - Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps. - - - Global position estimate from a Vicon motion system source. - Timestamp (UNIX time or time since system boot) - Global X position - Global Y position - Global Z position - Roll angle - Pitch angle - Yaw angle - - Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - - - The IMU readings in SI units in NED body frame - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - X Magnetic field - Y Magnetic field - Z Magnetic field - Absolute pressure - Differential pressure - Altitude calculated from pressure - Temperature - Bitmap for fields that have updated since last message - - Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0) - - - Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor) - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Sensor ID - Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. - Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) - Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) - RH rotation around X axis - RH rotation around Y axis - RH rotation around Z axis - Temperature - Optical flow quality / confidence. 0: no valid flow, 255: maximum quality - Time since the distance was sampled. - Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance. - - - The IMU readings in SI units in NED body frame - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis in body frame - Angular speed around Y axis in body frame - Angular speed around Z axis in body frame - X Magnetic field - Y Magnetic field - Z Magnetic field - Absolute pressure - Differential pressure (airspeed) - Altitude calculated from pressure - Temperature - Bitmap for fields that have updated since last message - - Sensor ID (zero indexed). Used for multiple sensor inputs - - - Status of simulation environment, if used - True attitude quaternion component 1, w (1 in null-rotation) - True attitude quaternion component 2, x (0 in null-rotation) - True attitude quaternion component 3, y (0 in null-rotation) - True attitude quaternion component 4, z (0 in null-rotation) - Attitude roll expressed as Euler angles, not recommended except for human-readable outputs - Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs - Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - Latitude (lower precision). Both this and the lat_int field should be set. - Longitude (lower precision). Both this and the lon_int field should be set. - Altitude - Horizontal position standard deviation - Vertical position standard deviation - True velocity in north direction in earth-fixed NED frame - True velocity in east direction in earth-fixed NED frame - True velocity in down direction in earth-fixed NED frame - - Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred). - Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred). - - - Status generated by radio and injected into MAVLink stream. - Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown. - Remaining free transmitter buffer space. - Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown. - Count of radio packet receive errors (since boot). - Count of error corrected radio packets (since boot). - - - File transfer protocol message: https://mavlink.io/en/services/ftp.html. - Network ID (0 for broadcast) - System ID (0 for broadcast) - Component ID (0 for broadcast) - Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in https://mavlink.io/en/services/ftp.html. - - - - Time synchronization message. - The message is used for both timesync requests and responses. - The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component. - The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request. - Systems can determine if they are receiving a request or response based on the value of `tc`. - If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error. - Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). - The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. - - Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. - Time sync timestamp 2. Timestamp of syncing component (mirrored in response). - - Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. - Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. - - - Camera-IMU triggering and synchronisation message. - Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Image frame sequence - - - The global position, as returned by the Global Positioning System (GPS). This is - NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS ground speed. If unknown, set to: UINT16_MAX - GPS velocity in north direction in earth-fixed NED frame - GPS velocity in east direction in earth-fixed NED frame - GPS velocity in down direction in earth-fixed NED frame - Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - Number of satellites visible. If unknown, set to UINT8_MAX - - GPS ID (zero indexed). Used for multiple GPS inputs - Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north - - - Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor) - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Sensor ID - Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. - Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) - Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) - RH rotation around X axis - RH rotation around Y axis - RH rotation around Z axis - Temperature - Optical flow quality / confidence. 0: no valid flow, 255: maximum quality - Time since the distance was sampled. - Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance. - - - Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) - Body frame roll / phi angular speed - Body frame pitch / theta angular speed - Body frame yaw / psi angular speed - Latitude - Longitude - Altitude - Ground X Speed (Latitude) - Ground Y Speed (Longitude) - Ground Z Speed (Altitude) - Indicated airspeed - True airspeed - X acceleration - Y acceleration - Z acceleration - - - The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units - Timestamp (time since system boot). - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - X Magnetic field - Y Magnetic field - Z Magnetic field - - Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C). - - - Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0. - System ID - Component ID - First log id (0 for first available) - Last log id (0xffff for last available) - - - Reply to LOG_REQUEST_LIST - Log id - Total number of logs - High log number - UTC timestamp of log since 1970, or 0 if not available - Size of the log (may be approximate) - - - Request a chunk of a log - System ID - Component ID - Log id (from LOG_ENTRY reply) - Offset into the log - Number of bytes - - - Reply to LOG_REQUEST_DATA - Log id (from LOG_ENTRY reply) - Offset into the log - Number of bytes (zero for end of log) - log data - - - Erase all logs - System ID - Component ID - - - Stop log transfer and resume normal logging - System ID - Component ID - - - - Data for injecting into the onboard GPS (used for DGPS) - System ID - Component ID - Data length - Raw data (110 is enough for 12 satellites of RTCMv2) - - - Second GPS data. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - GPS fix type. - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX - GPS ground speed. If unknown, set to: UINT16_MAX - Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX - Number of satellites visible. If unknown, set to UINT8_MAX - Number of DGPS satellites - Age of DGPS info - - Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. - Altitude (above WGS84, EGM96 ellipsoid). Positive for up. - Position uncertainty. - Altitude uncertainty. - Speed uncertainty. - Heading / track uncertainty - - - Power supply status - 5V rail voltage. - Servo rail voltage. - Bitmap of power supply status flags. - - - Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate. - Serial control device type. - Bitmap of serial control flags. - Timeout for reply data - Baudrate of transfer. Zero means no change. - how many bytes in this transfer - serial data - - System ID - Component ID - - - RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting - Time since boot of last baseline message received. - Identification of connected RTK receiver. - GPS Week Number of last baseline - GPS Time of Week of last baseline - GPS-specific health report for RTK data. - Rate of baseline messages being received by GPS - Current number of sats used for RTK calculation. - Coordinate system of baseline - Current baseline in ECEF x or NED north component. - Current baseline in ECEF y or NED east component. - Current baseline in ECEF z or NED down component. - Current estimate of baseline accuracy. - Current number of integer ambiguity hypotheses. - - - RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting - Time since boot of last baseline message received. - Identification of connected RTK receiver. - GPS Week Number of last baseline - GPS Time of Week of last baseline - GPS-specific health report for RTK data. - Rate of baseline messages being received by GPS - Current number of sats used for RTK calculation. - Coordinate system of baseline - Current baseline in ECEF x or NED north component. - Current baseline in ECEF y or NED east component. - Current baseline in ECEF z or NED down component. - Current estimate of baseline accuracy. - Current number of integer ambiguity hypotheses. - - - The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units - Timestamp (time since system boot). - X acceleration - Y acceleration - Z acceleration - Angular speed around X axis - Angular speed around Y axis - Angular speed around Z axis - X Magnetic field - Y Magnetic field - Z Magnetic field - - Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C). - - - Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: https://mavlink.io/en/services/image_transmission.html. - Type of requested/acknowledged data. - total data size (set on ACK only). - Width of a matrix or image. - Height of a matrix or image. - Number of packets being sent (set on ACK only). - Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only). - JPEG quality. Values: [1-100]. - - - Data packet for images sent using the Image Transmission Protocol: https://mavlink.io/en/services/image_transmission.html. - sequence number (starting with 0 on every transmission) - image data bytes - - - Distance sensor information for an onboard rangefinder. - Timestamp (time since system boot). - Minimum distance the sensor can measure - Maximum distance the sensor can measure - Current distance reading - Type of distance sensor. - Onboard ID of the sensor - Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270 - Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown. - - Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. - Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0. - Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid." - Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal. - - - Request for terrain data and terrain status. See terrain protocol docs: https://mavlink.io/en/services/terrain.html - Latitude of SW corner of first grid - Longitude of SW corner of first grid - Grid spacing - Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits) - - - Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: https://mavlink.io/en/services/terrain.html - Latitude of SW corner of first grid - Longitude of SW corner of first grid - Grid spacing - bit within the terrain request mask - Terrain data MSL - - - Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission. - Latitude - Longitude - - - Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: https://mavlink.io/en/services/terrain.html - Latitude - Longitude - grid spacing (zero if terrain at this location unavailable) - Terrain height MSL - Current vehicle height above lat/lon terrain height - Number of 4x4 terrain blocks waiting to be received or read from disk - Number of 4x4 terrain blocks in memory - - - Barometer readings for 2nd barometer - Timestamp (time since system boot). - Absolute pressure - Differential pressure - Absolute pressure temperature - - Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. - - - Motion capture attitude and position - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - X position (NED) - Y position (NED) - Z position (NED) - - Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - - - Set the vehicle attitude and body angular rates. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances. - System ID - Component ID - Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs. - - - Set the vehicle attitude and body angular rates. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances. - Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs. - - - The current system altitude. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. - This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude. - This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. - This is the altitude above the home position. It resets on each change of the current home position. - This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. - This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. - - - The autopilot is requesting a resource (file, binary, other type of data) - Request ID. This ID should be re-used when sending back URI contents - The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary - The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum) - The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream. - The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP). - - - Barometer readings for 3rd barometer - Timestamp (time since system boot). - Absolute pressure - Differential pressure - Absolute pressure temperature - - Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. - - - Current motion information from a designated system - Timestamp (time since system boot). - bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3) - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL) - target velocity (0,0,0) for unknown - linear target acceleration (0,0,0) for unknown - (0 0 0 0 for unknown) - (0 0 0 for unknown) - eph epv - button states or switches of a tracker device - - - The smoothed, monotonic system state used to feed the control loops of the system. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - X acceleration in body frame - Y acceleration in body frame - Z acceleration in body frame - X velocity in body frame - Y velocity in body frame - Z velocity in body frame - X position in local frame - Y position in local frame - Z position in local frame - Airspeed, set to -1 if unknown - Variance of body velocity estimate - Variance in local position - The attitude, represented as Quaternion - Angular rate in roll axis - Angular rate in pitch axis - Angular rate in yaw axis - - - Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO. - Battery ID - Function of the battery - Type (chemistry) of the battery - Temperature of the battery. INT16_MAX for unknown temperature. - Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1). - Battery current, -1: autopilot does not measure the current - Consumed charge, -1: autopilot does not provide consumption estimate - Consumed energy, -1: autopilot does not provide energy consumption estimate - Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery. - - Remaining battery time, 0: autopilot does not provide remaining battery time estimate - State for extent of discharge, provided by autopilot for warning or external reactions - Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead. - Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode. - Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported). - - - Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE. - Bitmap of capabilities - Firmware version number - Middleware version number - Operating system version number - HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt - Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. - Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. - Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. - ID of the board vendor - ID of the product - UID if provided by hardware (see uid2) - - UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid) - - - The location of a landing target. See: https://mavlink.io/en/services/landing_target.html - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - The ID of the target if multiple targets are present - Coordinate frame used for following fields. - X-axis angular offset of the target from the center of the image - Y-axis angular offset of the target from the center of the image - Distance to the target from the vehicle - Size of target along x-axis - Size of target along y-axis - - X Position of the landing target in MAV_FRAME - Y Position of the landing target in MAV_FRAME - Z Position of the landing target in MAV_FRAME - Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Type of landing target - Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid). - - - - Status of geo-fencing. Sent in extended status stream when fencing enabled. - Breach status (0 if currently inside fence, 1 if outside). - Number of fence breaches. - Last breach type. - Time (since boot) of last breach. - - Active action to prevent fence breach - - - - - Reports results of completed compass calibration. Sent until MAG_CAL_ACK received. - Compass being calibrated. - Bitmask of compasses being calibrated. - Calibration Status. - 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters. - RMS milligauss residuals. - X offset. - Y offset. - Z offset. - X diagonal (matrix 11). - Y diagonal (matrix 22). - Z diagonal (matrix 33). - X off-diagonal (matrix 12 and 21). - Y off-diagonal (matrix 13 and 31). - Z off-diagonal (matrix 32 and 23). - - Confidence in orientation (higher is better). - orientation before calibration. - orientation after calibration. - field radius correction factor - - - - EFI status output - EFI health status - ECU index - RPM - Fuel consumed - Fuel flow rate - Engine load - Throttle position - Spark dwell time - Barometric pressure - Intake manifold pressure( - Intake manifold temperature - Cylinder head temperature - Ignition timing (Crank angle degrees) - Injection time - Exhaust gas temperature - Output throttle - Pressure/temperature compensation - - Supply voltage to EFI sparking system. Zero in this value means "unknown", so if the supply voltage really is zero volts use 0.0001 instead. - Fuel pressure. Zero in this value means "unknown", so if the fuel pressure really is zero kPa use 0.0001 instead. - - - - Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Bitmap indicating which EKF outputs are valid. - Velocity innovation test ratio - Horizontal position innovation test ratio - Vertical position innovation test ratio - Magnetometer innovation test ratio - Height above terrain innovation test ratio - True airspeed innovation test ratio - Horizontal position 1-STD accuracy relative to the EKF local origin - Vertical position 1-STD accuracy relative to the EKF local origin - - - Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Wind in North (NED) direction (NAN if unknown) - Wind in East (NED) direction (NAN if unknown) - Wind in down (NED) direction (NAN if unknown) - Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown) - Altitude (MSL) that this measurement was taken at (NAN if unknown) - Horizontal speed 1-STD accuracy (0 if unknown) - Vertical speed 1-STD accuracy (0 if unknown) - - - GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - ID of the GPS for multiple GPS inputs - Bitmap indicating which GPS input flags fields to ignore. All other fields must be provided. - GPS time (from start of GPS week) - GPS week number - 0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX - GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX - GPS velocity in north direction in earth-fixed NED frame - GPS velocity in east direction in earth-fixed NED frame - GPS velocity in down direction in earth-fixed NED frame - GPS speed accuracy - GPS horizontal accuracy - GPS vertical accuracy - Number of satellites visible. - - Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north - - - RTCM message for injecting into the onboard GPS (used for DGPS) - LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order. - data length - RTCM message (may be fragmented) - - - - Message appropriate for high latency connections like Iridium - Bitmap of enabled system modes. - A bitfield for use for autopilot-specific flags. - The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. - roll - pitch - heading - throttle (percentage) - heading setpoint - Latitude - Longitude - Altitude above mean sea level - Altitude setpoint relative to the home position - airspeed - airspeed setpoint - groundspeed - climb rate - Number of satellites visible. If unknown, set to UINT8_MAX - GPS Fix type. - Remaining battery (percentage) - Autopilot temperature (degrees C) - Air temperature (degrees C) from airspeed sensor - failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence) - current waypoint number - distance to target - - - Message appropriate for high latency connections like Iridium (version 2) - Timestamp (milliseconds since boot or Unix epoch) - Type of the MAV (quadrotor, helicopter, etc.) - Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. - A bitfield for use for autopilot-specific flags (2 byte version). - Latitude - Longitude - Altitude above mean sea level - Altitude setpoint - Heading - Heading setpoint - Distance to target waypoint or position - Throttle - Airspeed - Airspeed setpoint - Groundspeed - Windspeed - Wind heading - Maximum error horizontal position since last message - Maximum error vertical position since last message - Air temperature from airspeed sensor - Maximum climb rate magnitude since last message - Battery level (-1 if field not provided). - Current waypoint number - Bitmap of failure flags. - Field for custom payload. - Field for custom payload. - Field for custom payload. - - - Vibration levels and accelerometer clipping - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Vibration levels on X-axis - Vibration levels on Y-axis - Vibration levels on Z-axis - first accelerometer clipping count - second accelerometer clipping count - third accelerometer clipping count - - - - Contains the home position. - The home position is the default position that the system will return to and land on. - The position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. - The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. - Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. - The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. - Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command). - - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - Local X position of this position in the local coordinate frame (NED) - Local Y position of this position in the local coordinate frame (NED) - Local Z position of this position in the local coordinate frame (NED: positive "down") - - Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. - Used to indicate the heading and slope of the ground. - All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied. - - Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. - - Sets the home position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this message). - The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. - Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. - The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - - System ID. - Latitude (WGS84) - Longitude (WGS84) - Altitude (MSL). Positive for up. - Local X position of this position in the local coordinate frame (NED) - Local Y position of this position in the local coordinate frame (NED) - Local Z position of this position in the local coordinate frame (NED: positive "down") - World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground - Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone. - - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - - The interval between messages for a particular MAVLink message ID. - This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). - It may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. - This interface replaces DATA_STREAM. - The ID of the requested MAVLink message. v1.0 is limited to 254 messages. - The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. - - - Provides state for additional features - The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. - The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. - - - The location and information of an ADSB vehicle - ICAO address - Latitude - Longitude - ADSB altitude type. - Altitude(ASL) - Course over ground - The horizontal velocity - The vertical velocity. Positive is up - The callsign, 8+null - ADSB emitter type. - Time since last communication in seconds - Bitmap to indicate various statuses including valid data fields - Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000 - - - Information about a potential collision - Collision data source - Unique identifier, domain based on src field - Action that is being taken to avoid this collision - How concerned the aircraft is about this collision - Estimated time until collision occurs - Closest vertical distance between vehicle and object - Closest horizontal distance between vehicle and object - - - Message implementing parts of the V2 payload specs in V1 frames for transitional support. - Network ID (0 for broadcast) - System ID (0 for broadcast) - Component ID (0 for broadcast) - A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase. - Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification. - - - Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output. - Starting address of the debug variables - Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below - Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14 - Memory contents at specified address - - - To debug something using a named 3D vector. - Name - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - x - y - z - - - Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output. - Timestamp (time since system boot). - Name of the debug variable - Floating point value - - - Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output. - Timestamp (time since system boot). - Name of the debug variable - Signed integer value - - - Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz). - Severity of status. Relies on the definitions within RFC-5424. - Status text message, without null termination character - - Unique (opaque) identifier for this statustext message. May be used to reassemble a logical long-statustext message from a sequence of chunks. A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately. - This chunk's sequence number; indexing is from zero. Any null character in the text field is taken to mean this was the last chunk. - - - Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N. - Timestamp (time since system boot). - index of debug variable - DEBUG value - - - - Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing - system id of the target - component ID of the target - signing key - initial timestamp - - - Report button state change. - Timestamp (time since system boot). - Time of last change of button state. - Bitmap for state of buttons. - - - New version explicitly defines format. More interoperable. - Control vehicle tone generation (buzzer). - System ID - Component ID - tune in board specific format - - tune extension (appended to tune) - - - Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command. - Timestamp (time since system boot). - Name of the camera vendor - Name of the camera model - Version of the camera firmware, encoded as: (Dev & 0xff) << 24 | (Patch & 0xff) << 16 | (Minor & 0xff) << 8 | (Major & 0xff). Use 0 if not known. - Focal length. Use NaN if not known. - Image sensor size horizontal. Use NaN if not known. - Image sensor size vertical. Use NaN if not known. - Horizontal image resolution. Use 0 if not known. - Vertical image resolution. Use 0 if not known. - Reserved for a lens ID. Use 0 if not known. - Bitmap of camera capability flags. - Camera definition version (iteration). Use 0 if not known. - Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known. - - Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera. - Camera id of a camera associated with this component. This is the component id of a proxied MAVLink camera, or 1-6 for a non-MAVLink camera attached to the component. Use 0 if the component is a camera (not something else providing access to a camera). - - - Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command. - Timestamp (time since system boot). - Camera mode - - Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known) - Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known) - - - Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc. - Timestamp (time since system boot). - Storage ID (1 for first, 2 for second, etc.) - Number of storage devices - Status of storage - Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored. - Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored. - Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored. - Read speed. - Write speed. - - Type of storage - Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user. - Flags indicating whether this instance is preferred storage for photos, videos, etc. - Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). - This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. - If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types. - - - Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command. - Timestamp (time since system boot). - Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress) - Current status of video capturing (0: idle, 1: capture in progress) - Image capture interval - Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy. - Available storage capacity. - - Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT). - - - Information about a captured image. This is emitted every time a message is captured. - MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers: - MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers. - MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send: - set to 0 (default) to send just the the message for the sequence number in param 2, - set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers, - set to the sequence number of the final message in the range. - Timestamp (time since system boot). - Timestamp (time since UNIX epoch) in UTC. 0 for unknown. - Deprecated/unused. Component IDs are used to differentiate multiple cameras. - Latitude where image was taken - Longitude where capture was taken - Altitude (MSL) where image was taken - Altitude above ground - Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1) - Boolean indicating success (1) or failure (0) while capturing this image. - URL of image taken. Either local storage or http://foo.jpg if camera provides an HTTP interface. - - - Flight information. - This includes time since boot for arm, takeoff, and land, and a flight number. - Takeoff and landing values reset to zero on arm. - This can be requested using MAV_CMD_REQUEST_MESSAGE. - Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number. - - Timestamp (time since system boot). - Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. - Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. - Flight number. Note, field is misnamed UUID. - - Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. - - - This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. - Orientation of a mount - Timestamp (time since system boot). - Roll in global frame (set to NaN for invalid). - Pitch in global frame (set to NaN for invalid). - Yaw relative to vehicle (set to NaN for invalid). - - Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid). - - - A message containing logged data (see also MAV_CMD_LOGGING_START) - system ID of the target - component ID of the target - sequence number (can wrap) - data length - offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). - logged data - - - A message containing logged data which requires a LOGGING_ACK to be sent back - system ID of the target - component ID of the target - sequence number (can wrap) - data length - offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists). - logged data - - - An ack for a LOGGING_DATA_ACKED message - system ID of the target - component ID of the target - sequence number (must match the one in LOGGING_DATA_ACKED) - - - Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc. - Video Stream ID (1 for first, 2 for second, etc.) - Number of streams available. - Type of stream. - Bitmap of stream status flags. - Frame rate. - Horizontal resolution. - Vertical resolution. - Bit rate. - Video image rotation clockwise. - Horizontal Field of view. - Stream name. - Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - - Encoding of stream. - - - Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE. - Video Stream ID (1 for first, 2 for second, etc.) - Bitmap of stream status flags - Frame rate - Horizontal resolution - Vertical resolution - Bit rate - Video image rotation clockwise - Horizontal Field of view - - - Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command. - Timestamp (time since system boot). - Latitude of camera (INT32_MAX if unknown). - Longitude of camera (INT32_MAX if unknown). - Altitude (MSL) of camera (INT32_MAX if unknown). - Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon). - Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon). - Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon). - Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Horizontal field of view (NaN if unknown). - Vertical field of view (NaN if unknown). - - - Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval. - Current tracking status - Current tracking mode - Defines location of target data - Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown - Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown - Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown - Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown - Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown - Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown - Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown - - - Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval. - Current tracking status - Latitude of tracked object - Longitude of tracked object - Altitude of tracked object(AMSL, WGS84) - Horizontal accuracy. NAN if unknown - Vertical accuracy. NAN if unknown - North velocity of tracked object. NAN if unknown - East velocity of tracked object. NAN if unknown - Down velocity of tracked object. NAN if unknown - Velocity accuracy. NAN if unknown - Distance between camera and tracked object. NAN if unknown - Heading in radians, in NED. NAN if unknown - Accuracy of heading, in NED. NAN if unknown - - - Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE. - Timestamp (time since system boot). - Bitmap of gimbal capability flags. - Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal). - Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left) - Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left) - Minimum pitch angle (positive: up, negative: down) - Maximum pitch angle (positive: up, negative: down) - Minimum yaw angle (positive: to the right, negative: to the left) - Maximum yaw angle (positive: to the right, negative: to the left) - - - Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz). - Timestamp (time since system boot). - High level gimbal manager flags currently applied. - Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal). - System ID of MAVLink component with primary control, 0 for none. - Component ID of MAVLink component with primary control, 0 for none. - System ID of MAVLink component with secondary control, 0 for none. - Component ID of MAVLink component with secondary control, 0 for none. - - - High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case. - System ID - Component ID - High level gimbal manager flags to use. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set) - X component of angular velocity, positive is rolling to the right, NaN to be ignored. - Y component of angular velocity, positive is pitching up, NaN to be ignored. - Z component of angular velocity, positive is yawing to the right, NaN to be ignored. - - - Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.. - Timestamp (time since system boot). - Name of the gimbal vendor. - Name of the gimbal model. - Custom name of the gimbal given to it by the user. - Version of the gimbal firmware, encoded as: (Dev & 0xff) << 24 | (Patch & 0xff) << 16 | (Minor & 0xff) << 8 | (Major & 0xff). - Version of the gimbal hardware, encoded as: (Dev & 0xff) << 24 | (Patch & 0xff) << 16 | (Minor & 0xff) << 8 | (Major & 0xff). - UID of gimbal hardware (0 if unknown). - Bitmap of gimbal capability flags. - Bitmap for use for gimbal-specific capability flags. - Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown. - Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown. - Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown. - Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown. - Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown. - Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown. - - This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0. - - - Low level message to control a gimbal device's attitude. - This message is to be sent from the gimbal manager to the gimbal device component. - The quaternion and angular velocities can be set to NaN according to use case. - For the angles encoded in the quaternion and the angular velocities holds: - If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). - If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). - If neither of these flags are set, then (for backwards compatibility) it holds: - If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), - else they are relative to the vehicle heading (vehicle frame). - Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. - These rules are to ensure backwards compatibility. - New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME. - System ID - Component ID - Low level gimbal flags. - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored. - X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored. - Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored. - Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored. - - - Message reporting the status of a gimbal device. - This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). - For the angles encoded in the quaternion and the angular velocities holds: - If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). - If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). - If neither of these flags are set, then (for backwards compatibility) it holds: - If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), - else they are relative to the vehicle heading (vehicle frame). - Other conditions of the flags are not allowed. - The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as - q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). - If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, - then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. - New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, - and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN. - System ID - Component ID - Timestamp (time since system boot). - Current gimbal flags set. - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. - X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown. - Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown. - Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown. - Failure flags (0 for no failure) - - Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown. - Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown. - This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0. - - - Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis. - System ID - Component ID - Timestamp (time since system boot). - Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention). - Estimated delay of the attitude data. 0 if unknown. - X Speed in NED (North, East, Down). NAN if unknown. - Y Speed in NED (North, East, Down). NAN if unknown. - Z Speed in NED (North, East, Down). NAN if unknown. - Estimated delay of the speed data. 0 if unknown. - Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing. - Bitmap indicating which estimator outputs are valid. - The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown. - - Z component of angular velocity in NED (North, East, Down). NaN if unknown. - - - Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation. - System ID - Component ID - High level gimbal manager flags to use. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Pitch angle (positive: up, negative: down, NaN to be ignored). - Yaw angle (positive: to the right, negative: to the left, NaN to be ignored). - Pitch angular rate (positive: up, negative: down, NaN to be ignored). - Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored). - - - High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case. - System ID - Component ID - High level gimbal manager flags. - Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals). - Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored). - Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored). - Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored). - Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored). - - - - - ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data. - Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - Counter of data packets received. - Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data. - Connection type protocol for all ESC. - Information regarding online/offline status of each ESC. - Bitmap of ESC failure flags. - Number of reported errors by each ESC since boot. - Temperature of each ESC. INT16_MAX: if data not supplied by ESC. - - - - - ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer). - Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number. - Reported motor RPM from each ESC (negative for reverse rotation). - Voltage measured from each ESC. - Current measured from each ESC. - - - - Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE - Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response. - Password. Blank for an open AP. MD5 hash when message is sent back as a response. - - WiFi Mode. - Message acceptance response (sent back to GS). - - - The location and information of an AIS vessel - Mobile Marine Service Identifier, 9 decimal digits - Latitude - Longitude - Course over ground - True heading - Speed over ground - Turn rate - Navigational status - Type of vessels - Distance from lat/lon location to bow - Distance from lat/lon location to stern - Distance from lat/lon location to port side - Distance from lat/lon location to starboard side - The vessel callsign - The vessel name - Time since last communication in seconds - Bitmask to indicate various statuses including valid data fields - - - - General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message "uavcan.protocol.NodeStatus" for the background information. The UAVCAN specification is available at http://uavcan.org. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Time since the start-up of the node. - Generalized node health status. - Generalized operating mode. - Not used currently. - Vendor-specific status information. - - - General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service "uavcan.protocol.GetNodeInfo" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at http://uavcan.org. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Time since the start-up of the node. - Node name string. For example, "sapog.px4.io". - Hardware major version number. - Hardware minor version number. - Hardware unique 128-bit ID. - Software major version number. - Software minor version number. - Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown. - - - Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response. - System ID - Component ID - Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored) - - - Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE. - System ID - Component ID - - - Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout. - Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter value - Parameter type. - Total number of parameters - Index of this parameter - - - Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response. - System ID - Component ID - Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter value - Parameter type. - - - Response from a PARAM_EXT_SET message. - Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise) - Parameter type. - Result code. - - - Obstacle distances in front of the sensor, starting from the left in increment degrees to the right - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Class id of the distance sensor type. - Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm. - Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero. - Minimum distance the sensor can measure. - Maximum distance the sensor can measure. - - Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise. - Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise. - Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned. - - - Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (http://www.ros.org/reps/rep-0147.html). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Coordinate frame of reference for the pose data. - Coordinate frame of reference for the velocity in free space (twist) data. - X Position - Y Position - Z Position - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) - X linear speed - Y linear speed - Z linear speed - Roll angular speed - Pitch angular speed - Yaw angular speed - Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array. - - Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps. - Type of estimator that is providing the odometry. - Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality - - - Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Number of valid points (up-to 5 waypoints are possible) - X-coordinate of waypoint, set to NaN if not being used - Y-coordinate of waypoint, set to NaN if not being used - Z-coordinate of waypoint, set to NaN if not being used - X-velocity of waypoint, set to NaN if not being used - Y-velocity of waypoint, set to NaN if not being used - Z-velocity of waypoint, set to NaN if not being used - X-acceleration of waypoint, set to NaN if not being used - Y-acceleration of waypoint, set to NaN if not being used - Z-acceleration of waypoint, set to NaN if not being used - Yaw angle, set to NaN if not being used - Yaw rate, set to NaN if not being used - MAV_CMD command id of waypoint, set to UINT16_MAX if not being used. - - - Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Number of valid control points (up-to 5 points are possible) - X-coordinate of bezier control points. Set to NaN if not being used - Y-coordinate of bezier control points. Set to NaN if not being used - Z-coordinate of bezier control points. Set to NaN if not being used - Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated - Yaw. Set to NaN for unchanged - - - - Report current used cellular network status - Cellular modem status - Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED - Cellular network radio type: gsm, cdma, lte... - Signal quality in percent. If unknown, set to UINT8_MAX - Mobile country code. If unknown, set to UINT16_MAX - Mobile network code. If unknown, set to UINT16_MAX - Location area code. If unknown, set to 0 - - - Status of the Iridium SBD link. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Number of failed SBD sessions. - Number of successful SBD sessions. - Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength. - 1: Ring call pending, 0: No call pending. - 1: Transmission session pending, 0: No transmission session pending. - 1: Receiving session pending, 0: No receiving session pending. - - - Configure cellular modems. - This message is re-emitted as an acknowledgement by the modem. - The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE. - Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response. - New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response. - Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response. - Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response. - Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response. - Message acceptance response (sent back to GS). - - - RPM sensor data message. - Index of this RPM sensor (0-indexed) - Indicated rate - - - The global position resulting from GPS and sensor fusion. - Time of applicability of position (microseconds since UNIX epoch). - Unique UAS ID. - Latitude (WGS84) - Longitude (WGS84) - Altitude (WGS84) - Altitude above ground - Ground X speed (latitude, positive north) - Ground Y speed (longitude, positive east) - Ground Z speed (altitude, positive down) - Horizontal position uncertainty (standard deviation) - Altitude uncertainty (standard deviation) - Speed uncertainty (standard deviation) - Next waypoint, latitude (WGS84) - Next waypoint, longitude (WGS84) - Next waypoint, altitude (WGS84) - Time until next update. Set to 0 if unknown or in data driven mode. - Flight state - Bitwise OR combination of the data available flags. - - - Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Name, for human-friendly display in a Ground Control Station - Unique ID used to discriminate between arrays - - data - - - - - Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT). - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. - The coordinate system of the fields: x, y, z. - X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7. - Altitude of center point. Coordinate system depends on frame field. - - - - - Battery information that is static, or requires infrequent update. - This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate. - BATTERY_STATUS_V2 is used for higher-rate battery status information. - - Battery ID - Function of the battery. - Type (chemistry) of the battery. - State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided. - Number of battery cells in series. 0: field not provided. - Lifetime count of the number of charge/discharge cycles (https://en.wikipedia.org/wiki/Charge_cycle). UINT16_MAX: field not provided. - Battery weight. 0: field not provided. - Minimum per-cell voltage when discharging. 0: field not provided. - Minimum per-cell voltage when charging. 0: field not provided. - Minimum per-cell voltage when resting. 0: field not provided. - Maximum per-cell voltage when charged. 0: field not provided. - Maximum pack continuous charge current. 0: field not provided. - Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided. - Maximum pack discharge current. 0: field not provided. - Maximum pack discharge burst current. 0: field not provided. - Fully charged design capacity. 0: field not provided. - Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided. - Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided. - Serial number in ASCII characters, 0 terminated. All 0: field not provided. - Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided. - - - Telemetry of power generation system. Alternator or mechanical generator. - Status flags. - Speed of electrical generator or alternator. UINT16_MAX: field not provided. - Current into/out of battery. Positive for out. Negative for in. NaN: field not provided. - Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided - The power being generated. NaN: field not provided - Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus. - The temperature of the rectifier or power converter. INT16_MAX: field not provided. - The target battery current. Positive for out. Negative for in. NaN: field not provided - The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided. - Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided. - Seconds until this generator requires maintenance. A negative value indicates maintenance is past-due. INT32_MAX: field not provided. - - - The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW. - Timestamp (since system boot). - Active outputs - Servo / motor output array values. Zero values indicate unused channels. - - - - - Time/duration estimates for various events and actions given the current vehicle state and position. - Estimated time to complete the vehicle's configured "safe return" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available. - Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available. - Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available. - Estimated time for completing the current mission. -1 means no mission active and/or no estimate available. - Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available. - - - Message for transporting "arbitrary" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification. - System ID (can be 0 for broadcast, but this is discouraged) - Component ID (can be 0 for broadcast, but this is discouraged) - A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase. - Length of the data transported in payload - Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type. - - - A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD. - System ID. - Component ID. - Bus number - Frame length - Frame ID - Frame data - - - - - Hardware status sent by an onboard computer. - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Time since system boot. - Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers. - CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused. - Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused. - Temperature of the board. A value of INT8_MAX implies the field is unused. - Temperature of the CPU core. A value of INT8_MAX implies the field is unused. - Fan speeds. A value of INT16_MAX implies the field is unused. - Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused. - Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused. - Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused. - Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused. - Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused. - Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary - Network traffic from the component system. A value of UINT32_MAX implies the field is unused. - Network traffic to the component system. A value of UINT32_MAX implies the field is unused. - Network capacity from the component system. A value of UINT32_MAX implies the field is unused. - Network capacity to the component system. A value of UINT32_MAX implies the field is unused. - - - - - Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE. - - Timestamp (time since system boot). - CRC32 of the general metadata file (general_metadata_uri). - MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - CRC32 of peripherals metadata file (peripherals_metadata_uri). - (Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated. - - - Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required. - Timestamp (time since system boot). - Component capability flags - Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds. - Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros. - Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros. - Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros. - - - - - - Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE. - - This contains the MAVLink FTP URI and CRC for the component's general metadata file. - The file must be hosted on the component, and may be xz compressed. - The file CRC can be used for file caching. - - The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. - For more information see: https://mavlink.io/en/services/component_information.html. - - Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION. - - Timestamp (time since system boot). - CRC32 of the general metadata file. - MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated. - - - Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE. - System ID - Component ID - Tune format - Tune definition as a NULL-terminated string. - - - Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE. - System ID - Component ID - Bitfield of supported tune formats. - - - - - - Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component). - Component ID - System ID - Event ID (as defined in the component metadata) - Timestamp (time since system boot when the event happened). - Sequence number. - Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9 - Arguments (depend on event ID). - - - - - Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events. - Sequence number. - Flag bitset. - - - - - Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response. - System ID - Component ID - First sequence number of the requested event. - Last sequence number of the requested event. - - - - - Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore). - System ID - Component ID - Sequence number. - Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT. - Error reason. - - - Illuminator status - Time since the start-up of the illuminator in ms - 0: Illuminators OFF, 1: Illuminators ON - Supported illuminator modes - Errors - Illuminator mode - Illuminator brightness - Illuminator strobing period in seconds - Illuminator strobing duty cycle - Temperature in Celsius - Minimum strobing period in seconds - Maximum strobing period in seconds - - - - A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling) - System ID. - Component ID. - bus number - Frame length - Frame ID - Frame data - - - Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages. - System ID. - Component ID. - bus number - what operation to perform on the filter list. See CAN_FILTER_OP enum. - number of IDs in filter list - filter IDs, length num_ids - - - - Cumulative distance traveled for each reported wheel. - Timestamp (synced to UNIX time or since system boot). - Number of wheels reported. - Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints. - - - Winch status. - Timestamp (synced to UNIX time or since system boot). - Length of line released. NaN if unknown - Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown - Tension on the line. NaN if unknown - Voltage of the battery supplying the winch. NaN if unknown - Current draw from the winch. NaN if unknown - Temperature of the motor. INT16_MAX if unknown - Status flags - - - Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. https://github.com/opendroneid/opendroneid-core-c. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at https://mavlink.io/en/services/opendroneid.html. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Indicates the format for the uas_id field of this message. - Indicates the type of UA (Unmanned Aircraft). - UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field. - - - Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Indicates whether the unmanned aircraft is on the ground or in the air. - Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees. - Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s. - The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s. - Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon). - Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon). - The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m. - The geodetic altitude as defined by WGS84. If unknown: -1000 m. - Indicates the reference point for the height field. - The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m. - The accuracy of the horizontal position. - The accuracy of the vertical position. - The accuracy of the barometric altitude. - The accuracy of the horizontal and vertical speed. - Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF. - The accuracy of the timestamps. - - - Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Indicates the type of authentication. - Allowed range is 0 - 15. - This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h. - This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h. - This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019. - Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field. - - - Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Indicates the type of the description field. - Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field. - - - Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Specifies the operator location type. - Specifies the classification type of the UA. - Latitude of the operator. If unknown: 0 (both Lat/Lon). - Longitude of the operator. If unknown: 0 (both Lat/Lon). - Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA. - Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA. - Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA. - When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA. - When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA. - Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. - 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019. - - - Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - Indicates the type of the operator_id field. - Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field. - - - - An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. - This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length. - Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9. - Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field. - - - - Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm. - Status level indicating if arming is allowed. - Text error message, should be empty if status is good to arm. Fill with nulls in unused portion. - - - Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location. - System ID (0 for broadcast). - Component ID (0 for broadcast). - Latitude of the operator. If unknown: 0 (both Lat/Lon). - Longitude of the operator. If unknown: 0 (both Lat/Lon). - Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m. - 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019. - - - Temperature and humidity from hygrometer. - Hygrometer ID - Temperature - Humidity - - - diff --git a/message_definitions/csAirLink.xml b/message_definitions/csAirLink.xml deleted file mode 100644 index 184000b57..000000000 --- a/message_definitions/csAirLink.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - 3 - - - - Login or password error - - - Auth successful - - - - - - - - - - - - - - - - - - - - - - - Authorization package - Login - Password - - - Response to the authorization request - Response type - - - Request to hole punching - Hole push response type - - - Response information about the connected device - Hole push response type - ip version - ip 4 address - ip 6 address - port - - - A package with information about the hole punching status. It is used for constant sending to avoid NAT closing timeout. - Hole push response type - - - Initializing the TURN protocol - Turn init type - - - diff --git a/message_definitions/cubepilot.xml b/message_definitions/cubepilot.xml deleted file mode 100644 index 65b58c8c1..000000000 --- a/message_definitions/cubepilot.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - common.xml - - - Raw RC Data - - - - Information about video stream - Video Stream ID (1 for first, 2 for second, etc.) - Number of streams available. - Frame rate. - Horizontal resolution. - Vertical resolution. - Bit rate. - Video image rotation clockwise. - Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to). - - - Herelink Telemetry - - - - - - - - - - Start firmware update with encapsulated data. - System ID. - Component ID. - FW Size. - FW CRC. - - - offset response to encapsulated data. - System ID. - Component ID. - FW Offset. - - - diff --git a/message_definitions/development.xml b/message_definitions/development.xml deleted file mode 100644 index 55bbc8367..000000000 --- a/message_definitions/development.xml +++ /dev/null @@ -1,744 +0,0 @@ - - - - common.xml - 0 - 0 - - - WiFi wireless security protocols. - - Undefined or unknown security protocol. - - - Open network, no security. - - - WEP. - - - WPA1. - - - WPA2. - - - WPA3. - - - - Airspeed sensor flags - - Airspeed sensor is unhealthy - - - True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control. - - - - - Possible transport layers to set and get parameters via mavlink during a parameter transaction. - - Transaction over param transport. - - - Transaction over param_ext transport. - - - - Possible parameter transaction actions. - - Commit the current parameter transaction. - - - Commit the current parameter transaction. - - - Cancel the current parameter transaction. - - - - Standard modes with a well understood meaning across flight stacks and vehicle types. - For example, most flight stack have the concept of a "return" or "RTL" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ. - Modes may be set using MAV_CMD_DO_SET_STANDARD_MODE. - - - Non standard mode. - This may be used when reporting the mode if the current flight mode is not a standard mode. - - - - Position mode (manual). - Position-controlled and stabilized manual mode. - When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces. - This mode can only be set by vehicles that can hold a fixed position. - Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces. - Hybrid MC/FW ("VTOL") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles. - Fixed-wing (FW) vehicles must not support this mode. - Other vehicle types must not support this mode (this may be revisited through the PR process). - - - - Orbit (manual). - Position-controlled and stabilized manual mode. - The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction. - Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated. - Flight stacks may support the [MAV_CMD_DO_ORBIT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT) for changing the orbit parameters. - MC and FW vehicles may support this mode. - Hybrid MC/FW ("VTOL") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration. - Other vehicle types must not support this mode (this may be revisited through the PR process). - - - - Cruise mode (manual). - Position-controlled and stabilized manual mode. - When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces. - Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces. - Hybrid MC/FW ("VTOL") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles. - Multicopter (MC) vehicles must not support this mode. - Other vehicle types must not support this mode (this may be revisited through the PR process). - - - - Altitude hold (manual). - Altitude-controlled and stabilized manual mode. - When sticks are released vehicles return to their level-flight orientation and hold their altitude. - MC vehicles continue with existing momentum and may move with wind (or other external forces). - FW vehicles continue with current heading, but may be moved off-track by wind. - Hybrid MC/FW ("VTOL") vehicles behave according to their current configuration/mode (FW or MC). - Other vehicle types must not support this mode (this may be revisited through the PR process). - - - - Return home mode (auto). - Automatic mode that returns vehicle to home via a safe flight path. - It may also automatically land the vehicle (i.e. RTL). - The precise flight path and landing behaviour depend on vehicle configuration and type. - - - - Safe recovery mode (auto). - Automatic mode that takes vehicle to a predefined safe location via a safe flight path (rally point or mission defined landing) . - It may also automatically land the vehicle. - The precise return location, flight path, and landing behaviour depend on vehicle configuration and type. - - - - Mission mode (automatic). - Automatic mode that executes MAVLink missions. - Missions are executed from the current waypoint as soon as the mode is enabled. - - - - Land mode (auto). - Automatic mode that lands the vehicle at the current location. - The precise landing behaviour depends on vehicle configuration and type. - - - - Takeoff mode (auto). - Automatic takeoff mode. - The precise takeoff behaviour depends on vehicle configuration and type. - - - - - Mode properties. - - - If set, this mode is an advanced mode. - For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not. - A GCS can optionally use this flag to configure the UI for its intended users. - - - - If set, this mode should not be added to the list of selectable modes. - The mode might still be selected by the FC directly (for example as part of a failsafe). - - - - - Battery status flags for fault, health and state indication. - - - The battery is not ready to use (fly). - Set if the battery has faults or other conditions that make it unsafe to fly with. - Note: It will be the logical OR of other status bits (chosen by the manufacturer/integrator). - - - - - Battery is charging. - - - - - Battery is cell balancing (during charging). - Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE may be set). - - - - - Battery cells are not balanced. - Not ready to use. - - - - - Battery is auto discharging (towards storage level). - Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE would be set). - - - - - Battery requires service (not safe to fly). - This is set at vendor discretion. - It is likely to be set for most faults, and may also be set according to a maintenance schedule (such as age, or number of recharge cycles, etc.). - - - - - Battery is faulty and cannot be repaired (not safe to fly). - This is set at vendor discretion. - The battery should be disposed of safely. - - - - - Automatic battery protection monitoring is enabled. - When enabled, the system will monitor for certain kinds of faults, such as cells being over-voltage. - If a fault is triggered then and protections are enabled then a safety fault (MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM) will be set and power from the battery will be stopped. - Note that battery protection monitoring should only be enabled when the vehicle is landed. Once the vehicle is armed, or starts moving, the protections should be disabled to prevent false positives from disabling the output. - - - - - The battery fault protection system had detected a fault and cut all power from the battery. - This will only trigger if MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED is set. - Other faults like MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT may also be set, indicating the cause of the protection fault. - - - - One or more cells are above their maximum voltage rating. - - - - One or more cells are below their minimum voltage rating. - A battery that had deep-discharged might be irrepairably damaged, and set both MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT and MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY. - - - - Over-temperature fault. - - - Under-temperature fault. - - - Over-current fault. - - - - Short circuit event detected. - The battery may or may not be safe to use (check other flags). - - - - Voltage not compatible with power rail voltage (batteries on same power rail should have similar voltage). - - - Battery firmware is not compatible with current autopilot firmware. - - - Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s). - - - - Battery capacity_consumed and capacity_remaining values are relative to a full battery (they sum to the total capacity of the battery). - This flag would be set for a smart battery that can accurately determine its remaining charge across vehicle reboots and discharge/recharge cycles. - If unset the capacity_consumed indicates the consumption since vehicle power-on, as measured using a power monitor. The capacity_remaining, if provided, indicates the estimated remaining capacity on the assumption that the battery was full on vehicle boot. - If unset a GCS is recommended to advise that users fully charge the battery on power on. - - - - Reserved (not used). If set, this will indicate that an additional status field exists for higher status values. - - - - - - - - Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries - - - - Fly a figure eight path as defined by the parameters. - Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values. - The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation. - This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED). - Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading). - - Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - NaN: The radius will be set to 2.5 times the minor radius and direction is clockwise. - Must be greater or equal to two times the minor radius for feasible values. - Minor axis radius of the figure eight. Defines the radius of the two circles that make up the figure. Negative value has no effect. - NaN: The radius will be set to the default loiter radius. - - Orientation of the figure eight major axis with respect to true north (range: [-pi,pi]). NaN: use default orientation aligned to true north. - Center point latitude/X coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle position, or current center if already loitering. - Center point longitude/Y coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle position, or current center if already loitering. - Center point altitude MSL/Z coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. - INT32_MAX or NaN: Use current vehicle altitude. - - - Request to start or end a parameter transaction. Multiple kinds of transport layers can be used to exchange parameters in the transaction (param, param_ext and mavftp). The command response can either be a success/failure or an in progress in case the receiving side takes some time to apply the parameters. - Action to be performed (start, commit, cancel, etc.) - Possible transport layers to set and get parameters via mavlink during a parameter transaction. - Identifier for a specific transaction. - - - Request a target system to start an upgrade of one (or all) of its components. - For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller. - The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation. - Command protocol information: https://mavlink.io/en/services/command.html. - Component id of the component to be upgraded. If set to 0, all components should be upgraded. - 0: Do not reboot component after the action is executed, 1: Reboot component after the action is executed. - Reserved - Reserved - Reserved - Reserved - WIP: upgrade progress report rate (can be used for more granular control). - - - Define start of a group of mission items. When control reaches this command a GROUP_START message is emitted. - The end of a group is marked using MAV_CMD_GROUP_END with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. - Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float. - - - Define end of a group of mission items. When control reaches this command a GROUP_END message is emitted. - The start of the group is marked is marked using MAV_CMD_GROUP_START with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. - Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float. - - - Enable the specified standard MAVLink mode. - If the mode is not supported the vehicle should ACK with MAV_RESULT_FAILED. - - The mode to set. - - - - - - - - - Allows setting an AT S command of an SiK radio. - - The radio instance, one-based, 0 for all. - The Sx index, e.g. 3 for S3 which is NETID. - The value to set it to, e.g. default 25 for NETID - - - - - - - - Set system and component id. - This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id. - Recipients must reject command addressed to broadcast system ID. - - New system ID for target component(s). 0: ignore and reject command (broadcast system ID not allowed). - New component ID for target component(s). 0: ignore (component IDs don't change). - Reboot components after ID change. Any non-zero value triggers the reboot. - - - - Used to manually set/unset emergency status for remote id. - This is for compliance with MOC ASTM docs, specifically F358 section 7.7: "Emergency Status Indicator". - The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred. - See https://mavlink.io/en/services/opendroneid.html for more information. - - Set/unset emergency 0: unset, 1: set - - - Empty - Empty - Empty - Empty - Empty - - - Set an external estimate of wind direction and speed. - This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself. - - Horizontal wind speed. - Estimated 1 sigma accuracy of wind speed. Set to NaN if unknown. - Azimuth (relative to true north) from where the wind is blowing. - Estimated 1 sigma accuracy of wind direction. Set to NaN if unknown. - Empty - Empty - Empty - - - - These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE. - - - - - - - - The frame of a target observation from an onboard sensor. - - NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth. - - - FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle. - - - NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle. - - - Other sensor frame for target observations neither in local NED nor in body FRD. - - - - RADIO_RC_CHANNELS flags (bitmask). - - Failsafe is active. The content of the RC channels data in the RADIO_RC_CHANNELS message is implementation dependent. - - - Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received. - - - - Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates. - - Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1. - - - A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second. - - - A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s). - - - - Flags indicating errors in a GPS receiver. - - There are problems with incoming correction streams. - - - There are problems with the configuration. - - - There are problems with the software on the GPS receiver. - - - There are problems with an antenna connected to the GPS receiver. - - - There are problems handling all incoming events. - - - The GPS receiver CPU is overloaded. - - - The GPS receiver is experiencing output congestion. - - - - Signal authentication state in a GPS receiver. - - The GPS receiver does not provide GPS signal authentication info. - - - The GPS receiver is initializing signal authentication. - - - The GPS receiver encountered an error while initializing signal authentication. - - - The GPS receiver has correctly authenticated all signals. - - - GPS signal authentication is disabled on the receiver. - - - - Signal jamming state in a GPS receiver. - - The GPS receiver does not provide GPS signal jamming info. - - - The GPS receiver detected no signal jamming. - - - The GPS receiver detected and mitigated signal jamming. - - - The GPS receiver detected signal jamming. - - - - Signal spoofing state in a GPS receiver. - - The GPS receiver does not provide GPS signal spoofing info. - - - The GPS receiver detected no signal spoofing. - - - The GPS receiver detected and mitigated signal spoofing. - - - The GPS receiver detected signal spoofing but still has a fix. - - - - State of RAIM processing. - - RAIM capability is unknown. - - - RAIM is disabled. - - - RAIM integrity check was successful. - - - RAIM integrity check failed. - - - - - - - Response from a PARAM_SET message when it is used in a transaction. - Id of system that sent PARAM_SET message. - Id of system that sent PARAM_SET message. - Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string - Parameter value (new value if PARAM_ACCEPTED, current value otherwise) - Parameter type. - Result code. - - - Airspeed information from a sensor. - Sensor ID. - Calibrated airspeed (CAS). - Temperature. INT16_MAX for value unknown/not supplied. - Raw differential pressure. NaN for value unknown/not supplied. - Airspeed sensor flags. - - - Detected WiFi network status information. This message is sent per each WiFi network detected in range with known SSID and general status parameters. - Name of Wi-Fi network (SSID). - WiFi network operating channel ID. Set to 0 if unknown or unidentified. - WiFi network signal quality. - WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - WiFi network security type. - - - - - Set temporary maximum limits for horizontal speed, vertical speed and yaw rate. - The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set). - The consumer should latch the limits until a new limit is received or the mode is changed. - - System ID (0 for broadcast). - Component ID (0 for broadcast). - Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore) - Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore) - - - - - Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS. - Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied - Limit for vehicle turn rate around its yaw axis. NaN: No limit applied - - - - - - Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT). - This may typically send at low rates: of the order of 2Hz. - - Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. - Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure. - Orientation of the figure eight major axis with respect to true north in [-pi,pi). - The coordinate system of the fields: x, y, z. - X coordinate of center point. Coordinate system depends on frame field. - Y coordinate of center point. Coordinate system depends on frame field. - Altitude of center point. Coordinate system depends on frame field. - - - Battery dynamic information. - This should be streamed (nominally at 1Hz). - Static/invariant battery information is sent in BATTERY_INFO. - Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full. - Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on. - - Battery ID - Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided. - Battery voltage (total). NaN: field not provided. - Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided. - Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL. - Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered. - Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. - Fault, health, readiness, and other status indications. - - - Fuel status. - This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot. - The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. - - The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. - A recipient can assume that if these fields are supplied they are accurate. - If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). - Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). - - This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. - If both messages are sent for the same fuel system, the ids and corresponding information must match. - - This should be streamed (nominally at 0.1 Hz). - - Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - Capacity when full. Must be provided. - Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - Fuel temperature. NaN: field not provided. - Fuel type. Defines units for fuel capacity and consumption fields above. - - - Emitted during mission execution when control reaches MAV_CMD_GROUP_START. - Mission-unique group id (from MAV_CMD_GROUP_START). - CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - Emitted during mission execution when control reaches MAV_CMD_GROUP_END. - Mission-unique group id (from MAV_CMD_GROUP_END). - CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message. - Timestamp (UNIX Epoch time or time since system boot). - The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. - - - RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS). - Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller. - The target_system field should normally be set to the system id of the system to control, typically the flight controller. - The target_component field can normally be set to 0, so that all components of the system can receive the message. - The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field. - The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain. - The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled). - The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent). - The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost). - In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver). - For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data. - Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming. - - System ID (ID of target system, normally flight controller). - Component ID (normally 0 for broadcast). - Time when the data in the channels field were last updated (time since boot in the receiver's time domain). - Radio RC channels status flags. - Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message. - - RC channels. - Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500. - Channels with indexes equal or above count should be set to 0, to benefit from MAVLink's trailing-zero trimming. - - - Get information about a particular flight modes. - The message can be enumerated or requested for a particular mode using MAV_CMD_REQUEST_MESSAGE. - Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. - The modes must be available/settable for the current vehicle/frame type. - Each modes should only be emitted once (even if it is both standard and custom). - - The total number of available modes for the current vehicle type. - The current mode index within number_modes, indexed from 1. - Standard mode. - A bitfield for use for autopilot-specific flags - Mode properties. - Name of custom mode, with null termination character. Should be omitted for standard modes. - - - Get the current mode. - This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). - It may be requested using MAV_CMD_REQUEST_MESSAGE. - - Standard mode. - A bitfield for use for autopilot-specific flags - The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied - - - A change to the sequence number indicates that the set of AVAILABLE_MODES has changed. - A receiver must re-request all available modes whenever the sequence number changes. - This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change. - - Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically). - - - Information about key components of GNSS receivers, like signal authentication, interference and system errors. - GNSS receiver id. Must match instance ids of other messages from same receiver. - Errors in the GPS system. - Signal authentication state of the GPS system. - Signal jamming state of the GPS system. - Signal spoofing state of the GPS system. - The state of the RAIM processing. - Horizontal expected accuracy using satellites successfully validated using RAIM. - Vertical expected accuracy using satellites successfully validated using RAIM. - An abstract value representing the estimated quality of incoming corrections, or 255 if not available. - An abstract value representing the overall status of the receiver, or 255 if not available. - An abstract value representing the quality of incoming GNSS signals, or 255 if not available. - An abstract value representing the estimated PPK quality, or 255 if not available. - - - - Current motion information from sensors on a target - Timestamp (UNIX epoch time). - The ID of the target if multiple targets are present - Bitmap to indicate the sensor's reporting capabilities - Target's latitude (WGS84) - Target's longitude (WGS84) - Target's altitude (AMSL) - Target's velocity in its body frame - Linear target's acceleration in its body frame - Quaternion of the target's orientation from its body frame to the vehicle's NED frame. - Target's roll, pitch and yaw rates - Standard deviation of horizontal (eph) and vertical (epv) position errors - Standard deviation of the target's velocity in its body frame - Standard deviation of the target's acceleration in its body frame - - - - The location of a target measured by MAV's onboard sensors. - Timestamp (UNIX epoch time) - The ID of the target if multiple targets are present - Coordinate frame used for following fields. - X Position of the target in TARGET_OBS_FRAME - Y Position of the target in TARGET_OBS_FRAME - Z Position of the target in TARGET_OBS_FRAME - Standard deviation of the target's position in TARGET_OBS_FRAME - Standard deviation of the target's orientation in TARGET_OBS_FRAME - Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0) - Type of target - - - diff --git a/message_definitions/icarous.xml b/message_definitions/icarous.xml deleted file mode 100644 index 7dbdb95eb..000000000 --- a/message_definitions/icarous.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - ICAROUS heartbeat - See the FMS_STATE enum. - - - Kinematic multi bands (track) output from Daidalus - Number of track bands - See the TRACK_BAND_TYPES enum. - min angle (degrees) - max angle (degrees) - See the TRACK_BAND_TYPES enum. - min angle (degrees) - max angle (degrees) - See the TRACK_BAND_TYPES enum. - min angle (degrees) - max angle (degrees) - See the TRACK_BAND_TYPES enum. - min angle (degrees) - max angle (degrees) - See the TRACK_BAND_TYPES enum. - min angle (degrees) - max angle (degrees) - - - diff --git a/message_definitions/matrixpilot.xml b/message_definitions/matrixpilot.xml deleted file mode 100644 index fdefe9a2b..000000000 --- a/message_definitions/matrixpilot.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - common.xml - - - - Action required when performing CMD_PREFLIGHT_STORAGE - - Read all parameters from storage - - - Write all parameters to storage - - - Clear all parameters in storage - - - Read specific parameters from storage - - - Write specific parameters to storage - - - Clear specific parameters in storage - - - do nothing - - - - - Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. - Storage action: Action defined by MAV_PREFLIGHT_STORAGE_ACTION_ADVANCED - Storage area as defined by parameter database - Storage flags as defined by parameter database - Empty - Empty - Empty - Empty - - - - - - Depreciated but used as a compiler flag. Do not remove - System ID - Component ID - - - Request reading of flexifunction data - System ID - Component ID - Type of flexifunction data requested - index into data where needed - - - Flexifunction type and parameters for component at function index from buffer - System ID - Component ID - Function index - Total count of functions - Address in the flexifunction data, Set to 0xFFFF to use address in target memory - Size of the - Settings data - - - Flexifunction type and parameters for component at function index from buffer - System ID - Component ID - Function index - result of acknowledge, 0=fail, 1=good - - - Acknowldge success or failure of a flexifunction command - System ID - Component ID - 0=inputs, 1=outputs - index of first directory entry to write - count of directory entries to write - Settings data - - - Acknowldge success or failure of a flexifunction command - System ID - Component ID - 0=inputs, 1=outputs - index of first directory entry to write - count of directory entries to write - result of acknowledge, 0=fail, 1=good - - - Acknowldge success or failure of a flexifunction command - System ID - Component ID - Flexifunction command type - - - Acknowldge success or failure of a flexifunction command - Command acknowledged - result of acknowledge - - - Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A - Serial UDB Extra Time - Serial UDB Extra Status - Serial UDB Extra Latitude - Serial UDB Extra Longitude - Serial UDB Extra Altitude - Serial UDB Extra Waypoint Index - Serial UDB Extra Rmat 0 - Serial UDB Extra Rmat 1 - Serial UDB Extra Rmat 2 - Serial UDB Extra Rmat 3 - Serial UDB Extra Rmat 4 - Serial UDB Extra Rmat 5 - Serial UDB Extra Rmat 6 - Serial UDB Extra Rmat 7 - Serial UDB Extra Rmat 8 - Serial UDB Extra GPS Course Over Ground - Serial UDB Extra Speed Over Ground - Serial UDB Extra CPU Load - Serial UDB Extra 3D IMU Air Speed - Serial UDB Extra Estimated Wind 0 - Serial UDB Extra Estimated Wind 1 - Serial UDB Extra Estimated Wind 2 - Serial UDB Extra Magnetic Field Earth 0 - Serial UDB Extra Magnetic Field Earth 1 - Serial UDB Extra Magnetic Field Earth 2 - Serial UDB Extra Number of Satellites in View - Serial UDB Extra GPS Horizontal Dilution of Precision - - - Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B - Serial UDB Extra Time - Serial UDB Extra PWM Input Channel 1 - Serial UDB Extra PWM Input Channel 2 - Serial UDB Extra PWM Input Channel 3 - Serial UDB Extra PWM Input Channel 4 - Serial UDB Extra PWM Input Channel 5 - Serial UDB Extra PWM Input Channel 6 - Serial UDB Extra PWM Input Channel 7 - Serial UDB Extra PWM Input Channel 8 - Serial UDB Extra PWM Input Channel 9 - Serial UDB Extra PWM Input Channel 10 - Serial UDB Extra PWM Input Channel 11 - Serial UDB Extra PWM Input Channel 12 - Serial UDB Extra PWM Output Channel 1 - Serial UDB Extra PWM Output Channel 2 - Serial UDB Extra PWM Output Channel 3 - Serial UDB Extra PWM Output Channel 4 - Serial UDB Extra PWM Output Channel 5 - Serial UDB Extra PWM Output Channel 6 - Serial UDB Extra PWM Output Channel 7 - Serial UDB Extra PWM Output Channel 8 - Serial UDB Extra PWM Output Channel 9 - Serial UDB Extra PWM Output Channel 10 - Serial UDB Extra PWM Output Channel 11 - Serial UDB Extra PWM Output Channel 12 - Serial UDB Extra IMU Location X - Serial UDB Extra IMU Location Y - Serial UDB Extra IMU Location Z - Serial UDB Location Error Earth X - Serial UDB Location Error Earth Y - Serial UDB Location Error Earth Z - Serial UDB Extra Status Flags - Serial UDB Extra Oscillator Failure Count - Serial UDB Extra IMU Velocity X - Serial UDB Extra IMU Velocity Y - Serial UDB Extra IMU Velocity Z - Serial UDB Extra Current Waypoint Goal X - Serial UDB Extra Current Waypoint Goal Y - Serial UDB Extra Current Waypoint Goal Z - Aeroforce in UDB X Axis - Aeroforce in UDB Y Axis - Aeroforce in UDB Z axis - SUE barometer temperature - SUE barometer pressure - SUE barometer altitude - SUE battery voltage - SUE battery current - SUE battery milli amp hours used - Sue autopilot desired height - Serial UDB Extra Stack Memory Free - - - Backwards compatible version of SERIAL_UDB_EXTRA F4: format - Serial UDB Extra Roll Stabilization with Ailerons Enabled - Serial UDB Extra Roll Stabilization with Rudder Enabled - Serial UDB Extra Pitch Stabilization Enabled - Serial UDB Extra Yaw Stabilization using Rudder Enabled - Serial UDB Extra Yaw Stabilization using Ailerons Enabled - Serial UDB Extra Navigation with Ailerons Enabled - Serial UDB Extra Navigation with Rudder Enabled - Serial UDB Extra Type of Alitude Hold when in Stabilized Mode - Serial UDB Extra Type of Alitude Hold when in Waypoint Mode - Serial UDB Extra Firmware racing mode enabled - - - Backwards compatible version of SERIAL_UDB_EXTRA F5: format - Serial UDB YAWKP_AILERON Gain for Proporional control of navigation - Serial UDB YAWKD_AILERON Gain for Rate control of navigation - Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization - Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization - - - Backwards compatible version of SERIAL_UDB_EXTRA F6: format - Serial UDB Extra PITCHGAIN Proportional Control - Serial UDB Extra Pitch Rate Control - Serial UDB Extra Rudder to Elevator Mix - Serial UDB Extra Roll to Elevator Mix - Gain For Boosting Manual Elevator control When Plane Stabilized - - - Backwards compatible version of SERIAL_UDB_EXTRA F7: format - Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation - Serial UDB YAWKD_RUDDER Gain for Rate control of navigation - Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization - Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization - SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized - Serial UDB Extra Return To Landing - Angle to Pitch Plane Down - - - Backwards compatible version of SERIAL_UDB_EXTRA F8: format - Serial UDB Extra HEIGHT_TARGET_MAX - Serial UDB Extra HEIGHT_TARGET_MIN - Serial UDB Extra ALT_HOLD_THROTTLE_MIN - Serial UDB Extra ALT_HOLD_THROTTLE_MAX - Serial UDB Extra ALT_HOLD_PITCH_MIN - Serial UDB Extra ALT_HOLD_PITCH_MAX - Serial UDB Extra ALT_HOLD_PITCH_HIGH - - - Backwards compatible version of SERIAL_UDB_EXTRA F13: format - Serial UDB Extra GPS Week Number - Serial UDB Extra MP Origin Latitude - Serial UDB Extra MP Origin Longitude - Serial UDB Extra MP Origin Altitude Above Sea Level - - - Backwards compatible version of SERIAL_UDB_EXTRA F14: format - Serial UDB Extra Wind Estimation Enabled - Serial UDB Extra Type of GPS Unit - Serial UDB Extra Dead Reckoning Enabled - Serial UDB Extra Type of UDB Hardware - Serial UDB Extra Type of Airframe - Serial UDB Extra Reboot Register of DSPIC - Serial UDB Extra Last dspic Trap Flags - Serial UDB Extra Type Program Address of Last Trap - Serial UDB Extra Number of Ocillator Failures - Serial UDB Extra UDB Internal Clock Configuration - Serial UDB Extra Type of Flight Plan - - - Backwards compatible version of SERIAL_UDB_EXTRA F15 format - Serial UDB Extra Model Name Of Vehicle - Serial UDB Extra Registraton Number of Vehicle - - - Backwards compatible version of SERIAL_UDB_EXTRA F16 format - Serial UDB Extra Name of Expected Lead Pilot - Serial UDB Extra URL of Lead Pilot or Team - - - The altitude measured by sensors and IMU - Timestamp (milliseconds since system boot) - GPS altitude (MSL) in meters, expressed as * 1000 (millimeters) - IMU altitude above ground in meters, expressed as * 1000 (millimeters) - barometeric altitude above ground in meters, expressed as * 1000 (millimeters) - Optical flow altitude above ground in meters, expressed as * 1000 (millimeters) - Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters) - Extra altitude above ground in meters, expressed as * 1000 (millimeters) - - - The airspeed measured by sensors and IMU - Timestamp (milliseconds since system boot) - Airspeed estimate from IMU, cm/s - Pitot measured forward airpseed, cm/s - Hot wire anenometer measured airspeed, cm/s - Ultrasonic measured airspeed, cm/s - Angle of attack sensor, degrees * 10 - Yaw angle sensor, degrees * 10 - - - Backwards compatible version of SERIAL_UDB_EXTRA F17 format - SUE Feed Forward Gain - SUE Max Turn Rate when Navigating - SUE Max Turn Rate in Fly By Wire Mode - - - Backwards compatible version of SERIAL_UDB_EXTRA F18 format - SUE Angle of Attack Normal - SUE Angle of Attack Inverted - SUE Elevator Trim Normal - SUE Elevator Trim Inverted - SUE reference_speed - - - Backwards compatible version of SERIAL_UDB_EXTRA F19 format - SUE aileron output channel - SUE aileron reversed - SUE elevator output channel - SUE elevator reversed - SUE throttle output channel - SUE throttle reversed - SUE rudder output channel - SUE rudder reversed - - - Backwards compatible version of SERIAL_UDB_EXTRA F20 format - SUE Number of Input Channels - SUE UDB PWM Trim Value on Input 1 - SUE UDB PWM Trim Value on Input 2 - SUE UDB PWM Trim Value on Input 3 - SUE UDB PWM Trim Value on Input 4 - SUE UDB PWM Trim Value on Input 5 - SUE UDB PWM Trim Value on Input 6 - SUE UDB PWM Trim Value on Input 7 - SUE UDB PWM Trim Value on Input 8 - SUE UDB PWM Trim Value on Input 9 - SUE UDB PWM Trim Value on Input 10 - SUE UDB PWM Trim Value on Input 11 - SUE UDB PWM Trim Value on Input 12 - - - Backwards compatible version of SERIAL_UDB_EXTRA F21 format - SUE X accelerometer offset - SUE Y accelerometer offset - SUE Z accelerometer offset - SUE X gyro offset - SUE Y gyro offset - SUE Z gyro offset - - - Backwards compatible version of SERIAL_UDB_EXTRA F22 format - SUE X accelerometer at calibration time - SUE Y accelerometer at calibration time - SUE Z accelerometer at calibration time - SUE X gyro at calibration time - SUE Y gyro at calibration time - SUE Z gyro at calibration time - - - diff --git a/message_definitions/minimal.xml b/message_definitions/minimal.xml deleted file mode 100644 index 221a04a65..000000000 --- a/message_definitions/minimal.xml +++ /dev/null @@ -1,731 +0,0 @@ - - - 3 - - - Micro air vehicle / autopilot classes. This identifies the individual model. - - Generic autopilot, full support for everything - - - Reserved for future use. - - - SLUGS autopilot, http://slugsuav.soe.ucsc.edu - - - ArduPilot - Plane/Copter/Rover/Sub/Tracker, https://ardupilot.org - - - OpenPilot, http://openpilot.org - - - Generic autopilot only supporting simple waypoints - - - Generic autopilot supporting waypoints and other simple navigation commands - - - Generic autopilot supporting the full mission command set - - - No valid autopilot, e.g. a GCS or other MAVLink component - - - PPZ UAV - http://nongnu.org/paparazzi - - - UAV Dev Board - - - FlexiPilot - - - PX4 Autopilot - http://px4.io/ - - - SMACCMPilot - http://smaccmpilot.org - - - AutoQuad -- http://autoquad.org - - - Armazila -- http://armazila.com - - - Aerob -- http://aerob.ru - - - ASLUAV autopilot -- http://www.asl.ethz.ch - - - SmartAP Autopilot - http://sky-drones.com - - - AirRails - http://uaventure.com - - - Fusion Reflex - https://fusion.engineering - - - - MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA). - - Generic micro air vehicle - - - Fixed wing aircraft. - - - Quadrotor - - - Coaxial helicopter - - - Normal helicopter with tail rotor. - - - Ground installation - - - Operator control unit / ground control station - - - Airship, controlled - - - Free balloon, uncontrolled - - - Rocket - - - Ground rover - - - Surface vessel, boat, ship - - - Submarine - - - Hexarotor - - - Octorotor - - - Tricopter - - - Flapping wing - - - Kite - - - Onboard companion controller - - - Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR. - - - Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR. - - - Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight. - - - VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases. - - - Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate. - - - Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode. - - - - VTOL reserved 5 - - - Gimbal - - - ADSB system - - - Steerable, nonrigid airfoil - - - Dodecarotor - - - Camera - - - Charging station - - - FLARM collision avoidance system - - - Servo - - - Open Drone ID. See https://mavlink.io/en/services/opendroneid.html. - - - Decarotor - - - Battery - - - Parachute - - - Log - - - OSD - - - IMU - - - GPS - - - Winch - - - Generic multirotor that does not fit into a specific type or whose type is unknown - - - Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). - - - - These flags encode the MAV mode. - - 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state. - - - 0b01000000 remote control input is enabled. - - - 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. - - - 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. - - - 0b00001000 guided mode enabled, system flies waypoints / mission items. - - - 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. - - - 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. - - - 0b00000001 Reserved for future use. - - - - These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not. - - First bit: 10000000 - - - Second bit: 01000000 - - - Third bit: 00100000 - - - Fourth bit: 00010000 - - - Fifth bit: 00001000 - - - Sixth bit: 00000100 - - - Seventh bit: 00000010 - - - Eighth bit: 00000001 - - - - - Uninitialized system, state is unknown. - - - System is booting up. - - - System is calibrating and not flight-ready. - - - System is grounded and on standby. It can be launched any time. - - - System is active and might be already airborne. Motors are engaged. - - - System is in a non-normal flight mode (failsafe). It can however still navigate. - - - System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down. - - - System just initialized its power-down sequence, will shut down now. - - - System is terminating itself (failsafe or commanded). - - - - Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.). - Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components. - When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded. - - Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message. - - - System flight controller component ("autopilot"). Only one autopilot is expected in a particular system. - - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages). - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. - - - Camera #1. - - - Camera #2. - - - Camera #3. - - - Camera #4. - - - Camera #5. - - - Camera #6. - - - Servo #1. - - - Servo #2. - - - Servo #3. - - - Servo #4. - - - Servo #5. - - - Servo #6. - - - Servo #7. - - - Servo #8. - - - Servo #9. - - - Servo #10. - - - Servo #11. - - - Servo #12. - - - Servo #13. - - - Servo #14. - - - Gimbal #1. - - - Logging component. - - - Automatic Dependent Surveillance-Broadcast (ADS-B) component. - - - On Screen Display (OSD) devices for video links. - - - Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice. - - - All gimbals should use MAV_COMP_ID_GIMBAL. - Gimbal ID for QX1. - - - FLARM collision alert component. - - - Parachute component. - - - Winch component. - - - Gimbal #2. - - - Gimbal #3. - - - Gimbal #4 - - - Gimbal #5. - - - Gimbal #6. - - - Battery #1. - - - Battery #2. - - - CAN over MAVLink client. - - - Component that can generate/supply a mission flight plan (e.g. GCS or developer API). - - - Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. - - - Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. - - - Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. - - - Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. - - - Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.). - - - Component that plans a collision free path between two points. - - - Component that provides position estimates using VIO techniques. - - - Component that manages pairing of vehicle and GCS. - - - Inertial Measurement Unit (IMU) #1. - - - Inertial Measurement Unit (IMU) #2. - - - Inertial Measurement Unit (IMU) #3. - - - GPS #1. - - - GPS #2. - - - Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). - - - Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). - - - Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). - - - Component to bridge MAVLink to UDP (i.e. from a UART). - - - Component to bridge to UART (i.e. from UDP). - - - Component handling TUNNEL messages (e.g. vendor specific GUI of a component). - - - Illuminator - - - System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. - Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). - - - - - - The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html - Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type. - Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. - System mode bitmap. - A bitfield for use for autopilot-specific flags - System status flag. - MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version - - - - - Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly. - Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - Minimum MAVLink version supported - Maximum MAVLink version supported (set to the same value as version by default) - The first 8 bytes (not characters printed in hex!) of the git hash. - The first 8 bytes (not characters printed in hex!) of the git hash. - - - diff --git a/message_definitions/paparazzi.xml b/message_definitions/paparazzi.xml deleted file mode 100755 index 45c9ec554..000000000 --- a/message_definitions/paparazzi.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - common.xml - 3 - - - - - - Message encoding a mission script item. This message is emitted upon a request for the next script item. - System ID - Component ID - Sequence - The name of the mission script, NULL terminated. - - - Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message. - System ID - Component ID - Sequence - - - Request the overall list of mission items from the system/component. - System ID - Component ID - - - This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts. - System ID - Component ID - Number of script items in the sequence - - - This message informs about the currently active SCRIPT. - Active Sequence - - - diff --git a/message_definitions/python_array_test.xml b/message_definitions/python_array_test.xml deleted file mode 100644 index 7e4b72e14..000000000 --- a/message_definitions/python_array_test.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - common.xml - - - Array test #0. - Stub field - Value array - Value array - Value array - Value array - - - Array test #1. - Value array - - - Array test #3. - Stub field - Value array - - - Array test #4. - Value array - Stub field - - - Array test #5. - Value array - Value array - - - Array test #6. - Stub field - Stub field - Stub field - Value array - Value array - Value array - Value array - Value array - Value array - Value array - Value array - Value array - - - Array test #7. - Value array - Value array - Value array - Value array - Value array - Value array - Value array - Value array - Value array - - - Array test #8. - Stub field - Value array - Value array - - - diff --git a/message_definitions/standard.xml b/message_definitions/standard.xml deleted file mode 100644 index e323b9543..000000000 --- a/message_definitions/standard.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - minimal.xml - 0 - - - - - diff --git a/message_definitions/storm32.xml b/message_definitions/storm32.xml deleted file mode 100644 index 7a0bf2ecd..000000000 --- a/message_definitions/storm32.xml +++ /dev/null @@ -1,387 +0,0 @@ - - - - ardupilotmega.xml - 1 - 1 - - - - - - - Registered for STorM32 gimbal controller. For communication with gimbal or camera. - - - Registered for STorM32 gimbal controller. For communication with gimbal or camera. - - - Registered for STorM32 gimbal controller. For communication with gimbal. - - - Registered for STorM32 gimbal controller. For communication with gimbal. - - - Registered for STorM32 gimbal controller. For communication with camera. - - - Registered for STorM32 gimbal controller. For communication with camera. - - - - - - STorM32 gimbal prearm check flags. - - STorM32 gimbal is in normal state. - - - The IMUs are healthy and working normally. - - - The motors are active and working normally. - - - The encoders are healthy and working normally. - - - A battery voltage is applied and is in range. - - - Virtual input channels are receiving data. - - - Mavlink messages are being received. - - - The STorM32Link data indicates QFix. - - - The STorM32Link is working. - - - The camera has been found and is connected. - - - The signal on the AUX0 input pin is low. - - - The signal on the AUX1 input pin is low. - - - The NTLogger is working normally. - - - - - STorM32 camera prearm check flags. - - The camera has been found and is connected. - - - - - - - Gimbal manager capability flags. - - The gimbal manager supports several profiles. - - - - - Flags for gimbal manager operation. Used for setting and reporting, unless specified otherwise. If a setting has been accepted by the gimbal manager is reported in the STORM32_GIMBAL_MANAGER_STATUS message. - - 0 = ignore. - - - Request to set RC input to active, or report RC input is active. Implies RC mixed. RC exclusive is achieved by setting all clients to inactive. - - - Request to set onboard/companion computer client to active, or report this client is active. - - - Request to set autopliot client to active, or report this client is active. - - - Request to set GCS client to active, or report this client is active. - - - Request to set camera client to active, or report this client is active. - - - Request to set GCS2 client to active, or report this client is active. - - - Request to set camera2 client to active, or report this client is active. - - - Request to set custom client to active, or report this client is active. - - - Request to set custom2 client to active, or report this client is active. - - - Request supervision. This flag is only for setting, it is not reported. - - - Release supervision. This flag is only for setting, it is not reported. - - - - - Gimbal manager client ID. In a prioritizing profile, the priorities are determined by the implementation; they could e.g. be custom1 > onboard > GCS > autopilot/camera > GCS2 > custom2. - - For convenience. - - - This is the onboard/companion computer client. - - - This is the autopilot client. - - - This is the GCS client. - - - This is the camera client. - - - This is the GCS2 client. - - - This is the camera2 client. - - - This is the custom client. - - - This is the custom2 client. - - - - - Gimbal manager profiles. Only standard profiles are defined. Any implementation can define its own profile(s) in addition, and should use enum values > 16. - - Default profile. Implementation specific. - - - Not supported/deprecated. - - - Profile with cooperative behavior. - - - Profile with exclusive behavior. - - - Profile with priority and cooperative behavior for equal priority. - - - Profile with priority and exclusive behavior for equal priority. - - - - - - Enumeration of possible shot modes. - - Undefined shot mode. Can be used to determine if qshots should be used or not. - - - Start normal gimbal operation. Is usually used to return back from a shot. - - - Load and keep safe gimbal position and stop stabilization. - - - Load neutral gimbal position and keep it while stabilizing. - - - Start mission with gimbal control. - - - Start RC gimbal control. - - - Start gimbal tracking the point specified by Lat, Lon, Alt. - - - Start gimbal tracking the system with specified system ID. - - - Start 2-point cable cam quick shot. - - - Start gimbal tracking the home location. - - - - - - - - Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. A gimbal device is never to react to this command. - Pitch/tilt angle (positive: tilt up). NaN to be ignored. - Yaw/pan angle (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - Pitch/tilt rate (positive: tilt up). NaN to be ignored. - Yaw/pan rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - Gimbal device flags to be applied. - Gimbal manager flags to be applied. - Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. The client is copied into bits 8-15. - - - - - Command to configure a gimbal manager. A gimbal device is never to react to this command. The selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message. - Gimbal manager profile (0 = default). - Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. - - - - - Command to set the shot manager mode. - Set shot mode. - Set shot state or command. The allowed values are specific to the selected shot mode. - - - - - - - - - - Information about a gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE. It mirrors some fields of the GIMBAL_DEVICE_INFORMATION message, but not all. If the additional information is desired, also GIMBAL_DEVICE_INFORMATION should be requested. - Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). - Gimbal manager capability flags. - Hardware minimum roll angle (positive: roll to the right). NaN if unknown. - Hardware maximum roll angle (positive: roll to the right). NaN if unknown. - Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. - Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. - Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - - - - Message reporting the current status of a gimbal manager. This message should be broadcast at a low regular rate (e.g. 1 Hz, may be increase momentarily to e.g. 5 Hz for a period of 1 sec after a change). - Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - Client who is currently supervisor (0 = none). - Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. - Gimbal manager flags currently applied. - Profile currently applied (0 = default). - - - - Message to a gimbal manager to control the gimbal attitude. Angles and rates can be set to NaN according to use case. A gimbal device is never to react to this message. - System ID - Component ID - Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. - Client which is contacting the gimbal manager (must be set). - Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - Gimbal manager flags to be applied (0 to be ignored). - Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - X component of angular velocity (positive: roll to the right). NaN to be ignored. - Y component of angular velocity (positive: tilt up). NaN to be ignored. - Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - - - - Message to a gimbal manager to control the gimbal tilt and pan angles. Angles and rates can be set to NaN according to use case. A gimbal device is never to react to this message. - System ID - Component ID - Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. - Client which is contacting the gimbal manager (must be set). - Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - Gimbal manager flags to be applied (0 to be ignored). - Pitch/tilt angle (positive: tilt up). NaN to be ignored. - Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. - Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - - - - Message to a gimbal manager to correct the gimbal roll angle. This message is typically used to manually correct for a tilted horizon in operation. A gimbal device is never to react to this message. - System ID - Component ID - Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. - Client which is contacting the gimbal manager (must be set). - Roll angle (positive to roll to the right). - - - - - - Information about the shot operation. - Current shot mode. - Current state in the shot. States are specific to the selected shot mode. - - - - - Frsky SPort passthrough multi packet container. - Timestamp (time since system boot). - Number of passthrough packets in this message. - Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - - - - Parameter multi param value container. - Total number of onboard parameters. - Index of the first onboard parameter in this array. - Number of onboard parameters in this array. - Flags. - Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - - - - diff --git a/message_definitions/test.xml b/message_definitions/test.xml deleted file mode 100644 index c68020746..000000000 --- a/message_definitions/test.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 3 - - - Test all field types - char - string - uint8_t - uint16_t - uint32_t - uint64_t - int8_t - int16_t - int32_t - int64_t - float - double - uint8_t_array - uint16_t_array - uint32_t_array - uint64_t_array - int8_t_array - int16_t_array - int32_t_array - int64_t_array - float_array - double_array - - - diff --git a/message_definitions/uAvionix.xml b/message_definitions/uAvionix.xml deleted file mode 100644 index f5c089e2a..000000000 --- a/message_definitions/uAvionix.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - common.xml - - - State flags for ADS-B transponder dynamic report - - - - - - - - Transceiver RF control flags for ADS-B transponder dynamic reports - - - - - - Status for ADS-B transponder dynamic input - - - - - - - - - Status flags for ADS-B transponder dynamic output - - - - - - - Definitions for aircraft size - - - - - - - - - - - - - - - - - - - GPS lataral offset encoding - - - - - - - - - - - GPS longitudinal offset encoding - - - - - Emergency status encoding - - - - - - - - - - - - - Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter) - Vehicle address (24 bit) - Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, " " only) - Transmitting vehicle type. See ADSB_EMITTER_TYPE enum - Aircraft length and width encoding (table 2-35 of DO-282B) - GPS antenna lateral offset (table 2-36 of DO-282B) - GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B) - Aircraft stall speed in cm/s - ADS-B transponder receiver and transmit enable flags - - - Dynamic data used to generate ADS-B out transponder data (send at 5Hz) - UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX - Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX - Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX - Altitude (WGS84). UP +ve. If unknown set to INT32_MAX - 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK - Number of satellites visible. If unknown set to UINT8_MAX - Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX - Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX - Vertical accuracy in cm. If unknown set to UINT16_MAX - Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX - GPS vertical speed in cm/s. If unknown set to INT16_MAX - North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX - East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX - Emergency status - ADS-B transponder dynamic input state flags - Mode A code (typically 1200 [0x04B0] for VFR) - - - Transceiver heartbeat with health report (updated every 10s) - ADS-B transponder messages - - - diff --git a/message_definitions/ualberta.xml b/message_definitions/ualberta.xml deleted file mode 100644 index 5c674c545..000000000 --- a/message_definitions/ualberta.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - common.xml - - - Available autopilot modes for ualberta uav - - Raw input pulse widts sent to output - - - Inputs are normalized using calibration, the converted back to raw pulse widths for output - - - - - - - Navigation filter mode - - - AHRS mode - - - INS/GPS initialization mode - - - INS/GPS mode - - - - Mode currently commanded by pilot - - - - Rotomotion mode - - - - - - Accelerometer and Gyro biases from the navigation filter - Timestamp (microseconds) - b_f[0] - b_f[1] - b_f[2] - b_f[0] - b_f[1] - b_f[2] - - - Complete set of calibration parameters for the radio - Aileron setpoints: left, center, right - Elevator setpoints: nose down, center, nose up - Rudder setpoints: nose left, center, nose right - Tail gyro mode/gain setpoints: heading hold, rate mode - Pitch curve setpoints (every 25%) - Throttle curve setpoints (every 25%) - - - System status specific to ualberta uav - System mode, see UALBERTA_AUTOPILOT_MODE ENUM - Navigation mode, see UALBERTA_NAV_MODE ENUM - Pilot mode, see UALBERTA_PILOT_MODE - - - diff --git a/minimal/mavlink.h b/minimal/mavlink.h index c799b85d5..d744db2e0 100644 --- a/minimal/mavlink.h +++ b/minimal/mavlink.h @@ -6,7 +6,7 @@ #ifndef MAVLINK_H #define MAVLINK_H -#define MAVLINK_PRIMARY_XML_HASH 908331018148430261 +#define MAVLINK_PRIMARY_XML_HASH -2232578626599874104 #ifndef MAVLINK_STX #define MAVLINK_STX 253 diff --git a/minimal/mavlink_msg_protocol_version.h b/minimal/mavlink_msg_protocol_version.h deleted file mode 100644 index 367d8225f..000000000 --- a/minimal/mavlink_msg_protocol_version.h +++ /dev/null @@ -1,363 +0,0 @@ -#pragma once -// MESSAGE PROTOCOL_VERSION PACKING - -#define MAVLINK_MSG_ID_PROTOCOL_VERSION 300 - - -typedef struct __mavlink_protocol_version_t { - uint16_t version; /*< Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc.*/ - uint16_t min_version; /*< Minimum MAVLink version supported*/ - uint16_t max_version; /*< Maximum MAVLink version supported (set to the same value as version by default)*/ - uint8_t spec_version_hash[8]; /*< The first 8 bytes (not characters printed in hex!) of the git hash.*/ - uint8_t library_version_hash[8]; /*< The first 8 bytes (not characters printed in hex!) of the git hash.*/ -} mavlink_protocol_version_t; - -#define MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN 22 -#define MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN 22 -#define MAVLINK_MSG_ID_300_LEN 22 -#define MAVLINK_MSG_ID_300_MIN_LEN 22 - -#define MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC 217 -#define MAVLINK_MSG_ID_300_CRC 217 - -#define MAVLINK_MSG_PROTOCOL_VERSION_FIELD_SPEC_VERSION_HASH_LEN 8 -#define MAVLINK_MSG_PROTOCOL_VERSION_FIELD_LIBRARY_VERSION_HASH_LEN 8 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION { \ - 300, \ - "PROTOCOL_VERSION", \ - 5, \ - { { "version", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_protocol_version_t, version) }, \ - { "min_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_protocol_version_t, min_version) }, \ - { "max_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_protocol_version_t, max_version) }, \ - { "spec_version_hash", NULL, MAVLINK_TYPE_UINT8_T, 8, 6, offsetof(mavlink_protocol_version_t, spec_version_hash) }, \ - { "library_version_hash", NULL, MAVLINK_TYPE_UINT8_T, 8, 14, offsetof(mavlink_protocol_version_t, library_version_hash) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION { \ - "PROTOCOL_VERSION", \ - 5, \ - { { "version", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_protocol_version_t, version) }, \ - { "min_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_protocol_version_t, min_version) }, \ - { "max_version", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_protocol_version_t, max_version) }, \ - { "spec_version_hash", NULL, MAVLINK_TYPE_UINT8_T, 8, 6, offsetof(mavlink_protocol_version_t, spec_version_hash) }, \ - { "library_version_hash", NULL, MAVLINK_TYPE_UINT8_T, 8, 14, offsetof(mavlink_protocol_version_t, library_version_hash) }, \ - } \ -} -#endif - -/** - * @brief Pack a protocol_version message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param version Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - * @param min_version Minimum MAVLink version supported - * @param max_version Maximum MAVLink version supported (set to the same value as version by default) - * @param spec_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @param library_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_protocol_version_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t version, uint16_t min_version, uint16_t max_version, const uint8_t *spec_version_hash, const uint8_t *library_version_hash) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN]; - _mav_put_uint16_t(buf, 0, version); - _mav_put_uint16_t(buf, 2, min_version); - _mav_put_uint16_t(buf, 4, max_version); - _mav_put_uint8_t_array(buf, 6, spec_version_hash, 8); - _mav_put_uint8_t_array(buf, 14, library_version_hash, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#else - mavlink_protocol_version_t packet; - packet.version = version; - packet.min_version = min_version; - packet.max_version = max_version; - mav_array_memcpy(packet.spec_version_hash, spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet.library_version_hash, library_version_hash, sizeof(uint8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -} - -/** - * @brief Pack a protocol_version message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param version Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - * @param min_version Minimum MAVLink version supported - * @param max_version Maximum MAVLink version supported (set to the same value as version by default) - * @param spec_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @param library_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_protocol_version_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t version, uint16_t min_version, uint16_t max_version, const uint8_t *spec_version_hash, const uint8_t *library_version_hash) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN]; - _mav_put_uint16_t(buf, 0, version); - _mav_put_uint16_t(buf, 2, min_version); - _mav_put_uint16_t(buf, 4, max_version); - _mav_put_uint8_t_array(buf, 6, spec_version_hash, 8); - _mav_put_uint8_t_array(buf, 14, library_version_hash, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#else - mavlink_protocol_version_t packet; - packet.version = version; - packet.min_version = min_version; - packet.max_version = max_version; - mav_array_memcpy(packet.spec_version_hash, spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet.library_version_hash, library_version_hash, sizeof(uint8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#endif -} - -/** - * @brief Pack a protocol_version message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param version Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - * @param min_version Minimum MAVLink version supported - * @param max_version Maximum MAVLink version supported (set to the same value as version by default) - * @param spec_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @param library_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_protocol_version_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint16_t version,uint16_t min_version,uint16_t max_version,const uint8_t *spec_version_hash,const uint8_t *library_version_hash) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN]; - _mav_put_uint16_t(buf, 0, version); - _mav_put_uint16_t(buf, 2, min_version); - _mav_put_uint16_t(buf, 4, max_version); - _mav_put_uint8_t_array(buf, 6, spec_version_hash, 8); - _mav_put_uint8_t_array(buf, 14, library_version_hash, 8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#else - mavlink_protocol_version_t packet; - packet.version = version; - packet.min_version = min_version; - packet.max_version = max_version; - mav_array_memcpy(packet.spec_version_hash, spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet.library_version_hash, library_version_hash, sizeof(uint8_t)*8); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -} - -/** - * @brief Encode a protocol_version struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param protocol_version C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_protocol_version_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_protocol_version_t* protocol_version) -{ - return mavlink_msg_protocol_version_pack(system_id, component_id, msg, protocol_version->version, protocol_version->min_version, protocol_version->max_version, protocol_version->spec_version_hash, protocol_version->library_version_hash); -} - -/** - * @brief Encode a protocol_version struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param protocol_version C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_protocol_version_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_protocol_version_t* protocol_version) -{ - return mavlink_msg_protocol_version_pack_chan(system_id, component_id, chan, msg, protocol_version->version, protocol_version->min_version, protocol_version->max_version, protocol_version->spec_version_hash, protocol_version->library_version_hash); -} - -/** - * @brief Encode a protocol_version struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param protocol_version C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_protocol_version_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_protocol_version_t* protocol_version) -{ - return mavlink_msg_protocol_version_pack_status(system_id, component_id, _status, msg, protocol_version->version, protocol_version->min_version, protocol_version->max_version, protocol_version->spec_version_hash, protocol_version->library_version_hash); -} - -/** - * @brief Send a protocol_version message - * @param chan MAVLink channel to send the message - * - * @param version Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - * @param min_version Minimum MAVLink version supported - * @param max_version Maximum MAVLink version supported (set to the same value as version by default) - * @param spec_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - * @param library_version_hash The first 8 bytes (not characters printed in hex!) of the git hash. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_protocol_version_send(mavlink_channel_t chan, uint16_t version, uint16_t min_version, uint16_t max_version, const uint8_t *spec_version_hash, const uint8_t *library_version_hash) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN]; - _mav_put_uint16_t(buf, 0, version); - _mav_put_uint16_t(buf, 2, min_version); - _mav_put_uint16_t(buf, 4, max_version); - _mav_put_uint8_t_array(buf, 6, spec_version_hash, 8); - _mav_put_uint8_t_array(buf, 14, library_version_hash, 8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PROTOCOL_VERSION, buf, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#else - mavlink_protocol_version_t packet; - packet.version = version; - packet.min_version = min_version; - packet.max_version = max_version; - mav_array_memcpy(packet.spec_version_hash, spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet.library_version_hash, library_version_hash, sizeof(uint8_t)*8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PROTOCOL_VERSION, (const char *)&packet, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#endif -} - -/** - * @brief Send a protocol_version message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_protocol_version_send_struct(mavlink_channel_t chan, const mavlink_protocol_version_t* protocol_version) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_protocol_version_send(chan, protocol_version->version, protocol_version->min_version, protocol_version->max_version, protocol_version->spec_version_hash, protocol_version->library_version_hash); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PROTOCOL_VERSION, (const char *)protocol_version, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#endif -} - -#if MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_protocol_version_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t version, uint16_t min_version, uint16_t max_version, const uint8_t *spec_version_hash, const uint8_t *library_version_hash) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, version); - _mav_put_uint16_t(buf, 2, min_version); - _mav_put_uint16_t(buf, 4, max_version); - _mav_put_uint8_t_array(buf, 6, spec_version_hash, 8); - _mav_put_uint8_t_array(buf, 14, library_version_hash, 8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PROTOCOL_VERSION, buf, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#else - mavlink_protocol_version_t *packet = (mavlink_protocol_version_t *)msgbuf; - packet->version = version; - packet->min_version = min_version; - packet->max_version = max_version; - mav_array_memcpy(packet->spec_version_hash, spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet->library_version_hash, library_version_hash, sizeof(uint8_t)*8); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PROTOCOL_VERSION, (const char *)packet, MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN, MAVLINK_MSG_ID_PROTOCOL_VERSION_CRC); -#endif -} -#endif - -#endif - -// MESSAGE PROTOCOL_VERSION UNPACKING - - -/** - * @brief Get field version from protocol_version message - * - * @return Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc. - */ -static inline uint16_t mavlink_msg_protocol_version_get_version(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field min_version from protocol_version message - * - * @return Minimum MAVLink version supported - */ -static inline uint16_t mavlink_msg_protocol_version_get_min_version(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Get field max_version from protocol_version message - * - * @return Maximum MAVLink version supported (set to the same value as version by default) - */ -static inline uint16_t mavlink_msg_protocol_version_get_max_version(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 4); -} - -/** - * @brief Get field spec_version_hash from protocol_version message - * - * @return The first 8 bytes (not characters printed in hex!) of the git hash. - */ -static inline uint16_t mavlink_msg_protocol_version_get_spec_version_hash(const mavlink_message_t* msg, uint8_t *spec_version_hash) -{ - return _MAV_RETURN_uint8_t_array(msg, spec_version_hash, 8, 6); -} - -/** - * @brief Get field library_version_hash from protocol_version message - * - * @return The first 8 bytes (not characters printed in hex!) of the git hash. - */ -static inline uint16_t mavlink_msg_protocol_version_get_library_version_hash(const mavlink_message_t* msg, uint8_t *library_version_hash) -{ - return _MAV_RETURN_uint8_t_array(msg, library_version_hash, 8, 14); -} - -/** - * @brief Decode a protocol_version message into a struct - * - * @param msg The message to decode - * @param protocol_version C-struct to decode the message contents into - */ -static inline void mavlink_msg_protocol_version_decode(const mavlink_message_t* msg, mavlink_protocol_version_t* protocol_version) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - protocol_version->version = mavlink_msg_protocol_version_get_version(msg); - protocol_version->min_version = mavlink_msg_protocol_version_get_min_version(msg); - protocol_version->max_version = mavlink_msg_protocol_version_get_max_version(msg); - mavlink_msg_protocol_version_get_spec_version_hash(msg, protocol_version->spec_version_hash); - mavlink_msg_protocol_version_get_library_version_hash(msg, protocol_version->library_version_hash); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN? msg->len : MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN; - memset(protocol_version, 0, MAVLINK_MSG_ID_PROTOCOL_VERSION_LEN); - memcpy(protocol_version, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/minimal/minimal.h b/minimal/minimal.h index 4adc6a3e9..95884aabe 100644 --- a/minimal/minimal.h +++ b/minimal/minimal.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_MINIMAL_XML_HASH 908331018148430261 +#define MAVLINK_MINIMAL_XML_HASH -2232578626599874104 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}} #endif #include "../protocol.h" @@ -87,12 +87,12 @@ typedef enum MAV_TYPE MAV_TYPE_FLAPPING_WING=16, /* Flapping wing | */ MAV_TYPE_KITE=17, /* Kite | */ MAV_TYPE_ONBOARD_CONTROLLER=18, /* Onboard companion controller | */ - MAV_TYPE_VTOL_TAILSITTER_DUOROTOR=19, /* Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR. | */ - MAV_TYPE_VTOL_TAILSITTER_QUADROTOR=20, /* Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR. | */ - MAV_TYPE_VTOL_TILTROTOR=21, /* Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight. | */ - MAV_TYPE_VTOL_FIXEDROTOR=22, /* VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases. | */ - MAV_TYPE_VTOL_TAILSITTER=23, /* Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate. | */ - MAV_TYPE_VTOL_TILTWING=24, /* Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode. | */ + MAV_TYPE_VTOL_DUOROTOR=19, /* Two-rotor VTOL using control surfaces in vertical operation in addition. Tailsitter. | */ + MAV_TYPE_VTOL_QUADROTOR=20, /* Quad-rotor VTOL using a V-shaped quad config in vertical operation. Tailsitter. | */ + MAV_TYPE_VTOL_TILTROTOR=21, /* Tiltrotor VTOL | */ + MAV_TYPE_VTOL_RESERVED2=22, /* VTOL reserved 2 | */ + MAV_TYPE_VTOL_RESERVED3=23, /* VTOL reserved 3 | */ + MAV_TYPE_VTOL_RESERVED4=24, /* VTOL reserved 4 | */ MAV_TYPE_VTOL_RESERVED5=25, /* VTOL reserved 5 | */ MAV_TYPE_GIMBAL=26, /* Gimbal | */ MAV_TYPE_ADSB=27, /* ADSB system | */ @@ -111,9 +111,7 @@ typedef enum MAV_TYPE MAV_TYPE_IMU=40, /* IMU | */ MAV_TYPE_GPS=41, /* GPS | */ MAV_TYPE_WINCH=42, /* Winch | */ - MAV_TYPE_GENERIC_MULTIROTOR=43, /* Generic multirotor that does not fit into a specific type or whose type is unknown | */ - MAV_TYPE_ILLUMINATOR=44, /* Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). | */ - MAV_TYPE_ENUM_END=45, /* | */ + MAV_TYPE_ENUM_END=43, /* | */ } MAV_TYPE; #endif @@ -161,10 +159,10 @@ typedef enum MAV_STATE MAV_STATE_CALIBRATING=2, /* System is calibrating and not flight-ready. | */ MAV_STATE_STANDBY=3, /* System is grounded and on standby. It can be launched any time. | */ MAV_STATE_ACTIVE=4, /* System is active and might be already airborne. Motors are engaged. | */ - MAV_STATE_CRITICAL=5, /* System is in a non-normal flight mode (failsafe). It can however still navigate. | */ - MAV_STATE_EMERGENCY=6, /* System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down. | */ + MAV_STATE_CRITICAL=5, /* System is in a non-normal flight mode. It can however still navigate. | */ + MAV_STATE_EMERGENCY=6, /* System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down. | */ MAV_STATE_POWEROFF=7, /* System just initialized its power-down sequence, will shut down now. | */ - MAV_STATE_FLIGHT_TERMINATION=8, /* System is terminating itself (failsafe or commanded). | */ + MAV_STATE_FLIGHT_TERMINATION=8, /* System is terminating itself. | */ MAV_STATE_ENUM_END=9, /* | */ } MAV_STATE; #endif @@ -281,7 +279,6 @@ typedef enum MAV_COMPONENT MAV_COMP_ID_QX1_GIMBAL=159, /* Gimbal ID for QX1. | */ MAV_COMP_ID_FLARM=160, /* FLARM collision alert component. | */ MAV_COMP_ID_PARACHUTE=161, /* Parachute component. | */ - MAV_COMP_ID_WINCH=169, /* Winch component. | */ MAV_COMP_ID_GIMBAL2=171, /* Gimbal #2. | */ MAV_COMP_ID_GIMBAL3=172, /* Gimbal #3. | */ MAV_COMP_ID_GIMBAL4=173, /* Gimbal #4 | */ @@ -310,8 +307,7 @@ typedef enum MAV_COMPONENT MAV_COMP_ID_UDP_BRIDGE=240, /* Component to bridge MAVLink to UDP (i.e. from a UART). | */ MAV_COMP_ID_UART_BRIDGE=241, /* Component to bridge to UART (i.e. from UDP). | */ MAV_COMP_ID_TUNNEL_NODE=242, /* Component handling TUNNEL messages (e.g. vendor specific GUI of a component). | */ - MAV_COMP_ID_ILLUMINATOR=243, /* Illuminator | */ - MAV_COMP_ID_SYSTEM_CONTROL=250, /* Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). | */ + MAV_COMP_ID_SYSTEM_CONTROL=250, /* Component for handling system messages (e.g. to ARM, takeoff, etc.). | */ MAV_COMPONENT_ENUM_END=251, /* | */ } MAV_COMPONENT; #endif @@ -329,15 +325,14 @@ typedef enum MAV_COMPONENT // MESSAGE DEFINITIONS #include "./mavlink_msg_heartbeat.h" -#include "./mavlink_msg_protocol_version.h" // base include #if MAVLINK_MINIMAL_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION} -# define MAVLINK_MESSAGE_NAMES {{ "HEARTBEAT", 0 }, { "PROTOCOL_VERSION", 300 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT} +# define MAVLINK_MESSAGE_NAMES {{ "HEARTBEAT", 0 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/minimal/testsuite.h b/minimal/testsuite.h index ad2471cd3..8e5824f25 100644 --- a/minimal/testsuite.h +++ b/minimal/testsuite.h @@ -89,73 +89,9 @@ static void mavlink_test_heartbeat(uint8_t system_id, uint8_t component_id, mavl #endif } -static void mavlink_test_protocol_version(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PROTOCOL_VERSION >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_protocol_version_t packet_in = { - 17235,17339,17443,{ 151, 152, 153, 154, 155, 156, 157, 158 },{ 175, 176, 177, 178, 179, 180, 181, 182 } - }; - mavlink_protocol_version_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.version = packet_in.version; - packet1.min_version = packet_in.min_version; - packet1.max_version = packet_in.max_version; - - mav_array_memcpy(packet1.spec_version_hash, packet_in.spec_version_hash, sizeof(uint8_t)*8); - mav_array_memcpy(packet1.library_version_hash, packet_in.library_version_hash, sizeof(uint8_t)*8); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PROTOCOL_VERSION_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_protocol_version_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_protocol_version_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_protocol_version_pack(system_id, component_id, &msg , packet1.version , packet1.min_version , packet1.max_version , packet1.spec_version_hash , packet1.library_version_hash ); - mavlink_msg_protocol_version_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_protocol_version_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.version , packet1.min_version , packet1.max_version , packet1.spec_version_hash , packet1.library_version_hash ); - mavlink_msg_protocol_version_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; imsgid = MAVLINK_MSG_ID_SCRIPT_COUNT; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -} - -/** - * @brief Pack a script_count message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param count Number of script items in the sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_count_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_COUNT_LEN]; - _mav_put_uint16_t(buf, 0, count); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); -#else - mavlink_script_count_t packet; - packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_COUNT; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); -#endif -} - -/** - * @brief Pack a script_count message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param count Number of script items in the sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_count_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_COUNT_LEN]; - _mav_put_uint16_t(buf, 0, count); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); -#else - mavlink_script_count_t packet; - packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_COUNT; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -} - -/** - * @brief Encode a script_count struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param script_count C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_count_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_script_count_t* script_count) -{ - return mavlink_msg_script_count_pack(system_id, component_id, msg, script_count->target_system, script_count->target_component, script_count->count); -} - -/** - * @brief Encode a script_count struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param script_count C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_count_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_script_count_t* script_count) -{ - return mavlink_msg_script_count_pack_chan(system_id, component_id, chan, msg, script_count->target_system, script_count->target_component, script_count->count); -} - -/** - * @brief Encode a script_count struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param script_count C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_count_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_script_count_t* script_count) -{ - return mavlink_msg_script_count_pack_status(system_id, component_id, _status, msg, script_count->target_system, script_count->target_component, script_count->count); -} - -/** - * @brief Send a script_count message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param count Number of script items in the sequence - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_script_count_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_COUNT_LEN]; - _mav_put_uint16_t(buf, 0, count); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_COUNT, buf, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#else - mavlink_script_count_t packet; - packet.count = count; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_COUNT, (const char *)&packet, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#endif -} - -/** - * @brief Send a script_count message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_script_count_send_struct(mavlink_channel_t chan, const mavlink_script_count_t* script_count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_script_count_send(chan, script_count->target_system, script_count->target_component, script_count->count); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_COUNT, (const char *)script_count, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SCRIPT_COUNT_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_script_count_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, count); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_COUNT, buf, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#else - mavlink_script_count_t *packet = (mavlink_script_count_t *)msgbuf; - packet->count = count; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_COUNT, (const char *)packet, MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN, MAVLINK_MSG_ID_SCRIPT_COUNT_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SCRIPT_COUNT UNPACKING - - -/** - * @brief Get field target_system from script_count message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_script_count_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field target_component from script_count message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_script_count_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field count from script_count message - * - * @return Number of script items in the sequence - */ -static inline uint16_t mavlink_msg_script_count_get_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Decode a script_count message into a struct - * - * @param msg The message to decode - * @param script_count C-struct to decode the message contents into - */ -static inline void mavlink_msg_script_count_decode(const mavlink_message_t* msg, mavlink_script_count_t* script_count) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - script_count->count = mavlink_msg_script_count_get_count(msg); - script_count->target_system = mavlink_msg_script_count_get_target_system(msg); - script_count->target_component = mavlink_msg_script_count_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SCRIPT_COUNT_LEN? msg->len : MAVLINK_MSG_ID_SCRIPT_COUNT_LEN; - memset(script_count, 0, MAVLINK_MSG_ID_SCRIPT_COUNT_LEN); - memcpy(script_count, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/paparazzi/mavlink_msg_script_current.h b/paparazzi/mavlink_msg_script_current.h deleted file mode 100644 index 5ff4817d9..000000000 --- a/paparazzi/mavlink_msg_script_current.h +++ /dev/null @@ -1,260 +0,0 @@ -#pragma once -// MESSAGE SCRIPT_CURRENT PACKING - -#define MAVLINK_MSG_ID_SCRIPT_CURRENT 184 - - -typedef struct __mavlink_script_current_t { - uint16_t seq; /*< Active Sequence*/ -} mavlink_script_current_t; - -#define MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN 2 -#define MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN 2 -#define MAVLINK_MSG_ID_184_LEN 2 -#define MAVLINK_MSG_ID_184_MIN_LEN 2 - -#define MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC 40 -#define MAVLINK_MSG_ID_184_CRC 40 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SCRIPT_CURRENT { \ - 184, \ - "SCRIPT_CURRENT", \ - 1, \ - { { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_current_t, seq) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SCRIPT_CURRENT { \ - "SCRIPT_CURRENT", \ - 1, \ - { { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_current_t, seq) }, \ - } \ -} -#endif - -/** - * @brief Pack a script_current message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param seq Active Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN]; - _mav_put_uint16_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#else - mavlink_script_current_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -} - -/** - * @brief Pack a script_current message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param seq Active Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_current_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN]; - _mav_put_uint16_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#else - mavlink_script_current_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#endif -} - -/** - * @brief Pack a script_current message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param seq Active Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN]; - _mav_put_uint16_t(buf, 0, seq); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#else - mavlink_script_current_t packet; - packet.seq = seq; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -} - -/** - * @brief Encode a script_current struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param script_current C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_script_current_t* script_current) -{ - return mavlink_msg_script_current_pack(system_id, component_id, msg, script_current->seq); -} - -/** - * @brief Encode a script_current struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param script_current C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_script_current_t* script_current) -{ - return mavlink_msg_script_current_pack_chan(system_id, component_id, chan, msg, script_current->seq); -} - -/** - * @brief Encode a script_current struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param script_current C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_current_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_script_current_t* script_current) -{ - return mavlink_msg_script_current_pack_status(system_id, component_id, _status, msg, script_current->seq); -} - -/** - * @brief Send a script_current message - * @param chan MAVLink channel to send the message - * - * @param seq Active Sequence - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_script_current_send(mavlink_channel_t chan, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN]; - _mav_put_uint16_t(buf, 0, seq); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_CURRENT, buf, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#else - mavlink_script_current_t packet; - packet.seq = seq; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#endif -} - -/** - * @brief Send a script_current message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_script_current_send_struct(mavlink_channel_t chan, const mavlink_script_current_t* script_current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_script_current_send(chan, script_current->seq); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_CURRENT, (const char *)script_current, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_script_current_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, seq); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_CURRENT, buf, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#else - mavlink_script_current_t *packet = (mavlink_script_current_t *)msgbuf; - packet->seq = seq; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_CURRENT, (const char *)packet, MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN, MAVLINK_MSG_ID_SCRIPT_CURRENT_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SCRIPT_CURRENT UNPACKING - - -/** - * @brief Get field seq from script_current message - * - * @return Active Sequence - */ -static inline uint16_t mavlink_msg_script_current_get_seq(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Decode a script_current message into a struct - * - * @param msg The message to decode - * @param script_current C-struct to decode the message contents into - */ -static inline void mavlink_msg_script_current_decode(const mavlink_message_t* msg, mavlink_script_current_t* script_current) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - script_current->seq = mavlink_msg_script_current_get_seq(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN? msg->len : MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN; - memset(script_current, 0, MAVLINK_MSG_ID_SCRIPT_CURRENT_LEN); - memcpy(script_current, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/paparazzi/mavlink_msg_script_item.h b/paparazzi/mavlink_msg_script_item.h deleted file mode 100644 index 17077e488..000000000 --- a/paparazzi/mavlink_msg_script_item.h +++ /dev/null @@ -1,334 +0,0 @@ -#pragma once -// MESSAGE SCRIPT_ITEM PACKING - -#define MAVLINK_MSG_ID_SCRIPT_ITEM 180 - - -typedef struct __mavlink_script_item_t { - uint16_t seq; /*< Sequence*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ - char name[50]; /*< The name of the mission script, NULL terminated.*/ -} mavlink_script_item_t; - -#define MAVLINK_MSG_ID_SCRIPT_ITEM_LEN 54 -#define MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN 54 -#define MAVLINK_MSG_ID_180_LEN 54 -#define MAVLINK_MSG_ID_180_MIN_LEN 54 - -#define MAVLINK_MSG_ID_SCRIPT_ITEM_CRC 231 -#define MAVLINK_MSG_ID_180_CRC 231 - -#define MAVLINK_MSG_SCRIPT_ITEM_FIELD_NAME_LEN 50 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SCRIPT_ITEM { \ - 180, \ - "SCRIPT_ITEM", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_script_item_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_script_item_t, target_component) }, \ - { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_item_t, seq) }, \ - { "name", NULL, MAVLINK_TYPE_CHAR, 50, 4, offsetof(mavlink_script_item_t, name) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SCRIPT_ITEM { \ - "SCRIPT_ITEM", \ - 4, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_script_item_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_script_item_t, target_component) }, \ - { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_item_t, seq) }, \ - { "name", NULL, MAVLINK_TYPE_CHAR, 50, 4, offsetof(mavlink_script_item_t, name) }, \ - } \ -} -#endif - -/** - * @brief Pack a script_item message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @param name The name of the mission script, NULL terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_item_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t seq, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_ITEM_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_char_array(buf, 4, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#else - mavlink_script_item_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_ITEM; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -} - -/** - * @brief Pack a script_item message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @param name The name of the mission script, NULL terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_item_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t seq, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_ITEM_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_char_array(buf, 4, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#else - mavlink_script_item_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_ITEM; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#endif -} - -/** - * @brief Pack a script_item message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @param name The name of the mission script, NULL terminated. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_item_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t seq,const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_ITEM_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_char_array(buf, 4, name, 50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#else - mavlink_script_item_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.name, name, sizeof(char)*50); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_ITEM; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -} - -/** - * @brief Encode a script_item struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param script_item C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_item_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_script_item_t* script_item) -{ - return mavlink_msg_script_item_pack(system_id, component_id, msg, script_item->target_system, script_item->target_component, script_item->seq, script_item->name); -} - -/** - * @brief Encode a script_item struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param script_item C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_item_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_script_item_t* script_item) -{ - return mavlink_msg_script_item_pack_chan(system_id, component_id, chan, msg, script_item->target_system, script_item->target_component, script_item->seq, script_item->name); -} - -/** - * @brief Encode a script_item struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param script_item C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_item_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_script_item_t* script_item) -{ - return mavlink_msg_script_item_pack_status(system_id, component_id, _status, msg, script_item->target_system, script_item->target_component, script_item->seq, script_item->name); -} - -/** - * @brief Send a script_item message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @param name The name of the mission script, NULL terminated. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_script_item_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_ITEM_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_char_array(buf, 4, name, 50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_ITEM, buf, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#else - mavlink_script_item_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - mav_array_memcpy(packet.name, name, sizeof(char)*50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_ITEM, (const char *)&packet, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#endif -} - -/** - * @brief Send a script_item message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_script_item_send_struct(mavlink_channel_t chan, const mavlink_script_item_t* script_item) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_script_item_send(chan, script_item->target_system, script_item->target_component, script_item->seq, script_item->name); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_ITEM, (const char *)script_item, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SCRIPT_ITEM_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_script_item_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq, const char *name) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - _mav_put_char_array(buf, 4, name, 50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_ITEM, buf, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#else - mavlink_script_item_t *packet = (mavlink_script_item_t *)msgbuf; - packet->seq = seq; - packet->target_system = target_system; - packet->target_component = target_component; - mav_array_memcpy(packet->name, name, sizeof(char)*50); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_ITEM, (const char *)packet, MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN, MAVLINK_MSG_ID_SCRIPT_ITEM_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SCRIPT_ITEM UNPACKING - - -/** - * @brief Get field target_system from script_item message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_script_item_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field target_component from script_item message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_script_item_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field seq from script_item message - * - * @return Sequence - */ -static inline uint16_t mavlink_msg_script_item_get_seq(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field name from script_item message - * - * @return The name of the mission script, NULL terminated. - */ -static inline uint16_t mavlink_msg_script_item_get_name(const mavlink_message_t* msg, char *name) -{ - return _MAV_RETURN_char_array(msg, name, 50, 4); -} - -/** - * @brief Decode a script_item message into a struct - * - * @param msg The message to decode - * @param script_item C-struct to decode the message contents into - */ -static inline void mavlink_msg_script_item_decode(const mavlink_message_t* msg, mavlink_script_item_t* script_item) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - script_item->seq = mavlink_msg_script_item_get_seq(msg); - script_item->target_system = mavlink_msg_script_item_get_target_system(msg); - script_item->target_component = mavlink_msg_script_item_get_target_component(msg); - mavlink_msg_script_item_get_name(msg, script_item->name); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SCRIPT_ITEM_LEN? msg->len : MAVLINK_MSG_ID_SCRIPT_ITEM_LEN; - memset(script_item, 0, MAVLINK_MSG_ID_SCRIPT_ITEM_LEN); - memcpy(script_item, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/paparazzi/mavlink_msg_script_request.h b/paparazzi/mavlink_msg_script_request.h deleted file mode 100644 index 824b3856d..000000000 --- a/paparazzi/mavlink_msg_script_request.h +++ /dev/null @@ -1,316 +0,0 @@ -#pragma once -// MESSAGE SCRIPT_REQUEST PACKING - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST 181 - - -typedef struct __mavlink_script_request_t { - uint16_t seq; /*< Sequence*/ - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_script_request_t; - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN 4 -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN 4 -#define MAVLINK_MSG_ID_181_LEN 4 -#define MAVLINK_MSG_ID_181_MIN_LEN 4 - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC 129 -#define MAVLINK_MSG_ID_181_CRC 129 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST { \ - 181, \ - "SCRIPT_REQUEST", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_script_request_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_script_request_t, target_component) }, \ - { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_request_t, seq) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST { \ - "SCRIPT_REQUEST", \ - 3, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_script_request_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_script_request_t, target_component) }, \ - { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_script_request_t, seq) }, \ - } \ -} -#endif - -/** - * @brief Pack a script_request message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#else - mavlink_script_request_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -} - -/** - * @brief Pack a script_request message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#else - mavlink_script_request_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#endif -} - -/** - * @brief Pack a script_request message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component,uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#else - mavlink_script_request_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -} - -/** - * @brief Encode a script_request struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param script_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_script_request_t* script_request) -{ - return mavlink_msg_script_request_pack(system_id, component_id, msg, script_request->target_system, script_request->target_component, script_request->seq); -} - -/** - * @brief Encode a script_request struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param script_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_script_request_t* script_request) -{ - return mavlink_msg_script_request_pack_chan(system_id, component_id, chan, msg, script_request->target_system, script_request->target_component, script_request->seq); -} - -/** - * @brief Encode a script_request struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param script_request C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_script_request_t* script_request) -{ - return mavlink_msg_script_request_pack_status(system_id, component_id, _status, msg, script_request->target_system, script_request->target_component, script_request->seq); -} - -/** - * @brief Send a script_request message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - * @param seq Sequence - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_script_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN]; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST, buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#else - mavlink_script_request_t packet; - packet.seq = seq; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#endif -} - -/** - * @brief Send a script_request message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_script_request_send_struct(mavlink_channel_t chan, const mavlink_script_request_t* script_request) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_script_request_send(chan, script_request->target_system, script_request->target_component, script_request->seq); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST, (const char *)script_request, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_script_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, seq); - _mav_put_uint8_t(buf, 2, target_system); - _mav_put_uint8_t(buf, 3, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST, buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#else - mavlink_script_request_t *packet = (mavlink_script_request_t *)msgbuf; - packet->seq = seq; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST, (const char *)packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SCRIPT_REQUEST UNPACKING - - -/** - * @brief Get field target_system from script_request message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_script_request_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 2); -} - -/** - * @brief Get field target_component from script_request message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_script_request_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 3); -} - -/** - * @brief Get field seq from script_request message - * - * @return Sequence - */ -static inline uint16_t mavlink_msg_script_request_get_seq(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Decode a script_request message into a struct - * - * @param msg The message to decode - * @param script_request C-struct to decode the message contents into - */ -static inline void mavlink_msg_script_request_decode(const mavlink_message_t* msg, mavlink_script_request_t* script_request) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - script_request->seq = mavlink_msg_script_request_get_seq(msg); - script_request->target_system = mavlink_msg_script_request_get_target_system(msg); - script_request->target_component = mavlink_msg_script_request_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN? msg->len : MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN; - memset(script_request, 0, MAVLINK_MSG_ID_SCRIPT_REQUEST_LEN); - memcpy(script_request, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/paparazzi/mavlink_msg_script_request_list.h b/paparazzi/mavlink_msg_script_request_list.h deleted file mode 100644 index 64c33cc12..000000000 --- a/paparazzi/mavlink_msg_script_request_list.h +++ /dev/null @@ -1,288 +0,0 @@ -#pragma once -// MESSAGE SCRIPT_REQUEST_LIST PACKING - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST 182 - - -typedef struct __mavlink_script_request_list_t { - uint8_t target_system; /*< System ID*/ - uint8_t target_component; /*< Component ID*/ -} mavlink_script_request_list_t; - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN 2 -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN 2 -#define MAVLINK_MSG_ID_182_LEN 2 -#define MAVLINK_MSG_ID_182_MIN_LEN 2 - -#define MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC 115 -#define MAVLINK_MSG_ID_182_CRC 115 - - - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST_LIST { \ - 182, \ - "SCRIPT_REQUEST_LIST", \ - 2, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_script_request_list_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_script_request_list_t, target_component) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST_LIST { \ - "SCRIPT_REQUEST_LIST", \ - 2, \ - { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_script_request_list_t, target_system) }, \ - { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_script_request_list_t, target_component) }, \ - } \ -} -#endif - -/** - * @brief Pack a script_request_list message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#else - mavlink_script_request_list_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -} - -/** - * @brief Pack a script_request_list message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_list_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#else - mavlink_script_request_list_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#endif -} - -/** - * @brief Pack a script_request_list message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param target_system System ID - * @param target_component Component ID - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_script_request_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint8_t target_system,uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#else - mavlink_script_request_list_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -} - -/** - * @brief Encode a script_request_list struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param script_request_list C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_script_request_list_t* script_request_list) -{ - return mavlink_msg_script_request_list_pack(system_id, component_id, msg, script_request_list->target_system, script_request_list->target_component); -} - -/** - * @brief Encode a script_request_list struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param script_request_list C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_script_request_list_t* script_request_list) -{ - return mavlink_msg_script_request_list_pack_chan(system_id, component_id, chan, msg, script_request_list->target_system, script_request_list->target_component); -} - -/** - * @brief Encode a script_request_list struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param script_request_list C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_script_request_list_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_script_request_list_t* script_request_list) -{ - return mavlink_msg_script_request_list_pack_status(system_id, component_id, _status, msg, script_request_list->target_system, script_request_list->target_component); -} - -/** - * @brief Send a script_request_list message - * @param chan MAVLink channel to send the message - * - * @param target_system System ID - * @param target_component Component ID - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_script_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN]; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST, buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#else - mavlink_script_request_list_t packet; - packet.target_system = target_system; - packet.target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#endif -} - -/** - * @brief Send a script_request_list message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_script_request_list_send_struct(mavlink_channel_t chan, const mavlink_script_request_list_t* script_request_list) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_script_request_list_send(chan, script_request_list->target_system, script_request_list->target_component); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST, (const char *)script_request_list, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#endif -} - -#if MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_script_request_list_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint8_t(buf, 0, target_system); - _mav_put_uint8_t(buf, 1, target_component); - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST, buf, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#else - mavlink_script_request_list_t *packet = (mavlink_script_request_list_t *)msgbuf; - packet->target_system = target_system; - packet->target_component = target_component; - - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST, (const char *)packet, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_CRC); -#endif -} -#endif - -#endif - -// MESSAGE SCRIPT_REQUEST_LIST UNPACKING - - -/** - * @brief Get field target_system from script_request_list message - * - * @return System ID - */ -static inline uint8_t mavlink_msg_script_request_list_get_target_system(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 0); -} - -/** - * @brief Get field target_component from script_request_list message - * - * @return Component ID - */ -static inline uint8_t mavlink_msg_script_request_list_get_target_component(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 1); -} - -/** - * @brief Decode a script_request_list message into a struct - * - * @param msg The message to decode - * @param script_request_list C-struct to decode the message contents into - */ -static inline void mavlink_msg_script_request_list_decode(const mavlink_message_t* msg, mavlink_script_request_list_t* script_request_list) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - script_request_list->target_system = mavlink_msg_script_request_list_get_target_system(msg); - script_request_list->target_component = mavlink_msg_script_request_list_get_target_component(msg); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN? msg->len : MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN; - memset(script_request_list, 0, MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_LEN); - memcpy(script_request_list, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/paparazzi/paparazzi.h b/paparazzi/paparazzi.h deleted file mode 100644 index 700e1b26b..000000000 --- a/paparazzi/paparazzi.h +++ /dev/null @@ -1,70 +0,0 @@ -/** @file - * @brief MAVLink comm protocol generated from paparazzi.xml - * @see http://mavlink.org - */ -#pragma once -#ifndef MAVLINK_PAPARAZZI_H -#define MAVLINK_PAPARAZZI_H - -#ifndef MAVLINK_H - #error Wrong include order: MAVLINK_PAPARAZZI.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. -#endif - -#define MAVLINK_PAPARAZZI_XML_HASH -3660478917487340693 - -#ifdef __cplusplus -extern "C" { -#endif - -// MESSAGE LENGTHS AND CRCS - -#ifndef MAVLINK_MESSAGE_LENGTHS -#define MAVLINK_MESSAGE_LENGTHS {} -#endif - -#ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {180, 231, 54, 54, 3, 2, 3}, {181, 129, 4, 4, 3, 2, 3}, {182, 115, 2, 2, 3, 0, 1}, {183, 186, 4, 4, 3, 2, 3}, {184, 40, 2, 2, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {440, 66, 35, 35, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}} -#endif - -#include "../protocol.h" - -#define MAVLINK_ENABLED_PAPARAZZI - -// ENUM DEFINITIONS - - - -// MAVLINK VERSION - -#ifndef MAVLINK_VERSION -#define MAVLINK_VERSION 3 -#endif - -#if (MAVLINK_VERSION == 0) -#undef MAVLINK_VERSION -#define MAVLINK_VERSION 3 -#endif - -// MESSAGE DEFINITIONS -#include "./mavlink_msg_script_item.h" -#include "./mavlink_msg_script_request.h" -#include "./mavlink_msg_script_request_list.h" -#include "./mavlink_msg_script_count.h" -#include "./mavlink_msg_script_current.h" - -// base include -#include "../common/common.h" - - -#if MAVLINK_PAPARAZZI_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_SCRIPT_ITEM, MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST, MAVLINK_MESSAGE_INFO_SCRIPT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_SCRIPT_COUNT, MAVLINK_MESSAGE_INFO_SCRIPT_CURRENT, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SCRIPT_COUNT", 183 }, { "SCRIPT_CURRENT", 184 }, { "SCRIPT_ITEM", 180 }, { "SCRIPT_REQUEST", 181 }, { "SCRIPT_REQUEST_LIST", 182 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} -# if MAVLINK_COMMAND_24BIT -# include "../mavlink_get_info.h" -# endif -#endif - -#ifdef __cplusplus -} -#endif // __cplusplus -#endif // MAVLINK_PAPARAZZI_H diff --git a/paparazzi/testsuite.h b/paparazzi/testsuite.h deleted file mode 100644 index 0890076fd..000000000 --- a/paparazzi/testsuite.h +++ /dev/null @@ -1,343 +0,0 @@ -/** @file - * @brief MAVLink comm protocol testsuite generated from paparazzi.xml - * @see https://mavlink.io/en/ - */ -#pragma once -#ifndef PAPARAZZI_TESTSUITE_H -#define PAPARAZZI_TESTSUITE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef MAVLINK_TEST_ALL -#define MAVLINK_TEST_ALL -static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); -static void mavlink_test_paparazzi(uint8_t, uint8_t, mavlink_message_t *last_msg); - -static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ - mavlink_test_common(system_id, component_id, last_msg); - mavlink_test_paparazzi(system_id, component_id, last_msg); -} -#endif - -#include "../common/testsuite.h" - - -static void mavlink_test_script_item(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) -{ -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); - if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SCRIPT_ITEM >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_script_item_t packet_in = { - 17235,139,206,"EFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZA" - }; - mavlink_script_item_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.seq = packet_in.seq; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - mav_array_memcpy(packet1.name, packet_in.name, sizeof(char)*50); - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SCRIPT_ITEM_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_item_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_script_item_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_item_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.name ); - mavlink_msg_script_item_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_item_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq , packet1.name ); - mavlink_msg_script_item_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SCRIPT_REQUEST >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_script_request_t packet_in = { - 17235,139,206 - }; - mavlink_script_request_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.seq = packet_in.seq; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SCRIPT_REQUEST_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_script_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.seq ); - mavlink_msg_script_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.seq ); - mavlink_msg_script_request_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_script_request_list_t packet_in = { - 5,72 - }; - mavlink_script_request_list_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_list_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_script_request_list_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_list_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component ); - mavlink_msg_script_request_list_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_request_list_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component ); - mavlink_msg_script_request_list_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SCRIPT_COUNT >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_script_count_t packet_in = { - 17235,139,206 - }; - mavlink_script_count_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.count = packet_in.count; - packet1.target_system = packet_in.target_system; - packet1.target_component = packet_in.target_component; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SCRIPT_COUNT_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_count_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_script_count_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_count_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.count ); - mavlink_msg_script_count_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_count_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.count ); - mavlink_msg_script_count_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SCRIPT_CURRENT >= 256) { - return; - } -#endif - mavlink_message_t msg; - uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; - uint16_t i; - mavlink_script_current_t packet_in = { - 17235 - }; - mavlink_script_current_t packet1, packet2; - memset(&packet1, 0, sizeof(packet1)); - packet1.seq = packet_in.seq; - - -#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 - if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { - // cope with extensions - memset(MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SCRIPT_CURRENT_MIN_LEN); - } -#endif - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_current_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_script_current_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_current_pack(system_id, component_id, &msg , packet1.seq ); - mavlink_msg_script_current_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_script_current_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.seq ); - mavlink_msg_script_current_decode(&msg, &packet2); - MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); - - memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_to_send_buffer(buffer, &msg); - for (i=0; imsgid = MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +} + +/** + * @brief Pack a component_prearm_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param enabled_flags Currently enabled prearm checks. 0 means no checks are being performed, UINT32_MAX means not known. + * @param fail_flags Currently not passed prearm checks. 0 means all checks have been passed. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_component_prearm_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t enabled_flags, uint32_t fail_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, enabled_flags); + _mav_put_uint32_t(buf, 4, fail_flags); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); +#else + mavlink_component_prearm_status_t packet; + packet.enabled_flags = enabled_flags; + packet.fail_flags = fail_flags; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); +#endif +} + +/** + * @brief Pack a component_prearm_status message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID + * @param target_component Component ID + * @param enabled_flags Currently enabled prearm checks. 0 means no checks are being performed, UINT32_MAX means not known. + * @param fail_flags Currently not passed prearm checks. 0 means all checks have been passed. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_component_prearm_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint32_t enabled_flags,uint32_t fail_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, enabled_flags); + _mav_put_uint32_t(buf, 4, fail_flags); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); +#else + mavlink_component_prearm_status_t packet; + packet.enabled_flags = enabled_flags; + packet.fail_flags = fail_flags; + packet.target_system = target_system; + packet.target_component = target_component; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +} + +/** + * @brief Encode a component_prearm_status struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param component_prearm_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_component_prearm_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_component_prearm_status_t* component_prearm_status) +{ + return mavlink_msg_component_prearm_status_pack(system_id, component_id, msg, component_prearm_status->target_system, component_prearm_status->target_component, component_prearm_status->enabled_flags, component_prearm_status->fail_flags); +} + +/** + * @brief Encode a component_prearm_status struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param component_prearm_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_component_prearm_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_component_prearm_status_t* component_prearm_status) +{ + return mavlink_msg_component_prearm_status_pack_chan(system_id, component_id, chan, msg, component_prearm_status->target_system, component_prearm_status->target_component, component_prearm_status->enabled_flags, component_prearm_status->fail_flags); +} + +/** + * @brief Encode a component_prearm_status struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param component_prearm_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_component_prearm_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_component_prearm_status_t* component_prearm_status) +{ + return mavlink_msg_component_prearm_status_pack_status(system_id, component_id, _status, msg, component_prearm_status->target_system, component_prearm_status->target_component, component_prearm_status->enabled_flags, component_prearm_status->fail_flags); +} + +/** + * @brief Send a component_prearm_status message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param enabled_flags Currently enabled prearm checks. 0 means no checks are being performed, UINT32_MAX means not known. + * @param fail_flags Currently not passed prearm checks. 0 means all checks have been passed. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_component_prearm_status_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t enabled_flags, uint32_t fail_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, enabled_flags); + _mav_put_uint32_t(buf, 4, fail_flags); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS, buf, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#else + mavlink_component_prearm_status_t packet; + packet.enabled_flags = enabled_flags; + packet.fail_flags = fail_flags; + packet.target_system = target_system; + packet.target_component = target_component; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS, (const char *)&packet, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#endif +} + +/** + * @brief Send a component_prearm_status message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_component_prearm_status_send_struct(mavlink_channel_t chan, const mavlink_component_prearm_status_t* component_prearm_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_component_prearm_status_send(chan, component_prearm_status->target_system, component_prearm_status->target_component, component_prearm_status->enabled_flags, component_prearm_status->fail_flags); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS, (const char *)component_prearm_status, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#endif +} + +#if MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_component_prearm_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t enabled_flags, uint32_t fail_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, enabled_flags); + _mav_put_uint32_t(buf, 4, fail_flags); + _mav_put_uint8_t(buf, 8, target_system); + _mav_put_uint8_t(buf, 9, target_component); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS, buf, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#else + mavlink_component_prearm_status_t *packet = (mavlink_component_prearm_status_t *)msgbuf; + packet->enabled_flags = enabled_flags; + packet->fail_flags = fail_flags; + packet->target_system = target_system; + packet->target_component = target_component; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS, (const char *)packet, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_CRC); +#endif +} +#endif + +#endif + +// MESSAGE COMPONENT_PREARM_STATUS UNPACKING + + +/** + * @brief Get field target_system from component_prearm_status message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_component_prearm_status_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 8); +} + +/** + * @brief Get field target_component from component_prearm_status message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_component_prearm_status_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 9); +} + +/** + * @brief Get field enabled_flags from component_prearm_status message + * + * @return Currently enabled prearm checks. 0 means no checks are being performed, UINT32_MAX means not known. + */ +static inline uint32_t mavlink_msg_component_prearm_status_get_enabled_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field fail_flags from component_prearm_status message + * + * @return Currently not passed prearm checks. 0 means all checks have been passed. + */ +static inline uint32_t mavlink_msg_component_prearm_status_get_fail_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 4); +} + +/** + * @brief Decode a component_prearm_status message into a struct + * + * @param msg The message to decode + * @param component_prearm_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_component_prearm_status_decode(const mavlink_message_t* msg, mavlink_component_prearm_status_t* component_prearm_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + component_prearm_status->enabled_flags = mavlink_msg_component_prearm_status_get_enabled_flags(msg); + component_prearm_status->fail_flags = mavlink_msg_component_prearm_status_get_fail_flags(msg); + component_prearm_status->target_system = mavlink_msg_component_prearm_status_get_target_system(msg); + component_prearm_status->target_component = mavlink_msg_component_prearm_status_get_target_component(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN; + memset(component_prearm_status, 0, MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_LEN); + memcpy(component_prearm_status, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/storm32/mavlink_msg_frsky_passthrough_array.h b/storm32/mavlink_msg_frsky_passthrough_array.h deleted file mode 100644 index 8a22be5e4..000000000 --- a/storm32/mavlink_msg_frsky_passthrough_array.h +++ /dev/null @@ -1,306 +0,0 @@ -#pragma once -// MESSAGE FRSKY_PASSTHROUGH_ARRAY PACKING - -#define MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY 60040 - - -typedef struct __mavlink_frsky_passthrough_array_t { - uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ - uint8_t count; /*< Number of passthrough packets in this message.*/ - uint8_t packet_buf[240]; /*< Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets.*/ -} mavlink_frsky_passthrough_array_t; - -#define MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN 245 -#define MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN 245 -#define MAVLINK_MSG_ID_60040_LEN 245 -#define MAVLINK_MSG_ID_60040_MIN_LEN 245 - -#define MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC 156 -#define MAVLINK_MSG_ID_60040_CRC 156 - -#define MAVLINK_MSG_FRSKY_PASSTHROUGH_ARRAY_FIELD_PACKET_BUF_LEN 240 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_FRSKY_PASSTHROUGH_ARRAY { \ - 60040, \ - "FRSKY_PASSTHROUGH_ARRAY", \ - 3, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_frsky_passthrough_array_t, time_boot_ms) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_frsky_passthrough_array_t, count) }, \ - { "packet_buf", NULL, MAVLINK_TYPE_UINT8_T, 240, 5, offsetof(mavlink_frsky_passthrough_array_t, packet_buf) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_FRSKY_PASSTHROUGH_ARRAY { \ - "FRSKY_PASSTHROUGH_ARRAY", \ - 3, \ - { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_frsky_passthrough_array_t, time_boot_ms) }, \ - { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_frsky_passthrough_array_t, count) }, \ - { "packet_buf", NULL, MAVLINK_TYPE_UINT8_T, 240, 5, offsetof(mavlink_frsky_passthrough_array_t, packet_buf) }, \ - } \ -} -#endif - -/** - * @brief Pack a frsky_passthrough_array message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param count Number of passthrough packets in this message. - * @param packet_buf Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t count, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint8_t(buf, 4, count); - _mav_put_uint8_t_array(buf, 5, packet_buf, 240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#else - mavlink_frsky_passthrough_array_t packet; - packet.time_boot_ms = time_boot_ms; - packet.count = count; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -} - -/** - * @brief Pack a frsky_passthrough_array message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param count Number of passthrough packets in this message. - * @param packet_buf Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint32_t time_boot_ms, uint8_t count, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint8_t(buf, 4, count); - _mav_put_uint8_t_array(buf, 5, packet_buf, 240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#else - mavlink_frsky_passthrough_array_t packet; - packet.time_boot_ms = time_boot_ms; - packet.count = count; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#endif -} - -/** - * @brief Pack a frsky_passthrough_array message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param count Number of passthrough packets in this message. - * @param packet_buf Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint32_t time_boot_ms,uint8_t count,const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint8_t(buf, 4, count); - _mav_put_uint8_t_array(buf, 5, packet_buf, 240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#else - mavlink_frsky_passthrough_array_t packet; - packet.time_boot_ms = time_boot_ms; - packet.count = count; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*240); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -} - -/** - * @brief Encode a frsky_passthrough_array struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param frsky_passthrough_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_frsky_passthrough_array_t* frsky_passthrough_array) -{ - return mavlink_msg_frsky_passthrough_array_pack(system_id, component_id, msg, frsky_passthrough_array->time_boot_ms, frsky_passthrough_array->count, frsky_passthrough_array->packet_buf); -} - -/** - * @brief Encode a frsky_passthrough_array struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param frsky_passthrough_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_frsky_passthrough_array_t* frsky_passthrough_array) -{ - return mavlink_msg_frsky_passthrough_array_pack_chan(system_id, component_id, chan, msg, frsky_passthrough_array->time_boot_ms, frsky_passthrough_array->count, frsky_passthrough_array->packet_buf); -} - -/** - * @brief Encode a frsky_passthrough_array struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param frsky_passthrough_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_frsky_passthrough_array_t* frsky_passthrough_array) -{ - return mavlink_msg_frsky_passthrough_array_pack_status(system_id, component_id, _status, msg, frsky_passthrough_array->time_boot_ms, frsky_passthrough_array->count, frsky_passthrough_array->packet_buf); -} - -/** - * @brief Send a frsky_passthrough_array message - * @param chan MAVLink channel to send the message - * - * @param time_boot_ms [ms] Timestamp (time since system boot). - * @param count Number of passthrough packets in this message. - * @param packet_buf Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_frsky_passthrough_array_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t count, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN]; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint8_t(buf, 4, count); - _mav_put_uint8_t_array(buf, 5, packet_buf, 240); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY, buf, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#else - mavlink_frsky_passthrough_array_t packet; - packet.time_boot_ms = time_boot_ms; - packet.count = count; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*240); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY, (const char *)&packet, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#endif -} - -/** - * @brief Send a frsky_passthrough_array message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_frsky_passthrough_array_send_struct(mavlink_channel_t chan, const mavlink_frsky_passthrough_array_t* frsky_passthrough_array) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_frsky_passthrough_array_send(chan, frsky_passthrough_array->time_boot_ms, frsky_passthrough_array->count, frsky_passthrough_array->packet_buf); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY, (const char *)frsky_passthrough_array, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#endif -} - -#if MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_frsky_passthrough_array_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t count, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint32_t(buf, 0, time_boot_ms); - _mav_put_uint8_t(buf, 4, count); - _mav_put_uint8_t_array(buf, 5, packet_buf, 240); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY, buf, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#else - mavlink_frsky_passthrough_array_t *packet = (mavlink_frsky_passthrough_array_t *)msgbuf; - packet->time_boot_ms = time_boot_ms; - packet->count = count; - mav_array_memcpy(packet->packet_buf, packet_buf, sizeof(uint8_t)*240); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY, (const char *)packet, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_CRC); -#endif -} -#endif - -#endif - -// MESSAGE FRSKY_PASSTHROUGH_ARRAY UNPACKING - - -/** - * @brief Get field time_boot_ms from frsky_passthrough_array message - * - * @return [ms] Timestamp (time since system boot). - */ -static inline uint32_t mavlink_msg_frsky_passthrough_array_get_time_boot_ms(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint32_t(msg, 0); -} - -/** - * @brief Get field count from frsky_passthrough_array message - * - * @return Number of passthrough packets in this message. - */ -static inline uint8_t mavlink_msg_frsky_passthrough_array_get_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 4); -} - -/** - * @brief Get field packet_buf from frsky_passthrough_array message - * - * @return Passthrough packet buffer. A packet has 6 bytes: uint16_t id + uint32_t data. The array has space for 40 packets. - */ -static inline uint16_t mavlink_msg_frsky_passthrough_array_get_packet_buf(const mavlink_message_t* msg, uint8_t *packet_buf) -{ - return _MAV_RETURN_uint8_t_array(msg, packet_buf, 240, 5); -} - -/** - * @brief Decode a frsky_passthrough_array message into a struct - * - * @param msg The message to decode - * @param frsky_passthrough_array C-struct to decode the message contents into - */ -static inline void mavlink_msg_frsky_passthrough_array_decode(const mavlink_message_t* msg, mavlink_frsky_passthrough_array_t* frsky_passthrough_array) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - frsky_passthrough_array->time_boot_ms = mavlink_msg_frsky_passthrough_array_get_time_boot_ms(msg); - frsky_passthrough_array->count = mavlink_msg_frsky_passthrough_array_get_count(msg); - mavlink_msg_frsky_passthrough_array_get_packet_buf(msg, frsky_passthrough_array->packet_buf); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN? msg->len : MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN; - memset(frsky_passthrough_array, 0, MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_LEN); - memcpy(frsky_passthrough_array, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/storm32/mavlink_msg_param_value_array.h b/storm32/mavlink_msg_param_value_array.h deleted file mode 100644 index 5685bf033..000000000 --- a/storm32/mavlink_msg_param_value_array.h +++ /dev/null @@ -1,362 +0,0 @@ -#pragma once -// MESSAGE PARAM_VALUE_ARRAY PACKING - -#define MAVLINK_MSG_ID_PARAM_VALUE_ARRAY 60041 - - -typedef struct __mavlink_param_value_array_t { - uint16_t param_count; /*< Total number of onboard parameters.*/ - uint16_t param_index_first; /*< Index of the first onboard parameter in this array.*/ - uint16_t flags; /*< Flags.*/ - uint8_t param_array_len; /*< Number of onboard parameters in this array.*/ - uint8_t packet_buf[248]; /*< Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere.*/ -} mavlink_param_value_array_t; - -#define MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN 255 -#define MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN 255 -#define MAVLINK_MSG_ID_60041_LEN 255 -#define MAVLINK_MSG_ID_60041_MIN_LEN 255 - -#define MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC 191 -#define MAVLINK_MSG_ID_60041_CRC 191 - -#define MAVLINK_MSG_PARAM_VALUE_ARRAY_FIELD_PACKET_BUF_LEN 248 - -#if MAVLINK_COMMAND_24BIT -#define MAVLINK_MESSAGE_INFO_PARAM_VALUE_ARRAY { \ - 60041, \ - "PARAM_VALUE_ARRAY", \ - 5, \ - { { "param_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_param_value_array_t, param_count) }, \ - { "param_index_first", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_param_value_array_t, param_index_first) }, \ - { "param_array_len", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_param_value_array_t, param_array_len) }, \ - { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_param_value_array_t, flags) }, \ - { "packet_buf", NULL, MAVLINK_TYPE_UINT8_T, 248, 7, offsetof(mavlink_param_value_array_t, packet_buf) }, \ - } \ -} -#else -#define MAVLINK_MESSAGE_INFO_PARAM_VALUE_ARRAY { \ - "PARAM_VALUE_ARRAY", \ - 5, \ - { { "param_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_param_value_array_t, param_count) }, \ - { "param_index_first", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_param_value_array_t, param_index_first) }, \ - { "param_array_len", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_param_value_array_t, param_array_len) }, \ - { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_param_value_array_t, flags) }, \ - { "packet_buf", NULL, MAVLINK_TYPE_UINT8_T, 248, 7, offsetof(mavlink_param_value_array_t, packet_buf) }, \ - } \ -} -#endif - -/** - * @brief Pack a param_value_array message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * - * @param param_count Total number of onboard parameters. - * @param param_index_first Index of the first onboard parameter in this array. - * @param param_array_len Number of onboard parameters in this array. - * @param flags Flags. - * @param packet_buf Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_value_array_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, - uint16_t param_count, uint16_t param_index_first, uint8_t param_array_len, uint16_t flags, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN]; - _mav_put_uint16_t(buf, 0, param_count); - _mav_put_uint16_t(buf, 2, param_index_first); - _mav_put_uint16_t(buf, 4, flags); - _mav_put_uint8_t(buf, 6, param_array_len); - _mav_put_uint8_t_array(buf, 7, packet_buf, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#else - mavlink_param_value_array_t packet; - packet.param_count = param_count; - packet.param_index_first = param_index_first; - packet.flags = flags; - packet.param_array_len = param_array_len; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE_ARRAY; - return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -} - -/** - * @brief Pack a param_value_array message - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * - * @param param_count Total number of onboard parameters. - * @param param_index_first Index of the first onboard parameter in this array. - * @param param_array_len Number of onboard parameters in this array. - * @param flags Flags. - * @param packet_buf Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_value_array_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, - uint16_t param_count, uint16_t param_index_first, uint8_t param_array_len, uint16_t flags, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN]; - _mav_put_uint16_t(buf, 0, param_count); - _mav_put_uint16_t(buf, 2, param_index_first); - _mav_put_uint16_t(buf, 4, flags); - _mav_put_uint8_t(buf, 6, param_array_len); - _mav_put_uint8_t_array(buf, 7, packet_buf, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#else - mavlink_param_value_array_t packet; - packet.param_count = param_count; - packet.param_index_first = param_index_first; - packet.flags = flags; - packet.param_array_len = param_array_len; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE_ARRAY; -#if MAVLINK_CRC_EXTRA - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#else - return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#endif -} - -/** - * @brief Pack a param_value_array message on a channel - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param param_count Total number of onboard parameters. - * @param param_index_first Index of the first onboard parameter in this array. - * @param param_array_len Number of onboard parameters in this array. - * @param flags Flags. - * @param packet_buf Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - * @return length of the message in bytes (excluding serial stream start sign) - */ -static inline uint16_t mavlink_msg_param_value_array_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, - mavlink_message_t* msg, - uint16_t param_count,uint16_t param_index_first,uint8_t param_array_len,uint16_t flags,const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN]; - _mav_put_uint16_t(buf, 0, param_count); - _mav_put_uint16_t(buf, 2, param_index_first); - _mav_put_uint16_t(buf, 4, flags); - _mav_put_uint8_t(buf, 6, param_array_len); - _mav_put_uint8_t_array(buf, 7, packet_buf, 248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#else - mavlink_param_value_array_t packet; - packet.param_count = param_count; - packet.param_index_first = param_index_first; - packet.flags = flags; - packet.param_array_len = param_array_len; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*248); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); -#endif - - msg->msgid = MAVLINK_MSG_ID_PARAM_VALUE_ARRAY; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -} - -/** - * @brief Encode a param_value_array struct - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param msg The MAVLink message to compress the data into - * @param param_value_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_value_array_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_param_value_array_t* param_value_array) -{ - return mavlink_msg_param_value_array_pack(system_id, component_id, msg, param_value_array->param_count, param_value_array->param_index_first, param_value_array->param_array_len, param_value_array->flags, param_value_array->packet_buf); -} - -/** - * @brief Encode a param_value_array struct on a channel - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param chan The MAVLink channel this message will be sent over - * @param msg The MAVLink message to compress the data into - * @param param_value_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_value_array_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_param_value_array_t* param_value_array) -{ - return mavlink_msg_param_value_array_pack_chan(system_id, component_id, chan, msg, param_value_array->param_count, param_value_array->param_index_first, param_value_array->param_array_len, param_value_array->flags, param_value_array->packet_buf); -} - -/** - * @brief Encode a param_value_array struct with provided status structure - * - * @param system_id ID of this system - * @param component_id ID of this component (e.g. 200 for IMU) - * @param status MAVLink status structure - * @param msg The MAVLink message to compress the data into - * @param param_value_array C-struct to read the message contents from - */ -static inline uint16_t mavlink_msg_param_value_array_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_param_value_array_t* param_value_array) -{ - return mavlink_msg_param_value_array_pack_status(system_id, component_id, _status, msg, param_value_array->param_count, param_value_array->param_index_first, param_value_array->param_array_len, param_value_array->flags, param_value_array->packet_buf); -} - -/** - * @brief Send a param_value_array message - * @param chan MAVLink channel to send the message - * - * @param param_count Total number of onboard parameters. - * @param param_index_first Index of the first onboard parameter in this array. - * @param param_array_len Number of onboard parameters in this array. - * @param flags Flags. - * @param packet_buf Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - */ -#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS - -static inline void mavlink_msg_param_value_array_send(mavlink_channel_t chan, uint16_t param_count, uint16_t param_index_first, uint8_t param_array_len, uint16_t flags, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN]; - _mav_put_uint16_t(buf, 0, param_count); - _mav_put_uint16_t(buf, 2, param_index_first); - _mav_put_uint16_t(buf, 4, flags); - _mav_put_uint8_t(buf, 6, param_array_len); - _mav_put_uint8_t_array(buf, 7, packet_buf, 248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY, buf, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#else - mavlink_param_value_array_t packet; - packet.param_count = param_count; - packet.param_index_first = param_index_first; - packet.flags = flags; - packet.param_array_len = param_array_len; - mav_array_memcpy(packet.packet_buf, packet_buf, sizeof(uint8_t)*248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY, (const char *)&packet, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#endif -} - -/** - * @brief Send a param_value_array message - * @param chan MAVLink channel to send the message - * @param struct The MAVLink struct to serialize - */ -static inline void mavlink_msg_param_value_array_send_struct(mavlink_channel_t chan, const mavlink_param_value_array_t* param_value_array) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - mavlink_msg_param_value_array_send(chan, param_value_array->param_count, param_value_array->param_index_first, param_value_array->param_array_len, param_value_array->flags, param_value_array->packet_buf); -#else - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY, (const char *)param_value_array, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#endif -} - -#if MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN <= MAVLINK_MAX_PAYLOAD_LEN -/* - This variant of _send() can be used to save stack space by re-using - memory from the receive buffer. The caller provides a - mavlink_message_t which is the size of a full mavlink message. This - is usually the receive buffer for the channel, and allows a reply to an - incoming message with minimum stack space usage. - */ -static inline void mavlink_msg_param_value_array_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t param_count, uint16_t param_index_first, uint8_t param_array_len, uint16_t flags, const uint8_t *packet_buf) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char *buf = (char *)msgbuf; - _mav_put_uint16_t(buf, 0, param_count); - _mav_put_uint16_t(buf, 2, param_index_first); - _mav_put_uint16_t(buf, 4, flags); - _mav_put_uint8_t(buf, 6, param_array_len); - _mav_put_uint8_t_array(buf, 7, packet_buf, 248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY, buf, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#else - mavlink_param_value_array_t *packet = (mavlink_param_value_array_t *)msgbuf; - packet->param_count = param_count; - packet->param_index_first = param_index_first; - packet->flags = flags; - packet->param_array_len = param_array_len; - mav_array_memcpy(packet->packet_buf, packet_buf, sizeof(uint8_t)*248); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY, (const char *)packet, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_CRC); -#endif -} -#endif - -#endif - -// MESSAGE PARAM_VALUE_ARRAY UNPACKING - - -/** - * @brief Get field param_count from param_value_array message - * - * @return Total number of onboard parameters. - */ -static inline uint16_t mavlink_msg_param_value_array_get_param_count(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 0); -} - -/** - * @brief Get field param_index_first from param_value_array message - * - * @return Index of the first onboard parameter in this array. - */ -static inline uint16_t mavlink_msg_param_value_array_get_param_index_first(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 2); -} - -/** - * @brief Get field param_array_len from param_value_array message - * - * @return Number of onboard parameters in this array. - */ -static inline uint8_t mavlink_msg_param_value_array_get_param_array_len(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint8_t(msg, 6); -} - -/** - * @brief Get field flags from param_value_array message - * - * @return Flags. - */ -static inline uint16_t mavlink_msg_param_value_array_get_flags(const mavlink_message_t* msg) -{ - return _MAV_RETURN_uint16_t(msg, 4); -} - -/** - * @brief Get field packet_buf from param_value_array message - * - * @return Parameters buffer. Contains a series of variable length parameter blocks, one per parameter, with format as specifed elsewhere. - */ -static inline uint16_t mavlink_msg_param_value_array_get_packet_buf(const mavlink_message_t* msg, uint8_t *packet_buf) -{ - return _MAV_RETURN_uint8_t_array(msg, packet_buf, 248, 7); -} - -/** - * @brief Decode a param_value_array message into a struct - * - * @param msg The message to decode - * @param param_value_array C-struct to decode the message contents into - */ -static inline void mavlink_msg_param_value_array_decode(const mavlink_message_t* msg, mavlink_param_value_array_t* param_value_array) -{ -#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - param_value_array->param_count = mavlink_msg_param_value_array_get_param_count(msg); - param_value_array->param_index_first = mavlink_msg_param_value_array_get_param_index_first(msg); - param_value_array->flags = mavlink_msg_param_value_array_get_flags(msg); - param_value_array->param_array_len = mavlink_msg_param_value_array_get_param_array_len(msg); - mavlink_msg_param_value_array_get_packet_buf(msg, param_value_array->packet_buf); -#else - uint8_t len = msg->len < MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN? msg->len : MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN; - memset(param_value_array, 0, MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_LEN); - memcpy(param_value_array, _MAV_PAYLOAD(msg), len); -#endif -} diff --git a/storm32/mavlink_msg_storm32_gimbal_device_control.h b/storm32/mavlink_msg_storm32_gimbal_device_control.h new file mode 100644 index 000000000..fd386ad47 --- /dev/null +++ b/storm32/mavlink_msg_storm32_gimbal_device_control.h @@ -0,0 +1,418 @@ +#pragma once +// MESSAGE STORM32_GIMBAL_DEVICE_CONTROL PACKING + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL 60002 + + +typedef struct __mavlink_storm32_gimbal_device_control_t { + float q[4]; /*< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored).*/ + float angular_velocity_x; /*< [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored).*/ + float angular_velocity_y; /*< [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored).*/ + float angular_velocity_z; /*< [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).*/ + uint16_t flags; /*< Gimbal device flags (UINT16_MAX to be ignored).*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ +} mavlink_storm32_gimbal_device_control_t; + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN 32 +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN 32 +#define MAVLINK_MSG_ID_60002_LEN 32 +#define MAVLINK_MSG_ID_60002_MIN_LEN 32 + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC 69 +#define MAVLINK_MSG_ID_60002_CRC 69 + +#define MAVLINK_MSG_STORM32_GIMBAL_DEVICE_CONTROL_FIELD_Q_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_CONTROL { \ + 60002, \ + "STORM32_GIMBAL_DEVICE_CONTROL", \ + 7, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_storm32_gimbal_device_control_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_storm32_gimbal_device_control_t, target_component) }, \ + { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_storm32_gimbal_device_control_t, flags) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 0, offsetof(mavlink_storm32_gimbal_device_control_t, q) }, \ + { "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_x) }, \ + { "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_y) }, \ + { "angular_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_z) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_CONTROL { \ + "STORM32_GIMBAL_DEVICE_CONTROL", \ + 7, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_storm32_gimbal_device_control_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_storm32_gimbal_device_control_t, target_component) }, \ + { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_storm32_gimbal_device_control_t, flags) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 0, offsetof(mavlink_storm32_gimbal_device_control_t, q) }, \ + { "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_x) }, \ + { "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_y) }, \ + { "angular_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_storm32_gimbal_device_control_t, angular_velocity_z) }, \ + } \ +} +#endif + +/** + * @brief Pack a storm32_gimbal_device_control message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param flags Gimbal device flags (UINT16_MAX to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN]; + _mav_put_float(buf, 16, angular_velocity_x); + _mav_put_float(buf, 20, angular_velocity_y); + _mav_put_float(buf, 24, angular_velocity_z); + _mav_put_uint16_t(buf, 28, flags); + _mav_put_uint8_t(buf, 30, target_system); + _mav_put_uint8_t(buf, 31, target_component); + _mav_put_float_array(buf, 0, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#else + mavlink_storm32_gimbal_device_control_t packet; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.flags = flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +} + +/** + * @brief Pack a storm32_gimbal_device_control message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param flags Gimbal device flags (UINT16_MAX to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN]; + _mav_put_float(buf, 16, angular_velocity_x); + _mav_put_float(buf, 20, angular_velocity_y); + _mav_put_float(buf, 24, angular_velocity_z); + _mav_put_uint16_t(buf, 28, flags); + _mav_put_uint8_t(buf, 30, target_system); + _mav_put_uint8_t(buf, 31, target_component); + _mav_put_float_array(buf, 0, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#else + mavlink_storm32_gimbal_device_control_t packet; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.flags = flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#endif +} + +/** + * @brief Pack a storm32_gimbal_device_control message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID + * @param target_component Component ID + * @param flags Gimbal device flags (UINT16_MAX to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint16_t flags,const float *q,float angular_velocity_x,float angular_velocity_y,float angular_velocity_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN]; + _mav_put_float(buf, 16, angular_velocity_x); + _mav_put_float(buf, 20, angular_velocity_y); + _mav_put_float(buf, 24, angular_velocity_z); + _mav_put_uint16_t(buf, 28, flags); + _mav_put_uint8_t(buf, 30, target_system); + _mav_put_uint8_t(buf, 31, target_component); + _mav_put_float_array(buf, 0, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#else + mavlink_storm32_gimbal_device_control_t packet; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.flags = flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +} + +/** + * @brief Encode a storm32_gimbal_device_control struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_control_t* storm32_gimbal_device_control) +{ + return mavlink_msg_storm32_gimbal_device_control_pack(system_id, component_id, msg, storm32_gimbal_device_control->target_system, storm32_gimbal_device_control->target_component, storm32_gimbal_device_control->flags, storm32_gimbal_device_control->q, storm32_gimbal_device_control->angular_velocity_x, storm32_gimbal_device_control->angular_velocity_y, storm32_gimbal_device_control->angular_velocity_z); +} + +/** + * @brief Encode a storm32_gimbal_device_control struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_control_t* storm32_gimbal_device_control) +{ + return mavlink_msg_storm32_gimbal_device_control_pack_chan(system_id, component_id, chan, msg, storm32_gimbal_device_control->target_system, storm32_gimbal_device_control->target_component, storm32_gimbal_device_control->flags, storm32_gimbal_device_control->q, storm32_gimbal_device_control->angular_velocity_x, storm32_gimbal_device_control->angular_velocity_y, storm32_gimbal_device_control->angular_velocity_z); +} + +/** + * @brief Encode a storm32_gimbal_device_control struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_control_t* storm32_gimbal_device_control) +{ + return mavlink_msg_storm32_gimbal_device_control_pack_status(system_id, component_id, _status, msg, storm32_gimbal_device_control->target_system, storm32_gimbal_device_control->target_component, storm32_gimbal_device_control->flags, storm32_gimbal_device_control->q, storm32_gimbal_device_control->angular_velocity_x, storm32_gimbal_device_control->angular_velocity_y, storm32_gimbal_device_control->angular_velocity_z); +} + +/** + * @brief Send a storm32_gimbal_device_control message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param flags Gimbal device flags (UINT16_MAX to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_storm32_gimbal_device_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN]; + _mav_put_float(buf, 16, angular_velocity_x); + _mav_put_float(buf, 20, angular_velocity_y); + _mav_put_float(buf, 24, angular_velocity_z); + _mav_put_uint16_t(buf, 28, flags); + _mav_put_uint8_t(buf, 30, target_system); + _mav_put_uint8_t(buf, 31, target_component); + _mav_put_float_array(buf, 0, q, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#else + mavlink_storm32_gimbal_device_control_t packet; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.flags = flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#endif +} + +/** + * @brief Send a storm32_gimbal_device_control message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_storm32_gimbal_device_control_send_struct(mavlink_channel_t chan, const mavlink_storm32_gimbal_device_control_t* storm32_gimbal_device_control) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_storm32_gimbal_device_control_send(chan, storm32_gimbal_device_control->target_system, storm32_gimbal_device_control->target_component, storm32_gimbal_device_control->flags, storm32_gimbal_device_control->q, storm32_gimbal_device_control->angular_velocity_x, storm32_gimbal_device_control->angular_velocity_y, storm32_gimbal_device_control->angular_velocity_z); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL, (const char *)storm32_gimbal_device_control, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#endif +} + +#if MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_storm32_gimbal_device_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_float(buf, 16, angular_velocity_x); + _mav_put_float(buf, 20, angular_velocity_y); + _mav_put_float(buf, 24, angular_velocity_z); + _mav_put_uint16_t(buf, 28, flags); + _mav_put_uint8_t(buf, 30, target_system); + _mav_put_uint8_t(buf, 31, target_component); + _mav_put_float_array(buf, 0, q, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#else + mavlink_storm32_gimbal_device_control_t *packet = (mavlink_storm32_gimbal_device_control_t *)msgbuf; + packet->angular_velocity_x = angular_velocity_x; + packet->angular_velocity_y = angular_velocity_y; + packet->angular_velocity_z = angular_velocity_z; + packet->flags = flags; + packet->target_system = target_system; + packet->target_component = target_component; + mav_array_memcpy(packet->q, q, sizeof(float)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL, (const char *)packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_CRC); +#endif +} +#endif + +#endif + +// MESSAGE STORM32_GIMBAL_DEVICE_CONTROL UNPACKING + + +/** + * @brief Get field target_system from storm32_gimbal_device_control message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_device_control_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 30); +} + +/** + * @brief Get field target_component from storm32_gimbal_device_control message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_device_control_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 31); +} + +/** + * @brief Get field flags from storm32_gimbal_device_control message + * + * @return Gimbal device flags (UINT16_MAX to be ignored). + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_get_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 28); +} + +/** + * @brief Get field q from storm32_gimbal_device_control message + * + * @return Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, set first element to NaN to be ignored). + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_control_get_q(const mavlink_message_t* msg, float *q) +{ + return _MAV_RETURN_float_array(msg, q, 4, 0); +} + +/** + * @brief Get field angular_velocity_x from storm32_gimbal_device_control message + * + * @return [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + */ +static inline float mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 16); +} + +/** + * @brief Get field angular_velocity_y from storm32_gimbal_device_control message + * + * @return [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + */ +static inline float mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field angular_velocity_z from storm32_gimbal_device_control message + * + * @return [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + */ +static inline float mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Decode a storm32_gimbal_device_control message into a struct + * + * @param msg The message to decode + * @param storm32_gimbal_device_control C-struct to decode the message contents into + */ +static inline void mavlink_msg_storm32_gimbal_device_control_decode(const mavlink_message_t* msg, mavlink_storm32_gimbal_device_control_t* storm32_gimbal_device_control) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_storm32_gimbal_device_control_get_q(msg, storm32_gimbal_device_control->q); + storm32_gimbal_device_control->angular_velocity_x = mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_x(msg); + storm32_gimbal_device_control->angular_velocity_y = mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_y(msg); + storm32_gimbal_device_control->angular_velocity_z = mavlink_msg_storm32_gimbal_device_control_get_angular_velocity_z(msg); + storm32_gimbal_device_control->flags = mavlink_msg_storm32_gimbal_device_control_get_flags(msg); + storm32_gimbal_device_control->target_system = mavlink_msg_storm32_gimbal_device_control_get_target_system(msg); + storm32_gimbal_device_control->target_component = mavlink_msg_storm32_gimbal_device_control_get_target_component(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN? msg->len : MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN; + memset(storm32_gimbal_device_control, 0, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_LEN); + memcpy(storm32_gimbal_device_control, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/storm32/mavlink_msg_storm32_gimbal_device_status.h b/storm32/mavlink_msg_storm32_gimbal_device_status.h new file mode 100644 index 000000000..0a932347f --- /dev/null +++ b/storm32/mavlink_msg_storm32_gimbal_device_status.h @@ -0,0 +1,502 @@ +#pragma once +// MESSAGE STORM32_GIMBAL_DEVICE_STATUS PACKING + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS 60001 + + +typedef struct __mavlink_storm32_gimbal_device_status_t { + uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/ + float q[4]; /*< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag.*/ + float angular_velocity_x; /*< [rad/s] X component of angular velocity (NaN if unknown).*/ + float angular_velocity_y; /*< [rad/s] Y component of angular velocity (NaN if unknown).*/ + float angular_velocity_z; /*< [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown).*/ + float yaw_absolute; /*< [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown).*/ + uint16_t flags; /*< Gimbal device flags currently applied.*/ + uint16_t failure_flags; /*< Failure flags (0 for no failure).*/ + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ +} mavlink_storm32_gimbal_device_status_t; + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN 42 +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN 42 +#define MAVLINK_MSG_ID_60001_LEN 42 +#define MAVLINK_MSG_ID_60001_MIN_LEN 42 + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC 186 +#define MAVLINK_MSG_ID_60001_CRC 186 + +#define MAVLINK_MSG_STORM32_GIMBAL_DEVICE_STATUS_FIELD_Q_LEN 4 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_STATUS { \ + 60001, \ + "STORM32_GIMBAL_DEVICE_STATUS", \ + 10, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_storm32_gimbal_device_status_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_storm32_gimbal_device_status_t, target_component) }, \ + { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storm32_gimbal_device_status_t, time_boot_ms) }, \ + { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_storm32_gimbal_device_status_t, flags) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_storm32_gimbal_device_status_t, q) }, \ + { "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_x) }, \ + { "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_y) }, \ + { "angular_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_z) }, \ + { "yaw_absolute", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_storm32_gimbal_device_status_t, yaw_absolute) }, \ + { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_storm32_gimbal_device_status_t, failure_flags) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_STATUS { \ + "STORM32_GIMBAL_DEVICE_STATUS", \ + 10, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_storm32_gimbal_device_status_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_storm32_gimbal_device_status_t, target_component) }, \ + { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storm32_gimbal_device_status_t, time_boot_ms) }, \ + { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_storm32_gimbal_device_status_t, flags) }, \ + { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_storm32_gimbal_device_status_t, q) }, \ + { "angular_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_x) }, \ + { "angular_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_y) }, \ + { "angular_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_storm32_gimbal_device_status_t, angular_velocity_z) }, \ + { "yaw_absolute", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_storm32_gimbal_device_status_t, yaw_absolute) }, \ + { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_storm32_gimbal_device_status_t, failure_flags) }, \ + } \ +} +#endif + +/** + * @brief Pack a storm32_gimbal_device_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param flags Gimbal device flags currently applied. + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag. + * @param angular_velocity_x [rad/s] X component of angular velocity (NaN if unknown). + * @param angular_velocity_y [rad/s] Y component of angular velocity (NaN if unknown). + * @param angular_velocity_z [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown). + * @param yaw_absolute [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown). + * @param failure_flags Failure flags (0 for no failure). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t time_boot_ms, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z, float yaw_absolute, uint16_t failure_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 20, angular_velocity_x); + _mav_put_float(buf, 24, angular_velocity_y); + _mav_put_float(buf, 28, angular_velocity_z); + _mav_put_float(buf, 32, yaw_absolute); + _mav_put_uint16_t(buf, 36, flags); + _mav_put_uint16_t(buf, 38, failure_flags); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_float_array(buf, 4, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#else + mavlink_storm32_gimbal_device_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.yaw_absolute = yaw_absolute; + packet.flags = flags; + packet.failure_flags = failure_flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +} + +/** + * @brief Pack a storm32_gimbal_device_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param flags Gimbal device flags currently applied. + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag. + * @param angular_velocity_x [rad/s] X component of angular velocity (NaN if unknown). + * @param angular_velocity_y [rad/s] Y component of angular velocity (NaN if unknown). + * @param angular_velocity_z [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown). + * @param yaw_absolute [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown). + * @param failure_flags Failure flags (0 for no failure). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t time_boot_ms, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z, float yaw_absolute, uint16_t failure_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 20, angular_velocity_x); + _mav_put_float(buf, 24, angular_velocity_y); + _mav_put_float(buf, 28, angular_velocity_z); + _mav_put_float(buf, 32, yaw_absolute); + _mav_put_uint16_t(buf, 36, flags); + _mav_put_uint16_t(buf, 38, failure_flags); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_float_array(buf, 4, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#else + mavlink_storm32_gimbal_device_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.yaw_absolute = yaw_absolute; + packet.flags = flags; + packet.failure_flags = failure_flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#endif +} + +/** + * @brief Pack a storm32_gimbal_device_status message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID + * @param target_component Component ID + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param flags Gimbal device flags currently applied. + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag. + * @param angular_velocity_x [rad/s] X component of angular velocity (NaN if unknown). + * @param angular_velocity_y [rad/s] Y component of angular velocity (NaN if unknown). + * @param angular_velocity_z [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown). + * @param yaw_absolute [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown). + * @param failure_flags Failure flags (0 for no failure). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint32_t time_boot_ms,uint16_t flags,const float *q,float angular_velocity_x,float angular_velocity_y,float angular_velocity_z,float yaw_absolute,uint16_t failure_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 20, angular_velocity_x); + _mav_put_float(buf, 24, angular_velocity_y); + _mav_put_float(buf, 28, angular_velocity_z); + _mav_put_float(buf, 32, yaw_absolute); + _mav_put_uint16_t(buf, 36, flags); + _mav_put_uint16_t(buf, 38, failure_flags); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_float_array(buf, 4, q, 4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#else + mavlink_storm32_gimbal_device_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.yaw_absolute = yaw_absolute; + packet.flags = flags; + packet.failure_flags = failure_flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +} + +/** + * @brief Encode a storm32_gimbal_device_status struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_status_t* storm32_gimbal_device_status) +{ + return mavlink_msg_storm32_gimbal_device_status_pack(system_id, component_id, msg, storm32_gimbal_device_status->target_system, storm32_gimbal_device_status->target_component, storm32_gimbal_device_status->time_boot_ms, storm32_gimbal_device_status->flags, storm32_gimbal_device_status->q, storm32_gimbal_device_status->angular_velocity_x, storm32_gimbal_device_status->angular_velocity_y, storm32_gimbal_device_status->angular_velocity_z, storm32_gimbal_device_status->yaw_absolute, storm32_gimbal_device_status->failure_flags); +} + +/** + * @brief Encode a storm32_gimbal_device_status struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_status_t* storm32_gimbal_device_status) +{ + return mavlink_msg_storm32_gimbal_device_status_pack_chan(system_id, component_id, chan, msg, storm32_gimbal_device_status->target_system, storm32_gimbal_device_status->target_component, storm32_gimbal_device_status->time_boot_ms, storm32_gimbal_device_status->flags, storm32_gimbal_device_status->q, storm32_gimbal_device_status->angular_velocity_x, storm32_gimbal_device_status->angular_velocity_y, storm32_gimbal_device_status->angular_velocity_z, storm32_gimbal_device_status->yaw_absolute, storm32_gimbal_device_status->failure_flags); +} + +/** + * @brief Encode a storm32_gimbal_device_status struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_device_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_storm32_gimbal_device_status_t* storm32_gimbal_device_status) +{ + return mavlink_msg_storm32_gimbal_device_status_pack_status(system_id, component_id, _status, msg, storm32_gimbal_device_status->target_system, storm32_gimbal_device_status->target_component, storm32_gimbal_device_status->time_boot_ms, storm32_gimbal_device_status->flags, storm32_gimbal_device_status->q, storm32_gimbal_device_status->angular_velocity_x, storm32_gimbal_device_status->angular_velocity_y, storm32_gimbal_device_status->angular_velocity_z, storm32_gimbal_device_status->yaw_absolute, storm32_gimbal_device_status->failure_flags); +} + +/** + * @brief Send a storm32_gimbal_device_status message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param time_boot_ms [ms] Timestamp (time since system boot). + * @param flags Gimbal device flags currently applied. + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag. + * @param angular_velocity_x [rad/s] X component of angular velocity (NaN if unknown). + * @param angular_velocity_y [rad/s] Y component of angular velocity (NaN if unknown). + * @param angular_velocity_z [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown). + * @param yaw_absolute [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown). + * @param failure_flags Failure flags (0 for no failure). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_storm32_gimbal_device_status_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t time_boot_ms, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z, float yaw_absolute, uint16_t failure_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN]; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 20, angular_velocity_x); + _mav_put_float(buf, 24, angular_velocity_y); + _mav_put_float(buf, 28, angular_velocity_z); + _mav_put_float(buf, 32, yaw_absolute); + _mav_put_uint16_t(buf, 36, flags); + _mav_put_uint16_t(buf, 38, failure_flags); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_float_array(buf, 4, q, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#else + mavlink_storm32_gimbal_device_status_t packet; + packet.time_boot_ms = time_boot_ms; + packet.angular_velocity_x = angular_velocity_x; + packet.angular_velocity_y = angular_velocity_y; + packet.angular_velocity_z = angular_velocity_z; + packet.yaw_absolute = yaw_absolute; + packet.flags = flags; + packet.failure_flags = failure_flags; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.q, q, sizeof(float)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS, (const char *)&packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#endif +} + +/** + * @brief Send a storm32_gimbal_device_status message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_storm32_gimbal_device_status_send_struct(mavlink_channel_t chan, const mavlink_storm32_gimbal_device_status_t* storm32_gimbal_device_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_storm32_gimbal_device_status_send(chan, storm32_gimbal_device_status->target_system, storm32_gimbal_device_status->target_component, storm32_gimbal_device_status->time_boot_ms, storm32_gimbal_device_status->flags, storm32_gimbal_device_status->q, storm32_gimbal_device_status->angular_velocity_x, storm32_gimbal_device_status->angular_velocity_y, storm32_gimbal_device_status->angular_velocity_z, storm32_gimbal_device_status->yaw_absolute, storm32_gimbal_device_status->failure_flags); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS, (const char *)storm32_gimbal_device_status, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#endif +} + +#if MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_storm32_gimbal_device_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t time_boot_ms, uint16_t flags, const float *q, float angular_velocity_x, float angular_velocity_y, float angular_velocity_z, float yaw_absolute, uint16_t failure_flags) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, time_boot_ms); + _mav_put_float(buf, 20, angular_velocity_x); + _mav_put_float(buf, 24, angular_velocity_y); + _mav_put_float(buf, 28, angular_velocity_z); + _mav_put_float(buf, 32, yaw_absolute); + _mav_put_uint16_t(buf, 36, flags); + _mav_put_uint16_t(buf, 38, failure_flags); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_float_array(buf, 4, q, 4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#else + mavlink_storm32_gimbal_device_status_t *packet = (mavlink_storm32_gimbal_device_status_t *)msgbuf; + packet->time_boot_ms = time_boot_ms; + packet->angular_velocity_x = angular_velocity_x; + packet->angular_velocity_y = angular_velocity_y; + packet->angular_velocity_z = angular_velocity_z; + packet->yaw_absolute = yaw_absolute; + packet->flags = flags; + packet->failure_flags = failure_flags; + packet->target_system = target_system; + packet->target_component = target_component; + mav_array_memcpy(packet->q, q, sizeof(float)*4); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS, (const char *)packet, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_CRC); +#endif +} +#endif + +#endif + +// MESSAGE STORM32_GIMBAL_DEVICE_STATUS UNPACKING + + +/** + * @brief Get field target_system from storm32_gimbal_device_status message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_device_status_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 40); +} + +/** + * @brief Get field target_component from storm32_gimbal_device_status message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_device_status_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 41); +} + +/** + * @brief Get field time_boot_ms from storm32_gimbal_device_status message + * + * @return [ms] Timestamp (time since system boot). + */ +static inline uint32_t mavlink_msg_storm32_gimbal_device_status_get_time_boot_ms(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Get field flags from storm32_gimbal_device_status message + * + * @return Gimbal device flags currently applied. + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_get_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 36); +} + +/** + * @brief Get field q from storm32_gimbal_device_status message + * + * @return Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag. + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_get_q(const mavlink_message_t* msg, float *q) +{ + return _MAV_RETURN_float_array(msg, q, 4, 4); +} + +/** + * @brief Get field angular_velocity_x from storm32_gimbal_device_status message + * + * @return [rad/s] X component of angular velocity (NaN if unknown). + */ +static inline float mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_x(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 20); +} + +/** + * @brief Get field angular_velocity_y from storm32_gimbal_device_status message + * + * @return [rad/s] Y component of angular velocity (NaN if unknown). + */ +static inline float mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_y(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 24); +} + +/** + * @brief Get field angular_velocity_z from storm32_gimbal_device_status message + * + * @return [rad/s] Z component of angular velocity (the frame depends on the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN if unknown). + */ +static inline float mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_z(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 28); +} + +/** + * @brief Get field yaw_absolute from storm32_gimbal_device_status message + * + * @return [deg] Yaw in absolute frame relative to Earth's North, north is 0 (NaN if unknown). + */ +static inline float mavlink_msg_storm32_gimbal_device_status_get_yaw_absolute(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 32); +} + +/** + * @brief Get field failure_flags from storm32_gimbal_device_status message + * + * @return Failure flags (0 for no failure). + */ +static inline uint16_t mavlink_msg_storm32_gimbal_device_status_get_failure_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 38); +} + +/** + * @brief Decode a storm32_gimbal_device_status message into a struct + * + * @param msg The message to decode + * @param storm32_gimbal_device_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_storm32_gimbal_device_status_decode(const mavlink_message_t* msg, mavlink_storm32_gimbal_device_status_t* storm32_gimbal_device_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + storm32_gimbal_device_status->time_boot_ms = mavlink_msg_storm32_gimbal_device_status_get_time_boot_ms(msg); + mavlink_msg_storm32_gimbal_device_status_get_q(msg, storm32_gimbal_device_status->q); + storm32_gimbal_device_status->angular_velocity_x = mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_x(msg); + storm32_gimbal_device_status->angular_velocity_y = mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_y(msg); + storm32_gimbal_device_status->angular_velocity_z = mavlink_msg_storm32_gimbal_device_status_get_angular_velocity_z(msg); + storm32_gimbal_device_status->yaw_absolute = mavlink_msg_storm32_gimbal_device_status_get_yaw_absolute(msg); + storm32_gimbal_device_status->flags = mavlink_msg_storm32_gimbal_device_status_get_flags(msg); + storm32_gimbal_device_status->failure_flags = mavlink_msg_storm32_gimbal_device_status_get_failure_flags(msg); + storm32_gimbal_device_status->target_system = mavlink_msg_storm32_gimbal_device_status_get_target_system(msg); + storm32_gimbal_device_status->target_component = mavlink_msg_storm32_gimbal_device_status_get_target_component(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN? msg->len : MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN; + memset(storm32_gimbal_device_status, 0, MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_LEN); + memcpy(storm32_gimbal_device_status, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_control.h b/storm32/mavlink_msg_storm32_gimbal_manager_control.h index 565a8a2bb..966772c67 100644 --- a/storm32/mavlink_msg_storm32_gimbal_manager_control.h +++ b/storm32/mavlink_msg_storm32_gimbal_manager_control.h @@ -5,15 +5,15 @@ typedef struct __mavlink_storm32_gimbal_manager_control_t { - float q[4]; /*< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.*/ - float angular_velocity_x; /*< [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored.*/ - float angular_velocity_y; /*< [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored.*/ - float angular_velocity_z; /*< [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.*/ - uint16_t device_flags; /*< Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE.*/ - uint16_t manager_flags; /*< Gimbal manager flags to be applied (0 to be ignored).*/ + float q[4]; /*< Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored).*/ + float angular_velocity_x; /*< [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored).*/ + float angular_velocity_y; /*< [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored).*/ + float angular_velocity_z; /*< [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).*/ + uint16_t device_flags; /*< Gimbal device flags (UINT16_MAX to be ignored).*/ + uint16_t manager_flags; /*< Gimbal manager flags (0 to be ignored).*/ uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ - uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.*/ + uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals).*/ uint8_t client; /*< Client which is contacting the gimbal manager (must be set).*/ } mavlink_storm32_gimbal_manager_control_t; @@ -70,14 +70,14 @@ typedef struct __mavlink_storm32_gimbal_manager_control_t { * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored. - * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored. - * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -124,14 +124,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pack(uint8_t s * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored. - * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored. - * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -181,14 +181,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pack_status(ui * @param msg The MAVLink message to compress the data into * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored. - * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored. - * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -274,14 +274,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_encode_status( * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored. - * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored. - * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param q Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored). + * @param angular_velocity_x [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). + * @param angular_velocity_y [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). + * @param angular_velocity_z [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -398,7 +398,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_get_target_comp /** * @brief Get field gimbal_id from storm32_gimbal_manager_control message * - * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). */ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_get_gimbal_id(const mavlink_message_t* msg) { @@ -418,7 +418,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_get_client(cons /** * @brief Get field device_flags from storm32_gimbal_manager_control message * - * @return Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. + * @return Gimbal device flags (UINT16_MAX to be ignored). */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_device_flags(const mavlink_message_t* msg) { @@ -428,7 +428,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_device_fla /** * @brief Get field manager_flags from storm32_gimbal_manager_control message * - * @return Gimbal manager flags to be applied (0 to be ignored). + * @return Gimbal manager flags (0 to be ignored). */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_manager_flags(const mavlink_message_t* msg) { @@ -438,7 +438,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_manager_fl /** * @brief Get field q from storm32_gimbal_manager_control message * - * @return Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). Set first element to NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @return Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is determined by the GIMBAL_MANAGER_FLAGS_ABSOLUTE_YAW flag, set first element to NaN to be ignored). */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_q(const mavlink_message_t* msg, float *q) { @@ -448,7 +448,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_get_q(const ma /** * @brief Get field angular_velocity_x from storm32_gimbal_manager_control message * - * @return [rad/s] X component of angular velocity (positive: roll to the right). NaN to be ignored. + * @return [rad/s] X component of angular velocity (positive: roll to the right, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_get_angular_velocity_x(const mavlink_message_t* msg) { @@ -458,7 +458,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_control_get_angular_veloc /** * @brief Get field angular_velocity_y from storm32_gimbal_manager_control message * - * @return [rad/s] Y component of angular velocity (positive: tilt up). NaN to be ignored. + * @return [rad/s] Y component of angular velocity (positive: tilt up, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_get_angular_velocity_y(const mavlink_message_t* msg) { @@ -468,7 +468,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_control_get_angular_veloc /** * @brief Get field angular_velocity_z from storm32_gimbal_manager_control message * - * @return [rad/s] Z component of angular velocity (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @return [rad/s] Z component of angular velocity (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_get_angular_velocity_z(const mavlink_message_t* msg) { diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_control_pitchyaw.h b/storm32/mavlink_msg_storm32_gimbal_manager_control_pitchyaw.h index 4941227a3..7cf0c2958 100644 --- a/storm32/mavlink_msg_storm32_gimbal_manager_control_pitchyaw.h +++ b/storm32/mavlink_msg_storm32_gimbal_manager_control_pitchyaw.h @@ -5,15 +5,15 @@ typedef struct __mavlink_storm32_gimbal_manager_control_pitchyaw_t { - float pitch; /*< [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored.*/ - float yaw; /*< [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.*/ - float pitch_rate; /*< [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored.*/ - float yaw_rate; /*< [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.*/ - uint16_t device_flags; /*< Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE.*/ - uint16_t manager_flags; /*< Gimbal manager flags to be applied (0 to be ignored).*/ + float pitch; /*< [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored).*/ + float yaw; /*< [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).*/ + float pitch_rate; /*< [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored).*/ + float yaw_rate; /*< [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored).*/ + uint16_t device_flags; /*< Gimbal device flags (UINT16_MAX to be ignored).*/ + uint16_t manager_flags; /*< Gimbal manager flags (0 to be ignored).*/ uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ - uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.*/ + uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals).*/ uint8_t client; /*< Client which is contacting the gimbal manager (must be set).*/ } mavlink_storm32_gimbal_manager_control_pitchyaw_t; @@ -70,14 +70,14 @@ typedef struct __mavlink_storm32_gimbal_manager_control_pitchyaw_t { * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param pitch [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored. - * @param yaw [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. - * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param pitch [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored). + * @param yaw [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored). + * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -126,14 +126,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_pack( * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param pitch [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored. - * @param yaw [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. - * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param pitch [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored). + * @param yaw [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored). + * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -185,14 +185,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_pack_ * @param msg The MAVLink message to compress the data into * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param pitch [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored. - * @param yaw [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. - * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param pitch [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored). + * @param yaw [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored). + * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -280,14 +280,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_encod * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). - * @param device_flags Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. - * @param manager_flags Gimbal manager flags to be applied (0 to be ignored). - * @param pitch [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored. - * @param yaw [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. - * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. - * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @param device_flags Gimbal device flags (UINT16_MAX to be ignored). + * @param manager_flags Gimbal manager flags (0 to be ignored). + * @param pitch [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored). + * @param yaw [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). + * @param pitch_rate [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored). + * @param yaw_rate [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -408,7 +408,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_ta /** * @brief Get field gimbal_id from storm32_gimbal_manager_control_pitchyaw message * - * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). */ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_gimbal_id(const mavlink_message_t* msg) { @@ -428,7 +428,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_cl /** * @brief Get field device_flags from storm32_gimbal_manager_control_pitchyaw message * - * @return Gimbal device flags to be applied (UINT16_MAX to be ignored). Same flags as used in GIMBAL_DEVICE_SET_ATTITUDE. + * @return Gimbal device flags (UINT16_MAX to be ignored). */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_device_flags(const mavlink_message_t* msg) { @@ -438,7 +438,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_d /** * @brief Get field manager_flags from storm32_gimbal_manager_control_pitchyaw message * - * @return Gimbal manager flags to be applied (0 to be ignored). + * @return Gimbal manager flags (0 to be ignored). */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_manager_flags(const mavlink_message_t* msg) { @@ -448,7 +448,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_m /** * @brief Get field pitch from storm32_gimbal_manager_control_pitchyaw message * - * @return [rad] Pitch/tilt angle (positive: tilt up). NaN to be ignored. + * @return [rad] Pitch/tilt angle (positive: tilt up, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_pitch(const mavlink_message_t* msg) { @@ -458,7 +458,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_pitc /** * @brief Get field yaw from storm32_gimbal_manager_control_pitchyaw message * - * @return [rad] Yaw/pan angle (positive: pan the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @return [rad] Yaw/pan angle (positive: pan the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_yaw(const mavlink_message_t* msg) { @@ -468,7 +468,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_yaw( /** * @brief Get field pitch_rate from storm32_gimbal_manager_control_pitchyaw message * - * @return [rad/s] Pitch/tilt angular rate (positive: tilt up). NaN to be ignored. + * @return [rad/s] Pitch/tilt angular rate (positive: tilt up, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_pitch_rate(const mavlink_message_t* msg) { @@ -478,7 +478,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_pitc /** * @brief Get field yaw_rate from storm32_gimbal_manager_control_pitchyaw message * - * @return [rad/s] Yaw/pan angular rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags. + * @return [rad/s] Yaw/pan angular rate (positive: pan to the right, the frame is determined by the STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE flag, NaN to be ignored). */ static inline float mavlink_msg_storm32_gimbal_manager_control_pitchyaw_get_yaw_rate(const mavlink_message_t* msg) { diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_correct_roll.h b/storm32/mavlink_msg_storm32_gimbal_manager_correct_roll.h index 0abf5cc25..ee40bb2ed 100644 --- a/storm32/mavlink_msg_storm32_gimbal_manager_correct_roll.h +++ b/storm32/mavlink_msg_storm32_gimbal_manager_correct_roll.h @@ -8,7 +8,7 @@ typedef struct __mavlink_storm32_gimbal_manager_correct_roll_t { float roll; /*< [rad] Roll angle (positive to roll to the right).*/ uint8_t target_system; /*< System ID*/ uint8_t target_component; /*< Component ID*/ - uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.*/ + uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals).*/ uint8_t client; /*< Client which is contacting the gimbal manager (must be set).*/ } mavlink_storm32_gimbal_manager_correct_roll_t; @@ -55,7 +55,7 @@ typedef struct __mavlink_storm32_gimbal_manager_correct_roll_t { * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). * @param roll [rad] Roll angle (positive to roll to the right). * @return length of the message in bytes (excluding serial stream start sign) @@ -96,7 +96,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_correct_roll_pack(uint * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). * @param roll [rad] Roll angle (positive to roll to the right). * @return length of the message in bytes (excluding serial stream start sign) @@ -140,7 +140,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_correct_roll_pack_stat * @param msg The MAVLink message to compress the data into * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). * @param roll [rad] Roll angle (positive to roll to the right). * @return length of the message in bytes (excluding serial stream start sign) @@ -220,7 +220,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_correct_roll_encode_st * * @param target_system System ID * @param target_component Component ID - * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). * @param client Client which is contacting the gimbal manager (must be set). * @param roll [rad] Roll angle (positive to roll to the right). */ @@ -323,7 +323,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_correct_roll_get_target /** * @brief Get field gimbal_id from storm32_gimbal_manager_correct_roll message * - * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. + * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). */ static inline uint8_t mavlink_msg_storm32_gimbal_manager_correct_roll_get_gimbal_id(const mavlink_message_t* msg) { diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_information.h b/storm32/mavlink_msg_storm32_gimbal_manager_information.h index 339c67cf3..48db8c29c 100644 --- a/storm32/mavlink_msg_storm32_gimbal_manager_information.h +++ b/storm32/mavlink_msg_storm32_gimbal_manager_information.h @@ -5,14 +5,14 @@ typedef struct __mavlink_storm32_gimbal_manager_information_t { - uint32_t device_cap_flags; /*< Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero).*/ + uint32_t device_cap_flags; /*< Gimbal device capability flags.*/ uint32_t manager_cap_flags; /*< Gimbal manager capability flags.*/ - float roll_min; /*< [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown.*/ - float roll_max; /*< [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown.*/ - float pitch_min; /*< [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown.*/ - float pitch_max; /*< [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown.*/ - float yaw_min; /*< [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown.*/ - float yaw_max; /*< [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown.*/ + float roll_min; /*< [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown).*/ + float roll_max; /*< [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown).*/ + float pitch_min; /*< [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown).*/ + float pitch_max; /*< [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown).*/ + float yaw_min; /*< [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown).*/ + float yaw_max; /*< [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown).*/ uint8_t gimbal_id; /*< Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for.*/ } mavlink_storm32_gimbal_manager_information_t; @@ -66,14 +66,14 @@ typedef struct __mavlink_storm32_gimbal_manager_information_t { * @param msg The MAVLink message to compress the data into * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - * @param device_cap_flags Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). + * @param device_cap_flags Gimbal device capability flags. * @param manager_cap_flags Gimbal manager capability flags. - * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown. - * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown. - * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown). + * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown). + * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). + * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -119,14 +119,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_pack(uint8 * @param msg The MAVLink message to compress the data into * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - * @param device_cap_flags Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). + * @param device_cap_flags Gimbal device capability flags. * @param manager_cap_flags Gimbal manager capability flags. - * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown. - * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown. - * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown). + * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown). + * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). + * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -175,14 +175,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_pack_statu * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - * @param device_cap_flags Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). + * @param device_cap_flags Gimbal device capability flags. * @param manager_cap_flags Gimbal manager capability flags. - * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown. - * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown. - * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown). + * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown). + * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). + * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -267,14 +267,14 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_information_encode_sta * @param chan MAVLink channel to send the message * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. - * @param device_cap_flags Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). + * @param device_cap_flags Gimbal device capability flags. * @param manager_cap_flags Gimbal manager capability flags. - * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown. - * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown. - * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. - * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. - * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @param roll_min [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown). + * @param roll_max [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown). + * @param pitch_min [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param pitch_max [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown). + * @param yaw_min [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). + * @param yaw_max [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -381,7 +381,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_information_get_gimbal_ /** * @brief Get field device_cap_flags from storm32_gimbal_manager_information message * - * @return Gimbal device capability flags. Same flags as reported by GIMBAL_DEVICE_INFORMATION. The flag is only 16 bit wide, but stored in 32 bit, for backwards compatibility (high word is zero). + * @return Gimbal device capability flags. */ static inline uint32_t mavlink_msg_storm32_gimbal_manager_information_get_device_cap_flags(const mavlink_message_t* msg) { @@ -401,7 +401,7 @@ static inline uint32_t mavlink_msg_storm32_gimbal_manager_information_get_manage /** * @brief Get field roll_min from storm32_gimbal_manager_information message * - * @return [rad] Hardware minimum roll angle (positive: roll to the right). NaN if unknown. + * @return [rad] Hardware minimum roll angle (positive: roll to the right, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_roll_min(const mavlink_message_t* msg) { @@ -411,7 +411,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_information_get_roll_min( /** * @brief Get field roll_max from storm32_gimbal_manager_information message * - * @return [rad] Hardware maximum roll angle (positive: roll to the right). NaN if unknown. + * @return [rad] Hardware maximum roll angle (positive: roll to the right, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_roll_max(const mavlink_message_t* msg) { @@ -421,7 +421,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_information_get_roll_max( /** * @brief Get field pitch_min from storm32_gimbal_manager_information message * - * @return [rad] Hardware minimum pitch/tilt angle (positive: tilt up). NaN if unknown. + * @return [rad] Hardware minimum pitch/tilt angle (positive: tilt up, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_pitch_min(const mavlink_message_t* msg) { @@ -431,7 +431,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_information_get_pitch_min /** * @brief Get field pitch_max from storm32_gimbal_manager_information message * - * @return [rad] Hardware maximum pitch/tilt angle (positive: tilt up). NaN if unknown. + * @return [rad] Hardware maximum pitch/tilt angle (positive: tilt up, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_pitch_max(const mavlink_message_t* msg) { @@ -441,7 +441,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_information_get_pitch_max /** * @brief Get field yaw_min from storm32_gimbal_manager_information message * - * @return [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @return [rad] Hardware minimum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_yaw_min(const mavlink_message_t* msg) { @@ -451,7 +451,7 @@ static inline float mavlink_msg_storm32_gimbal_manager_information_get_yaw_min(c /** * @brief Get field yaw_max from storm32_gimbal_manager_information message * - * @return [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base). NaN if unknown. + * @return [rad] Hardware maximum yaw/pan angle (positive: pan to the right, relative to the vehicle/gimbal base, NaN if unknown). */ static inline float mavlink_msg_storm32_gimbal_manager_information_get_yaw_max(const mavlink_message_t* msg) { diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_profile.h b/storm32/mavlink_msg_storm32_gimbal_manager_profile.h new file mode 100644 index 000000000..7266b8e91 --- /dev/null +++ b/storm32/mavlink_msg_storm32_gimbal_manager_profile.h @@ -0,0 +1,447 @@ +#pragma once +// MESSAGE STORM32_GIMBAL_MANAGER_PROFILE PACKING + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE 60015 + + +typedef struct __mavlink_storm32_gimbal_manager_profile_t { + uint8_t target_system; /*< System ID*/ + uint8_t target_component; /*< Component ID*/ + uint8_t gimbal_id; /*< Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals).*/ + uint8_t profile; /*< Profile to be applied (0 = default).*/ + uint8_t priorities[8]; /*< Priorities for custom profile.*/ + uint8_t profile_flags; /*< Profile flags for custom profile (0 = default).*/ + uint8_t rc_timeout; /*< Rc timeouts for custom profile (0 = infinite, in uints of 100 ms).*/ + uint8_t timeouts[8]; /*< Timeouts for custom profile (0 = infinite, in uints of 100 ms).*/ +} mavlink_storm32_gimbal_manager_profile_t; + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN 22 +#define MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN 22 +#define MAVLINK_MSG_ID_60015_LEN 22 +#define MAVLINK_MSG_ID_60015_MIN_LEN 22 + +#define MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC 78 +#define MAVLINK_MSG_ID_60015_CRC 78 + +#define MAVLINK_MSG_STORM32_GIMBAL_MANAGER_PROFILE_FIELD_PRIORITIES_LEN 8 +#define MAVLINK_MSG_STORM32_GIMBAL_MANAGER_PROFILE_FIELD_TIMEOUTS_LEN 8 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_PROFILE { \ + 60015, \ + "STORM32_GIMBAL_MANAGER_PROFILE", \ + 8, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_storm32_gimbal_manager_profile_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_storm32_gimbal_manager_profile_t, target_component) }, \ + { "gimbal_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_storm32_gimbal_manager_profile_t, gimbal_id) }, \ + { "profile", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_storm32_gimbal_manager_profile_t, profile) }, \ + { "priorities", NULL, MAVLINK_TYPE_UINT8_T, 8, 4, offsetof(mavlink_storm32_gimbal_manager_profile_t, priorities) }, \ + { "profile_flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_storm32_gimbal_manager_profile_t, profile_flags) }, \ + { "rc_timeout", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_storm32_gimbal_manager_profile_t, rc_timeout) }, \ + { "timeouts", NULL, MAVLINK_TYPE_UINT8_T, 8, 14, offsetof(mavlink_storm32_gimbal_manager_profile_t, timeouts) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_PROFILE { \ + "STORM32_GIMBAL_MANAGER_PROFILE", \ + 8, \ + { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_storm32_gimbal_manager_profile_t, target_system) }, \ + { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_storm32_gimbal_manager_profile_t, target_component) }, \ + { "gimbal_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_storm32_gimbal_manager_profile_t, gimbal_id) }, \ + { "profile", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_storm32_gimbal_manager_profile_t, profile) }, \ + { "priorities", NULL, MAVLINK_TYPE_UINT8_T, 8, 4, offsetof(mavlink_storm32_gimbal_manager_profile_t, priorities) }, \ + { "profile_flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_storm32_gimbal_manager_profile_t, profile_flags) }, \ + { "rc_timeout", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_storm32_gimbal_manager_profile_t, rc_timeout) }, \ + { "timeouts", NULL, MAVLINK_TYPE_UINT8_T, 8, 14, offsetof(mavlink_storm32_gimbal_manager_profile_t, timeouts) }, \ + } \ +} +#endif + +/** + * @brief Pack a storm32_gimbal_manager_profile message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). + * @param profile Profile to be applied (0 = default). + * @param priorities Priorities for custom profile. + * @param profile_flags Profile flags for custom profile (0 = default). + * @param rc_timeout Rc timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @param timeouts Timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint8_t gimbal_id, uint8_t profile, const uint8_t *priorities, uint8_t profile_flags, uint8_t rc_timeout, const uint8_t *timeouts) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN]; + _mav_put_uint8_t(buf, 0, target_system); + _mav_put_uint8_t(buf, 1, target_component); + _mav_put_uint8_t(buf, 2, gimbal_id); + _mav_put_uint8_t(buf, 3, profile); + _mav_put_uint8_t(buf, 12, profile_flags); + _mav_put_uint8_t(buf, 13, rc_timeout); + _mav_put_uint8_t_array(buf, 4, priorities, 8); + _mav_put_uint8_t_array(buf, 14, timeouts, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#else + mavlink_storm32_gimbal_manager_profile_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.gimbal_id = gimbal_id; + packet.profile = profile; + packet.profile_flags = profile_flags; + packet.rc_timeout = rc_timeout; + mav_array_memcpy(packet.priorities, priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet.timeouts, timeouts, sizeof(uint8_t)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +} + +/** + * @brief Pack a storm32_gimbal_manager_profile message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID + * @param target_component Component ID + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). + * @param profile Profile to be applied (0 = default). + * @param priorities Priorities for custom profile. + * @param profile_flags Profile flags for custom profile (0 = default). + * @param rc_timeout Rc timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @param timeouts Timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint8_t gimbal_id, uint8_t profile, const uint8_t *priorities, uint8_t profile_flags, uint8_t rc_timeout, const uint8_t *timeouts) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN]; + _mav_put_uint8_t(buf, 0, target_system); + _mav_put_uint8_t(buf, 1, target_component); + _mav_put_uint8_t(buf, 2, gimbal_id); + _mav_put_uint8_t(buf, 3, profile); + _mav_put_uint8_t(buf, 12, profile_flags); + _mav_put_uint8_t(buf, 13, rc_timeout); + _mav_put_uint8_t_array(buf, 4, priorities, 8); + _mav_put_uint8_t_array(buf, 14, timeouts, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#else + mavlink_storm32_gimbal_manager_profile_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.gimbal_id = gimbal_id; + packet.profile = profile; + packet.profile_flags = profile_flags; + packet.rc_timeout = rc_timeout; + mav_array_memcpy(packet.priorities, priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet.timeouts, timeouts, sizeof(uint8_t)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#endif +} + +/** + * @brief Pack a storm32_gimbal_manager_profile message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID + * @param target_component Component ID + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). + * @param profile Profile to be applied (0 = default). + * @param priorities Priorities for custom profile. + * @param profile_flags Profile flags for custom profile (0 = default). + * @param rc_timeout Rc timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @param timeouts Timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint8_t gimbal_id,uint8_t profile,const uint8_t *priorities,uint8_t profile_flags,uint8_t rc_timeout,const uint8_t *timeouts) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN]; + _mav_put_uint8_t(buf, 0, target_system); + _mav_put_uint8_t(buf, 1, target_component); + _mav_put_uint8_t(buf, 2, gimbal_id); + _mav_put_uint8_t(buf, 3, profile); + _mav_put_uint8_t(buf, 12, profile_flags); + _mav_put_uint8_t(buf, 13, rc_timeout); + _mav_put_uint8_t_array(buf, 4, priorities, 8); + _mav_put_uint8_t_array(buf, 14, timeouts, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#else + mavlink_storm32_gimbal_manager_profile_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.gimbal_id = gimbal_id; + packet.profile = profile; + packet.profile_flags = profile_flags; + packet.rc_timeout = rc_timeout; + mav_array_memcpy(packet.priorities, priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet.timeouts, timeouts, sizeof(uint8_t)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +} + +/** + * @brief Encode a storm32_gimbal_manager_profile struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_manager_profile C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_storm32_gimbal_manager_profile_t* storm32_gimbal_manager_profile) +{ + return mavlink_msg_storm32_gimbal_manager_profile_pack(system_id, component_id, msg, storm32_gimbal_manager_profile->target_system, storm32_gimbal_manager_profile->target_component, storm32_gimbal_manager_profile->gimbal_id, storm32_gimbal_manager_profile->profile, storm32_gimbal_manager_profile->priorities, storm32_gimbal_manager_profile->profile_flags, storm32_gimbal_manager_profile->rc_timeout, storm32_gimbal_manager_profile->timeouts); +} + +/** + * @brief Encode a storm32_gimbal_manager_profile struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_manager_profile C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_storm32_gimbal_manager_profile_t* storm32_gimbal_manager_profile) +{ + return mavlink_msg_storm32_gimbal_manager_profile_pack_chan(system_id, component_id, chan, msg, storm32_gimbal_manager_profile->target_system, storm32_gimbal_manager_profile->target_component, storm32_gimbal_manager_profile->gimbal_id, storm32_gimbal_manager_profile->profile, storm32_gimbal_manager_profile->priorities, storm32_gimbal_manager_profile->profile_flags, storm32_gimbal_manager_profile->rc_timeout, storm32_gimbal_manager_profile->timeouts); +} + +/** + * @brief Encode a storm32_gimbal_manager_profile struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param storm32_gimbal_manager_profile C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_storm32_gimbal_manager_profile_t* storm32_gimbal_manager_profile) +{ + return mavlink_msg_storm32_gimbal_manager_profile_pack_status(system_id, component_id, _status, msg, storm32_gimbal_manager_profile->target_system, storm32_gimbal_manager_profile->target_component, storm32_gimbal_manager_profile->gimbal_id, storm32_gimbal_manager_profile->profile, storm32_gimbal_manager_profile->priorities, storm32_gimbal_manager_profile->profile_flags, storm32_gimbal_manager_profile->rc_timeout, storm32_gimbal_manager_profile->timeouts); +} + +/** + * @brief Send a storm32_gimbal_manager_profile message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID + * @param target_component Component ID + * @param gimbal_id Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). + * @param profile Profile to be applied (0 = default). + * @param priorities Priorities for custom profile. + * @param profile_flags Profile flags for custom profile (0 = default). + * @param rc_timeout Rc timeouts for custom profile (0 = infinite, in uints of 100 ms). + * @param timeouts Timeouts for custom profile (0 = infinite, in uints of 100 ms). + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_storm32_gimbal_manager_profile_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t gimbal_id, uint8_t profile, const uint8_t *priorities, uint8_t profile_flags, uint8_t rc_timeout, const uint8_t *timeouts) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN]; + _mav_put_uint8_t(buf, 0, target_system); + _mav_put_uint8_t(buf, 1, target_component); + _mav_put_uint8_t(buf, 2, gimbal_id); + _mav_put_uint8_t(buf, 3, profile); + _mav_put_uint8_t(buf, 12, profile_flags); + _mav_put_uint8_t(buf, 13, rc_timeout); + _mav_put_uint8_t_array(buf, 4, priorities, 8); + _mav_put_uint8_t_array(buf, 14, timeouts, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#else + mavlink_storm32_gimbal_manager_profile_t packet; + packet.target_system = target_system; + packet.target_component = target_component; + packet.gimbal_id = gimbal_id; + packet.profile = profile; + packet.profile_flags = profile_flags; + packet.rc_timeout = rc_timeout; + mav_array_memcpy(packet.priorities, priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet.timeouts, timeouts, sizeof(uint8_t)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE, (const char *)&packet, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#endif +} + +/** + * @brief Send a storm32_gimbal_manager_profile message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_storm32_gimbal_manager_profile_send_struct(mavlink_channel_t chan, const mavlink_storm32_gimbal_manager_profile_t* storm32_gimbal_manager_profile) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_storm32_gimbal_manager_profile_send(chan, storm32_gimbal_manager_profile->target_system, storm32_gimbal_manager_profile->target_component, storm32_gimbal_manager_profile->gimbal_id, storm32_gimbal_manager_profile->profile, storm32_gimbal_manager_profile->priorities, storm32_gimbal_manager_profile->profile_flags, storm32_gimbal_manager_profile->rc_timeout, storm32_gimbal_manager_profile->timeouts); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE, (const char *)storm32_gimbal_manager_profile, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#endif +} + +#if MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_storm32_gimbal_manager_profile_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t gimbal_id, uint8_t profile, const uint8_t *priorities, uint8_t profile_flags, uint8_t rc_timeout, const uint8_t *timeouts) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint8_t(buf, 0, target_system); + _mav_put_uint8_t(buf, 1, target_component); + _mav_put_uint8_t(buf, 2, gimbal_id); + _mav_put_uint8_t(buf, 3, profile); + _mav_put_uint8_t(buf, 12, profile_flags); + _mav_put_uint8_t(buf, 13, rc_timeout); + _mav_put_uint8_t_array(buf, 4, priorities, 8); + _mav_put_uint8_t_array(buf, 14, timeouts, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE, buf, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#else + mavlink_storm32_gimbal_manager_profile_t *packet = (mavlink_storm32_gimbal_manager_profile_t *)msgbuf; + packet->target_system = target_system; + packet->target_component = target_component; + packet->gimbal_id = gimbal_id; + packet->profile = profile; + packet->profile_flags = profile_flags; + packet->rc_timeout = rc_timeout; + mav_array_memcpy(packet->priorities, priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet->timeouts, timeouts, sizeof(uint8_t)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE, (const char *)packet, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_CRC); +#endif +} +#endif + +#endif + +// MESSAGE STORM32_GIMBAL_MANAGER_PROFILE UNPACKING + + +/** + * @brief Get field target_system from storm32_gimbal_manager_profile message + * + * @return System ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 0); +} + +/** + * @brief Get field target_component from storm32_gimbal_manager_profile message + * + * @return Component ID + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 1); +} + +/** + * @brief Get field gimbal_id from storm32_gimbal_manager_profile message + * + * @return Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals, send command multiple times for more than one but not all gimbals). + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_gimbal_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 2); +} + +/** + * @brief Get field profile from storm32_gimbal_manager_profile message + * + * @return Profile to be applied (0 = default). + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_profile(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 3); +} + +/** + * @brief Get field priorities from storm32_gimbal_manager_profile message + * + * @return Priorities for custom profile. + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_get_priorities(const mavlink_message_t* msg, uint8_t *priorities) +{ + return _MAV_RETURN_uint8_t_array(msg, priorities, 8, 4); +} + +/** + * @brief Get field profile_flags from storm32_gimbal_manager_profile message + * + * @return Profile flags for custom profile (0 = default). + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_profile_flags(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 12); +} + +/** + * @brief Get field rc_timeout from storm32_gimbal_manager_profile message + * + * @return Rc timeouts for custom profile (0 = infinite, in uints of 100 ms). + */ +static inline uint8_t mavlink_msg_storm32_gimbal_manager_profile_get_rc_timeout(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 13); +} + +/** + * @brief Get field timeouts from storm32_gimbal_manager_profile message + * + * @return Timeouts for custom profile (0 = infinite, in uints of 100 ms). + */ +static inline uint16_t mavlink_msg_storm32_gimbal_manager_profile_get_timeouts(const mavlink_message_t* msg, uint8_t *timeouts) +{ + return _MAV_RETURN_uint8_t_array(msg, timeouts, 8, 14); +} + +/** + * @brief Decode a storm32_gimbal_manager_profile message into a struct + * + * @param msg The message to decode + * @param storm32_gimbal_manager_profile C-struct to decode the message contents into + */ +static inline void mavlink_msg_storm32_gimbal_manager_profile_decode(const mavlink_message_t* msg, mavlink_storm32_gimbal_manager_profile_t* storm32_gimbal_manager_profile) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + storm32_gimbal_manager_profile->target_system = mavlink_msg_storm32_gimbal_manager_profile_get_target_system(msg); + storm32_gimbal_manager_profile->target_component = mavlink_msg_storm32_gimbal_manager_profile_get_target_component(msg); + storm32_gimbal_manager_profile->gimbal_id = mavlink_msg_storm32_gimbal_manager_profile_get_gimbal_id(msg); + storm32_gimbal_manager_profile->profile = mavlink_msg_storm32_gimbal_manager_profile_get_profile(msg); + mavlink_msg_storm32_gimbal_manager_profile_get_priorities(msg, storm32_gimbal_manager_profile->priorities); + storm32_gimbal_manager_profile->profile_flags = mavlink_msg_storm32_gimbal_manager_profile_get_profile_flags(msg); + storm32_gimbal_manager_profile->rc_timeout = mavlink_msg_storm32_gimbal_manager_profile_get_rc_timeout(msg); + mavlink_msg_storm32_gimbal_manager_profile_get_timeouts(msg, storm32_gimbal_manager_profile->timeouts); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN? msg->len : MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN; + memset(storm32_gimbal_manager_profile, 0, MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_LEN); + memcpy(storm32_gimbal_manager_profile, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/storm32/mavlink_msg_storm32_gimbal_manager_status.h b/storm32/mavlink_msg_storm32_gimbal_manager_status.h index befb9a3d0..1b5e15a23 100644 --- a/storm32/mavlink_msg_storm32_gimbal_manager_status.h +++ b/storm32/mavlink_msg_storm32_gimbal_manager_status.h @@ -5,7 +5,7 @@ typedef struct __mavlink_storm32_gimbal_manager_status_t { - uint16_t device_flags; /*< Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS.*/ + uint16_t device_flags; /*< Gimbal device flags currently applied.*/ uint16_t manager_flags; /*< Gimbal manager flags currently applied.*/ uint8_t gimbal_id; /*< Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for.*/ uint8_t supervisor; /*< Client who is currently supervisor (0 = none).*/ @@ -55,7 +55,7 @@ typedef struct __mavlink_storm32_gimbal_manager_status_t { * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. * @param supervisor Client who is currently supervisor (0 = none). - * @param device_flags Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. + * @param device_flags Gimbal device flags currently applied. * @param manager_flags Gimbal manager flags currently applied. * @param profile Profile currently applied (0 = default). * @return length of the message in bytes (excluding serial stream start sign) @@ -96,7 +96,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_status_pack(uint8_t sy * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. * @param supervisor Client who is currently supervisor (0 = none). - * @param device_flags Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. + * @param device_flags Gimbal device flags currently applied. * @param manager_flags Gimbal manager flags currently applied. * @param profile Profile currently applied (0 = default). * @return length of the message in bytes (excluding serial stream start sign) @@ -140,7 +140,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_status_pack_status(uin * @param msg The MAVLink message to compress the data into * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. * @param supervisor Client who is currently supervisor (0 = none). - * @param device_flags Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. + * @param device_flags Gimbal device flags currently applied. * @param manager_flags Gimbal manager flags currently applied. * @param profile Profile currently applied (0 = default). * @return length of the message in bytes (excluding serial stream start sign) @@ -220,7 +220,7 @@ static inline uint16_t mavlink_msg_storm32_gimbal_manager_status_encode_status(u * * @param gimbal_id Gimbal ID (component ID or 1-6 for non-MAVLink gimbal) that this gimbal manager is responsible for. * @param supervisor Client who is currently supervisor (0 = none). - * @param device_flags Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. + * @param device_flags Gimbal device flags currently applied. * @param manager_flags Gimbal manager flags currently applied. * @param profile Profile currently applied (0 = default). */ @@ -323,7 +323,7 @@ static inline uint8_t mavlink_msg_storm32_gimbal_manager_status_get_supervisor(c /** * @brief Get field device_flags from storm32_gimbal_manager_status message * - * @return Gimbal device flags currently applied. Same flags as reported by GIMBAL_DEVICE_ATTITUDE_STATUS. + * @return Gimbal device flags currently applied. */ static inline uint16_t mavlink_msg_storm32_gimbal_manager_status_get_device_flags(const mavlink_message_t* msg) { diff --git a/storm32/storm32.h b/storm32/storm32.h index 2d9998cc8..52cc71549 100644 --- a/storm32/storm32.h +++ b/storm32/storm32.h @@ -10,7 +10,7 @@ #error Wrong include order: MAVLINK_STORM32.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. #endif -#define MAVLINK_STORM32_XML_HASH -3183426255758071734 +#define MAVLINK_STORM32_XML_HASH 5658160879472994838 #ifdef __cplusplus extern "C" { @@ -23,7 +23,7 @@ extern "C" { #endif #ifndef MAVLINK_MESSAGE_CRCS -#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 43, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {8, 117, 36, 36, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 18, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 9, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 8, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {80, 14, 4, 4, 3, 2, 3}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 51, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 18, 3, 16, 17}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 81, 3, 79, 80}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 237, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 61, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 32, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 214, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {290, 251, 46, 46, 0, 0, 0}, {291, 10, 57, 57, 0, 0, 0}, {299, 19, 96, 98, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {332, 236, 239, 239, 0, 0, 0}, {333, 231, 109, 109, 0, 0, 0}, {334, 72, 10, 10, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {336, 245, 84, 84, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {360, 11, 25, 25, 0, 0, 0}, {370, 26, 140, 140, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {380, 232, 20, 20, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {390, 156, 238, 238, 0, 0, 0}, {395, 0, 212, 212, 0, 0, 0}, {396, 50, 160, 160, 0, 0, 0}, {397, 182, 108, 108, 0, 0, 0}, {400, 110, 254, 254, 3, 4, 5}, {401, 183, 6, 6, 3, 4, 5}, {410, 160, 53, 53, 0, 0, 0}, {411, 106, 3, 3, 0, 0, 0}, {412, 33, 6, 6, 3, 4, 5}, {413, 77, 7, 7, 3, 4, 5}, {440, 66, 35, 35, 0, 0, 0}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {52002, 24, 1, 1, 0, 0, 0}, {52003, 166, 26, 26, 0, 0, 0}, {52004, 39, 1, 1, 0, 0, 0}, {52005, 145, 1, 1, 0, 0, 0}, {60010, 208, 33, 33, 0, 0, 0}, {60011, 183, 7, 7, 0, 0, 0}, {60012, 99, 36, 36, 3, 32, 33}, {60013, 129, 24, 24, 3, 20, 21}, {60014, 134, 8, 8, 3, 4, 5}, {60020, 202, 4, 4, 0, 0, 0}, {60040, 156, 245, 245, 0, 0, 0}, {60041, 191, 255, 255, 0, 0, 0}} +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {150, 134, 42, 42, 0, 0, 0}, {151, 219, 8, 8, 3, 6, 7}, {152, 208, 4, 8, 0, 0, 0}, {153, 188, 12, 12, 0, 0, 0}, {154, 84, 15, 15, 3, 6, 7}, {155, 22, 13, 13, 3, 4, 5}, {156, 19, 6, 6, 3, 0, 1}, {157, 21, 15, 15, 3, 12, 13}, {158, 134, 14, 15, 3, 12, 13}, {160, 78, 12, 12, 3, 8, 9}, {161, 68, 3, 3, 3, 0, 1}, {162, 189, 8, 9, 0, 0, 0}, {163, 127, 28, 28, 0, 0, 0}, {164, 154, 44, 44, 0, 0, 0}, {165, 21, 3, 3, 0, 0, 0}, {166, 21, 9, 9, 0, 0, 0}, {167, 144, 22, 22, 0, 0, 0}, {168, 1, 12, 12, 0, 0, 0}, {169, 234, 18, 18, 0, 0, 0}, {170, 73, 34, 34, 0, 0, 0}, {171, 181, 66, 66, 0, 0, 0}, {172, 22, 98, 98, 0, 0, 0}, {173, 83, 8, 8, 0, 0, 0}, {174, 167, 48, 48, 0, 0, 0}, {175, 138, 19, 19, 3, 14, 15}, {176, 234, 3, 3, 3, 0, 1}, {177, 240, 20, 20, 0, 0, 0}, {178, 47, 24, 24, 0, 0, 0}, {179, 189, 29, 29, 1, 26, 0}, {180, 52, 45, 47, 1, 42, 0}, {181, 174, 4, 4, 0, 0, 0}, {182, 229, 40, 40, 0, 0, 0}, {183, 85, 2, 2, 3, 0, 1}, {184, 159, 206, 206, 3, 4, 5}, {185, 186, 7, 7, 3, 4, 5}, {186, 72, 29, 29, 3, 0, 1}, {191, 92, 27, 27, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {193, 71, 22, 26, 0, 0, 0}, {194, 98, 25, 33, 0, 0, 0}, {195, 120, 37, 37, 0, 0, 0}, {200, 134, 42, 42, 3, 40, 41}, {201, 205, 14, 14, 3, 12, 13}, {214, 69, 8, 8, 3, 6, 7}, {215, 101, 3, 3, 0, 0, 0}, {216, 50, 3, 3, 3, 0, 1}, {217, 202, 6, 6, 0, 0, 0}, {218, 17, 7, 7, 3, 0, 1}, {219, 162, 2, 2, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {226, 207, 8, 8, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {10001, 209, 20, 20, 0, 0, 0}, {10002, 186, 41, 41, 0, 0, 0}, {10003, 4, 1, 1, 0, 0, 0}, {10004, 133, 9, 9, 0, 0, 0}, {10005, 103, 9, 9, 0, 0, 0}, {10006, 193, 4, 4, 0, 0, 0}, {10007, 71, 17, 17, 0, 0, 0}, {10008, 240, 14, 14, 0, 0, 0}, {10151, 195, 85, 85, 0, 0, 0}, {11000, 134, 51, 52, 3, 4, 5}, {11001, 15, 135, 136, 0, 0, 0}, {11002, 234, 179, 180, 3, 4, 5}, {11003, 64, 5, 5, 0, 0, 0}, {11004, 11, 232, 232, 3, 8, 9}, {11005, 93, 230, 230, 0, 0, 0}, {11010, 46, 49, 49, 0, 0, 0}, {11011, 106, 44, 44, 0, 0, 0}, {11020, 205, 16, 16, 0, 0, 0}, {11030, 144, 44, 44, 0, 0, 0}, {11031, 133, 44, 44, 0, 0, 0}, {11032, 85, 44, 44, 0, 0, 0}, {11033, 195, 37, 37, 3, 16, 17}, {11034, 79, 5, 5, 0, 0, 0}, {11035, 128, 8, 8, 3, 4, 5}, {11036, 177, 34, 34, 0, 0, 0}, {11037, 130, 28, 28, 0, 0, 0}, {11038, 47, 38, 38, 0, 0, 0}, {11039, 142, 9, 9, 0, 0, 0}, {11040, 132, 44, 44, 0, 0, 0}, {11041, 208, 44, 44, 0, 0, 0}, {11042, 201, 44, 44, 0, 0, 0}, {11043, 193, 44, 44, 0, 0, 0}, {11044, 189, 44, 44, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {42000, 227, 1, 1, 0, 0, 0}, {42001, 239, 46, 46, 0, 0, 0}, {50001, 246, 32, 32, 0, 0, 0}, {50002, 181, 246, 246, 0, 0, 0}, {50003, 62, 19, 19, 0, 0, 0}, {50004, 240, 10, 10, 3, 8, 9}, {50005, 152, 6, 6, 3, 4, 5}, {52000, 13, 100, 100, 0, 0, 0}, {52001, 239, 1, 1, 0, 0, 0}, {60001, 186, 42, 42, 3, 40, 41}, {60002, 69, 32, 32, 3, 30, 31}, {60010, 208, 33, 33, 0, 0, 0}, {60011, 183, 7, 7, 0, 0, 0}, {60012, 99, 36, 36, 3, 32, 33}, {60013, 129, 24, 24, 3, 20, 21}, {60014, 134, 8, 8, 3, 4, 5}, {60015, 78, 22, 22, 3, 0, 1}, {60020, 202, 4, 4, 0, 0, 0}, {60025, 20, 10, 10, 3, 8, 9}, {70000, 238, 195, 195, 3, 40, 41}} #endif #include "../protocol.h" @@ -38,13 +38,17 @@ extern "C" { #define HAVE_ENUM_MAV_STORM32_TUNNEL_PAYLOAD_TYPE typedef enum MAV_STORM32_TUNNEL_PAYLOAD_TYPE { - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH1_IN=200, /* Registered for STorM32 gimbal controller. For communication with gimbal or camera. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH1_OUT=201, /* Registered for STorM32 gimbal controller. For communication with gimbal or camera. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH2_IN=202, /* Registered for STorM32 gimbal controller. For communication with gimbal. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH2_OUT=203, /* Registered for STorM32 gimbal controller. For communication with gimbal. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH3_IN=204, /* Registered for STorM32 gimbal controller. For communication with camera. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH3_OUT=205, /* Registered for STorM32 gimbal controller. For communication with camera. | */ - MAV_STORM32_TUNNEL_PAYLOAD_TYPE_ENUM_END=206, /* | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH1_IN=200, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH1_OUT=201, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH2_IN=202, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH2_OUT=203, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH3_IN=204, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_CH3_OUT=205, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6=206, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7=207, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8=208, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9=209, /* Registered for STorM32 gimbal controller. | */ + MAV_STORM32_TUNNEL_PAYLOAD_TYPE_ENUM_END=210, /* | */ } MAV_STORM32_TUNNEL_PAYLOAD_TYPE; #endif @@ -58,7 +62,7 @@ typedef enum MAV_STORM32_GIMBAL_PREARM_FLAGS MAV_STORM32_GIMBAL_PREARM_FLAGS_MOTORS_WORKING=4, /* The motors are active and working normally. | */ MAV_STORM32_GIMBAL_PREARM_FLAGS_ENCODERS_WORKING=8, /* The encoders are healthy and working normally. | */ MAV_STORM32_GIMBAL_PREARM_FLAGS_VOLTAGE_OK=16, /* A battery voltage is applied and is in range. | */ - MAV_STORM32_GIMBAL_PREARM_FLAGS_VIRTUALCHANNELS_RECEIVING=32, /* Virtual input channels are receiving data. | */ + MAV_STORM32_GIMBAL_PREARM_FLAGS_VIRTUALCHANNELS_RECEIVING=32, /* ???. | */ MAV_STORM32_GIMBAL_PREARM_FLAGS_MAVLINK_RECEIVING=64, /* Mavlink messages are being received. | */ MAV_STORM32_GIMBAL_PREARM_FLAGS_STORM32LINK_QFIX=128, /* The STorM32Link data indicates QFix. | */ MAV_STORM32_GIMBAL_PREARM_FLAGS_STORM32LINK_WORKING=256, /* The STorM32Link is working. | */ @@ -80,17 +84,79 @@ typedef enum MAV_STORM32_CAMERA_PREARM_FLAGS } MAV_STORM32_CAMERA_PREARM_FLAGS; #endif +/** @brief Gimbal device capability flags. */ +#ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS +#define HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS +typedef enum MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS +{ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT=1, /* Gimbal device supports a retracted position. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL=2, /* Gimbal device supports a horizontal, forward looking position, stabilized. Can also be used to reset the gimbal's orientation. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS=4, /* Gimbal device supports rotating around roll axis. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW=8, /* Gimbal device supports to follow a roll angle relative to the vehicle. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK=16, /* Gimbal device supports locking to an roll angle (generally that's the default). | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS=32, /* Gimbal device supports rotating around pitch axis. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW=64, /* Gimbal device supports to follow a pitch angle relative to the vehicle. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK=128, /* Gimbal device supports locking to an pitch angle (generally that's the default). | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS=256, /* Gimbal device supports rotating around yaw axis. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW=512, /* Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default). | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK=1024, /* Gimbal device supports locking to a heading angle. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_INFINITE_YAW=2048, /* Gimbal device supports yawing/panning infinitely (e.g. using a slip ring). | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_ABSOLUTE_YAW=65536, /* Gimbal device supports absolute yaw angles (this usually requires support by an autopilot, and can be dynamic, i.e., go on and off during runtime). | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_HAS_RC=131072, /* Gimbal device supports control via an RC input signal. | */ + MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS_ENUM_END=131073, /* | */ +} MAV_STORM32_GIMBAL_DEVICE_CAP_FLAGS; +#endif + +/** @brief Flags for gimbal device operation. Used for setting and reporting, unless specified otherwise. Settings which are in violation of the capability flags are ignored by the gimbal device. */ +#ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_FLAGS +#define HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_FLAGS +typedef enum MAV_STORM32_GIMBAL_DEVICE_FLAGS +{ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_RETRACT=1, /* Retracted safe position (no stabilization), takes presedence over NEUTRAL flag. If supported by the gimbal, the angles in the retracted position can be set in addition. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_NEUTRAL=2, /* Neutral position (horizontal, forward looking, with stabiliziation). | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_ROLL_LOCK=4, /* Lock roll angle to absolute angle relative to horizon (not relative to drone). This is generally the default. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_PITCH_LOCK=8, /* Lock pitch angle to absolute angle relative to horizon (not relative to drone). This is generally the default. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_YAW_LOCK=16, /* Lock yaw angle to absolute angle relative to earth (not relative to drone). When the YAW_ABSOLUTE flag is set, the quaternion is in the Earth frame with the x-axis pointing North (yaw absolute), else it is in the Earth frame rotated so that the x-axis is pointing forward (yaw relative to vehicle). | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_ABSOLUTE=256, /* Gimbal device can accept absolute yaw angle input. This flag cannot be set, is only for reporting (attempts to set it are rejected by the gimbal device). | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_YAW_ABSOLUTE=512, /* Yaw angle is absolute (is only accepted if CAN_ACCEPT_YAW_ABSOLUTE is set). If this flag is set, the quaternion is in the Earth frame with the x-axis pointing North (yaw absolute), else it is in the Earth frame rotated so that the x-axis is pointing forward (yaw relative to vehicle). | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE=1024, /* RC control. The RC input signal fed to the gimbal device exclusively controls the gimbal's orientation. Overrides RC_MIXED flag if that is also set. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_RC_MIXED=2048, /* RC control. The RC input signal fed to the gimbal device is mixed into the gimbal's orientation. Is overriden by RC_EXCLUSIVE flag if that is also set. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_NONE=65535, /* UINT16_MAX = ignore. | */ + MAV_STORM32_GIMBAL_DEVICE_FLAGS_ENUM_END=65536, /* | */ +} MAV_STORM32_GIMBAL_DEVICE_FLAGS; +#endif + +/** @brief Gimbal device error and condition flags (0 means no error or other condition). */ +#ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS +#define HAVE_ENUM_MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS +typedef enum MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS +{ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT=1, /* Gimbal device is limited by hardware roll limit. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT=2, /* Gimbal device is limited by hardware pitch limit. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT=4, /* Gimbal device is limited by hardware yaw limit. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR=8, /* There is an error with the gimbal device's encoders. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR=16, /* There is an error with the gimbal device's power source. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR=32, /* There is an error with the gimbal device's motors. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR=64, /* There is an error with the gimbal device's software. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR=128, /* There is an error with the gimbal device's communication. | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING=256, /* Gimbal device is currently calibrating (not an error). | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER=32768, /* Gimbal device is not assigned to a gimbal manager (not an error). | */ + MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS_ENUM_END=32769, /* | */ +} MAV_STORM32_GIMBAL_DEVICE_ERROR_FLAGS; +#endif + /** @brief Gimbal manager capability flags. */ #ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS #define HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS typedef enum MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS { MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS_HAS_PROFILES=1, /* The gimbal manager supports several profiles. | */ - MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS_ENUM_END=2, /* | */ + MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_CHANGE=2, /* The gimbal manager supports changing the gimbal manager during run time, i.e. can be enabled/disabled. | */ + MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS_ENUM_END=3, /* | */ } MAV_STORM32_GIMBAL_MANAGER_CAP_FLAGS; #endif -/** @brief Flags for gimbal manager operation. Used for setting and reporting, unless specified otherwise. If a setting has been accepted by the gimbal manager is reported in the STORM32_GIMBAL_MANAGER_STATUS message. */ +/** @brief Flags for gimbal manager operation. Used for setting and reporting, unless specified otherwise. If a setting is accepted by the gimbal manger, is reported in the STORM32_GIMBAL_MANAGER_STATUS message. */ #ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_FLAGS #define HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_FLAGS typedef enum MAV_STORM32_GIMBAL_MANAGER_FLAGS @@ -129,28 +195,51 @@ typedef enum MAV_STORM32_GIMBAL_MANAGER_CLIENT } MAV_STORM32_GIMBAL_MANAGER_CLIENT; #endif -/** @brief Gimbal manager profiles. Only standard profiles are defined. Any implementation can define its own profile(s) in addition, and should use enum values > 16. */ +/** @brief Flags for gimbal manager set up. Used for setting and reporting, unless specified otherwise. */ +#ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS +#define HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS +typedef enum MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS +{ + MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS_ENABLE=16384, /* Enable gimbal manager. This flag is only for setting, is not reported. | */ + MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS_DISABLE=32768, /* Disable gimbal manager. This flag is only for setting, is not reported. | */ + MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS_ENUM_END=32769, /* | */ +} MAV_STORM32_GIMBAL_MANAGER_SETUP_FLAGS; +#endif + +/** @brief Gimbal manager profiles. Only standard profiles are defined. Any implementation can define it's own profile in addition, and should use enum values > 16. */ #ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_PROFILE #define HAVE_ENUM_MAV_STORM32_GIMBAL_MANAGER_PROFILE typedef enum MAV_STORM32_GIMBAL_MANAGER_PROFILE { MAV_STORM32_GIMBAL_MANAGER_PROFILE_DEFAULT=0, /* Default profile. Implementation specific. | */ - MAV_STORM32_GIMBAL_MANAGER_PROFILE_CUSTOM=1, /* Not supported/deprecated. | */ - MAV_STORM32_GIMBAL_MANAGER_PROFILE_COOPERATIVE=2, /* Profile with cooperative behavior. | */ - MAV_STORM32_GIMBAL_MANAGER_PROFILE_EXCLUSIVE=3, /* Profile with exclusive behavior. | */ - MAV_STORM32_GIMBAL_MANAGER_PROFILE_PRIORITY_COOPERATIVE=4, /* Profile with priority and cooperative behavior for equal priority. | */ - MAV_STORM32_GIMBAL_MANAGER_PROFILE_PRIORITY_EXCLUSIVE=5, /* Profile with priority and exclusive behavior for equal priority. | */ + MAV_STORM32_GIMBAL_MANAGER_PROFILE_CUSTOM=1, /* Custom profile. Configurable profile according to the STorM32 definition. Is configured with STORM32_GIMBAL_MANAGER_PROFIL. | */ + MAV_STORM32_GIMBAL_MANAGER_PROFILE_COOPERATIVE=2, /* Default cooperative profile. Uses STorM32 custom profile with default settings to achieve cooperative behavior. | */ + MAV_STORM32_GIMBAL_MANAGER_PROFILE_EXCLUSIVE=3, /* Default exclusive profile. Uses STorM32 custom profile with default settings to achieve exclusive behavior. | */ + MAV_STORM32_GIMBAL_MANAGER_PROFILE_PRIORITY_COOPERATIVE=4, /* Default priority profile with cooperative behavior for equal priority. Uses STorM32 custom profile with default settings to achieve priority-based behavior. | */ + MAV_STORM32_GIMBAL_MANAGER_PROFILE_PRIORITY_EXCLUSIVE=5, /* Default priority profile with exclusive behavior for equal priority. Uses STorM32 custom profile with default settings to achieve priority-based behavior. | */ MAV_STORM32_GIMBAL_MANAGER_PROFILE_ENUM_END=6, /* | */ } MAV_STORM32_GIMBAL_MANAGER_PROFILE; #endif +/** @brief Gimbal actions. */ +#ifndef HAVE_ENUM_MAV_STORM32_GIMBAL_ACTION +#define HAVE_ENUM_MAV_STORM32_GIMBAL_ACTION +typedef enum MAV_STORM32_GIMBAL_ACTION +{ + MAV_STORM32_GIMBAL_ACTION_RECENTER=1, /* Trigger the gimbal device to recenter the gimbal. | */ + MAV_STORM32_GIMBAL_ACTION_CALIBRATION=2, /* Trigger the gimbal device to run a calibration. | */ + MAV_STORM32_GIMBAL_ACTION_DISCOVER_MANAGER=3, /* Trigger gimbal device to (re)discover the gimbal manager during run time. | */ + MAV_STORM32_GIMBAL_ACTION_ENUM_END=4, /* | */ +} MAV_STORM32_GIMBAL_ACTION; +#endif + /** @brief Enumeration of possible shot modes. */ #ifndef HAVE_ENUM_MAV_QSHOT_MODE #define HAVE_ENUM_MAV_QSHOT_MODE typedef enum MAV_QSHOT_MODE { MAV_QSHOT_MODE_UNDEFINED=0, /* Undefined shot mode. Can be used to determine if qshots should be used or not. | */ - MAV_QSHOT_MODE_DEFAULT=1, /* Start normal gimbal operation. Is usually used to return back from a shot. | */ + MAV_QSHOT_MODE_DEFAULT=1, /* Start normal gimbal operation. Is usally used to return back from a shot. | */ MAV_QSHOT_MODE_GIMBAL_RETRACT=2, /* Load and keep safe gimbal position and stop stabilization. | */ MAV_QSHOT_MODE_GIMBAL_NEUTRAL=3, /* Load neutral gimbal position and keep it while stabilizing. | */ MAV_QSHOT_MODE_GIMBAL_MISSION=4, /* Start mission with gimbal control. | */ @@ -163,307 +252,6 @@ typedef enum MAV_QSHOT_MODE } MAV_QSHOT_MODE; #endif -/** @brief Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries */ -#ifndef HAVE_ENUM_MAV_CMD -#define HAVE_ENUM_MAV_CMD -typedef enum MAV_CMD -{ - MAV_CMD_NAV_WAYPOINT=16, /* Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION). |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| 0 to pass through the WP, if > 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_UNLIM=17, /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TURNS=18, /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LOITER_TIME=19, /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_RETURN_TO_LAUNCH=20, /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_LAND=21, /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */ - MAV_CMD_NAV_TAKEOFF=22, /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAND_LOCAL=23, /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */ - MAV_CMD_NAV_TAKEOFF_LOCAL=24, /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */ - MAV_CMD_NAV_FOLLOW=25, /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT=30, /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */ - MAV_CMD_NAV_LOITER_TO_ALT=31, /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_FOLLOW=32, /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */ - MAV_CMD_DO_FOLLOW_REPOSITION=33, /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */ - MAV_CMD_DO_ORBIT=34, /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */ - MAV_CMD_NAV_ROI=80, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */ - MAV_CMD_NAV_PATHPLANNING=81, /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_SPLINE_WAYPOINT=82, /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */ - MAV_CMD_NAV_ALTITUDE_WAIT=83, /* Mission command to wait for an altitude or downwards vertical speed. This is meant for high altitude balloon launches, allowing the aircraft to be idle until either an altitude is reached or a negative vertical speed is reached (indicating early balloon burst). The wiggle time is how often to wiggle the control surfaces to prevent them seizing up. |Altitude.| Descent speed.| How long to wiggle the control surfaces to prevent them seizing up.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_VTOL_TAKEOFF=84, /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_VTOL_LAND=85, /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */ - MAV_CMD_NAV_GUIDED_ENABLE=92, /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_NAV_DELAY=93, /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */ - MAV_CMD_NAV_PAYLOAD_PLACE=94, /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_LAST=95, /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_DELAY=112, /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_CHANGE_ALT=113, /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_CONDITION_DISTANCE=114, /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_YAW=115, /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */ - MAV_CMD_CONDITION_LAST=159, /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MODE=176, /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_JUMP=177, /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_SPEED=178, /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_SET_HOME=179, /* - Sets the home position to either to the current position or a specified position. - The home position is the default position that the system will return to and land on. - The position is set automatically by the system during the takeoff (and may also be set using this command). - Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242). - |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_SET_PARAMETER=180, /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RELAY=181, /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */ - MAV_CMD_DO_FLIGHTTERMINATION=185, /* Terminate flight immediately. - Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. - The vehicle will ignore RC or other input until it has been power-cycled. - Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). - On multicopters without a parachute it may trigger a crash landing. - Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. - Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED. - |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_CHANGE_ALTITUDE=186, /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ACTUATOR=187, /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */ - MAV_CMD_DO_RETURN_PATH_START=188, /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). - A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). - The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. - The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. - If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. - If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. - The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. - If specified, the item defines the waypoint at which the return segment starts. - If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored. - |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */ - MAV_CMD_DO_LAND_START=189, /* Mission command to perform a landing. This is used as a marker in a mission to tell the autopilot where a sequence of mission items that represents a landing starts. - It may also be sent via a COMMAND_LONG to trigger a landing, in which case the nearest (geographically) landing sequence in the mission will be used. - The Latitude/Longitude/Altitude is optional, and may be set to 0 if not needed. If specified then it will be used to help find the closest landing sequence. - |Empty| Empty| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_RALLY_LAND=190, /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GO_AROUND=191, /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_REPOSITION=192, /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */ - MAV_CMD_DO_PAUSE_CONTINUE=193, /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_DO_SET_REVERSE=194, /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_LOCATION=195, /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */ - MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET=196, /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */ - MAV_CMD_DO_SET_ROI_NONE=197, /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI_SYSID=198, /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */ - MAV_CMD_DO_DIGICAM_CONFIGURE=202, /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */ - MAV_CMD_DO_DIGICAM_CONTROL=203, /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */ - MAV_CMD_DO_MOUNT_CONFIGURE=204, /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */ - MAV_CMD_DO_MOUNT_CONTROL=205, /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */ - MAV_CMD_DO_SET_CAM_TRIGG_DIST=206, /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_FENCE_ENABLE=207, /* - Enable the geofence. - This can be used in a mission or via the command protocol. - The persistence/lifetime of the setting is undefined. - Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. - Flight stacks typically reset the setting to system defaults on reboot. - |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. A value of 0 indicates that all fences should be enabled or disabled. This parameter is ignored if param 1 has the value 2| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_PARACHUTE=208, /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_MOTOR_TEST=209, /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */ - MAV_CMD_DO_INVERTED_FLIGHT=210, /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GRIPPER=211, /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_AUTOTUNE_ENABLE=212, /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify which axis are autotuned. 0 indicates autopilot default settings.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_NAV_SET_YAW_SPEED=213, /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL=214, /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_RESUME_REPEAT_DIST=215, /* Set the distance to be repeated on mission resume |Distance.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_SPRAYER=216, /* Control attached liquid sprayer |0: disable sprayer. 1: enable sprayer.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_SEND_SCRIPT_MESSAGE=217, /* Pass instructions onto scripting, a script should be checking for a new command |uint16 ID value to be passed to scripting| float value to be passed to scripting| float value to be passed to scripting| float value to be passed to scripting| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_AUX_FUNCTION=218, /* Execute auxiliary function |Auxiliary Function.| Switch Level.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_MOUNT_CONTROL_QUAT=220, /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_MASTER=221, /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_GUIDED_LIMITS=222, /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */ - MAV_CMD_DO_ENGINE_CONTROL=223, /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_SET_MISSION_CURRENT=224, /* - Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). - If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. - Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). - - This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. - If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. - If the system is not in mission mode this command must not trigger a switch to mission mode. - - The mission may be "reset" using param2. - Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). - Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. - - The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item). - |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */ - MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS=242, /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */ - MAV_CMD_PREFLIGHT_UAVCAN=243, /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */ - MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN=246, /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Reserved (set to 0)| WIP: ID (e.g. camera ID -1 for all IDs)| */ - MAV_CMD_OVERRIDE_GOTO=252, /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */ - MAV_CMD_OBLIQUE_SURVEY=260, /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */ - MAV_CMD_MISSION_START=300, /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ACTUATOR_TEST=310, /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots typically refuse this command while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CONFIGURE_ACTUATOR=311, /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_COMPONENT_ARM_DISARM=400, /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RUN_PREARM_CHECKS=401, /* Instructs a target system to run pre-arm checks. - This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. - This command should return MAV_RESULT_ACCEPTED if it will run the checks. - The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). - The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ILLUMINATOR_ON_OFF=405, /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_ILLUMINATOR_CONFIGURE=406, /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_HOME_POSITION=410, /* Request the home position from the vehicle. - The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_INJECT_FAILURE=420, /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_START_RX_PAIR=500, /* Starts receiver pairing. |0:Spektrum.| RC type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_GET_MESSAGE_INTERVAL=510, /* - Request the interval between messages for a particular MAVLink message ID. - The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message. - |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_MESSAGE_INTERVAL=511, /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_MESSAGE=512, /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */ - MAV_CMD_REQUEST_PROTOCOL_VERSION=519, /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES=520, /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_INFORMATION=521, /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_SETTINGS=522, /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_STORAGE_INFORMATION=525, /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_STORAGE_FORMAT=526, /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS=527, /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_FLIGHT_INFORMATION=528, /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_RESET_CAMERA_SETTINGS=529, /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_MODE=530, /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_ZOOM=531, /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_CAMERA_FOCUS=532, /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_SET_STORAGE_USAGE=533, /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). - There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. - If no flag is set the system should use its default storage. - A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. - A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_CAMERA_SOURCE=534, /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_JUMP_TAG=600, /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_JUMP_TAG=601, /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW=1000, /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE=1001, /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */ - MAV_CMD_IMAGE_START_CAPTURE=2000, /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_IMAGE_STOP_CAPTURE=2001, /* Stop image capture sequence. - - Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. - It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). - It is also needed to specify the target camera in missions. - - When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). - If the param1 is 0 the autopilot should do both. - - When sent in a command the target MAVLink address is set using target_component. - If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). - If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. - If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels. - |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras that don't have a distinct component id (such as autopilot-attached cameras). 0: all cameras. This is used to specifically target autopilot-connected cameras or individual sensors in a multi-sensor MAVLink camera. It is also used to target specific cameras when the MAV_CMD is used in a mission| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE=2002, /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_DO_TRIGGER_CONTROL=2003, /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_POINT=2004, /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_TRACK_RECTANGLE=2005, /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_CAMERA_STOP_TRACKING=2010, /* Stops ongoing tracking. |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_START_CAPTURE=2500, /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_STOP_CAPTURE=2501, /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_VIDEO_START_STREAMING=2502, /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_VIDEO_STOP_STREAMING=2503, /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION=2504, /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_REQUEST_VIDEO_STREAM_STATUS=2505, /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_LOGGING_START=2510, /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_LOGGING_STOP=2511, /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_AIRFRAME_CONFIGURATION=2520, /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */ - MAV_CMD_CONTROL_HIGH_LATENCY=2600, /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */ - MAV_CMD_PANORAMA_CREATE=2800, /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DO_VTOL_TRANSITION=3000, /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ARM_AUTHORIZATION_REQUEST=3001, /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. - If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. - If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON. - |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_STANDARD=4000, /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes. - |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE=4001, /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position. - |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */ - MAV_CMD_CONDITION_GATE=4501, /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_RETURN_POINT=5000, /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION=5001, /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. - |Polygon vertex count| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION=5002, /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. - |Polygon vertex count| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION=5003, /* Circular fence area. The vehicle must stay inside this area. - |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION=5004, /* Circular fence area. The vehicle must stay outside this area. - |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */ - MAV_CMD_NAV_RALLY_POINT=5100, /* Rally point. You can have multiple rally points defined. - |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */ - MAV_CMD_UAVCAN_GET_NODE_INFO=5200, /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_DO_SET_SAFETY_SWITCH_STATE=5300, /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_ADSB_OUT_IDENT=10001, /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */ - MAV_CMD_PAYLOAD_PREPARE_DEPLOY=30001, /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */ - MAV_CMD_PAYLOAD_CONTROL_DEPLOY=30002, /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */ - MAV_CMD_WAYPOINT_USER_1=31000, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_2=31001, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_3=31002, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_4=31003, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_WAYPOINT_USER_5=31004, /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_1=31005, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_2=31006, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_3=31007, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_4=31008, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_SPATIAL_USER_5=31009, /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */ - MAV_CMD_USER_1=31010, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_2=31011, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_3=31012, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_4=31013, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_USER_5=31014, /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */ - MAV_CMD_CAN_FORWARD=32000, /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_POWER_OFF_INITIATED=42000, /* A system wide power-off event has been initiated. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_SOLO_BTN_FLY_CLICK=42001, /* FLY button has been clicked. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_SOLO_BTN_FLY_HOLD=42002, /* FLY button has been held for 1.5 seconds. |Takeoff altitude.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_SOLO_BTN_PAUSE_CLICK=42003, /* PAUSE button has been clicked. |1 if Solo is in a shot mode, 0 otherwise.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL=42004, /* Magnetometer calibration based on fixed position - in earth field given by inclination, declination and intensity. |Magnetic declination.| Magnetic inclination.| Magnetic intensity.| Yaw.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL_FIELD=42005, /* Magnetometer calibration based on fixed expected field values. |Field strength X.| Field strength Y.| Field strength Z.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_FIXED_MAG_CAL_YAW=42006, /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */ - MAV_CMD_SET_EKF_SOURCE_SET=42007, /* Set EKF sensor source set. |Source Set Id.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_START_MAG_CAL=42424, /* Initiate a magnetometer calibration. |Bitmask of magnetometers to calibrate. Use 0 to calibrate all sensors that can be started (sensors may not start if disabled, unhealthy, etc.). The command will NACK if calibration does not start for a sensor explicitly specified by the bitmask.| Automatically retry on failure (0=no retry, 1=retry).| Save without user input (0=require input, 1=autosave).| Delay.| Autoreboot (0=user reboot, 1=autoreboot).| Empty.| Empty.| */ - MAV_CMD_DO_ACCEPT_MAG_CAL=42425, /* Accept a magnetometer calibration. |Bitmask of magnetometers that calibration is accepted (0 means all).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_CANCEL_MAG_CAL=42426, /* Cancel a running magnetometer calibration. |Bitmask of magnetometers to cancel a running calibration (0 means all).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_SET_FACTORY_TEST_MODE=42427, /* Command autopilot to get into factory test/diagnostic mode. |0: activate test mode, 1: exit test mode.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_DO_SEND_BANNER=42428, /* Reply with the version banner. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_ACCELCAL_VEHICLE_POS=42429, /* Used when doing accelerometer calibration. When sent to the GCS tells it what position to put the vehicle in. When sent to the vehicle says what position the vehicle is in. |Position.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_GIMBAL_RESET=42501, /* Causes the gimbal to reset and boot as if it was just powered on. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS=42502, /* Reports progress and success or failure of gimbal axis calibration procedure. |Gimbal axis we're reporting calibration progress for.| Current calibration progress for this axis.| Status of the calibration.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION=42503, /* Starts commutation calibration on the gimbal. |Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_GIMBAL_FULL_RESET=42505, /* Erases gimbal application and parameters. |Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| Magic number.| */ - MAV_CMD_DO_WINCH=42600, /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */ - MAV_CMD_FLASH_BOOTLOADER=42650, /* Update the bootloader |Empty| Empty| Empty| Empty| Magic number - set to 290876 to actually flash| Empty| Empty| */ - MAV_CMD_BATTERY_RESET=42651, /* Reset battery capacity for batteries that accumulate consumed battery via integration. |Bitmask of batteries to reset. Least significant bit is for the first battery.| Battery percentage remaining to set.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_DEBUG_TRAP=42700, /* Issue a trap signal to the autopilot process, presumably to enter the debugger. |Magic number - set to 32451 to actually trap.| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */ - MAV_CMD_SCRIPTING=42701, /* Control onboard scripting. |Scripting command to execute| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_NAV_SCRIPT_TIME=42702, /* Scripting command as NAV command with wait for completion. |integer command number (0 to 255)| timeout for operation in seconds. Zero means no timeout (0 to 255)| argument1.| argument2.| Empty| Empty| Empty| */ - MAV_CMD_NAV_ATTITUDE_TIME=42703, /* Maintain an attitude for a specified time. |Time to maintain specified attitude and climb rate| Roll angle in degrees (positive is lean right, negative is lean left)| Pitch angle in degrees (positive is lean back, negative is lean forward)| Yaw angle| Climb rate| Empty| Empty| */ - MAV_CMD_GUIDED_CHANGE_SPEED=43000, /* Change flight speed at a given rate. This slews the vehicle at a controllable rate between it's previous speed and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |Airspeed or groundspeed.| Target Speed| Acceleration rate, 0 to take effect instantly| Empty| Empty| Empty| Empty| */ - MAV_CMD_GUIDED_CHANGE_ALTITUDE=43001, /* Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |Empty| Empty| Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt.| Empty| Empty| Empty| Target Altitude| */ - MAV_CMD_GUIDED_CHANGE_HEADING=43002, /* Change to target heading at a given rate, overriding previous heading/s. This slews the vehicle at a controllable rate between it's previous heading and the new one. (affects GUIDED only. Exiting GUIDED returns aircraft to normal behaviour defined elsewhere. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) |course-over-ground or raw vehicle heading.| Target heading.| Maximum centripetal accelearation, ie rate of change, toward new heading.| Empty| Empty| Empty| Empty| */ - MAV_CMD_EXTERNAL_POSITION_ESTIMATE=43003, /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */ - MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW=60002, /* Command to a gimbal manager to control the gimbal tilt and pan angles. It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. A gimbal device is never to react to this command. |Pitch/tilt angle (positive: tilt up). NaN to be ignored.| Yaw/pan angle (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.| Pitch/tilt rate (positive: tilt up). NaN to be ignored.| Yaw/pan rate (positive: pan to the right). NaN to be ignored. The frame is determined by the GIMBAL_DEVICE_FLAGS_YAW_IN_xxx_FRAME flags.| Gimbal device flags to be applied.| Gimbal manager flags to be applied.| Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals. The client is copied into bits 8-15.| */ - MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP=60010, /* Command to configure a gimbal manager. A gimbal device is never to react to this command. The selected profile is reported in the STORM32_GIMBAL_MANAGER_STATUS message. |Gimbal manager profile (0 = default).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Gimbal ID of the gimbal manager to address (component ID or 1-6 for non-MAVLink gimbal, 0 for all gimbals). Send command multiple times for more than one but not all gimbals.| */ - MAV_CMD_QSHOT_DO_CONFIGURE=60020, /* Command to set the shot manager mode. |Set shot mode.| Set shot state or command. The allowed values are specific to the selected shot mode.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */ - MAV_CMD_ENUM_END=60021, /* | */ -} MAV_CMD; -#endif - // MAVLINK VERSION #ifndef MAVLINK_VERSION @@ -476,22 +264,24 @@ typedef enum MAV_CMD #endif // MESSAGE DEFINITIONS +#include "./mavlink_msg_storm32_gimbal_device_status.h" +#include "./mavlink_msg_storm32_gimbal_device_control.h" #include "./mavlink_msg_storm32_gimbal_manager_information.h" #include "./mavlink_msg_storm32_gimbal_manager_status.h" #include "./mavlink_msg_storm32_gimbal_manager_control.h" #include "./mavlink_msg_storm32_gimbal_manager_control_pitchyaw.h" #include "./mavlink_msg_storm32_gimbal_manager_correct_roll.h" +#include "./mavlink_msg_storm32_gimbal_manager_profile.h" #include "./mavlink_msg_qshot_status.h" -#include "./mavlink_msg_frsky_passthrough_array.h" -#include "./mavlink_msg_param_value_array.h" +#include "./mavlink_msg_component_prearm_status.h" // base include #include "../ardupilotmega/ardupilotmega.h" #if MAVLINK_STORM32_XML_HASH == MAVLINK_PRIMARY_XML_HASH -# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_LINK_NODE_STATUS, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_COMMAND_CANCEL, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_ESC_INFO, MAVLINK_MESSAGE_INFO_ESC_STATUS, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_WAYPOINTS, MAVLINK_MESSAGE_INFO_TRAJECTORY_REPRESENTATION_BEZIER, MAVLINK_MESSAGE_INFO_CELLULAR_STATUS, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_ORBIT_EXECUTION_STATUS, MAVLINK_MESSAGE_INFO_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_TIME_ESTIMATE_TO_TARGET, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_ONBOARD_COMPUTER_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION, MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC, MAVLINK_MESSAGE_INFO_COMPONENT_METADATA, MAVLINK_MESSAGE_INFO_PLAY_TUNE_V2, MAVLINK_MESSAGE_INFO_SUPPORTED_TUNES, MAVLINK_MESSAGE_INFO_EVENT, MAVLINK_MESSAGE_INFO_CURRENT_EVENT_SEQUENCE, MAVLINK_MESSAGE_INFO_REQUEST_EVENT, MAVLINK_MESSAGE_INFO_RESPONSE_EVENT_ERROR, MAVLINK_MESSAGE_INFO_ILLUMINATOR_STATUS, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_REQUEST, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_HP, MAVLINK_MESSAGE_INFO_AIRLINK_EYE_TURN_INIT, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CORRECT_ROLL, MAVLINK_MESSAGE_INFO_QSHOT_STATUS, MAVLINK_MESSAGE_INFO_FRSKY_PASSTHROUGH_ARRAY, MAVLINK_MESSAGE_INFO_PARAM_VALUE_ARRAY} -# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRLINK_EYE_GS_HOLE_PUSH_REQUEST", 52002 }, { "AIRLINK_EYE_GS_HOLE_PUSH_RESPONSE", 52003 }, { "AIRLINK_EYE_HP", 52004 }, { "AIRLINK_EYE_TURN_INIT", 52005 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "BATTERY2", 181 }, { "BATTERY_INFO", 370 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CELLULAR_CONFIG", 336 }, { "CELLULAR_STATUS", 334 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_CANCEL", 80 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPASSMOT_STATUS", 177 }, { "COMPONENT_INFORMATION", 395 }, { "COMPONENT_INFORMATION_BASIC", 396 }, { "COMPONENT_METADATA", 397 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "CURRENT_EVENT_SEQUENCE", 411 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_INFO", 290 }, { "ESC_STATUS", 291 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EVENT", 410 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "FRSKY_PASSTHROUGH_ARRAY", 60040 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ILLUMINATOR_STATUS", 440 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LINK_NODE_STATUS", 8 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "ONBOARD_COMPUTER_STATUS", 390 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "ORBIT_EXECUTION_STATUS", 360 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PARAM_VALUE_ARRAY", 60041 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "PLAY_TUNE_V2", 400 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "PROTOCOL_VERSION", 300 }, { "QSHOT_STATUS", 60020 }, { "RADIO", 166 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "REQUEST_EVENT", 412 }, { "RESOURCE_REQUEST", 142 }, { "RESPONSE_EVENT_ERROR", 413 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SENSOR_OFFSETS", 150 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "STORM32_GIMBAL_MANAGER_CONTROL", 60012 }, { "STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW", 60013 }, { "STORM32_GIMBAL_MANAGER_CORRECT_ROLL", 60014 }, { "STORM32_GIMBAL_MANAGER_INFORMATION", 60010 }, { "STORM32_GIMBAL_MANAGER_STATUS", 60011 }, { "SUPPORTED_TUNES", 401 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TIME_ESTIMATE_TO_TARGET", 380 }, { "TRAJECTORY_REPRESENTATION_BEZIER", 333 }, { "TRAJECTORY_REPRESENTATION_WAYPOINTS", 332 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS, MAVLINK_MESSAGE_INFO_SET_MAG_OFFSETS, MAVLINK_MESSAGE_INFO_MEMINFO, MAVLINK_MESSAGE_INFO_AP_ADC, MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE, MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE, MAVLINK_MESSAGE_INFO_MOUNT_CONTROL, MAVLINK_MESSAGE_INFO_MOUNT_STATUS, MAVLINK_MESSAGE_INFO_FENCE_POINT, MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_AHRS, MAVLINK_MESSAGE_INFO_SIMSTATE, MAVLINK_MESSAGE_INFO_HWSTATUS, MAVLINK_MESSAGE_INFO_RADIO, MAVLINK_MESSAGE_INFO_LIMITS_STATUS, MAVLINK_MESSAGE_INFO_WIND, MAVLINK_MESSAGE_INFO_DATA16, MAVLINK_MESSAGE_INFO_DATA32, MAVLINK_MESSAGE_INFO_DATA64, MAVLINK_MESSAGE_INFO_DATA96, MAVLINK_MESSAGE_INFO_RANGEFINDER, MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL, MAVLINK_MESSAGE_INFO_RALLY_POINT, MAVLINK_MESSAGE_INFO_RALLY_FETCH_POINT, MAVLINK_MESSAGE_INFO_COMPASSMOT_STATUS, MAVLINK_MESSAGE_INFO_AHRS2, MAVLINK_MESSAGE_INFO_CAMERA_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK, MAVLINK_MESSAGE_INFO_BATTERY2, MAVLINK_MESSAGE_INFO_AHRS3, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST, MAVLINK_MESSAGE_INFO_REMOTE_LOG_DATA_BLOCK, MAVLINK_MESSAGE_INFO_REMOTE_LOG_BLOCK_STATUS, MAVLINK_MESSAGE_INFO_LED_CONTROL, MAVLINK_MESSAGE_INFO_MAG_CAL_PROGRESS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EKF_STATUS_REPORT, MAVLINK_MESSAGE_INFO_PID_TUNING, MAVLINK_MESSAGE_INFO_DEEPSTALL, MAVLINK_MESSAGE_INFO_GIMBAL_REPORT, MAVLINK_MESSAGE_INFO_GIMBAL_CONTROL, MAVLINK_MESSAGE_INFO_GIMBAL_TORQUE_CMD_REPORT, MAVLINK_MESSAGE_INFO_GOPRO_HEARTBEAT, MAVLINK_MESSAGE_INFO_GOPRO_GET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_GET_RESPONSE, MAVLINK_MESSAGE_INFO_GOPRO_SET_REQUEST, MAVLINK_MESSAGE_INFO_GOPRO_SET_RESPONSE, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_RPM, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_DYNAMIC, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_GET, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CONTROL, MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_STATUS, MAVLINK_MESSAGE_INFO_LOWEHEISER_GOV_EFI, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ, MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE, MAVLINK_MESSAGE_INFO_DEVICE_OP_WRITE_REPLY, MAVLINK_MESSAGE_INFO_SECURE_COMMAND, MAVLINK_MESSAGE_INFO_SECURE_COMMAND_REPLY, MAVLINK_MESSAGE_INFO_ADAP_TUNING, MAVLINK_MESSAGE_INFO_VISION_POSITION_DELTA, MAVLINK_MESSAGE_INFO_AOA_SSA, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_1_TO_4, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_5_TO_8, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_9_TO_12, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG, MAVLINK_MESSAGE_INFO_OSD_PARAM_SHOW_CONFIG_REPLY, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE_3D, MAVLINK_MESSAGE_INFO_WATER_DEPTH, MAVLINK_MESSAGE_INFO_MCU_STATUS, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_13_TO_16, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_17_TO_20, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_21_TO_24, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_25_TO_28, MAVLINK_MESSAGE_INFO_ESC_TELEMETRY_29_TO_32, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_ICAROUS_HEARTBEAT, MAVLINK_MESSAGE_INFO_ICAROUS_KINEMATIC_BANDS, MAVLINK_MESSAGE_INFO_CUBEPILOT_RAW_RC, MAVLINK_MESSAGE_INFO_HERELINK_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_HERELINK_TELEM, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_START, MAVLINK_MESSAGE_INFO_CUBEPILOT_FIRMWARE_UPDATE_RESP, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH, MAVLINK_MESSAGE_INFO_AIRLINK_AUTH_RESPONSE, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_DEVICE_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_CORRECT_ROLL, MAVLINK_MESSAGE_INFO_STORM32_GIMBAL_MANAGER_PROFILE, MAVLINK_MESSAGE_INFO_QSHOT_STATUS, MAVLINK_MESSAGE_INFO_COMPONENT_PREARM_STATUS, MAVLINK_MESSAGE_INFO_SUIND_MISSION_DATA} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADAP_TUNING", 11010 }, { "ADSB_VEHICLE", 246 }, { "AHRS", 163 }, { "AHRS2", 178 }, { "AHRS3", 182 }, { "AIRLINK_AUTH", 52000 }, { "AIRLINK_AUTH_RESPONSE", 52001 }, { "AIRSPEED_AUTOCAL", 174 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "AOA_SSA", 11020 }, { "AP_ADC", 153 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "AUTOPILOT_VERSION_REQUEST", 183 }, { "BATTERY2", 181 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FEEDBACK", 180 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_STATUS", 179 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "COMPASSMOT_STATUS", 177 }, { "COMPONENT_PREARM_STATUS", 60025 }, { "CONTROL_SYSTEM_STATE", 146 }, { "CUBEPILOT_FIRMWARE_UPDATE_RESP", 50005 }, { "CUBEPILOT_FIRMWARE_UPDATE_START", 50004 }, { "CUBEPILOT_RAW_RC", 50001 }, { "DATA16", 169 }, { "DATA32", 170 }, { "DATA64", 171 }, { "DATA96", 172 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DEEPSTALL", 195 }, { "DEVICE_OP_READ", 11000 }, { "DEVICE_OP_READ_REPLY", 11001 }, { "DEVICE_OP_WRITE", 11002 }, { "DEVICE_OP_WRITE_REPLY", 11003 }, { "DIGICAM_CONFIGURE", 154 }, { "DIGICAM_CONTROL", 155 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "EKF_STATUS_REPORT", 193 }, { "ENCAPSULATED_DATA", 131 }, { "ESC_TELEMETRY_13_TO_16", 11040 }, { "ESC_TELEMETRY_17_TO_20", 11041 }, { "ESC_TELEMETRY_1_TO_4", 11030 }, { "ESC_TELEMETRY_21_TO_24", 11042 }, { "ESC_TELEMETRY_25_TO_28", 11043 }, { "ESC_TELEMETRY_29_TO_32", 11044 }, { "ESC_TELEMETRY_5_TO_8", 11031 }, { "ESC_TELEMETRY_9_TO_12", 11032 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_FETCH_POINT", 161 }, { "FENCE_POINT", 160 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_CONTROL", 201 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GIMBAL_REPORT", 200 }, { "GIMBAL_TORQUE_CMD_REPORT", 214 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GOPRO_GET_REQUEST", 216 }, { "GOPRO_GET_RESPONSE", 217 }, { "GOPRO_HEARTBEAT", 215 }, { "GOPRO_SET_REQUEST", 218 }, { "GOPRO_SET_RESPONSE", 219 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HERELINK_TELEM", 50003 }, { "HERELINK_VIDEO_STREAM_INFORMATION", 50002 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HWSTATUS", 165 }, { "HYGROMETER_SENSOR", 12920 }, { "ICAROUS_HEARTBEAT", 42000 }, { "ICAROUS_KINEMATIC_BANDS", 42001 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LED_CONTROL", 186 }, { "LIMITS_STATUS", 167 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "LOWEHEISER_GOV_EFI", 10151 }, { "MAG_CAL_PROGRESS", 191 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MCU_STATUS", 11039 }, { "MEMINFO", 152 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_CONFIGURE", 156 }, { "MOUNT_CONTROL", 157 }, { "MOUNT_ORIENTATION", 265 }, { "MOUNT_STATUS", 158 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "OBSTACLE_DISTANCE_3D", 11037 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "OSD_PARAM_CONFIG", 11033 }, { "OSD_PARAM_CONFIG_REPLY", 11034 }, { "OSD_PARAM_SHOW_CONFIG", 11035 }, { "OSD_PARAM_SHOW_CONFIG_REPLY", 11036 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PID_TUNING", 194 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "QSHOT_STATUS", 60020 }, { "RADIO", 166 }, { "RADIO_STATUS", 109 }, { "RALLY_FETCH_POINT", 176 }, { "RALLY_POINT", 175 }, { "RANGEFINDER", 173 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REMOTE_LOG_BLOCK_STATUS", 185 }, { "REMOTE_LOG_DATA_BLOCK", 184 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "RPM", 226 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SECURE_COMMAND", 11004 }, { "SECURE_COMMAND_REPLY", 11005 }, { "SENSOR_OFFSETS", 150 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MAG_OFFSETS", 151 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIMSTATE", 164 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "STORM32_GIMBAL_DEVICE_CONTROL", 60002 }, { "STORM32_GIMBAL_DEVICE_STATUS", 60001 }, { "STORM32_GIMBAL_MANAGER_CONTROL", 60012 }, { "STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW", 60013 }, { "STORM32_GIMBAL_MANAGER_CORRECT_ROLL", 60014 }, { "STORM32_GIMBAL_MANAGER_INFORMATION", 60010 }, { "STORM32_GIMBAL_MANAGER_PROFILE", 60015 }, { "STORM32_GIMBAL_MANAGER_STATUS", 60011 }, { "SUIND_MISSION_DATA", 70000 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UAVIONIX_ADSB_GET", 10006 }, { "UAVIONIX_ADSB_OUT_CFG", 10001 }, { "UAVIONIX_ADSB_OUT_CFG_FLIGHTID", 10005 }, { "UAVIONIX_ADSB_OUT_CFG_REGISTRATION", 10004 }, { "UAVIONIX_ADSB_OUT_CONTROL", 10007 }, { "UAVIONIX_ADSB_OUT_DYNAMIC", 10002 }, { "UAVIONIX_ADSB_OUT_STATUS", 10008 }, { "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT", 10003 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_DELTA", 11011 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WATER_DEPTH", 11038 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND", 168 }, { "WIND_COV", 231 }} # if MAVLINK_COMMAND_24BIT # include "../mavlink_get_info.h" # endif diff --git a/storm32/testsuite.h b/storm32/testsuite.h index 91b5827b1..c18bba264 100644 --- a/storm32/testsuite.h +++ b/storm32/testsuite.h @@ -25,6 +25,139 @@ static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_me #include "../ardupilotmega/testsuite.h" +static void mavlink_test_storm32_gimbal_device_status(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_storm32_gimbal_device_status_t packet_in = { + 963497464,{ 45.0, 46.0, 47.0, 48.0 },157.0,185.0,213.0,241.0,19107,19211,125,192 + }; + mavlink_storm32_gimbal_device_status_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.time_boot_ms = packet_in.time_boot_ms; + packet1.angular_velocity_x = packet_in.angular_velocity_x; + packet1.angular_velocity_y = packet_in.angular_velocity_y; + packet1.angular_velocity_z = packet_in.angular_velocity_z; + packet1.yaw_absolute = packet_in.yaw_absolute; + packet1.flags = packet_in.flags; + packet1.failure_flags = packet_in.failure_flags; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + + mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_storm32_gimbal_device_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_status_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.time_boot_ms , packet1.flags , packet1.q , packet1.angular_velocity_x , packet1.angular_velocity_y , packet1.angular_velocity_z , packet1.yaw_absolute , packet1.failure_flags ); + mavlink_msg_storm32_gimbal_device_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.time_boot_ms , packet1.flags , packet1.q , packet1.angular_velocity_x , packet1.angular_velocity_y , packet1.angular_velocity_z , packet1.yaw_absolute , packet1.failure_flags ); + mavlink_msg_storm32_gimbal_device_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_storm32_gimbal_device_control_t packet_in = { + { 17.0, 18.0, 19.0, 20.0 },129.0,157.0,185.0,18691,223,34 + }; + mavlink_storm32_gimbal_device_control_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.angular_velocity_x = packet_in.angular_velocity_x; + packet1.angular_velocity_y = packet_in.angular_velocity_y; + packet1.angular_velocity_z = packet_in.angular_velocity_z; + packet1.flags = packet_in.flags; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + + mav_array_memcpy(packet1.q, packet_in.q, sizeof(float)*4); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_control_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_storm32_gimbal_device_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_control_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.flags , packet1.q , packet1.angular_velocity_x , packet1.angular_velocity_y , packet1.angular_velocity_z ); + mavlink_msg_storm32_gimbal_device_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_storm32_gimbal_device_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.flags , packet1.q , packet1.angular_velocity_x , packet1.angular_velocity_y , packet1.angular_velocity_z ); + mavlink_msg_storm32_gimbal_device_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_QSHOT_STATUS >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_qshot_status_t packet_in = { - 17235,17339 + mavlink_storm32_gimbal_manager_profile_t packet_in = { + 5,72,139,206,{ 17, 18, 19, 20, 21, 22, 23, 24 },41,108,{ 175, 176, 177, 178, 179, 180, 181, 182 } }; - mavlink_qshot_status_t packet1, packet2; + mavlink_storm32_gimbal_manager_profile_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.mode = packet_in.mode; - packet1.shot_state = packet_in.shot_state; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + packet1.gimbal_id = packet_in.gimbal_id; + packet1.profile = packet_in.profile; + packet1.profile_flags = packet_in.profile_flags; + packet1.rc_timeout = packet_in.rc_timeout; + mav_array_memcpy(packet1.priorities, packet_in.priorities, sizeof(uint8_t)*8); + mav_array_memcpy(packet1.timeouts, packet_in.timeouts, sizeof(uint8_t)*8); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_QSHOT_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_QSHOT_STATUS_MIN_LEN); + memset(MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_qshot_status_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_qshot_status_decode(&msg, &packet2); + mavlink_msg_storm32_gimbal_manager_profile_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_storm32_gimbal_manager_profile_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_qshot_status_pack(system_id, component_id, &msg , packet1.mode , packet1.shot_state ); - mavlink_msg_qshot_status_decode(&msg, &packet2); + mavlink_msg_storm32_gimbal_manager_profile_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.gimbal_id , packet1.profile , packet1.priorities , packet1.profile_flags , packet1.rc_timeout , packet1.timeouts ); + mavlink_msg_storm32_gimbal_manager_profile_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_qshot_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.mode , packet1.shot_state ); - mavlink_msg_qshot_status_decode(&msg, &packet2); + mavlink_msg_storm32_gimbal_manager_profile_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.gimbal_id , packet1.profile , packet1.priorities , packet1.profile_flags , packet1.rc_timeout , packet1.timeouts ); + mavlink_msg_storm32_gimbal_manager_profile_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -400,60 +539,59 @@ static void mavlink_test_qshot_status(uint8_t system_id, uint8_t component_id, m for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_QSHOT_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_frsky_passthrough_array_t packet_in = { - 963497464,17,{ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67 } + mavlink_qshot_status_t packet_in = { + 17235,17339 }; - mavlink_frsky_passthrough_array_t packet1, packet2; + mavlink_qshot_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.time_boot_ms = packet_in.time_boot_ms; - packet1.count = packet_in.count; + packet1.mode = packet_in.mode; + packet1.shot_state = packet_in.shot_state; - mav_array_memcpy(packet1.packet_buf, packet_in.packet_buf, sizeof(uint8_t)*240); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_FRSKY_PASSTHROUGH_ARRAY_MIN_LEN); + memset(MAVLINK_MSG_ID_QSHOT_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_QSHOT_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_frsky_passthrough_array_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_frsky_passthrough_array_decode(&msg, &packet2); + mavlink_msg_qshot_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_qshot_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_frsky_passthrough_array_pack(system_id, component_id, &msg , packet1.time_boot_ms , packet1.count , packet1.packet_buf ); - mavlink_msg_frsky_passthrough_array_decode(&msg, &packet2); + mavlink_msg_qshot_status_pack(system_id, component_id, &msg , packet1.mode , packet1.shot_state ); + mavlink_msg_qshot_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_frsky_passthrough_array_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.time_boot_ms , packet1.count , packet1.packet_buf ); - mavlink_msg_frsky_passthrough_array_decode(&msg, &packet2); + mavlink_msg_qshot_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.mode , packet1.shot_state ); + mavlink_msg_qshot_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -461,62 +599,61 @@ static void mavlink_test_frsky_passthrough_array(uint8_t system_id, uint8_t comp for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_PARAM_VALUE_ARRAY >= 256) { + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS >= 256) { return; } #endif mavlink_message_t msg; uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; uint16_t i; - mavlink_param_value_array_t packet_in = { - 17235,17339,17443,151,{ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209 } + mavlink_component_prearm_status_t packet_in = { + 963497464,963497672,29,96 }; - mavlink_param_value_array_t packet1, packet2; + mavlink_component_prearm_status_t packet1, packet2; memset(&packet1, 0, sizeof(packet1)); - packet1.param_count = packet_in.param_count; - packet1.param_index_first = packet_in.param_index_first; - packet1.flags = packet_in.flags; - packet1.param_array_len = packet_in.param_array_len; + packet1.enabled_flags = packet_in.enabled_flags; + packet1.fail_flags = packet_in.fail_flags; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; - mav_array_memcpy(packet1.packet_buf, packet_in.packet_buf, sizeof(uint8_t)*248); #ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { // cope with extensions - memset(MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_PARAM_VALUE_ARRAY_MIN_LEN); + memset(MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_COMPONENT_PREARM_STATUS_MIN_LEN); } #endif memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_value_array_encode(system_id, component_id, &msg, &packet1); - mavlink_msg_param_value_array_decode(&msg, &packet2); + mavlink_msg_component_prearm_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_component_prearm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_value_array_pack(system_id, component_id, &msg , packet1.param_count , packet1.param_index_first , packet1.param_array_len , packet1.flags , packet1.packet_buf ); - mavlink_msg_param_value_array_decode(&msg, &packet2); + mavlink_msg_component_prearm_status_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.enabled_flags , packet1.fail_flags ); + mavlink_msg_component_prearm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); - mavlink_msg_param_value_array_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.param_count , packet1.param_index_first , packet1.param_array_len , packet1.flags , packet1.packet_buf ); - mavlink_msg_param_value_array_decode(&msg, &packet2); + mavlink_msg_component_prearm_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.enabled_flags , packet1.fail_flags ); + mavlink_msg_component_prearm_status_decode(&msg, &packet2); MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); memset(&packet2, 0, sizeof(packet2)); @@ -524,30 +661,32 @@ static void mavlink_test_param_value_array(uint8_t system_id, uint8_t component_ for (i=0; imsgid = MAVLINK_MSG_ID_SUIND_MISSION_DATA; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +} + +/** + * @brief Pack a suind_mission_data message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param target_system System ID. + * @param target_component Component ID. + * @param mission_id Mission ID. + * @param signature Signature. + * @param serial_number Serial No. + * @param mission_duration [seconds] Mission Duration. + * @param spray_volume [litres] Spray Volume. + * @param spray_area [acres] Spray Area. + * @param mission_time Mission Timestamp. + * @param latitude Mission Latitude. + * @param longitude Mission Longitude. + * @param signature_algorithm Signature Algorithm. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_suind_mission_data_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t target_system, uint8_t target_component, uint32_t mission_id, const char *signature, const char *serial_number, float mission_duration, float spray_volume, float spray_area, uint64_t mission_time, double latitude, double longitude, const char *signature_algorithm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN]; + _mav_put_uint64_t(buf, 0, mission_time); + _mav_put_double(buf, 8, latitude); + _mav_put_double(buf, 16, longitude); + _mav_put_uint32_t(buf, 24, mission_id); + _mav_put_float(buf, 28, mission_duration); + _mav_put_float(buf, 32, spray_volume); + _mav_put_float(buf, 36, spray_area); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_char_array(buf, 42, signature, 128); + _mav_put_char_array(buf, 170, serial_number, 10); + _mav_put_char_array(buf, 180, signature_algorithm, 15); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); +#else + mavlink_suind_mission_data_t packet; + packet.mission_time = mission_time; + packet.latitude = latitude; + packet.longitude = longitude; + packet.mission_id = mission_id; + packet.mission_duration = mission_duration; + packet.spray_volume = spray_volume; + packet.spray_area = spray_area; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.signature, signature, sizeof(char)*128); + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*10); + mav_array_memcpy(packet.signature_algorithm, signature_algorithm, sizeof(char)*15); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SUIND_MISSION_DATA; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); +#endif +} + +/** + * @brief Pack a suind_mission_data message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param target_system System ID. + * @param target_component Component ID. + * @param mission_id Mission ID. + * @param signature Signature. + * @param serial_number Serial No. + * @param mission_duration [seconds] Mission Duration. + * @param spray_volume [litres] Spray Volume. + * @param spray_area [acres] Spray Area. + * @param mission_time Mission Timestamp. + * @param latitude Mission Latitude. + * @param longitude Mission Longitude. + * @param signature_algorithm Signature Algorithm. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_suind_mission_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t target_system,uint8_t target_component,uint32_t mission_id,const char *signature,const char *serial_number,float mission_duration,float spray_volume,float spray_area,uint64_t mission_time,double latitude,double longitude,const char *signature_algorithm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN]; + _mav_put_uint64_t(buf, 0, mission_time); + _mav_put_double(buf, 8, latitude); + _mav_put_double(buf, 16, longitude); + _mav_put_uint32_t(buf, 24, mission_id); + _mav_put_float(buf, 28, mission_duration); + _mav_put_float(buf, 32, spray_volume); + _mav_put_float(buf, 36, spray_area); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_char_array(buf, 42, signature, 128); + _mav_put_char_array(buf, 170, serial_number, 10); + _mav_put_char_array(buf, 180, signature_algorithm, 15); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); +#else + mavlink_suind_mission_data_t packet; + packet.mission_time = mission_time; + packet.latitude = latitude; + packet.longitude = longitude; + packet.mission_id = mission_id; + packet.mission_duration = mission_duration; + packet.spray_volume = spray_volume; + packet.spray_area = spray_area; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.signature, signature, sizeof(char)*128); + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*10); + mav_array_memcpy(packet.signature_algorithm, signature_algorithm, sizeof(char)*15); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_SUIND_MISSION_DATA; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +} + +/** + * @brief Encode a suind_mission_data struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param suind_mission_data C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_suind_mission_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_suind_mission_data_t* suind_mission_data) +{ + return mavlink_msg_suind_mission_data_pack(system_id, component_id, msg, suind_mission_data->target_system, suind_mission_data->target_component, suind_mission_data->mission_id, suind_mission_data->signature, suind_mission_data->serial_number, suind_mission_data->mission_duration, suind_mission_data->spray_volume, suind_mission_data->spray_area, suind_mission_data->mission_time, suind_mission_data->latitude, suind_mission_data->longitude, suind_mission_data->signature_algorithm); +} + +/** + * @brief Encode a suind_mission_data struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param suind_mission_data C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_suind_mission_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_suind_mission_data_t* suind_mission_data) +{ + return mavlink_msg_suind_mission_data_pack_chan(system_id, component_id, chan, msg, suind_mission_data->target_system, suind_mission_data->target_component, suind_mission_data->mission_id, suind_mission_data->signature, suind_mission_data->serial_number, suind_mission_data->mission_duration, suind_mission_data->spray_volume, suind_mission_data->spray_area, suind_mission_data->mission_time, suind_mission_data->latitude, suind_mission_data->longitude, suind_mission_data->signature_algorithm); +} + +/** + * @brief Encode a suind_mission_data struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param suind_mission_data C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_suind_mission_data_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_suind_mission_data_t* suind_mission_data) +{ + return mavlink_msg_suind_mission_data_pack_status(system_id, component_id, _status, msg, suind_mission_data->target_system, suind_mission_data->target_component, suind_mission_data->mission_id, suind_mission_data->signature, suind_mission_data->serial_number, suind_mission_data->mission_duration, suind_mission_data->spray_volume, suind_mission_data->spray_area, suind_mission_data->mission_time, suind_mission_data->latitude, suind_mission_data->longitude, suind_mission_data->signature_algorithm); +} + +/** + * @brief Send a suind_mission_data message + * @param chan MAVLink channel to send the message + * + * @param target_system System ID. + * @param target_component Component ID. + * @param mission_id Mission ID. + * @param signature Signature. + * @param serial_number Serial No. + * @param mission_duration [seconds] Mission Duration. + * @param spray_volume [litres] Spray Volume. + * @param spray_area [acres] Spray Area. + * @param mission_time Mission Timestamp. + * @param latitude Mission Latitude. + * @param longitude Mission Longitude. + * @param signature_algorithm Signature Algorithm. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_suind_mission_data_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t mission_id, const char *signature, const char *serial_number, float mission_duration, float spray_volume, float spray_area, uint64_t mission_time, double latitude, double longitude, const char *signature_algorithm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN]; + _mav_put_uint64_t(buf, 0, mission_time); + _mav_put_double(buf, 8, latitude); + _mav_put_double(buf, 16, longitude); + _mav_put_uint32_t(buf, 24, mission_id); + _mav_put_float(buf, 28, mission_duration); + _mav_put_float(buf, 32, spray_volume); + _mav_put_float(buf, 36, spray_area); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_char_array(buf, 42, signature, 128); + _mav_put_char_array(buf, 170, serial_number, 10); + _mav_put_char_array(buf, 180, signature_algorithm, 15); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA, buf, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#else + mavlink_suind_mission_data_t packet; + packet.mission_time = mission_time; + packet.latitude = latitude; + packet.longitude = longitude; + packet.mission_id = mission_id; + packet.mission_duration = mission_duration; + packet.spray_volume = spray_volume; + packet.spray_area = spray_area; + packet.target_system = target_system; + packet.target_component = target_component; + mav_array_memcpy(packet.signature, signature, sizeof(char)*128); + mav_array_memcpy(packet.serial_number, serial_number, sizeof(char)*10); + mav_array_memcpy(packet.signature_algorithm, signature_algorithm, sizeof(char)*15); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA, (const char *)&packet, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#endif +} + +/** + * @brief Send a suind_mission_data message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_suind_mission_data_send_struct(mavlink_channel_t chan, const mavlink_suind_mission_data_t* suind_mission_data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_suind_mission_data_send(chan, suind_mission_data->target_system, suind_mission_data->target_component, suind_mission_data->mission_id, suind_mission_data->signature, suind_mission_data->serial_number, suind_mission_data->mission_duration, suind_mission_data->spray_volume, suind_mission_data->spray_area, suind_mission_data->mission_time, suind_mission_data->latitude, suind_mission_data->longitude, suind_mission_data->signature_algorithm); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA, (const char *)suind_mission_data, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#endif +} + +#if MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_suind_mission_data_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint32_t mission_id, const char *signature, const char *serial_number, float mission_duration, float spray_volume, float spray_area, uint64_t mission_time, double latitude, double longitude, const char *signature_algorithm) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint64_t(buf, 0, mission_time); + _mav_put_double(buf, 8, latitude); + _mav_put_double(buf, 16, longitude); + _mav_put_uint32_t(buf, 24, mission_id); + _mav_put_float(buf, 28, mission_duration); + _mav_put_float(buf, 32, spray_volume); + _mav_put_float(buf, 36, spray_area); + _mav_put_uint8_t(buf, 40, target_system); + _mav_put_uint8_t(buf, 41, target_component); + _mav_put_char_array(buf, 42, signature, 128); + _mav_put_char_array(buf, 170, serial_number, 10); + _mav_put_char_array(buf, 180, signature_algorithm, 15); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA, buf, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#else + mavlink_suind_mission_data_t *packet = (mavlink_suind_mission_data_t *)msgbuf; + packet->mission_time = mission_time; + packet->latitude = latitude; + packet->longitude = longitude; + packet->mission_id = mission_id; + packet->mission_duration = mission_duration; + packet->spray_volume = spray_volume; + packet->spray_area = spray_area; + packet->target_system = target_system; + packet->target_component = target_component; + mav_array_memcpy(packet->signature, signature, sizeof(char)*128); + mav_array_memcpy(packet->serial_number, serial_number, sizeof(char)*10); + mav_array_memcpy(packet->signature_algorithm, signature_algorithm, sizeof(char)*15); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SUIND_MISSION_DATA, (const char *)packet, MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN, MAVLINK_MSG_ID_SUIND_MISSION_DATA_CRC); +#endif +} +#endif + +#endif + +// MESSAGE SUIND_MISSION_DATA UNPACKING + + +/** + * @brief Get field target_system from suind_mission_data message + * + * @return System ID. + */ +static inline uint8_t mavlink_msg_suind_mission_data_get_target_system(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 40); +} + +/** + * @brief Get field target_component from suind_mission_data message + * + * @return Component ID. + */ +static inline uint8_t mavlink_msg_suind_mission_data_get_target_component(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 41); +} + +/** + * @brief Get field mission_id from suind_mission_data message + * + * @return Mission ID. + */ +static inline uint32_t mavlink_msg_suind_mission_data_get_mission_id(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 24); +} + +/** + * @brief Get field signature from suind_mission_data message + * + * @return Signature. + */ +static inline uint16_t mavlink_msg_suind_mission_data_get_signature(const mavlink_message_t* msg, char *signature) +{ + return _MAV_RETURN_char_array(msg, signature, 128, 42); +} + +/** + * @brief Get field serial_number from suind_mission_data message + * + * @return Serial No. + */ +static inline uint16_t mavlink_msg_suind_mission_data_get_serial_number(const mavlink_message_t* msg, char *serial_number) +{ + return _MAV_RETURN_char_array(msg, serial_number, 10, 170); +} + +/** + * @brief Get field mission_duration from suind_mission_data message + * + * @return [seconds] Mission Duration. + */ +static inline float mavlink_msg_suind_mission_data_get_mission_duration(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 28); +} + +/** + * @brief Get field spray_volume from suind_mission_data message + * + * @return [litres] Spray Volume. + */ +static inline float mavlink_msg_suind_mission_data_get_spray_volume(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 32); +} + +/** + * @brief Get field spray_area from suind_mission_data message + * + * @return [acres] Spray Area. + */ +static inline float mavlink_msg_suind_mission_data_get_spray_area(const mavlink_message_t* msg) +{ + return _MAV_RETURN_float(msg, 36); +} + +/** + * @brief Get field mission_time from suind_mission_data message + * + * @return Mission Timestamp. + */ +static inline uint64_t mavlink_msg_suind_mission_data_get_mission_time(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint64_t(msg, 0); +} + +/** + * @brief Get field latitude from suind_mission_data message + * + * @return Mission Latitude. + */ +static inline double mavlink_msg_suind_mission_data_get_latitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_double(msg, 8); +} + +/** + * @brief Get field longitude from suind_mission_data message + * + * @return Mission Longitude. + */ +static inline double mavlink_msg_suind_mission_data_get_longitude(const mavlink_message_t* msg) +{ + return _MAV_RETURN_double(msg, 16); +} + +/** + * @brief Get field signature_algorithm from suind_mission_data message + * + * @return Signature Algorithm. + */ +static inline uint16_t mavlink_msg_suind_mission_data_get_signature_algorithm(const mavlink_message_t* msg, char *signature_algorithm) +{ + return _MAV_RETURN_char_array(msg, signature_algorithm, 15, 180); +} + +/** + * @brief Decode a suind_mission_data message into a struct + * + * @param msg The message to decode + * @param suind_mission_data C-struct to decode the message contents into + */ +static inline void mavlink_msg_suind_mission_data_decode(const mavlink_message_t* msg, mavlink_suind_mission_data_t* suind_mission_data) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + suind_mission_data->mission_time = mavlink_msg_suind_mission_data_get_mission_time(msg); + suind_mission_data->latitude = mavlink_msg_suind_mission_data_get_latitude(msg); + suind_mission_data->longitude = mavlink_msg_suind_mission_data_get_longitude(msg); + suind_mission_data->mission_id = mavlink_msg_suind_mission_data_get_mission_id(msg); + suind_mission_data->mission_duration = mavlink_msg_suind_mission_data_get_mission_duration(msg); + suind_mission_data->spray_volume = mavlink_msg_suind_mission_data_get_spray_volume(msg); + suind_mission_data->spray_area = mavlink_msg_suind_mission_data_get_spray_area(msg); + suind_mission_data->target_system = mavlink_msg_suind_mission_data_get_target_system(msg); + suind_mission_data->target_component = mavlink_msg_suind_mission_data_get_target_component(msg); + mavlink_msg_suind_mission_data_get_signature(msg, suind_mission_data->signature); + mavlink_msg_suind_mission_data_get_serial_number(msg, suind_mission_data->serial_number); + mavlink_msg_suind_mission_data_get_signature_algorithm(msg, suind_mission_data->signature_algorithm); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN? msg->len : MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN; + memset(suind_mission_data, 0, MAVLINK_MSG_ID_SUIND_MISSION_DATA_LEN); + memcpy(suind_mission_data, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/suind/suind.h b/suind/suind.h new file mode 100644 index 000000000..bf4447877 --- /dev/null +++ b/suind/suind.h @@ -0,0 +1,66 @@ +/** @file + * @brief MAVLink comm protocol generated from suind.xml + * @see http://mavlink.org + */ +#pragma once +#ifndef MAVLINK_SUIND_H +#define MAVLINK_SUIND_H + +#ifndef MAVLINK_H + #error Wrong include order: MAVLINK_SUIND.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. +#endif + +#define MAVLINK_SUIND_XML_HASH 6409533862814754567 + +#ifdef __cplusplus +extern "C" { +#endif + +// MESSAGE LENGTHS AND CRCS + +#ifndef MAVLINK_MESSAGE_LENGTHS +#define MAVLINK_MESSAGE_LENGTHS {} +#endif + +#ifndef MAVLINK_MESSAGE_CRCS +#define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {1, 124, 31, 31, 0, 0, 0}, {2, 137, 12, 12, 0, 0, 0}, {4, 237, 14, 14, 3, 12, 13}, {5, 217, 28, 28, 1, 0, 0}, {6, 104, 3, 3, 0, 0, 0}, {7, 119, 32, 32, 0, 0, 0}, {11, 89, 6, 6, 1, 4, 0}, {20, 214, 20, 20, 3, 2, 3}, {21, 159, 2, 2, 3, 0, 1}, {22, 220, 25, 25, 0, 0, 0}, {23, 168, 23, 23, 3, 4, 5}, {24, 24, 30, 52, 0, 0, 0}, {25, 23, 101, 101, 0, 0, 0}, {26, 170, 22, 24, 0, 0, 0}, {27, 144, 26, 29, 0, 0, 0}, {28, 67, 16, 16, 0, 0, 0}, {29, 115, 14, 16, 0, 0, 0}, {30, 39, 28, 28, 0, 0, 0}, {31, 246, 32, 48, 0, 0, 0}, {32, 185, 28, 28, 0, 0, 0}, {33, 104, 28, 28, 0, 0, 0}, {34, 237, 22, 22, 0, 0, 0}, {35, 244, 22, 22, 0, 0, 0}, {36, 222, 21, 37, 0, 0, 0}, {37, 212, 6, 7, 3, 4, 5}, {38, 9, 6, 7, 3, 4, 5}, {39, 254, 37, 38, 3, 32, 33}, {40, 230, 4, 5, 3, 2, 3}, {41, 28, 4, 4, 3, 2, 3}, {42, 28, 2, 6, 0, 0, 0}, {43, 132, 2, 3, 3, 0, 1}, {44, 221, 4, 5, 3, 2, 3}, {45, 232, 2, 3, 3, 0, 1}, {46, 11, 2, 2, 0, 0, 0}, {47, 153, 3, 4, 3, 0, 1}, {48, 41, 13, 21, 1, 12, 0}, {49, 39, 12, 20, 0, 0, 0}, {50, 78, 37, 37, 3, 18, 19}, {51, 196, 4, 5, 3, 2, 3}, {54, 15, 27, 27, 3, 24, 25}, {55, 3, 25, 25, 0, 0, 0}, {61, 167, 72, 72, 0, 0, 0}, {62, 183, 26, 26, 0, 0, 0}, {63, 119, 181, 181, 0, 0, 0}, {64, 191, 225, 225, 0, 0, 0}, {65, 118, 42, 42, 0, 0, 0}, {66, 148, 6, 6, 3, 2, 3}, {67, 21, 4, 4, 0, 0, 0}, {69, 243, 11, 30, 1, 10, 0}, {70, 124, 18, 38, 3, 16, 17}, {73, 38, 37, 38, 3, 32, 33}, {74, 20, 20, 20, 0, 0, 0}, {75, 158, 35, 35, 3, 30, 31}, {76, 152, 33, 33, 3, 30, 31}, {77, 143, 3, 10, 3, 8, 9}, {81, 106, 22, 22, 0, 0, 0}, {82, 49, 39, 39, 3, 36, 37}, {83, 22, 37, 37, 0, 0, 0}, {84, 143, 53, 53, 3, 50, 51}, {85, 140, 51, 51, 0, 0, 0}, {86, 5, 53, 53, 3, 50, 51}, {87, 150, 51, 51, 0, 0, 0}, {89, 231, 28, 28, 0, 0, 0}, {90, 183, 56, 56, 0, 0, 0}, {91, 63, 42, 42, 0, 0, 0}, {92, 54, 33, 33, 0, 0, 0}, {93, 47, 81, 81, 0, 0, 0}, {100, 175, 26, 34, 0, 0, 0}, {101, 102, 32, 117, 0, 0, 0}, {102, 158, 32, 117, 0, 0, 0}, {103, 208, 20, 57, 0, 0, 0}, {104, 56, 32, 116, 0, 0, 0}, {105, 93, 62, 63, 0, 0, 0}, {106, 138, 44, 44, 0, 0, 0}, {107, 108, 64, 65, 0, 0, 0}, {108, 32, 84, 92, 0, 0, 0}, {109, 185, 9, 9, 0, 0, 0}, {110, 84, 254, 254, 3, 1, 2}, {111, 34, 16, 16, 0, 0, 0}, {112, 174, 12, 12, 0, 0, 0}, {113, 124, 36, 39, 0, 0, 0}, {114, 237, 44, 44, 0, 0, 0}, {115, 4, 64, 64, 0, 0, 0}, {116, 76, 22, 24, 0, 0, 0}, {117, 128, 6, 6, 3, 4, 5}, {118, 56, 14, 14, 0, 0, 0}, {119, 116, 12, 12, 3, 10, 11}, {120, 134, 97, 97, 0, 0, 0}, {121, 237, 2, 2, 3, 0, 1}, {122, 203, 2, 2, 3, 0, 1}, {123, 250, 113, 113, 3, 0, 1}, {124, 87, 35, 57, 0, 0, 0}, {125, 203, 6, 6, 0, 0, 0}, {126, 220, 79, 79, 0, 0, 0}, {127, 25, 35, 35, 0, 0, 0}, {128, 226, 35, 35, 0, 0, 0}, {129, 46, 22, 24, 0, 0, 0}, {130, 29, 13, 13, 0, 0, 0}, {131, 223, 255, 255, 0, 0, 0}, {132, 85, 14, 39, 0, 0, 0}, {133, 6, 18, 18, 0, 0, 0}, {134, 229, 43, 43, 0, 0, 0}, {135, 203, 8, 8, 0, 0, 0}, {136, 1, 22, 22, 0, 0, 0}, {137, 195, 14, 16, 0, 0, 0}, {138, 109, 36, 120, 0, 0, 0}, {139, 168, 43, 43, 3, 41, 42}, {140, 181, 41, 41, 0, 0, 0}, {141, 47, 32, 32, 0, 0, 0}, {142, 72, 243, 243, 0, 0, 0}, {143, 131, 14, 16, 0, 0, 0}, {144, 127, 93, 93, 0, 0, 0}, {146, 103, 100, 100, 0, 0, 0}, {147, 154, 36, 54, 0, 0, 0}, {148, 178, 60, 78, 0, 0, 0}, {149, 200, 30, 60, 0, 0, 0}, {162, 189, 8, 9, 0, 0, 0}, {192, 36, 44, 54, 0, 0, 0}, {225, 208, 65, 73, 0, 0, 0}, {230, 163, 42, 42, 0, 0, 0}, {231, 105, 40, 40, 0, 0, 0}, {232, 151, 63, 65, 0, 0, 0}, {233, 35, 182, 182, 0, 0, 0}, {234, 150, 40, 40, 0, 0, 0}, {235, 179, 42, 42, 0, 0, 0}, {241, 90, 32, 32, 0, 0, 0}, {242, 104, 52, 60, 0, 0, 0}, {243, 85, 53, 61, 1, 52, 0}, {244, 95, 6, 6, 0, 0, 0}, {245, 130, 2, 2, 0, 0, 0}, {246, 184, 38, 38, 0, 0, 0}, {247, 81, 19, 19, 0, 0, 0}, {248, 8, 254, 254, 3, 3, 4}, {249, 204, 36, 36, 0, 0, 0}, {250, 49, 30, 30, 0, 0, 0}, {251, 170, 18, 18, 0, 0, 0}, {252, 44, 18, 18, 0, 0, 0}, {253, 83, 51, 54, 0, 0, 0}, {254, 46, 9, 9, 0, 0, 0}, {256, 71, 42, 42, 3, 8, 9}, {257, 131, 9, 9, 0, 0, 0}, {258, 187, 32, 232, 3, 0, 1}, {259, 92, 235, 236, 0, 0, 0}, {260, 146, 5, 13, 0, 0, 0}, {261, 179, 27, 60, 0, 0, 0}, {262, 12, 18, 22, 0, 0, 0}, {263, 133, 255, 255, 0, 0, 0}, {264, 49, 28, 28, 0, 0, 0}, {265, 26, 16, 20, 0, 0, 0}, {266, 193, 255, 255, 3, 2, 3}, {267, 35, 255, 255, 3, 2, 3}, {268, 14, 4, 4, 3, 2, 3}, {269, 109, 213, 213, 0, 0, 0}, {270, 59, 19, 19, 0, 0, 0}, {271, 22, 52, 52, 0, 0, 0}, {275, 126, 31, 31, 0, 0, 0}, {276, 18, 49, 49, 0, 0, 0}, {280, 70, 33, 33, 0, 0, 0}, {281, 48, 13, 13, 0, 0, 0}, {282, 123, 35, 35, 3, 32, 33}, {283, 74, 144, 145, 0, 0, 0}, {284, 99, 32, 32, 3, 30, 31}, {285, 137, 40, 49, 3, 38, 39}, {286, 210, 53, 57, 3, 50, 51}, {287, 1, 23, 23, 3, 20, 21}, {288, 20, 23, 23, 3, 20, 21}, {299, 19, 96, 96, 0, 0, 0}, {301, 243, 58, 58, 0, 0, 0}, {310, 28, 17, 17, 0, 0, 0}, {311, 95, 116, 116, 0, 0, 0}, {320, 243, 20, 20, 3, 2, 3}, {321, 88, 2, 2, 3, 0, 1}, {322, 243, 149, 149, 0, 0, 0}, {323, 78, 147, 147, 3, 0, 1}, {324, 132, 146, 146, 0, 0, 0}, {330, 23, 158, 167, 0, 0, 0}, {331, 91, 230, 233, 0, 0, 0}, {335, 225, 24, 24, 0, 0, 0}, {339, 199, 5, 5, 0, 0, 0}, {340, 99, 70, 70, 0, 0, 0}, {350, 232, 20, 252, 0, 0, 0}, {370, 75, 87, 109, 0, 0, 0}, {373, 117, 42, 42, 0, 0, 0}, {375, 251, 140, 140, 0, 0, 0}, {376, 199, 8, 8, 0, 0, 0}, {385, 147, 133, 133, 3, 2, 3}, {386, 132, 16, 16, 3, 4, 5}, {387, 4, 72, 72, 3, 4, 5}, {388, 8, 37, 37, 3, 32, 33}, {9000, 113, 137, 137, 0, 0, 0}, {9005, 117, 34, 34, 0, 0, 0}, {12900, 114, 44, 44, 3, 0, 1}, {12901, 254, 59, 59, 3, 30, 31}, {12902, 140, 53, 53, 3, 4, 5}, {12903, 249, 46, 46, 3, 0, 1}, {12904, 77, 54, 54, 3, 28, 29}, {12905, 49, 43, 43, 3, 0, 1}, {12915, 94, 249, 249, 3, 0, 1}, {12918, 139, 51, 51, 0, 0, 0}, {12919, 7, 18, 18, 3, 16, 17}, {12920, 20, 5, 5, 0, 0, 0}, {70000, 238, 195, 195, 3, 40, 41}} +#endif + +#include "../protocol.h" + +#define MAVLINK_ENABLED_SUIND + +// ENUM DEFINITIONS + + + +// MAVLINK VERSION + +#ifndef MAVLINK_VERSION +#define MAVLINK_VERSION 2 +#endif + +#if (MAVLINK_VERSION == 0) +#undef MAVLINK_VERSION +#define MAVLINK_VERSION 2 +#endif + +// MESSAGE DEFINITIONS +#include "./mavlink_msg_suind_mission_data.h" + +// base include +#include "../common/common.h" + + +#if MAVLINK_SUIND_XML_HASH == MAVLINK_PRIMARY_XML_HASH +# define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_SYS_STATUS, MAVLINK_MESSAGE_INFO_SYSTEM_TIME, MAVLINK_MESSAGE_INFO_PING, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL, MAVLINK_MESSAGE_INFO_CHANGE_OPERATOR_CONTROL_ACK, MAVLINK_MESSAGE_INFO_AUTH_KEY, MAVLINK_MESSAGE_INFO_SET_MODE, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_VALUE, MAVLINK_MESSAGE_INFO_PARAM_SET, MAVLINK_MESSAGE_INFO_GPS_RAW_INT, MAVLINK_MESSAGE_INFO_GPS_STATUS, MAVLINK_MESSAGE_INFO_SCALED_IMU, MAVLINK_MESSAGE_INFO_RAW_IMU, MAVLINK_MESSAGE_INFO_RAW_PRESSURE, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE, MAVLINK_MESSAGE_INFO_ATTITUDE, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT, MAVLINK_MESSAGE_INFO_RC_CHANNELS_SCALED, MAVLINK_MESSAGE_INFO_RC_CHANNELS_RAW, MAVLINK_MESSAGE_INFO_SERVO_OUTPUT_RAW, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_WRITE_PARTIAL_LIST, MAVLINK_MESSAGE_INFO_MISSION_ITEM, MAVLINK_MESSAGE_INFO_MISSION_REQUEST, MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_CURRENT, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_LIST, MAVLINK_MESSAGE_INFO_MISSION_COUNT, MAVLINK_MESSAGE_INFO_MISSION_CLEAR_ALL, MAVLINK_MESSAGE_INFO_MISSION_ITEM_REACHED, MAVLINK_MESSAGE_INFO_MISSION_ACK, MAVLINK_MESSAGE_INFO_SET_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_GPS_GLOBAL_ORIGIN, MAVLINK_MESSAGE_INFO_PARAM_MAP_RC, MAVLINK_MESSAGE_INFO_MISSION_REQUEST_INT, MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_SAFETY_ALLOWED_AREA, MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV, MAVLINK_MESSAGE_INFO_NAV_CONTROLLER_OUTPUT, MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV, MAVLINK_MESSAGE_INFO_RC_CHANNELS, MAVLINK_MESSAGE_INFO_REQUEST_DATA_STREAM, MAVLINK_MESSAGE_INFO_DATA_STREAM, MAVLINK_MESSAGE_INFO_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_RC_CHANNELS_OVERRIDE, MAVLINK_MESSAGE_INFO_MISSION_ITEM_INT, MAVLINK_MESSAGE_INFO_VFR_HUD, MAVLINK_MESSAGE_INFO_COMMAND_INT, MAVLINK_MESSAGE_INFO_COMMAND_LONG, MAVLINK_MESSAGE_INFO_COMMAND_ACK, MAVLINK_MESSAGE_INFO_MANUAL_SETPOINT, MAVLINK_MESSAGE_INFO_SET_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_ATTITUDE_TARGET, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_POSITION_TARGET_LOCAL_NED, MAVLINK_MESSAGE_INFO_SET_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_POSITION_TARGET_GLOBAL_INT, MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET, MAVLINK_MESSAGE_INFO_HIL_STATE, MAVLINK_MESSAGE_INFO_HIL_CONTROLS, MAVLINK_MESSAGE_INFO_HIL_RC_INPUTS_RAW, MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_GLOBAL_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_VISION_SPEED_ESTIMATE, MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE, MAVLINK_MESSAGE_INFO_HIGHRES_IMU, MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD, MAVLINK_MESSAGE_INFO_HIL_SENSOR, MAVLINK_MESSAGE_INFO_SIM_STATE, MAVLINK_MESSAGE_INFO_RADIO_STATUS, MAVLINK_MESSAGE_INFO_FILE_TRANSFER_PROTOCOL, MAVLINK_MESSAGE_INFO_TIMESYNC, MAVLINK_MESSAGE_INFO_CAMERA_TRIGGER, MAVLINK_MESSAGE_INFO_HIL_GPS, MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW, MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION, MAVLINK_MESSAGE_INFO_SCALED_IMU2, MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST, MAVLINK_MESSAGE_INFO_LOG_ENTRY, MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA, MAVLINK_MESSAGE_INFO_LOG_DATA, MAVLINK_MESSAGE_INFO_LOG_ERASE, MAVLINK_MESSAGE_INFO_LOG_REQUEST_END, MAVLINK_MESSAGE_INFO_GPS_INJECT_DATA, MAVLINK_MESSAGE_INFO_GPS2_RAW, MAVLINK_MESSAGE_INFO_POWER_STATUS, MAVLINK_MESSAGE_INFO_SERIAL_CONTROL, MAVLINK_MESSAGE_INFO_GPS_RTK, MAVLINK_MESSAGE_INFO_GPS2_RTK, MAVLINK_MESSAGE_INFO_SCALED_IMU3, MAVLINK_MESSAGE_INFO_DATA_TRANSMISSION_HANDSHAKE, MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA, MAVLINK_MESSAGE_INFO_DISTANCE_SENSOR, MAVLINK_MESSAGE_INFO_TERRAIN_REQUEST, MAVLINK_MESSAGE_INFO_TERRAIN_DATA, MAVLINK_MESSAGE_INFO_TERRAIN_CHECK, MAVLINK_MESSAGE_INFO_TERRAIN_REPORT, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE2, MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP, MAVLINK_MESSAGE_INFO_SET_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ACTUATOR_CONTROL_TARGET, MAVLINK_MESSAGE_INFO_ALTITUDE, MAVLINK_MESSAGE_INFO_RESOURCE_REQUEST, MAVLINK_MESSAGE_INFO_SCALED_PRESSURE3, MAVLINK_MESSAGE_INFO_FOLLOW_TARGET, MAVLINK_MESSAGE_INFO_CONTROL_SYSTEM_STATE, MAVLINK_MESSAGE_INFO_BATTERY_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION, MAVLINK_MESSAGE_INFO_LANDING_TARGET, MAVLINK_MESSAGE_INFO_FENCE_STATUS, MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT, MAVLINK_MESSAGE_INFO_EFI_STATUS, MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS, MAVLINK_MESSAGE_INFO_WIND_COV, MAVLINK_MESSAGE_INFO_GPS_INPUT, MAVLINK_MESSAGE_INFO_GPS_RTCM_DATA, MAVLINK_MESSAGE_INFO_HIGH_LATENCY, MAVLINK_MESSAGE_INFO_HIGH_LATENCY2, MAVLINK_MESSAGE_INFO_VIBRATION, MAVLINK_MESSAGE_INFO_HOME_POSITION, MAVLINK_MESSAGE_INFO_SET_HOME_POSITION, MAVLINK_MESSAGE_INFO_MESSAGE_INTERVAL, MAVLINK_MESSAGE_INFO_EXTENDED_SYS_STATE, MAVLINK_MESSAGE_INFO_ADSB_VEHICLE, MAVLINK_MESSAGE_INFO_COLLISION, MAVLINK_MESSAGE_INFO_V2_EXTENSION, MAVLINK_MESSAGE_INFO_MEMORY_VECT, MAVLINK_MESSAGE_INFO_DEBUG_VECT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_FLOAT, MAVLINK_MESSAGE_INFO_NAMED_VALUE_INT, MAVLINK_MESSAGE_INFO_STATUSTEXT, MAVLINK_MESSAGE_INFO_DEBUG, MAVLINK_MESSAGE_INFO_SETUP_SIGNING, MAVLINK_MESSAGE_INFO_BUTTON_CHANGE, MAVLINK_MESSAGE_INFO_PLAY_TUNE, MAVLINK_MESSAGE_INFO_CAMERA_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_SETTINGS, MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION, MAVLINK_MESSAGE_INFO_CAMERA_CAPTURE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_IMAGE_CAPTURED, MAVLINK_MESSAGE_INFO_FLIGHT_INFORMATION, MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION, MAVLINK_MESSAGE_INFO_LOGGING_DATA, MAVLINK_MESSAGE_INFO_LOGGING_DATA_ACKED, MAVLINK_MESSAGE_INFO_LOGGING_ACK, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_INFORMATION, MAVLINK_MESSAGE_INFO_VIDEO_STREAM_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_FOV_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_IMAGE_STATUS, MAVLINK_MESSAGE_INFO_CAMERA_TRACKING_GEO_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_STATUS, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_INFORMATION, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_SET_ATTITUDE, MAVLINK_MESSAGE_INFO_GIMBAL_DEVICE_ATTITUDE_STATUS, MAVLINK_MESSAGE_INFO_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_PITCHYAW, MAVLINK_MESSAGE_INFO_GIMBAL_MANAGER_SET_MANUAL_CONTROL, MAVLINK_MESSAGE_INFO_WIFI_CONFIG_AP, MAVLINK_MESSAGE_INFO_AIS_VESSEL, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_STATUS, MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_READ, MAVLINK_MESSAGE_INFO_PARAM_EXT_REQUEST_LIST, MAVLINK_MESSAGE_INFO_PARAM_EXT_VALUE, MAVLINK_MESSAGE_INFO_PARAM_EXT_SET, MAVLINK_MESSAGE_INFO_PARAM_EXT_ACK, MAVLINK_MESSAGE_INFO_OBSTACLE_DISTANCE, MAVLINK_MESSAGE_INFO_ODOMETRY, MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS, MAVLINK_MESSAGE_INFO_RAW_RPM, MAVLINK_MESSAGE_INFO_UTM_GLOBAL_POSITION, MAVLINK_MESSAGE_INFO_DEBUG_FLOAT_ARRAY, MAVLINK_MESSAGE_INFO_SMART_BATTERY_INFO, MAVLINK_MESSAGE_INFO_GENERATOR_STATUS, MAVLINK_MESSAGE_INFO_ACTUATOR_OUTPUT_STATUS, MAVLINK_MESSAGE_INFO_RELAY_STATUS, MAVLINK_MESSAGE_INFO_TUNNEL, MAVLINK_MESSAGE_INFO_CAN_FRAME, MAVLINK_MESSAGE_INFO_CANFD_FRAME, MAVLINK_MESSAGE_INFO_CAN_FILTER_MODIFY, MAVLINK_MESSAGE_INFO_WHEEL_DISTANCE, MAVLINK_MESSAGE_INFO_WINCH_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_BASIC_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_LOCATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SELF_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_OPERATOR_ID, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_ARM_STATUS, MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM_UPDATE, MAVLINK_MESSAGE_INFO_HYGROMETER_SENSOR, MAVLINK_MESSAGE_INFO_SUIND_MISSION_DATA} +# define MAVLINK_MESSAGE_NAMES {{ "ACTUATOR_CONTROL_TARGET", 140 }, { "ACTUATOR_OUTPUT_STATUS", 375 }, { "ADSB_VEHICLE", 246 }, { "AIS_VESSEL", 301 }, { "ALTITUDE", 141 }, { "ATTITUDE", 30 }, { "ATTITUDE_QUATERNION", 31 }, { "ATTITUDE_QUATERNION_COV", 61 }, { "ATTITUDE_TARGET", 83 }, { "ATT_POS_MOCAP", 138 }, { "AUTH_KEY", 7 }, { "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE", 286 }, { "AUTOPILOT_VERSION", 148 }, { "BATTERY_STATUS", 147 }, { "BUTTON_CHANGE", 257 }, { "CAMERA_CAPTURE_STATUS", 262 }, { "CAMERA_FOV_STATUS", 271 }, { "CAMERA_IMAGE_CAPTURED", 263 }, { "CAMERA_INFORMATION", 259 }, { "CAMERA_SETTINGS", 260 }, { "CAMERA_TRACKING_GEO_STATUS", 276 }, { "CAMERA_TRACKING_IMAGE_STATUS", 275 }, { "CAMERA_TRIGGER", 112 }, { "CANFD_FRAME", 387 }, { "CAN_FILTER_MODIFY", 388 }, { "CAN_FRAME", 386 }, { "CHANGE_OPERATOR_CONTROL", 5 }, { "CHANGE_OPERATOR_CONTROL_ACK", 6 }, { "COLLISION", 247 }, { "COMMAND_ACK", 77 }, { "COMMAND_INT", 75 }, { "COMMAND_LONG", 76 }, { "CONTROL_SYSTEM_STATE", 146 }, { "DATA_STREAM", 67 }, { "DATA_TRANSMISSION_HANDSHAKE", 130 }, { "DEBUG", 254 }, { "DEBUG_FLOAT_ARRAY", 350 }, { "DEBUG_VECT", 250 }, { "DISTANCE_SENSOR", 132 }, { "EFI_STATUS", 225 }, { "ENCAPSULATED_DATA", 131 }, { "ESTIMATOR_STATUS", 230 }, { "EXTENDED_SYS_STATE", 245 }, { "FENCE_STATUS", 162 }, { "FILE_TRANSFER_PROTOCOL", 110 }, { "FLIGHT_INFORMATION", 264 }, { "FOLLOW_TARGET", 144 }, { "GENERATOR_STATUS", 373 }, { "GIMBAL_DEVICE_ATTITUDE_STATUS", 285 }, { "GIMBAL_DEVICE_INFORMATION", 283 }, { "GIMBAL_DEVICE_SET_ATTITUDE", 284 }, { "GIMBAL_MANAGER_INFORMATION", 280 }, { "GIMBAL_MANAGER_SET_ATTITUDE", 282 }, { "GIMBAL_MANAGER_SET_MANUAL_CONTROL", 288 }, { "GIMBAL_MANAGER_SET_PITCHYAW", 287 }, { "GIMBAL_MANAGER_STATUS", 281 }, { "GLOBAL_POSITION_INT", 33 }, { "GLOBAL_POSITION_INT_COV", 63 }, { "GLOBAL_VISION_POSITION_ESTIMATE", 101 }, { "GPS2_RAW", 124 }, { "GPS2_RTK", 128 }, { "GPS_GLOBAL_ORIGIN", 49 }, { "GPS_INJECT_DATA", 123 }, { "GPS_INPUT", 232 }, { "GPS_RAW_INT", 24 }, { "GPS_RTCM_DATA", 233 }, { "GPS_RTK", 127 }, { "GPS_STATUS", 25 }, { "HEARTBEAT", 0 }, { "HIGHRES_IMU", 105 }, { "HIGH_LATENCY", 234 }, { "HIGH_LATENCY2", 235 }, { "HIL_ACTUATOR_CONTROLS", 93 }, { "HIL_CONTROLS", 91 }, { "HIL_GPS", 113 }, { "HIL_OPTICAL_FLOW", 114 }, { "HIL_RC_INPUTS_RAW", 92 }, { "HIL_SENSOR", 107 }, { "HIL_STATE", 90 }, { "HIL_STATE_QUATERNION", 115 }, { "HOME_POSITION", 242 }, { "HYGROMETER_SENSOR", 12920 }, { "ISBD_LINK_STATUS", 335 }, { "LANDING_TARGET", 149 }, { "LOCAL_POSITION_NED", 32 }, { "LOCAL_POSITION_NED_COV", 64 }, { "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET", 89 }, { "LOGGING_ACK", 268 }, { "LOGGING_DATA", 266 }, { "LOGGING_DATA_ACKED", 267 }, { "LOG_DATA", 120 }, { "LOG_ENTRY", 118 }, { "LOG_ERASE", 121 }, { "LOG_REQUEST_DATA", 119 }, { "LOG_REQUEST_END", 122 }, { "LOG_REQUEST_LIST", 117 }, { "MAG_CAL_REPORT", 192 }, { "MANUAL_CONTROL", 69 }, { "MANUAL_SETPOINT", 81 }, { "MEMORY_VECT", 249 }, { "MESSAGE_INTERVAL", 244 }, { "MISSION_ACK", 47 }, { "MISSION_CLEAR_ALL", 45 }, { "MISSION_COUNT", 44 }, { "MISSION_CURRENT", 42 }, { "MISSION_ITEM", 39 }, { "MISSION_ITEM_INT", 73 }, { "MISSION_ITEM_REACHED", 46 }, { "MISSION_REQUEST", 40 }, { "MISSION_REQUEST_INT", 51 }, { "MISSION_REQUEST_LIST", 43 }, { "MISSION_REQUEST_PARTIAL_LIST", 37 }, { "MISSION_SET_CURRENT", 41 }, { "MISSION_WRITE_PARTIAL_LIST", 38 }, { "MOUNT_ORIENTATION", 265 }, { "NAMED_VALUE_FLOAT", 251 }, { "NAMED_VALUE_INT", 252 }, { "NAV_CONTROLLER_OUTPUT", 62 }, { "OBSTACLE_DISTANCE", 330 }, { "ODOMETRY", 331 }, { "OPEN_DRONE_ID_ARM_STATUS", 12918 }, { "OPEN_DRONE_ID_AUTHENTICATION", 12902 }, { "OPEN_DRONE_ID_BASIC_ID", 12900 }, { "OPEN_DRONE_ID_LOCATION", 12901 }, { "OPEN_DRONE_ID_MESSAGE_PACK", 12915 }, { "OPEN_DRONE_ID_OPERATOR_ID", 12905 }, { "OPEN_DRONE_ID_SELF_ID", 12903 }, { "OPEN_DRONE_ID_SYSTEM", 12904 }, { "OPEN_DRONE_ID_SYSTEM_UPDATE", 12919 }, { "OPTICAL_FLOW", 100 }, { "OPTICAL_FLOW_RAD", 106 }, { "PARAM_EXT_ACK", 324 }, { "PARAM_EXT_REQUEST_LIST", 321 }, { "PARAM_EXT_REQUEST_READ", 320 }, { "PARAM_EXT_SET", 323 }, { "PARAM_EXT_VALUE", 322 }, { "PARAM_MAP_RC", 50 }, { "PARAM_REQUEST_LIST", 21 }, { "PARAM_REQUEST_READ", 20 }, { "PARAM_SET", 23 }, { "PARAM_VALUE", 22 }, { "PING", 4 }, { "PLAY_TUNE", 258 }, { "POSITION_TARGET_GLOBAL_INT", 87 }, { "POSITION_TARGET_LOCAL_NED", 85 }, { "POWER_STATUS", 125 }, { "RADIO_STATUS", 109 }, { "RAW_IMU", 27 }, { "RAW_PRESSURE", 28 }, { "RAW_RPM", 339 }, { "RC_CHANNELS", 65 }, { "RC_CHANNELS_OVERRIDE", 70 }, { "RC_CHANNELS_RAW", 35 }, { "RC_CHANNELS_SCALED", 34 }, { "RELAY_STATUS", 376 }, { "REQUEST_DATA_STREAM", 66 }, { "RESOURCE_REQUEST", 142 }, { "SAFETY_ALLOWED_AREA", 55 }, { "SAFETY_SET_ALLOWED_AREA", 54 }, { "SCALED_IMU", 26 }, { "SCALED_IMU2", 116 }, { "SCALED_IMU3", 129 }, { "SCALED_PRESSURE", 29 }, { "SCALED_PRESSURE2", 137 }, { "SCALED_PRESSURE3", 143 }, { "SERIAL_CONTROL", 126 }, { "SERVO_OUTPUT_RAW", 36 }, { "SETUP_SIGNING", 256 }, { "SET_ACTUATOR_CONTROL_TARGET", 139 }, { "SET_ATTITUDE_TARGET", 82 }, { "SET_GPS_GLOBAL_ORIGIN", 48 }, { "SET_HOME_POSITION", 243 }, { "SET_MODE", 11 }, { "SET_POSITION_TARGET_GLOBAL_INT", 86 }, { "SET_POSITION_TARGET_LOCAL_NED", 84 }, { "SIM_STATE", 108 }, { "SMART_BATTERY_INFO", 370 }, { "STATUSTEXT", 253 }, { "STORAGE_INFORMATION", 261 }, { "SUIND_MISSION_DATA", 70000 }, { "SYSTEM_TIME", 2 }, { "SYS_STATUS", 1 }, { "TERRAIN_CHECK", 135 }, { "TERRAIN_DATA", 134 }, { "TERRAIN_REPORT", 136 }, { "TERRAIN_REQUEST", 133 }, { "TIMESYNC", 111 }, { "TUNNEL", 385 }, { "UAVCAN_NODE_INFO", 311 }, { "UAVCAN_NODE_STATUS", 310 }, { "UTM_GLOBAL_POSITION", 340 }, { "V2_EXTENSION", 248 }, { "VFR_HUD", 74 }, { "VIBRATION", 241 }, { "VICON_POSITION_ESTIMATE", 104 }, { "VIDEO_STREAM_INFORMATION", 269 }, { "VIDEO_STREAM_STATUS", 270 }, { "VISION_POSITION_ESTIMATE", 102 }, { "VISION_SPEED_ESTIMATE", 103 }, { "WHEEL_DISTANCE", 9000 }, { "WIFI_CONFIG_AP", 299 }, { "WINCH_STATUS", 9005 }, { "WIND_COV", 231 }} +# if MAVLINK_COMMAND_24BIT +# include "../mavlink_get_info.h" +# endif +#endif + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // MAVLINK_SUIND_H diff --git a/suind/testsuite.h b/suind/testsuite.h new file mode 100644 index 000000000..00320ce90 --- /dev/null +++ b/suind/testsuite.h @@ -0,0 +1,106 @@ +/** @file + * @brief MAVLink comm protocol testsuite generated from suind.xml + * @see https://mavlink.io/en/ + */ +#pragma once +#ifndef SUIND_TESTSUITE_H +#define SUIND_TESTSUITE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef MAVLINK_TEST_ALL +#define MAVLINK_TEST_ALL +static void mavlink_test_common(uint8_t, uint8_t, mavlink_message_t *last_msg); +static void mavlink_test_suind(uint8_t, uint8_t, mavlink_message_t *last_msg); + +static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ + mavlink_test_common(system_id, component_id, last_msg); + mavlink_test_suind(system_id, component_id, last_msg); +} +#endif + +#include "../common/testsuite.h" + + +static void mavlink_test_suind_mission_data(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_SUIND_MISSION_DATA >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_suind_mission_data_t packet_in = { + 93372036854775807ULL,179.0,235.0,963498712,213.0,241.0,269.0,125,192,"QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM","OPQRSTUVW","YZABCDEFGHIJKL" + }; + mavlink_suind_mission_data_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.mission_time = packet_in.mission_time; + packet1.latitude = packet_in.latitude; + packet1.longitude = packet_in.longitude; + packet1.mission_id = packet_in.mission_id; + packet1.mission_duration = packet_in.mission_duration; + packet1.spray_volume = packet_in.spray_volume; + packet1.spray_area = packet_in.spray_area; + packet1.target_system = packet_in.target_system; + packet1.target_component = packet_in.target_component; + + mav_array_memcpy(packet1.signature, packet_in.signature, sizeof(char)*128); + mav_array_memcpy(packet1.serial_number, packet_in.serial_number, sizeof(char)*10); + mav_array_memcpy(packet1.signature_algorithm, packet_in.signature_algorithm, sizeof(char)*15); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_SUIND_MISSION_DATA_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_suind_mission_data_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_suind_mission_data_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_suind_mission_data_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.mission_id , packet1.signature , packet1.serial_number , packet1.mission_duration , packet1.spray_volume , packet1.spray_area , packet1.mission_time , packet1.latitude , packet1.longitude , packet1.signature_algorithm ); + mavlink_msg_suind_mission_data_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_suind_mission_data_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.mission_id , packet1.signature , packet1.serial_number , packet1.mission_duration , packet1.spray_volume , packet1.spray_area , packet1.mission_time , packet1.latitude , packet1.longitude , packet1.signature_algorithm ); + mavlink_msg_suind_mission_data_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; imsgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_GET; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +} + +/** + * @brief Pack a uavionix_adsb_get message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param ReqMessageId Message ID to request. Supports any message in this 10000-10099 range + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_get_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint32_t ReqMessageId) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN]; + _mav_put_uint32_t(buf, 0, ReqMessageId); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); +#else + mavlink_uavionix_adsb_get_t packet; + packet.ReqMessageId = ReqMessageId; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_GET; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); +#endif +} + +/** + * @brief Pack a uavionix_adsb_get message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param ReqMessageId Message ID to request. Supports any message in this 10000-10099 range + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_get_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint32_t ReqMessageId) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN]; + _mav_put_uint32_t(buf, 0, ReqMessageId); + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); +#else + mavlink_uavionix_adsb_get_t packet; + packet.ReqMessageId = ReqMessageId; + + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_GET; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +} + +/** + * @brief Encode a uavionix_adsb_get struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_get C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_get_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavionix_adsb_get_t* uavionix_adsb_get) +{ + return mavlink_msg_uavionix_adsb_get_pack(system_id, component_id, msg, uavionix_adsb_get->ReqMessageId); +} + +/** + * @brief Encode a uavionix_adsb_get struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_get C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_get_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavionix_adsb_get_t* uavionix_adsb_get) +{ + return mavlink_msg_uavionix_adsb_get_pack_chan(system_id, component_id, chan, msg, uavionix_adsb_get->ReqMessageId); +} + +/** + * @brief Encode a uavionix_adsb_get struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_get C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_get_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_uavionix_adsb_get_t* uavionix_adsb_get) +{ + return mavlink_msg_uavionix_adsb_get_pack_status(system_id, component_id, _status, msg, uavionix_adsb_get->ReqMessageId); +} + +/** + * @brief Send a uavionix_adsb_get message + * @param chan MAVLink channel to send the message + * + * @param ReqMessageId Message ID to request. Supports any message in this 10000-10099 range + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_uavionix_adsb_get_send(mavlink_channel_t chan, uint32_t ReqMessageId) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN]; + _mav_put_uint32_t(buf, 0, ReqMessageId); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#else + mavlink_uavionix_adsb_get_t packet; + packet.ReqMessageId = ReqMessageId; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET, (const char *)&packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#endif +} + +/** + * @brief Send a uavionix_adsb_get message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_uavionix_adsb_get_send_struct(mavlink_channel_t chan, const mavlink_uavionix_adsb_get_t* uavionix_adsb_get) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_get_send(chan, uavionix_adsb_get->ReqMessageId); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET, (const char *)uavionix_adsb_get, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#endif +} + +#if MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_uavionix_adsb_get_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t ReqMessageId) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint32_t(buf, 0, ReqMessageId); + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#else + mavlink_uavionix_adsb_get_t *packet = (mavlink_uavionix_adsb_get_t *)msgbuf; + packet->ReqMessageId = ReqMessageId; + + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET, (const char *)packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_CRC); +#endif +} +#endif + +#endif + +// MESSAGE UAVIONIX_ADSB_GET UNPACKING + + +/** + * @brief Get field ReqMessageId from uavionix_adsb_get message + * + * @return Message ID to request. Supports any message in this 10000-10099 range + */ +static inline uint32_t mavlink_msg_uavionix_adsb_get_get_ReqMessageId(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint32_t(msg, 0); +} + +/** + * @brief Decode a uavionix_adsb_get message into a struct + * + * @param msg The message to decode + * @param uavionix_adsb_get C-struct to decode the message contents into + */ +static inline void mavlink_msg_uavionix_adsb_get_decode(const mavlink_message_t* msg, mavlink_uavionix_adsb_get_t* uavionix_adsb_get) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + uavionix_adsb_get->ReqMessageId = mavlink_msg_uavionix_adsb_get_get_ReqMessageId(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN? msg->len : MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN; + memset(uavionix_adsb_get, 0, MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_LEN); + memcpy(uavionix_adsb_get, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/uAvionix/mavlink_msg_uavionix_adsb_out_cfg.h b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg.h index 460b21f8a..cc9ce86cf 100644 --- a/uAvionix/mavlink_msg_uavionix_adsb_out_cfg.h +++ b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg.h @@ -12,7 +12,7 @@ typedef struct __mavlink_uavionix_adsb_out_cfg_t { uint8_t aircraftSize; /*< Aircraft length and width encoding (table 2-35 of DO-282B)*/ uint8_t gpsOffsetLat; /*< GPS antenna lateral offset (table 2-36 of DO-282B)*/ uint8_t gpsOffsetLon; /*< GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)*/ - uint8_t rfSelect; /*< ADS-B transponder receiver and transmit enable flags*/ + uint8_t rfSelect; /*< ADS-B transponder reciever and transmit enable flags*/ } mavlink_uavionix_adsb_out_cfg_t; #define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_LEN 20 @@ -69,7 +69,7 @@ typedef struct __mavlink_uavionix_adsb_out_cfg_t { * @param gpsOffsetLat GPS antenna lateral offset (table 2-36 of DO-282B) * @param gpsOffsetLon GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B) * @param stallSpeed [cm/s] Aircraft stall speed in cm/s - * @param rfSelect ADS-B transponder receiver and transmit enable flags + * @param rfSelect ADS-B transponder reciever and transmit enable flags * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, @@ -117,7 +117,7 @@ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_pack(uint8_t system_id, * @param gpsOffsetLat GPS antenna lateral offset (table 2-36 of DO-282B) * @param gpsOffsetLon GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B) * @param stallSpeed [cm/s] Aircraft stall speed in cm/s - * @param rfSelect ADS-B transponder receiver and transmit enable flags + * @param rfSelect ADS-B transponder reciever and transmit enable flags * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, @@ -168,7 +168,7 @@ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_pack_status(uint8_t sys * @param gpsOffsetLat GPS antenna lateral offset (table 2-36 of DO-282B) * @param gpsOffsetLon GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B) * @param stallSpeed [cm/s] Aircraft stall speed in cm/s - * @param rfSelect ADS-B transponder receiver and transmit enable flags + * @param rfSelect ADS-B transponder reciever and transmit enable flags * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, @@ -255,7 +255,7 @@ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_encode_status(uint8_t s * @param gpsOffsetLat GPS antenna lateral offset (table 2-36 of DO-282B) * @param gpsOffsetLon GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B) * @param stallSpeed [cm/s] Aircraft stall speed in cm/s - * @param rfSelect ADS-B transponder receiver and transmit enable flags + * @param rfSelect ADS-B transponder reciever and transmit enable flags */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS @@ -414,7 +414,7 @@ static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_get_stallSpeed(const ma /** * @brief Get field rfSelect from uavionix_adsb_out_cfg message * - * @return ADS-B transponder receiver and transmit enable flags + * @return ADS-B transponder reciever and transmit enable flags */ static inline uint8_t mavlink_msg_uavionix_adsb_out_cfg_get_rfSelect(const mavlink_message_t* msg) { diff --git a/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_flightid.h b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_flightid.h new file mode 100644 index 000000000..a29afab82 --- /dev/null +++ b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_flightid.h @@ -0,0 +1,260 @@ +#pragma once +// MESSAGE UAVIONIX_ADSB_OUT_CFG_FLIGHTID PACKING + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID 10005 + + +typedef struct __mavlink_uavionix_adsb_out_cfg_flightid_t { + char flight_id[9]; /*< Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated.*/ +} mavlink_uavionix_adsb_out_cfg_flightid_t; + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN 9 +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN 9 +#define MAVLINK_MSG_ID_10005_LEN 9 +#define MAVLINK_MSG_ID_10005_MIN_LEN 9 + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC 103 +#define MAVLINK_MSG_ID_10005_CRC 103 + +#define MAVLINK_MSG_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_FIELD_FLIGHT_ID_LEN 9 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_FLIGHTID { \ + 10005, \ + "UAVIONIX_ADSB_OUT_CFG_FLIGHTID", \ + 1, \ + { { "flight_id", NULL, MAVLINK_TYPE_CHAR, 9, 0, offsetof(mavlink_uavionix_adsb_out_cfg_flightid_t, flight_id) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_FLIGHTID { \ + "UAVIONIX_ADSB_OUT_CFG_FLIGHTID", \ + 1, \ + { { "flight_id", NULL, MAVLINK_TYPE_CHAR, 9, 0, offsetof(mavlink_uavionix_adsb_out_cfg_flightid_t, flight_id) }, \ + } \ +} +#endif + +/** + * @brief Pack a uavionix_adsb_out_cfg_flightid message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN]; + + _mav_put_char_array(buf, 0, flight_id, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#else + mavlink_uavionix_adsb_out_cfg_flightid_t packet; + + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +} + +/** + * @brief Pack a uavionix_adsb_out_cfg_flightid message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN]; + + _mav_put_char_array(buf, 0, flight_id, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#else + mavlink_uavionix_adsb_out_cfg_flightid_t packet; + + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#endif +} + +/** + * @brief Pack a uavionix_adsb_out_cfg_flightid message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN]; + + _mav_put_char_array(buf, 0, flight_id, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#else + mavlink_uavionix_adsb_out_cfg_flightid_t packet; + + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_flightid struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_flightid C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_flightid_t* uavionix_adsb_out_cfg_flightid) +{ + return mavlink_msg_uavionix_adsb_out_cfg_flightid_pack(system_id, component_id, msg, uavionix_adsb_out_cfg_flightid->flight_id); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_flightid struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_flightid C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_flightid_t* uavionix_adsb_out_cfg_flightid) +{ + return mavlink_msg_uavionix_adsb_out_cfg_flightid_pack_chan(system_id, component_id, chan, msg, uavionix_adsb_out_cfg_flightid->flight_id); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_flightid struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_flightid C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_flightid_t* uavionix_adsb_out_cfg_flightid) +{ + return mavlink_msg_uavionix_adsb_out_cfg_flightid_pack_status(system_id, component_id, _status, msg, uavionix_adsb_out_cfg_flightid->flight_id); +} + +/** + * @brief Send a uavionix_adsb_out_cfg_flightid message + * @param chan MAVLink channel to send the message + * + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_uavionix_adsb_out_cfg_flightid_send(mavlink_channel_t chan, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN]; + + _mav_put_char_array(buf, 0, flight_id, 9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#else + mavlink_uavionix_adsb_out_cfg_flightid_t packet; + + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, (const char *)&packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#endif +} + +/** + * @brief Send a uavionix_adsb_out_cfg_flightid message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_flightid_send_struct(mavlink_channel_t chan, const mavlink_uavionix_adsb_out_cfg_flightid_t* uavionix_adsb_out_cfg_flightid) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_cfg_flightid_send(chan, uavionix_adsb_out_cfg_flightid->flight_id); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, (const char *)uavionix_adsb_out_cfg_flightid, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#endif +} + +#if MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_flightid_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_char_array(buf, 0, flight_id, 9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#else + mavlink_uavionix_adsb_out_cfg_flightid_t *packet = (mavlink_uavionix_adsb_out_cfg_flightid_t *)msgbuf; + + mav_array_memcpy(packet->flight_id, flight_id, sizeof(char)*9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID, (const char *)packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_CRC); +#endif +} +#endif + +#endif + +// MESSAGE UAVIONIX_ADSB_OUT_CFG_FLIGHTID UNPACKING + + +/** + * @brief Get field flight_id from uavionix_adsb_out_cfg_flightid message + * + * @return Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated. + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_flightid_get_flight_id(const mavlink_message_t* msg, char *flight_id) +{ + return _MAV_RETURN_char_array(msg, flight_id, 9, 0); +} + +/** + * @brief Decode a uavionix_adsb_out_cfg_flightid message into a struct + * + * @param msg The message to decode + * @param uavionix_adsb_out_cfg_flightid C-struct to decode the message contents into + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_flightid_decode(const mavlink_message_t* msg, mavlink_uavionix_adsb_out_cfg_flightid_t* uavionix_adsb_out_cfg_flightid) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_cfg_flightid_get_flight_id(msg, uavionix_adsb_out_cfg_flightid->flight_id); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN? msg->len : MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN; + memset(uavionix_adsb_out_cfg_flightid, 0, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_LEN); + memcpy(uavionix_adsb_out_cfg_flightid, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_registration.h b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_registration.h new file mode 100644 index 000000000..2ded92ef3 --- /dev/null +++ b/uAvionix/mavlink_msg_uavionix_adsb_out_cfg_registration.h @@ -0,0 +1,260 @@ +#pragma once +// MESSAGE UAVIONIX_ADSB_OUT_CFG_REGISTRATION PACKING + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION 10004 + + +typedef struct __mavlink_uavionix_adsb_out_cfg_registration_t { + char registration[9]; /*< Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated.*/ +} mavlink_uavionix_adsb_out_cfg_registration_t; + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN 9 +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN 9 +#define MAVLINK_MSG_ID_10004_LEN 9 +#define MAVLINK_MSG_ID_10004_MIN_LEN 9 + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC 133 +#define MAVLINK_MSG_ID_10004_CRC 133 + +#define MAVLINK_MSG_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_FIELD_REGISTRATION_LEN 9 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_REGISTRATION { \ + 10004, \ + "UAVIONIX_ADSB_OUT_CFG_REGISTRATION", \ + 1, \ + { { "registration", NULL, MAVLINK_TYPE_CHAR, 9, 0, offsetof(mavlink_uavionix_adsb_out_cfg_registration_t, registration) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CFG_REGISTRATION { \ + "UAVIONIX_ADSB_OUT_CFG_REGISTRATION", \ + 1, \ + { { "registration", NULL, MAVLINK_TYPE_CHAR, 9, 0, offsetof(mavlink_uavionix_adsb_out_cfg_registration_t, registration) }, \ + } \ +} +#endif + +/** + * @brief Pack a uavionix_adsb_out_cfg_registration message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param registration Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + const char *registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN]; + + _mav_put_char_array(buf, 0, registration, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#else + mavlink_uavionix_adsb_out_cfg_registration_t packet; + + mav_array_memcpy(packet.registration, registration, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +} + +/** + * @brief Pack a uavionix_adsb_out_cfg_registration message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param registration Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + const char *registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN]; + + _mav_put_char_array(buf, 0, registration, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#else + mavlink_uavionix_adsb_out_cfg_registration_t packet; + + mav_array_memcpy(packet.registration, registration, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#endif +} + +/** + * @brief Pack a uavionix_adsb_out_cfg_registration message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param registration Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + const char *registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN]; + + _mav_put_char_array(buf, 0, registration, 9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#else + mavlink_uavionix_adsb_out_cfg_registration_t packet; + + mav_array_memcpy(packet.registration, registration, sizeof(char)*9); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_registration struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_registration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_registration_t* uavionix_adsb_out_cfg_registration) +{ + return mavlink_msg_uavionix_adsb_out_cfg_registration_pack(system_id, component_id, msg, uavionix_adsb_out_cfg_registration->registration); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_registration struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_registration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_registration_t* uavionix_adsb_out_cfg_registration) +{ + return mavlink_msg_uavionix_adsb_out_cfg_registration_pack_chan(system_id, component_id, chan, msg, uavionix_adsb_out_cfg_registration->registration); +} + +/** + * @brief Encode a uavionix_adsb_out_cfg_registration struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_cfg_registration C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_cfg_registration_t* uavionix_adsb_out_cfg_registration) +{ + return mavlink_msg_uavionix_adsb_out_cfg_registration_pack_status(system_id, component_id, _status, msg, uavionix_adsb_out_cfg_registration->registration); +} + +/** + * @brief Send a uavionix_adsb_out_cfg_registration message + * @param chan MAVLink channel to send the message + * + * @param registration Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_uavionix_adsb_out_cfg_registration_send(mavlink_channel_t chan, const char *registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN]; + + _mav_put_char_array(buf, 0, registration, 9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#else + mavlink_uavionix_adsb_out_cfg_registration_t packet; + + mav_array_memcpy(packet.registration, registration, sizeof(char)*9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, (const char *)&packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#endif +} + +/** + * @brief Send a uavionix_adsb_out_cfg_registration message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_registration_send_struct(mavlink_channel_t chan, const mavlink_uavionix_adsb_out_cfg_registration_t* uavionix_adsb_out_cfg_registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_cfg_registration_send(chan, uavionix_adsb_out_cfg_registration->registration); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, (const char *)uavionix_adsb_out_cfg_registration, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#endif +} + +#if MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_registration_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const char *registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + + _mav_put_char_array(buf, 0, registration, 9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#else + mavlink_uavionix_adsb_out_cfg_registration_t *packet = (mavlink_uavionix_adsb_out_cfg_registration_t *)msgbuf; + + mav_array_memcpy(packet->registration, registration, sizeof(char)*9); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION, (const char *)packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_CRC); +#endif +} +#endif + +#endif + +// MESSAGE UAVIONIX_ADSB_OUT_CFG_REGISTRATION UNPACKING + + +/** + * @brief Get field registration from uavionix_adsb_out_cfg_registration message + * + * @return Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. "N8644B ". Trailing spaces (0x20) only. This is null-terminated. + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_cfg_registration_get_registration(const mavlink_message_t* msg, char *registration) +{ + return _MAV_RETURN_char_array(msg, registration, 9, 0); +} + +/** + * @brief Decode a uavionix_adsb_out_cfg_registration message into a struct + * + * @param msg The message to decode + * @param uavionix_adsb_out_cfg_registration C-struct to decode the message contents into + */ +static inline void mavlink_msg_uavionix_adsb_out_cfg_registration_decode(const mavlink_message_t* msg, mavlink_uavionix_adsb_out_cfg_registration_t* uavionix_adsb_out_cfg_registration) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_cfg_registration_get_registration(msg, uavionix_adsb_out_cfg_registration->registration); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN? msg->len : MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN; + memset(uavionix_adsb_out_cfg_registration, 0, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_LEN); + memcpy(uavionix_adsb_out_cfg_registration, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/uAvionix/mavlink_msg_uavionix_adsb_out_control.h b/uAvionix/mavlink_msg_uavionix_adsb_out_control.h new file mode 100644 index 000000000..1ced9fd20 --- /dev/null +++ b/uAvionix/mavlink_msg_uavionix_adsb_out_control.h @@ -0,0 +1,390 @@ +#pragma once +// MESSAGE UAVIONIX_ADSB_OUT_CONTROL PACKING + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL 10007 + + +typedef struct __mavlink_uavionix_adsb_out_control_t { + int32_t baroAltMSL; /*< [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX*/ + uint16_t squawk; /*< Mode A code (typically 1200 [0x04B0] for VFR)*/ + uint8_t state; /*< ADS-B transponder control state flags*/ + uint8_t emergencyStatus; /*< Emergency status*/ + char flight_id[8]; /*< Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable.*/ + uint8_t x_bit; /*< X-Bit enable (military transponders only)*/ +} mavlink_uavionix_adsb_out_control_t; + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN 17 +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN 17 +#define MAVLINK_MSG_ID_10007_LEN 17 +#define MAVLINK_MSG_ID_10007_MIN_LEN 17 + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC 71 +#define MAVLINK_MSG_ID_10007_CRC 71 + +#define MAVLINK_MSG_UAVIONIX_ADSB_OUT_CONTROL_FIELD_FLIGHT_ID_LEN 8 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CONTROL { \ + 10007, \ + "UAVIONIX_ADSB_OUT_CONTROL", \ + 6, \ + { { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_uavionix_adsb_out_control_t, state) }, \ + { "baroAltMSL", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_uavionix_adsb_out_control_t, baroAltMSL) }, \ + { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_uavionix_adsb_out_control_t, squawk) }, \ + { "emergencyStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_uavionix_adsb_out_control_t, emergencyStatus) }, \ + { "flight_id", NULL, MAVLINK_TYPE_CHAR, 8, 8, offsetof(mavlink_uavionix_adsb_out_control_t, flight_id) }, \ + { "x_bit", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_uavionix_adsb_out_control_t, x_bit) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_CONTROL { \ + "UAVIONIX_ADSB_OUT_CONTROL", \ + 6, \ + { { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_uavionix_adsb_out_control_t, state) }, \ + { "baroAltMSL", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_uavionix_adsb_out_control_t, baroAltMSL) }, \ + { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_uavionix_adsb_out_control_t, squawk) }, \ + { "emergencyStatus", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_uavionix_adsb_out_control_t, emergencyStatus) }, \ + { "flight_id", NULL, MAVLINK_TYPE_CHAR, 8, 8, offsetof(mavlink_uavionix_adsb_out_control_t, flight_id) }, \ + { "x_bit", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_uavionix_adsb_out_control_t, x_bit) }, \ + } \ +} +#endif + +/** + * @brief Pack a uavionix_adsb_out_control message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param state ADS-B transponder control state flags + * @param baroAltMSL [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param emergencyStatus Emergency status + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @param x_bit X-Bit enable (military transponders only) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t state, int32_t baroAltMSL, uint16_t squawk, uint8_t emergencyStatus, const char *flight_id, uint8_t x_bit) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN]; + _mav_put_int32_t(buf, 0, baroAltMSL); + _mav_put_uint16_t(buf, 4, squawk); + _mav_put_uint8_t(buf, 6, state); + _mav_put_uint8_t(buf, 7, emergencyStatus); + _mav_put_uint8_t(buf, 16, x_bit); + _mav_put_char_array(buf, 8, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#else + mavlink_uavionix_adsb_out_control_t packet; + packet.baroAltMSL = baroAltMSL; + packet.squawk = squawk; + packet.state = state; + packet.emergencyStatus = emergencyStatus; + packet.x_bit = x_bit; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +} + +/** + * @brief Pack a uavionix_adsb_out_control message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param state ADS-B transponder control state flags + * @param baroAltMSL [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param emergencyStatus Emergency status + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @param x_bit X-Bit enable (military transponders only) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t state, int32_t baroAltMSL, uint16_t squawk, uint8_t emergencyStatus, const char *flight_id, uint8_t x_bit) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN]; + _mav_put_int32_t(buf, 0, baroAltMSL); + _mav_put_uint16_t(buf, 4, squawk); + _mav_put_uint8_t(buf, 6, state); + _mav_put_uint8_t(buf, 7, emergencyStatus); + _mav_put_uint8_t(buf, 16, x_bit); + _mav_put_char_array(buf, 8, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#else + mavlink_uavionix_adsb_out_control_t packet; + packet.baroAltMSL = baroAltMSL; + packet.squawk = squawk; + packet.state = state; + packet.emergencyStatus = emergencyStatus; + packet.x_bit = x_bit; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#endif +} + +/** + * @brief Pack a uavionix_adsb_out_control message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param state ADS-B transponder control state flags + * @param baroAltMSL [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param emergencyStatus Emergency status + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @param x_bit X-Bit enable (military transponders only) + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t state,int32_t baroAltMSL,uint16_t squawk,uint8_t emergencyStatus,const char *flight_id,uint8_t x_bit) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN]; + _mav_put_int32_t(buf, 0, baroAltMSL); + _mav_put_uint16_t(buf, 4, squawk); + _mav_put_uint8_t(buf, 6, state); + _mav_put_uint8_t(buf, 7, emergencyStatus); + _mav_put_uint8_t(buf, 16, x_bit); + _mav_put_char_array(buf, 8, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#else + mavlink_uavionix_adsb_out_control_t packet; + packet.baroAltMSL = baroAltMSL; + packet.squawk = squawk; + packet.state = state; + packet.emergencyStatus = emergencyStatus; + packet.x_bit = x_bit; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +} + +/** + * @brief Encode a uavionix_adsb_out_control struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_control_t* uavionix_adsb_out_control) +{ + return mavlink_msg_uavionix_adsb_out_control_pack(system_id, component_id, msg, uavionix_adsb_out_control->state, uavionix_adsb_out_control->baroAltMSL, uavionix_adsb_out_control->squawk, uavionix_adsb_out_control->emergencyStatus, uavionix_adsb_out_control->flight_id, uavionix_adsb_out_control->x_bit); +} + +/** + * @brief Encode a uavionix_adsb_out_control struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_control_t* uavionix_adsb_out_control) +{ + return mavlink_msg_uavionix_adsb_out_control_pack_chan(system_id, component_id, chan, msg, uavionix_adsb_out_control->state, uavionix_adsb_out_control->baroAltMSL, uavionix_adsb_out_control->squawk, uavionix_adsb_out_control->emergencyStatus, uavionix_adsb_out_control->flight_id, uavionix_adsb_out_control->x_bit); +} + +/** + * @brief Encode a uavionix_adsb_out_control struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_control C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_control_t* uavionix_adsb_out_control) +{ + return mavlink_msg_uavionix_adsb_out_control_pack_status(system_id, component_id, _status, msg, uavionix_adsb_out_control->state, uavionix_adsb_out_control->baroAltMSL, uavionix_adsb_out_control->squawk, uavionix_adsb_out_control->emergencyStatus, uavionix_adsb_out_control->flight_id, uavionix_adsb_out_control->x_bit); +} + +/** + * @brief Send a uavionix_adsb_out_control message + * @param chan MAVLink channel to send the message + * + * @param state ADS-B transponder control state flags + * @param baroAltMSL [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param emergencyStatus Emergency status + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @param x_bit X-Bit enable (military transponders only) + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_uavionix_adsb_out_control_send(mavlink_channel_t chan, uint8_t state, int32_t baroAltMSL, uint16_t squawk, uint8_t emergencyStatus, const char *flight_id, uint8_t x_bit) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN]; + _mav_put_int32_t(buf, 0, baroAltMSL); + _mav_put_uint16_t(buf, 4, squawk); + _mav_put_uint8_t(buf, 6, state); + _mav_put_uint8_t(buf, 7, emergencyStatus); + _mav_put_uint8_t(buf, 16, x_bit); + _mav_put_char_array(buf, 8, flight_id, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#else + mavlink_uavionix_adsb_out_control_t packet; + packet.baroAltMSL = baroAltMSL; + packet.squawk = squawk; + packet.state = state; + packet.emergencyStatus = emergencyStatus; + packet.x_bit = x_bit; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL, (const char *)&packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#endif +} + +/** + * @brief Send a uavionix_adsb_out_control message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_uavionix_adsb_out_control_send_struct(mavlink_channel_t chan, const mavlink_uavionix_adsb_out_control_t* uavionix_adsb_out_control) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_control_send(chan, uavionix_adsb_out_control->state, uavionix_adsb_out_control->baroAltMSL, uavionix_adsb_out_control->squawk, uavionix_adsb_out_control->emergencyStatus, uavionix_adsb_out_control->flight_id, uavionix_adsb_out_control->x_bit); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL, (const char *)uavionix_adsb_out_control, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#endif +} + +#if MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_uavionix_adsb_out_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t state, int32_t baroAltMSL, uint16_t squawk, uint8_t emergencyStatus, const char *flight_id, uint8_t x_bit) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_int32_t(buf, 0, baroAltMSL); + _mav_put_uint16_t(buf, 4, squawk); + _mav_put_uint8_t(buf, 6, state); + _mav_put_uint8_t(buf, 7, emergencyStatus); + _mav_put_uint8_t(buf, 16, x_bit); + _mav_put_char_array(buf, 8, flight_id, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#else + mavlink_uavionix_adsb_out_control_t *packet = (mavlink_uavionix_adsb_out_control_t *)msgbuf; + packet->baroAltMSL = baroAltMSL; + packet->squawk = squawk; + packet->state = state; + packet->emergencyStatus = emergencyStatus; + packet->x_bit = x_bit; + mav_array_memcpy(packet->flight_id, flight_id, sizeof(char)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL, (const char *)packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_CRC); +#endif +} +#endif + +#endif + +// MESSAGE UAVIONIX_ADSB_OUT_CONTROL UNPACKING + + +/** + * @brief Get field state from uavionix_adsb_out_control message + * + * @return ADS-B transponder control state flags + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_control_get_state(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 6); +} + +/** + * @brief Get field baroAltMSL from uavionix_adsb_out_control message + * + * @return [mbar] Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX + */ +static inline int32_t mavlink_msg_uavionix_adsb_out_control_get_baroAltMSL(const mavlink_message_t* msg) +{ + return _MAV_RETURN_int32_t(msg, 0); +} + +/** + * @brief Get field squawk from uavionix_adsb_out_control message + * + * @return Mode A code (typically 1200 [0x04B0] for VFR) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_get_squawk(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 4); +} + +/** + * @brief Get field emergencyStatus from uavionix_adsb_out_control message + * + * @return Emergency status + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_control_get_emergencyStatus(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 7); +} + +/** + * @brief Get field flight_id from uavionix_adsb_out_control message + * + * @return Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_control_get_flight_id(const mavlink_message_t* msg, char *flight_id) +{ + return _MAV_RETURN_char_array(msg, flight_id, 8, 8); +} + +/** + * @brief Get field x_bit from uavionix_adsb_out_control message + * + * @return X-Bit enable (military transponders only) + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_control_get_x_bit(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 16); +} + +/** + * @brief Decode a uavionix_adsb_out_control message into a struct + * + * @param msg The message to decode + * @param uavionix_adsb_out_control C-struct to decode the message contents into + */ +static inline void mavlink_msg_uavionix_adsb_out_control_decode(const mavlink_message_t* msg, mavlink_uavionix_adsb_out_control_t* uavionix_adsb_out_control) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + uavionix_adsb_out_control->baroAltMSL = mavlink_msg_uavionix_adsb_out_control_get_baroAltMSL(msg); + uavionix_adsb_out_control->squawk = mavlink_msg_uavionix_adsb_out_control_get_squawk(msg); + uavionix_adsb_out_control->state = mavlink_msg_uavionix_adsb_out_control_get_state(msg); + uavionix_adsb_out_control->emergencyStatus = mavlink_msg_uavionix_adsb_out_control_get_emergencyStatus(msg); + mavlink_msg_uavionix_adsb_out_control_get_flight_id(msg, uavionix_adsb_out_control->flight_id); + uavionix_adsb_out_control->x_bit = mavlink_msg_uavionix_adsb_out_control_get_x_bit(msg); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN? msg->len : MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN; + memset(uavionix_adsb_out_control, 0, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_LEN); + memcpy(uavionix_adsb_out_control, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/uAvionix/mavlink_msg_uavionix_adsb_out_status.h b/uAvionix/mavlink_msg_uavionix_adsb_out_status.h new file mode 100644 index 000000000..8389a7fab --- /dev/null +++ b/uAvionix/mavlink_msg_uavionix_adsb_out_status.h @@ -0,0 +1,390 @@ +#pragma once +// MESSAGE UAVIONIX_ADSB_OUT_STATUS PACKING + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS 10008 + + +typedef struct __mavlink_uavionix_adsb_out_status_t { + uint16_t squawk; /*< Mode A code (typically 1200 [0x04B0] for VFR)*/ + uint8_t state; /*< ADS-B transponder status state flags*/ + uint8_t NIC_NACp; /*< Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively*/ + uint8_t boardTemp; /*< Board temperature in C*/ + uint8_t fault; /*< ADS-B transponder fault flags*/ + char flight_id[8]; /*< Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable.*/ +} mavlink_uavionix_adsb_out_status_t; + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN 14 +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN 14 +#define MAVLINK_MSG_ID_10008_LEN 14 +#define MAVLINK_MSG_ID_10008_MIN_LEN 14 + +#define MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC 240 +#define MAVLINK_MSG_ID_10008_CRC 240 + +#define MAVLINK_MSG_UAVIONIX_ADSB_OUT_STATUS_FIELD_FLIGHT_ID_LEN 8 + +#if MAVLINK_COMMAND_24BIT +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_STATUS { \ + 10008, \ + "UAVIONIX_ADSB_OUT_STATUS", \ + 6, \ + { { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_uavionix_adsb_out_status_t, state) }, \ + { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_uavionix_adsb_out_status_t, squawk) }, \ + { "NIC_NACp", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_uavionix_adsb_out_status_t, NIC_NACp) }, \ + { "boardTemp", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_uavionix_adsb_out_status_t, boardTemp) }, \ + { "fault", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_uavionix_adsb_out_status_t, fault) }, \ + { "flight_id", NULL, MAVLINK_TYPE_CHAR, 8, 6, offsetof(mavlink_uavionix_adsb_out_status_t, flight_id) }, \ + } \ +} +#else +#define MAVLINK_MESSAGE_INFO_UAVIONIX_ADSB_OUT_STATUS { \ + "UAVIONIX_ADSB_OUT_STATUS", \ + 6, \ + { { "state", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_uavionix_adsb_out_status_t, state) }, \ + { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_uavionix_adsb_out_status_t, squawk) }, \ + { "NIC_NACp", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_uavionix_adsb_out_status_t, NIC_NACp) }, \ + { "boardTemp", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_uavionix_adsb_out_status_t, boardTemp) }, \ + { "fault", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_uavionix_adsb_out_status_t, fault) }, \ + { "flight_id", NULL, MAVLINK_TYPE_CHAR, 8, 6, offsetof(mavlink_uavionix_adsb_out_status_t, flight_id) }, \ + } \ +} +#endif + +/** + * @brief Pack a uavionix_adsb_out_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * + * @param state ADS-B transponder status state flags + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param NIC_NACp Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively + * @param boardTemp Board temperature in C + * @param fault ADS-B transponder fault flags + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, + uint8_t state, uint16_t squawk, uint8_t NIC_NACp, uint8_t boardTemp, uint8_t fault, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN]; + _mav_put_uint16_t(buf, 0, squawk); + _mav_put_uint8_t(buf, 2, state); + _mav_put_uint8_t(buf, 3, NIC_NACp); + _mav_put_uint8_t(buf, 4, boardTemp); + _mav_put_uint8_t(buf, 5, fault); + _mav_put_char_array(buf, 6, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#else + mavlink_uavionix_adsb_out_status_t packet; + packet.squawk = squawk; + packet.state = state; + packet.NIC_NACp = NIC_NACp; + packet.boardTemp = boardTemp; + packet.fault = fault; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS; + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +} + +/** + * @brief Pack a uavionix_adsb_out_status message + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * + * @param state ADS-B transponder status state flags + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param NIC_NACp Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively + * @param boardTemp Board temperature in C + * @param fault ADS-B transponder fault flags + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, + uint8_t state, uint16_t squawk, uint8_t NIC_NACp, uint8_t boardTemp, uint8_t fault, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN]; + _mav_put_uint16_t(buf, 0, squawk); + _mav_put_uint8_t(buf, 2, state); + _mav_put_uint8_t(buf, 3, NIC_NACp); + _mav_put_uint8_t(buf, 4, boardTemp); + _mav_put_uint8_t(buf, 5, fault); + _mav_put_char_array(buf, 6, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#else + mavlink_uavionix_adsb_out_status_t packet; + packet.squawk = squawk; + packet.state = state; + packet.NIC_NACp = NIC_NACp; + packet.boardTemp = boardTemp; + packet.fault = fault; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS; +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#else + return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#endif +} + +/** + * @brief Pack a uavionix_adsb_out_status message on a channel + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param state ADS-B transponder status state flags + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param NIC_NACp Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively + * @param boardTemp Board temperature in C + * @param fault ADS-B transponder fault flags + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + * @return length of the message in bytes (excluding serial stream start sign) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, + mavlink_message_t* msg, + uint8_t state,uint16_t squawk,uint8_t NIC_NACp,uint8_t boardTemp,uint8_t fault,const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN]; + _mav_put_uint16_t(buf, 0, squawk); + _mav_put_uint8_t(buf, 2, state); + _mav_put_uint8_t(buf, 3, NIC_NACp); + _mav_put_uint8_t(buf, 4, boardTemp); + _mav_put_uint8_t(buf, 5, fault); + _mav_put_char_array(buf, 6, flight_id, 8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#else + mavlink_uavionix_adsb_out_status_t packet; + packet.squawk = squawk; + packet.state = state; + packet.NIC_NACp = NIC_NACp; + packet.boardTemp = boardTemp; + packet.fault = fault; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); +#endif + + msg->msgid = MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS; + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +} + +/** + * @brief Encode a uavionix_adsb_out_status struct + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_status_t* uavionix_adsb_out_status) +{ + return mavlink_msg_uavionix_adsb_out_status_pack(system_id, component_id, msg, uavionix_adsb_out_status->state, uavionix_adsb_out_status->squawk, uavionix_adsb_out_status->NIC_NACp, uavionix_adsb_out_status->boardTemp, uavionix_adsb_out_status->fault, uavionix_adsb_out_status->flight_id); +} + +/** + * @brief Encode a uavionix_adsb_out_status struct on a channel + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param chan The MAVLink channel this message will be sent over + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_status_t* uavionix_adsb_out_status) +{ + return mavlink_msg_uavionix_adsb_out_status_pack_chan(system_id, component_id, chan, msg, uavionix_adsb_out_status->state, uavionix_adsb_out_status->squawk, uavionix_adsb_out_status->NIC_NACp, uavionix_adsb_out_status->boardTemp, uavionix_adsb_out_status->fault, uavionix_adsb_out_status->flight_id); +} + +/** + * @brief Encode a uavionix_adsb_out_status struct with provided status structure + * + * @param system_id ID of this system + * @param component_id ID of this component (e.g. 200 for IMU) + * @param status MAVLink status structure + * @param msg The MAVLink message to compress the data into + * @param uavionix_adsb_out_status C-struct to read the message contents from + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_uavionix_adsb_out_status_t* uavionix_adsb_out_status) +{ + return mavlink_msg_uavionix_adsb_out_status_pack_status(system_id, component_id, _status, msg, uavionix_adsb_out_status->state, uavionix_adsb_out_status->squawk, uavionix_adsb_out_status->NIC_NACp, uavionix_adsb_out_status->boardTemp, uavionix_adsb_out_status->fault, uavionix_adsb_out_status->flight_id); +} + +/** + * @brief Send a uavionix_adsb_out_status message + * @param chan MAVLink channel to send the message + * + * @param state ADS-B transponder status state flags + * @param squawk Mode A code (typically 1200 [0x04B0] for VFR) + * @param NIC_NACp Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively + * @param boardTemp Board temperature in C + * @param fault ADS-B transponder fault flags + * @param flight_id Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + */ +#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS + +static inline void mavlink_msg_uavionix_adsb_out_status_send(mavlink_channel_t chan, uint8_t state, uint16_t squawk, uint8_t NIC_NACp, uint8_t boardTemp, uint8_t fault, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char buf[MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN]; + _mav_put_uint16_t(buf, 0, squawk); + _mav_put_uint8_t(buf, 2, state); + _mav_put_uint8_t(buf, 3, NIC_NACp); + _mav_put_uint8_t(buf, 4, boardTemp); + _mav_put_uint8_t(buf, 5, fault); + _mav_put_char_array(buf, 6, flight_id, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#else + mavlink_uavionix_adsb_out_status_t packet; + packet.squawk = squawk; + packet.state = state; + packet.NIC_NACp = NIC_NACp; + packet.boardTemp = boardTemp; + packet.fault = fault; + mav_array_memcpy(packet.flight_id, flight_id, sizeof(char)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS, (const char *)&packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#endif +} + +/** + * @brief Send a uavionix_adsb_out_status message + * @param chan MAVLink channel to send the message + * @param struct The MAVLink struct to serialize + */ +static inline void mavlink_msg_uavionix_adsb_out_status_send_struct(mavlink_channel_t chan, const mavlink_uavionix_adsb_out_status_t* uavionix_adsb_out_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + mavlink_msg_uavionix_adsb_out_status_send(chan, uavionix_adsb_out_status->state, uavionix_adsb_out_status->squawk, uavionix_adsb_out_status->NIC_NACp, uavionix_adsb_out_status->boardTemp, uavionix_adsb_out_status->fault, uavionix_adsb_out_status->flight_id); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS, (const char *)uavionix_adsb_out_status, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#endif +} + +#if MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN +/* + This variant of _send() can be used to save stack space by re-using + memory from the receive buffer. The caller provides a + mavlink_message_t which is the size of a full mavlink message. This + is usually the receive buffer for the channel, and allows a reply to an + incoming message with minimum stack space usage. + */ +static inline void mavlink_msg_uavionix_adsb_out_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t state, uint16_t squawk, uint8_t NIC_NACp, uint8_t boardTemp, uint8_t fault, const char *flight_id) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + char *buf = (char *)msgbuf; + _mav_put_uint16_t(buf, 0, squawk); + _mav_put_uint8_t(buf, 2, state); + _mav_put_uint8_t(buf, 3, NIC_NACp); + _mav_put_uint8_t(buf, 4, boardTemp); + _mav_put_uint8_t(buf, 5, fault); + _mav_put_char_array(buf, 6, flight_id, 8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS, buf, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#else + mavlink_uavionix_adsb_out_status_t *packet = (mavlink_uavionix_adsb_out_status_t *)msgbuf; + packet->squawk = squawk; + packet->state = state; + packet->NIC_NACp = NIC_NACp; + packet->boardTemp = boardTemp; + packet->fault = fault; + mav_array_memcpy(packet->flight_id, flight_id, sizeof(char)*8); + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS, (const char *)packet, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_CRC); +#endif +} +#endif + +#endif + +// MESSAGE UAVIONIX_ADSB_OUT_STATUS UNPACKING + + +/** + * @brief Get field state from uavionix_adsb_out_status message + * + * @return ADS-B transponder status state flags + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_status_get_state(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 2); +} + +/** + * @brief Get field squawk from uavionix_adsb_out_status message + * + * @return Mode A code (typically 1200 [0x04B0] for VFR) + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_get_squawk(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint16_t(msg, 0); +} + +/** + * @brief Get field NIC_NACp from uavionix_adsb_out_status message + * + * @return Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_status_get_NIC_NACp(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 3); +} + +/** + * @brief Get field boardTemp from uavionix_adsb_out_status message + * + * @return Board temperature in C + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_status_get_boardTemp(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 4); +} + +/** + * @brief Get field fault from uavionix_adsb_out_status message + * + * @return ADS-B transponder fault flags + */ +static inline uint8_t mavlink_msg_uavionix_adsb_out_status_get_fault(const mavlink_message_t* msg) +{ + return _MAV_RETURN_uint8_t(msg, 5); +} + +/** + * @brief Get field flight_id from uavionix_adsb_out_status message + * + * @return Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. + */ +static inline uint16_t mavlink_msg_uavionix_adsb_out_status_get_flight_id(const mavlink_message_t* msg, char *flight_id) +{ + return _MAV_RETURN_char_array(msg, flight_id, 8, 6); +} + +/** + * @brief Decode a uavionix_adsb_out_status message into a struct + * + * @param msg The message to decode + * @param uavionix_adsb_out_status C-struct to decode the message contents into + */ +static inline void mavlink_msg_uavionix_adsb_out_status_decode(const mavlink_message_t* msg, mavlink_uavionix_adsb_out_status_t* uavionix_adsb_out_status) +{ +#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS + uavionix_adsb_out_status->squawk = mavlink_msg_uavionix_adsb_out_status_get_squawk(msg); + uavionix_adsb_out_status->state = mavlink_msg_uavionix_adsb_out_status_get_state(msg); + uavionix_adsb_out_status->NIC_NACp = mavlink_msg_uavionix_adsb_out_status_get_NIC_NACp(msg); + uavionix_adsb_out_status->boardTemp = mavlink_msg_uavionix_adsb_out_status_get_boardTemp(msg); + uavionix_adsb_out_status->fault = mavlink_msg_uavionix_adsb_out_status_get_fault(msg); + mavlink_msg_uavionix_adsb_out_status_get_flight_id(msg, uavionix_adsb_out_status->flight_id); +#else + uint8_t len = msg->len < MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN? msg->len : MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN; + memset(uavionix_adsb_out_status, 0, MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_LEN); + memcpy(uavionix_adsb_out_status, _MAV_PAYLOAD(msg), len); +#endif +} diff --git a/uAvionix/testsuite.h b/uAvionix/testsuite.h index 801a5a08b..7d728122b 100644 --- a/uAvionix/testsuite.h +++ b/uAvionix/testsuite.h @@ -224,11 +224,321 @@ static void mavlink_test_uavionix_adsb_transceiver_health_report(uint8_t system_ #endif } +static void mavlink_test_uavionix_adsb_out_cfg_registration(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) +{ +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + mavlink_status_t *status = mavlink_get_channel_status(MAVLINK_COMM_0); + if ((status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_uavionix_adsb_out_cfg_registration_t packet_in = { + "ABCDEFGH" + }; + mavlink_uavionix_adsb_out_cfg_registration_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.registration, packet_in.registration, sizeof(char)*9); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_REGISTRATION_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_registration_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_uavionix_adsb_out_cfg_registration_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_registration_pack(system_id, component_id, &msg , packet1.registration ); + mavlink_msg_uavionix_adsb_out_cfg_registration_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_registration_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.registration ); + mavlink_msg_uavionix_adsb_out_cfg_registration_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_uavionix_adsb_out_cfg_flightid_t packet_in = { + "ABCDEFGH" + }; + mavlink_uavionix_adsb_out_cfg_flightid_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + + mav_array_memcpy(packet1.flight_id, packet_in.flight_id, sizeof(char)*9); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CFG_FLIGHTID_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_flightid_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_uavionix_adsb_out_cfg_flightid_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_flightid_pack(system_id, component_id, &msg , packet1.flight_id ); + mavlink_msg_uavionix_adsb_out_cfg_flightid_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_cfg_flightid_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.flight_id ); + mavlink_msg_uavionix_adsb_out_cfg_flightid_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAVIONIX_ADSB_GET >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_uavionix_adsb_get_t packet_in = { + 963497464 + }; + mavlink_uavionix_adsb_get_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.ReqMessageId = packet_in.ReqMessageId; + + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAVIONIX_ADSB_GET_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_get_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_uavionix_adsb_get_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_get_pack(system_id, component_id, &msg , packet1.ReqMessageId ); + mavlink_msg_uavionix_adsb_get_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_get_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.ReqMessageId ); + mavlink_msg_uavionix_adsb_get_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_uavionix_adsb_out_control_t packet_in = { + 963497464,17443,151,218,"IJKLMNO",53 + }; + mavlink_uavionix_adsb_out_control_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.baroAltMSL = packet_in.baroAltMSL; + packet1.squawk = packet_in.squawk; + packet1.state = packet_in.state; + packet1.emergencyStatus = packet_in.emergencyStatus; + packet1.x_bit = packet_in.x_bit; + + mav_array_memcpy(packet1.flight_id, packet_in.flight_id, sizeof(char)*8); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_CONTROL_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_control_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_uavionix_adsb_out_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_control_pack(system_id, component_id, &msg , packet1.state , packet1.baroAltMSL , packet1.squawk , packet1.emergencyStatus , packet1.flight_id , packet1.x_bit ); + mavlink_msg_uavionix_adsb_out_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_control_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.state , packet1.baroAltMSL , packet1.squawk , packet1.emergencyStatus , packet1.flight_id , packet1.x_bit ); + mavlink_msg_uavionix_adsb_out_control_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; iflags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) && MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS >= 256) { + return; + } +#endif + mavlink_message_t msg; + uint8_t buffer[MAVLINK_MAX_PACKET_LEN]; + uint16_t i; + mavlink_uavionix_adsb_out_status_t packet_in = { + 17235,139,206,17,84,"GHIJKLM" + }; + mavlink_uavionix_adsb_out_status_t packet1, packet2; + memset(&packet1, 0, sizeof(packet1)); + packet1.squawk = packet_in.squawk; + packet1.state = packet_in.state; + packet1.NIC_NACp = packet_in.NIC_NACp; + packet1.boardTemp = packet_in.boardTemp; + packet1.fault = packet_in.fault; + + mav_array_memcpy(packet1.flight_id, packet_in.flight_id, sizeof(char)*8); + +#ifdef MAVLINK_STATUS_FLAG_OUT_MAVLINK1 + if (status->flags & MAVLINK_STATUS_FLAG_OUT_MAVLINK1) { + // cope with extensions + memset(MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN + (char *)&packet1, 0, sizeof(packet1)-MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_STATUS_MIN_LEN); + } +#endif + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_status_encode(system_id, component_id, &msg, &packet1); + mavlink_msg_uavionix_adsb_out_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_status_pack(system_id, component_id, &msg , packet1.state , packet1.squawk , packet1.NIC_NACp , packet1.boardTemp , packet1.fault , packet1.flight_id ); + mavlink_msg_uavionix_adsb_out_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_uavionix_adsb_out_status_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.state , packet1.squawk , packet1.NIC_NACp , packet1.boardTemp , packet1.fault , packet1.flight_id ); + mavlink_msg_uavionix_adsb_out_status_decode(&msg, &packet2); + MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0); + + memset(&packet2, 0, sizeof(packet2)); + mavlink_msg_to_send_buffer(buffer, &msg); + for (i=0; i