Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mavlink.cpp: fix errors that occur due to sending empty string #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion RemoteIDModule/mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,11 @@ void MAVLinkSerial::process_packet(mavlink_status_t &status, mavlink_message_t &

void MAVLinkSerial::arm_status_send(void)
{
static constexpr char reason_none[50] = "";

const uint8_t status = parse_fail==nullptr?MAV_ODID_ARM_STATUS_GOOD_TO_ARM:MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC;
const char *reason = parse_fail==nullptr?"":parse_fail;
const char *reason = parse_fail==nullptr?reason_none:parse_fail;

mavlink_msg_open_drone_id_arm_status_send(
chan,
status,
Expand Down
Loading