mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
AP_RCTelemetry: correct firmware string length for CRSF
This commit is contained in:
parent
7dcc5dd7ac
commit
40ec8c723b
@ -777,7 +777,7 @@ void AP_CRSF_Telem::calc_device_info() {
|
|||||||
|
|
||||||
const AP_FWVersion &fwver = AP::fwversion();
|
const AP_FWVersion &fwver = AP::fwversion();
|
||||||
// write out the name with version, max width is 60 - 18 = the meaning of life
|
// write out the name with version, max width is 60 - 18 = the meaning of life
|
||||||
int32_t n = strlen(fwver.fw_string);
|
int32_t n = strlen(fwver.fw_short_string);
|
||||||
strncpy((char*)_telem.ext.info.payload, fwver.fw_short_string, 41);
|
strncpy((char*)_telem.ext.info.payload, fwver.fw_short_string, 41);
|
||||||
n = MIN(n + 1, 42);
|
n = MIN(n + 1, 42);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user