Mavlink_log_info function do not work

Hi there.I’m new for Px4 and i’m trying to send some text message for firmware to QGC message windows.I heard mavlink_log_info() function can do for it like gcs().send_text() function in ardupilot.I try it like following code on a selfwrite function:

mavlink_log_info(“Hi”);

but it doesn’t work.function looks like running but nothing happend on QGC message windows.

And I move it to modules/commander/commander.cpp line599 and change origin code to following:


if (!_health_and_arming_checks.canArm(_vehicle_status.nav_state)) {
			tune_negative(true);
			mavlink_log_info(&_mavlink_log_pub, "Hi\t");
			/*mavlink_log_critical(&_mavlink_log_pub, "Arming denied:  Resolve system health failures first\t");
			events::send(events::ID("commander_arm_denied_resolve_failures"), {events::Log::Critical, events::LogInternal::Info},
				     "Arming denied:  Resolve system health failures first");

			*/
			return TRANSITION_DENIED;
		}

Function running but QGC massage windows still nothing happend.

Any one know how to fix it?Or is there any other way to display text massage in QGC massage windows?Thx :slight_smile: