Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/telemetry_packer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#include <zephyr/logging/log.h>
#include <zephyr/zbus/zbus.h>

// MAVLink headers
// clang-format off
#include "mavlink_custom.h" // Needs to be included before any MAVLink header inclusion
Comment thread
mileticveljko marked this conversation as resolved.
#include "common/mavlink.h"
// clang-format on

#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions libs/telemetry/mavlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ STATIC

target_include_directories(mavlink
SYSTEM PUBLIC
include
${GENERATED_DIR}
)

Expand Down
27 changes: 27 additions & 0 deletions libs/telemetry/mavlink/include/mavlink_custom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* This file is part of the efc project <https://github.com/eurus-project/efc/>.
* Copyright (c) (2024 - Present), The efc developers.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __MAVLINK_CUSTOM_H__
#define __MAVLINK_CUSTOM_H__

#include "mavlink_types.h"

/* Prototypes must be visible to anyone including MAVLink */
mavlink_status_t *mavlink_get_channel_status(uint8_t chan);
mavlink_message_t *mavlink_get_channel_buffer(uint8_t chan);

#endif
2 changes: 1 addition & 1 deletion libs/telemetry/mavlink/mavlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "mavlink_types.h"
#include "mavlink_custom.h"

/* Global status and buffer instances for each channel */
static mavlink_status_t chan_statuses[MAVLINK_COMM_NUM_BUFFERS];
Expand Down