|
|
|
@ -43,6 +43,25 @@ const AP_Param::Info Copter::var_info[] = {
@@ -43,6 +43,25 @@ const AP_Param::Info Copter::var_info[] = {
|
|
|
|
|
// @ReadOnly: True
|
|
|
|
|
GSCALAR(format_version, "SYSID_SW_MREV", 0), |
|
|
|
|
|
|
|
|
|
// @Param: BOARD_ID
|
|
|
|
|
// @DisplayName: Board ID
|
|
|
|
|
// @Description: For mark board id
|
|
|
|
|
// @User: @Brown
|
|
|
|
|
GSCALAR(sysid_board_id, "SYSID_BOARD_ID", 100), |
|
|
|
|
|
|
|
|
|
// @Param: SYSID_BD_NAME1
|
|
|
|
|
// @DisplayName: Board Name 1st
|
|
|
|
|
// @Description: For mark board name first
|
|
|
|
|
// @Range: 1-4294967269
|
|
|
|
|
// @User: @Binsir
|
|
|
|
|
GSCALAR(sysid_board_name_1st, "SYSID_BDNAME_P1", 12848 ), |
|
|
|
|
|
|
|
|
|
// @Param: SYSID_BD_NAME2
|
|
|
|
|
// @DisplayName: Board Name 2nd
|
|
|
|
|
// @Description: For mark board name last
|
|
|
|
|
// @User: @Binsir
|
|
|
|
|
GSCALAR(sysid_board_name_2nd, "SYSID_BDNAME_P2", 5329970), |
|
|
|
|
|
|
|
|
|
// @Param: SYSID_THISMAV
|
|
|
|
|
// @DisplayName: MAVLink system ID of this vehicle
|
|
|
|
|
// @Description: Allows setting an individual MAVLink system id for this vehicle to distinguish it from others on the same network
|
|
|
|
@ -1594,3 +1613,26 @@ void Copter::convert_fs_options_params(void)
@@ -1594,3 +1613,26 @@ void Copter::convert_fs_options_params(void)
|
|
|
|
|
// AP_Param::set_and_save_by_name("FS_OPTIONS", fs_options_converted);
|
|
|
|
|
fs_opt->set_and_save(fs_options_converted); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// modify by @Brown
|
|
|
|
|
const char* Copter::get_sysid_board_id(void) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
static char buf[50]; |
|
|
|
|
// snprintf(buf, sizeof(buf), "Version: v3.5.6 ,Board ID: ZRZK.19QT3.%d",(int)g.sysid_board_id);
|
|
|
|
|
|
|
|
|
|
int32_t nameValue1 =(int32_t) g.sysid_board_name_1st; |
|
|
|
|
int32_t nameValue2 = (int32_t)g.sysid_board_name_2nd;
|
|
|
|
|
char name[6] = {' ',' ',' ',' ',' ','.'};
|
|
|
|
|
// memset(name,0,6);
|
|
|
|
|
nameValue2 = nameValue2 & 0xffffff; |
|
|
|
|
// name[5] = "a";
|
|
|
|
|
name[4] = nameValue2&0xFF; |
|
|
|
|
name[3] = nameValue2>>8&0xFF;
|
|
|
|
|
name[2] = nameValue2>>16& 0xFF;
|
|
|
|
|
name[1] = nameValue1&0xFF;
|
|
|
|
|
name[0] = nameValue1>>8 & 0xFF;
|
|
|
|
|
snprintf(buf, sizeof(buf), "Version: zr-v4.0 ,Board ID: ZRZK.%5s%d",name,(int)g.sysid_board_id); |
|
|
|
|
return buf; |
|
|
|
|
} |