Skip to content
Snippets Groups Projects
Commit f8905e20 authored by Nicolò Caruso's avatar Nicolò Caruso Committed by Emilio Corigliano
Browse files

[GS/ARP] System and component ID updated

System ID and component ID updated, now ARP/GS have different systems ID
parent 5fdd48c6
Branches
No related tags found
1 merge request!48[GS, ARP] New entrypoint for lyra_gs and ARP related things
/* Copyright (c) 2023 Skyward Experimental Rocketry /* Copyright (c) 2023-2024 Skyward Experimental Rocketry
* Author: Davide Mor * Authors: Davide Mor, Nicolò Caruso
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
#pragma once #pragma once
#include <cstdint> #include <common/Mavlink.h>
#include <cstdint>
namespace Groundstation namespace Groundstation
{ {
constexpr uint8_t GS_SYSTEM_ID = SysIDs::MAV_SYSID_GS;
constexpr uint8_t GS_COMPONENT_ID = 1; constexpr uint8_t GS_COMPONENT_ID = 1;
constexpr uint8_t GS_SYSTEM_ID = 1;
constexpr uint8_t ARP_SYSTEM_ID = SysIDs::MAV_SYSID_ARP;
constexpr uint8_t ARP_COMPONENT_ID = 1;
} // namespace Groundstation } // namespace Groundstation
\ No newline at end of file
...@@ -123,8 +123,8 @@ void BoardStatus::arpRoutine() ...@@ -123,8 +123,8 @@ void BoardStatus::arpRoutine()
} }
mavlink_message_t msg; mavlink_message_t msg;
mavlink_msg_arp_tm_encode(SysIDs::MAV_SYSID_ARP, mavlink_msg_arp_tm_encode(Groundstation::ARP_SYSTEM_ID,
Groundstation::GS_COMPONENT_ID, &msg, &tm); Groundstation::ARP_COMPONENT_ID, &msg, &tm);
getModule<HubBase>()->dispatchIncomingMsg(msg); getModule<HubBase>()->dispatchIncomingMsg(msg);
} }
...@@ -181,7 +181,8 @@ void BoardStatus::GSRoutine() ...@@ -181,7 +181,8 @@ void BoardStatus::GSRoutine()
} }
mavlink_message_t msg; mavlink_message_t msg;
mavlink_msg_arp_tm_encode(GS_SYSTEM_ID, GS_COMPONENT_ID, &msg, &tm); mavlink_msg_arp_tm_encode(Groundstation::GS_SYSTEM_ID, GS_COMPONENT_ID,
&msg, &tm);
getModule<HubBase>()->dispatchIncomingMsg(msg); getModule<HubBase>()->dispatchIncomingMsg(msg);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment