GCS_MAVLink: don't send statustext from other than main thread

This fixes high stack usage in the RCIN thread when it notifies the
GCS of a new RCIN protocol. The problem is severe when signing is
enabled, as signing adds over 500 bytes to stack cost of sending a
mavlink msg

fixes issue #13615
This commit is contained in:
Andrew Tridgell 2020-02-20 12:59:01 +11:00
parent 10ef74172c
commit d3ee8c8795

View File

@ -1795,7 +1795,9 @@ void GCS::send_statustext(MAV_SEVERITY severity, uint8_t dest_bitmask, const cha
_statustext_queue.push_force(statustext);
// try and send immediately if possible
service_statustext();
if (hal.scheduler->in_main_thread()) {
service_statustext();
}
}
/*