diff --git a/src/ConRIG/Buttons/Buttons.h b/src/ConRIG/Buttons/Buttons.h index 8221788545d340f37f5bda36a8670e64c8103800..362207778c9bc720eadaef34b2f8f8557b7aea29 100644 --- a/src/ConRIG/Buttons/Buttons.h +++ b/src/ConRIG/Buttons/Buttons.h @@ -23,7 +23,7 @@ #pragma once #include <ConRIG/BoardScheduler.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <diagnostic/PrintLogger.h> #include <scheduler/TaskScheduler.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/ConRIG/Configs/RadioConfig.h b/src/ConRIG/Configs/RadioConfig.h index 42b6d20640d30f9fb6577514fa022fd1864eb936..712e4466caf8329af70784fe95a23bffdd043d2d 100644 --- a/src/ConRIG/Configs/RadioConfig.h +++ b/src/ConRIG/Configs/RadioConfig.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <units/Frequency.h> namespace ConRIG diff --git a/src/ConRIG/Radio/Radio.cpp b/src/ConRIG/Radio/Radio.cpp index d218a284d00b56e7ce005b07d76138372a520d7b..a1092628fa25d9a3ddfd867c76b59853feaa93fd 100644 --- a/src/ConRIG/Radio/Radio.cpp +++ b/src/ConRIG/Radio/Radio.cpp @@ -22,7 +22,7 @@ #include "Radio.h" -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <common/Radio.h> #include <diagnostic/SkywardStack.h> #include <drivers/interrupt/external_interrupts.h> diff --git a/src/ConRIG/Radio/Radio.h b/src/ConRIG/Radio/Radio.h index ec2c24991f4a16514f44c47ddb7abfa9c41a3c15..6c0508892b13e47e8fefdf7fa1bea670578656fe 100644 --- a/src/ConRIG/Radio/Radio.h +++ b/src/ConRIG/Radio/Radio.h @@ -27,7 +27,7 @@ #include <ConRIG/Buttons/Buttons.h> #include <ConRIG/Configs/RadioConfig.h> #include <ConRIG/Serial/Serial.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <diagnostic/PrintLogger.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <radio/SX1278/SX1278Lora.h> diff --git a/src/ConRIG/Serial/Serial.h b/src/ConRIG/Serial/Serial.h index eb5fc324f3ba093cb73ebd07e449657269d2c138..6d53219d13522ab729166e190e18b06a234dcb14 100644 --- a/src/ConRIG/Serial/Serial.h +++ b/src/ConRIG/Serial/Serial.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Groundstation/Automated/Actuators/Actuators.h b/src/Groundstation/Automated/Actuators/Actuators.h index 6f6b6c7391cb718d5ed357ed330f5fb5f8207538..0d457b1af7b15c5b796d715ad9ca2758f13a5ba8 100644 --- a/src/Groundstation/Automated/Actuators/Actuators.h +++ b/src/Groundstation/Automated/Actuators/Actuators.h @@ -21,7 +21,7 @@ */ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <logger/Logger.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Groundstation/Automated/Hub.cpp b/src/Groundstation/Automated/Hub.cpp index 8ba014793dbe8e750676bffcd833a5301b4b2778..bf6c80042a85b239f6e9ad0ec7ef97a1d40da867 100644 --- a/src/Groundstation/Automated/Hub.cpp +++ b/src/Groundstation/Automated/Hub.cpp @@ -30,7 +30,7 @@ #include <Groundstation/LyraGS/Radio/Radio.h> #include <algorithms/NAS/NASState.h> #include <common/Events.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <logger/Logger.h> #include <sensors/SensorData.h> diff --git a/src/Groundstation/Automated/Hub.h b/src/Groundstation/Automated/Hub.h index c27e13c67bbd80af7a8d336f444033d2af818981..9130dd058466db23751f9c511fd702c40ef3a5de 100644 --- a/src/Groundstation/Automated/Hub.h +++ b/src/Groundstation/Automated/Hub.h @@ -29,7 +29,7 @@ #include <Groundstation/LyraGS/Ports/SerialLyraGS.h> #include <Groundstation/LyraGS/Radio/Radio.h> #include <algorithms/NAS/NASState.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <miosix.h> #include <sensors/SensorData.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Groundstation/Common/Config/GeneralConfig.h b/src/Groundstation/Common/Config/GeneralConfig.h index 9d031417031489ba3a48ab44f4ecebd4e79b511c..ef304c86dd5bc6069f6bd6430691b44cb461e22a 100644 --- a/src/Groundstation/Common/Config/GeneralConfig.h +++ b/src/Groundstation/Common/Config/GeneralConfig.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <cstdint> namespace Groundstation diff --git a/src/Groundstation/Common/HubBase.h b/src/Groundstation/Common/HubBase.h index ea981ffcd933ea1967df82dd58f12f0cb7096427..f121655d1b7415db23fa08dc3d6809ca157e74bb 100644 --- a/src/Groundstation/Common/HubBase.h +++ b/src/Groundstation/Common/HubBase.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace Groundstation diff --git a/src/Groundstation/Common/Ports/EthernetBase.h b/src/Groundstation/Common/Ports/EthernetBase.h index c370ae3d0070ec997d50240b830ac1fea0840e48..1113560c822abf9b11e8bd81ec92101ae80bb5f5 100644 --- a/src/Groundstation/Common/Ports/EthernetBase.h +++ b/src/Groundstation/Common/Ports/EthernetBase.h @@ -24,7 +24,7 @@ #include <ActiveObject.h> #include <Groundstation/Common/HubBase.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/WIZ5500/WIZ5500.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Groundstation/Common/Ports/Serial.h b/src/Groundstation/Common/Ports/Serial.h index 199bc1ba40d8612d7cc8d7922799ad36ffa73f21..abfba264dbec44b73200440f594bffaa68f5af84 100644 --- a/src/Groundstation/Common/Ports/Serial.h +++ b/src/Groundstation/Common/Ports/Serial.h @@ -24,7 +24,7 @@ #include <ActiveObject.h> #include <Groundstation/Common/HubBase.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <filesystem/console/console_device.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Groundstation/Common/Radio/RadioBase.h b/src/Groundstation/Common/Radio/RadioBase.h index fc8bf2d332b10587e4fe854a21f6bb0d8c79bc3f..6a6c454ab395f52ce38ad9c6b434a4b63e4f3321 100644 --- a/src/Groundstation/Common/Radio/RadioBase.h +++ b/src/Groundstation/Common/Radio/RadioBase.h @@ -25,7 +25,7 @@ #include <ActiveObject.h> #include <Groundstation/Common/Config/RadioConfig.h> #include <Groundstation/Common/HubBase.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <common/Radio.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <radio/SX1278/SX1278Fsk.h> diff --git a/src/Groundstation/LyraGS/Base/Hub.h b/src/Groundstation/LyraGS/Base/Hub.h index 0e792bf28945767a75f4f64f12eb619dae84a2bb..628f3d6177ebb11283cc90907ed0333d03e9cea6 100644 --- a/src/Groundstation/LyraGS/Base/Hub.h +++ b/src/Groundstation/LyraGS/Base/Hub.h @@ -25,7 +25,7 @@ #include <Groundstation/Common/HubBase.h> #include <Groundstation/LyraGS/Ports/Ethernet.h> #include <Groundstation/LyraGS/Ports/SerialLyraGS.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace GroundstationBase diff --git a/src/Groundstation/LyraGS/BoardStatus.h b/src/Groundstation/LyraGS/BoardStatus.h index 0396a2b077d47ee4e2d22db0f24ce9e21f03e119..185327fc8af97ed0a897857e658d3079fb6022fd 100644 --- a/src/Groundstation/LyraGS/BoardStatus.h +++ b/src/Groundstation/LyraGS/BoardStatus.h @@ -32,7 +32,7 @@ #include <Groundstation/Common/Radio/RadioBase.h> #include <Groundstation/LyraGS/Ports/Ethernet.h> #include <Groundstation/LyraGS/Radio/Radio.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/timer/TimestampTimer.h> #include <utils/DependencyManager/DependencyManager.h> #include <utils/collections/CircularBuffer.h> diff --git a/src/Groundstation/LyraGS/Ports/SerialLyraGS.h b/src/Groundstation/LyraGS/Ports/SerialLyraGS.h index 5fdece2f3765d49eb50c824e759a0a817fb25771..bc54eb152fc0a72f592572001ad32792eef5f896 100644 --- a/src/Groundstation/LyraGS/Ports/SerialLyraGS.h +++ b/src/Groundstation/LyraGS/Ports/SerialLyraGS.h @@ -27,7 +27,7 @@ #include <Groundstation/Common/Ports/Serial.h> #include <Groundstation/LyraGS/BoardStatus.h> #include <Groundstation/LyraGS/Buses.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/usart/USART.h> #include <filesystem/console/console_device.h> #include <radio/MavlinkDriver/MavlinkDriver.h> diff --git a/src/Groundstation/Nokia/Hub.h b/src/Groundstation/Nokia/Hub.h index 920e151cde73e04d4c18317824763431d7f4ed05..ab90123f1d74359d6a51f1522ee2e2142eb99ce7 100644 --- a/src/Groundstation/Nokia/Hub.h +++ b/src/Groundstation/Nokia/Hub.h @@ -25,7 +25,7 @@ #include <Groundstation/Common/HubBase.h> #include <Groundstation/Common/Ports/Serial.h> #include <Groundstation/Nokia/Radio/Radio.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace GroundstationNokia diff --git a/src/Groundstation/Rovie/Hub.h b/src/Groundstation/Rovie/Hub.h index b74a80901298591ed527c32651e270850b5558c0..02b1328267bf1946f9e4e1ea9141d3616d5b0d64 100644 --- a/src/Groundstation/Rovie/Hub.h +++ b/src/Groundstation/Rovie/Hub.h @@ -26,7 +26,7 @@ #include <Groundstation/Common/Ports/Serial.h> #include <Groundstation/Rovie/Ports/Ethernet.h> #include <Groundstation/Rovie/Radio/Radio.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace GroundstationRovie diff --git a/src/Main/Actuators/Actuators.h b/src/Main/Actuators/Actuators.h index 3e5801147cb25eb2b08cea10cb6f65d9bc60f68b..6b86511795dcd3ebc699f01f7fddd540b718ca84 100644 --- a/src/Main/Actuators/Actuators.h +++ b/src/Main/Actuators/Actuators.h @@ -24,7 +24,7 @@ #include <Main/BoardScheduler.h> #include <actuators/Servo/Servo.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <scheduler/TaskScheduler.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Main/CanHandler/CanHandler.h b/src/Main/CanHandler/CanHandler.h index 60c7c47fef40d960e1cf4f9e3b21e35b8e1103e9..b8ddac87dcec5b23b718224282e6e949fa2d20d2 100644 --- a/src/Main/CanHandler/CanHandler.h +++ b/src/Main/CanHandler/CanHandler.h @@ -27,7 +27,7 @@ #include <Main/PersistentVars/PersistentVars.h> #include <Main/Sensors/Sensors.h> #include <common/CanConfig.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/canbus/CanProtocol/CanProtocol.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Main/Configs/RadioConfig.h b/src/Main/Configs/RadioConfig.h index 05a31165a38cad2cbd6a180ce0157b15b03c7279..34fe287ffeb0e7312f615336b5582eaeaed95824 100644 --- a/src/Main/Configs/RadioConfig.h +++ b/src/Main/Configs/RadioConfig.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <units/Frequency.h> namespace Main diff --git a/src/Main/Radio/Radio.h b/src/Main/Radio/Radio.h index a77ed4eeab2ca6a65d37fa41943f19b103e3a47f..33e89244e86cdb2e9180fac16cc014037ab3623b 100644 --- a/src/Main/Radio/Radio.h +++ b/src/Main/Radio/Radio.h @@ -36,7 +36,7 @@ #include <Main/StateMachines/MEAController/MEAController.h> #include <Main/StateMachines/NASController/NASController.h> #include <Main/StatsRecorder/StatsRecorder.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <radio/SX1278/SX1278Fsk.h> #include <scheduler/TaskScheduler.h> diff --git a/src/Motor/Actuators/Actuators.h b/src/Motor/Actuators/Actuators.h index 0e4eed38c6527dcc119b6372ea053e7525e3a8a9..329d0c5ff70544075ab3a881d083133a64ac2aec 100644 --- a/src/Motor/Actuators/Actuators.h +++ b/src/Motor/Actuators/Actuators.h @@ -25,7 +25,7 @@ #include <Motor/BoardScheduler.h> #include <Motor/CanHandler/CanHandler.h> #include <actuators/Servo/Servo.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace Motor diff --git a/src/Payload/Actuators/Actuators.h b/src/Payload/Actuators/Actuators.h index 3ad14d3db389fe78877b80259294586047d4f0d0..14911fd856ba6d9f7326dd41918593af05d40479 100644 --- a/src/Payload/Actuators/Actuators.h +++ b/src/Payload/Actuators/Actuators.h @@ -23,7 +23,7 @@ #pragma once #include <actuators/Servo/Servo.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <utils/DependencyManager/DependencyManager.h> namespace Payload diff --git a/src/Payload/CanHandler/CanHandler.h b/src/Payload/CanHandler/CanHandler.h index a45ccdc94d765bcb54a04dcc99df181965b67d20..fee6448ca5183bcbffad44bae80e89bb0595c3ee 100644 --- a/src/Payload/CanHandler/CanHandler.h +++ b/src/Payload/CanHandler/CanHandler.h @@ -23,7 +23,7 @@ #pragma once #include <common/CanConfig.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/canbus/CanProtocol/CanProtocol.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/Payload/Configs/RadioConfig.h b/src/Payload/Configs/RadioConfig.h index 0175d69970071c40733e733099ceb2ac94fa1b0b..92a3c76a0d77384d1ac7a2feb7bf836cd5f16bfe 100644 --- a/src/Payload/Configs/RadioConfig.h +++ b/src/Payload/Configs/RadioConfig.h @@ -21,7 +21,7 @@ */ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <units/Frequency.h> #include <chrono> diff --git a/src/Payload/PinHandler/PinHandler.h b/src/Payload/PinHandler/PinHandler.h index 308c5770e477f9af7d87943a0aa8e72cbc185d3c..159614f9adf955a2ec5f1726f7623af0cb9be235 100644 --- a/src/Payload/PinHandler/PinHandler.h +++ b/src/Payload/PinHandler/PinHandler.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <diagnostic/PrintLogger.h> #include <utils/DependencyManager/DependencyManager.h> #include <utils/PinObserver/PinObserver.h> diff --git a/src/Payload/Radio/Radio.h b/src/Payload/Radio/Radio.h index 817e961f88f4351086d5334be52feff8deb124e6..563d0b56e0c06be5bc21de17b54894125d93faa6 100644 --- a/src/Payload/Radio/Radio.h +++ b/src/Payload/Radio/Radio.h @@ -24,7 +24,7 @@ #include <Payload/Configs/RadioConfig.h> #include <Payload/PersistentVars/PersistentVars.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <radio/SX1278/SX1278Fsk.h> #include <radio/SerialTransceiver/SerialTransceiver.h> diff --git a/src/RIGv2/Actuators/Actuators.h b/src/RIGv2/Actuators/Actuators.h index bd2ef33fde3fe96db3985239160a328a47aa6db8..939cd5e257b5586772c2528a0e7d5a8199030752 100644 --- a/src/RIGv2/Actuators/Actuators.h +++ b/src/RIGv2/Actuators/Actuators.h @@ -26,7 +26,7 @@ #include <RIGv2/CanHandler/CanHandler.h> #include <RIGv2/Registry/Registry.h> #include <actuators/Servo/Servo.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <miosix.h> #include <scheduler/TaskScheduler.h> diff --git a/src/RIGv2/CanHandler/CanHandler.h b/src/RIGv2/CanHandler/CanHandler.h index 065389a4ebca936fab835ddbfd2498589f6abd0a..66a242ac808e07669f4cca24035a310a7dc2f0ce 100644 --- a/src/RIGv2/CanHandler/CanHandler.h +++ b/src/RIGv2/CanHandler/CanHandler.h @@ -26,7 +26,7 @@ #include <RIGv2/Configs/CanHandlerConfig.h> #include <RIGv2/Sensors/Sensors.h> #include <common/CanConfig.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <drivers/canbus/CanProtocol/CanProtocol.h> #include <utils/DependencyManager/DependencyManager.h> diff --git a/src/RIGv2/Configs/RadioConfig.h b/src/RIGv2/Configs/RadioConfig.h index a094a7a9f72f5053ca273d453b98fe4646d43274..9b3039b9ad5ca165566b40dc18eec0bd74255573 100644 --- a/src/RIGv2/Configs/RadioConfig.h +++ b/src/RIGv2/Configs/RadioConfig.h @@ -22,7 +22,7 @@ #pragma once -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> namespace RIGv2 { diff --git a/src/RIGv2/Radio/Radio.h b/src/RIGv2/Radio/Radio.h index 01cf7e4baa398d48016dc94f9ac54b78b9fb5c45..e55d15bdef990d2577777c5f794f752c8e33062c 100644 --- a/src/RIGv2/Radio/Radio.h +++ b/src/RIGv2/Radio/Radio.h @@ -31,7 +31,7 @@ #include <RIGv2/Sensors/Sensors.h> #include <RIGv2/StateMachines/GroundModeManager/GroundModeManager.h> #include <RIGv2/StateMachines/TARS1/TARS1.h> -#include <common/Mavlink.h> +#include <common/MavlinkLyra.h> #include <interfaces-impl/hwmapping.h> #include <radio/MavlinkDriver/MavlinkDriver.h> #include <radio/SX1278/SX1278Lora.h> diff --git a/src/common/MavlinkGemini.h b/src/common/MavlinkGemini.h index 97ea89d8fa0fcfcf1cc13b0aec56956f283a4d4b..0cb3e7cf1a3e61b07a137baab6207bee87ba6044 100644 --- a/src/common/MavlinkGemini.h +++ b/src/common/MavlinkGemini.h @@ -26,4 +26,6 @@ #pragma GCC diagnostic ignored "-Waddress-of-packed-member" #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #include <mavlink_lib/gemini/mavlink.h> -#pragma GCC diagnostic pop \ No newline at end of file +#pragma GCC diagnostic pop + +#warning "Gemini message definitions are deprecated, consider updating" diff --git a/src/common/MavlinkLyra.h b/src/common/MavlinkLyra.h new file mode 100644 index 0000000000000000000000000000000000000000..e6cd6b5c05506e41994a0388c112b59c7c4f1ad4 --- /dev/null +++ b/src/common/MavlinkLyra.h @@ -0,0 +1,87 @@ +/* Copyright (c) 2024 Skyward Experimental Rocketry + * Author: Davide Mor + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +// Ignore warnings as these are auto-generated headers made by a third party +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#include <mavlink_lib/lyra/mavlink.h> +#pragma GCC diagnostic pop + +#warning "Lyra message definitions are deprecated, consider updating" + +#include <common/Events.h> + +namespace Common +{ + +inline Events mavCmdToEvent(uint8_t id) +{ + switch (id) + { + case MAV_CMD_ARM: + return TMTC_ARM; + case MAV_CMD_DISARM: + return TMTC_DISARM; + case MAV_CMD_CALIBRATE: + return TMTC_CALIBRATE; + case MAV_CMD_FORCE_INIT: + return TMTC_FORCE_INIT; + case MAV_CMD_FORCE_LAUNCH: + return TMTC_FORCE_LAUNCH; + case MAV_CMD_FORCE_ENGINE_SHUTDOWN: + return TMTC_FORCE_ENGINE_SHUTDOWN; + case MAV_CMD_FORCE_EXPULSION: + return TMTC_FORCE_EXPULSION; + case MAV_CMD_FORCE_DEPLOYMENT: + return TMTC_FORCE_DEPLOYMENT; + case MAV_CMD_FORCE_LANDING: + return TMTC_FORCE_LANDING; + case MAV_CMD_START_LOGGING: + return TMTC_START_LOGGING; + case MAV_CMD_STOP_LOGGING: + return TMTC_STOP_LOGGING; + case MAV_CMD_FORCE_REBOOT: + return TMTC_RESET_BOARD; + case MAV_CMD_ENTER_TEST_MODE: + return TMTC_ENTER_TEST_MODE; + case MAV_CMD_EXIT_TEST_MODE: + return TMTC_EXIT_TEST_MODE; + case MAV_CMD_ENTER_HIL: + return TMTC_ENTER_HIL_MODE; + case MAV_CMD_EXIT_HIL: + return TMTC_EXIT_HIL_MODE; + case MAV_CMD_START_RECORDING: + return TMTC_START_RECORDING; + case MAV_CMD_STOP_RECORDING: + return TMTC_STOP_RECORDING; + case MAV_CMD_OPEN_NITROGEN: + return TMTC_OPEN_NITROGEN; + default: + return LAST_EVENT; + } +} + +} // namespace Common \ No newline at end of file diff --git a/src/common/Mavlink.h b/src/common/MavlinkOrion.h similarity index 97% rename from src/common/Mavlink.h rename to src/common/MavlinkOrion.h index ac00532fa1d0506a2843bc280a68d27561595a5f..bd6f7ffaab1fa8cd812d6ce99ce0cb023a6274b1 100644 --- a/src/common/Mavlink.h +++ b/src/common/MavlinkOrion.h @@ -1,5 +1,5 @@ /* Copyright (c) 2024 Skyward Experimental Rocketry - * Author: Davide Mor + * Author: Niccolò Betto * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,7 +27,7 @@ #pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Waddress-of-packed-member" #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#include <mavlink_lib/lyra/mavlink.h> +#include <mavlink_lib/orion/mavlink.h> #pragma GCC diagnostic pop #include <common/Events.h>