@ -55,6 +55,8 @@ const AP_Param::Info Copter::var_info[] = {
@@ -55,6 +55,8 @@ const AP_Param::Info Copter::var_info[] = {
// @Description: For mark board name last
// @User: @Binsir
GSCALAR ( sysid_board_name_2nd , " SYSID_BDNAME_P2 " , 1001 ) ,
// 0:rs100, 1:M66, 2:RF610 3:zrzk.20qt2
GSCALAR ( sysid_type , " SYSID_TYPE " , 0 ) ,
// @Param: SYSID_THISMAV
// @DisplayName: MAVLink system ID of this vehicle
@ -1631,11 +1633,25 @@ const char* Copter::get_sysid_board_id(void)
@@ -1631,11 +1633,25 @@ const char* Copter::get_sysid_board_id(void)
int32_t nameValue1 = ( int32_t ) g . sysid_board_name_1st ;
int32_t nameValue2 = ( int32_t ) g . sysid_board_name_2nd ;
// snprintf(buf, sizeof(buf), "Version: zr-v4.0.3 ,Board ID: ZRZK.20QT2.%d",(int)nameValue2);
int8_t type = g . sysid_type ;
switch ( type )
{
case 0 :
snprintf ( buf , sizeof ( buf ) , " Version: zr-v4.0.3 ,ID: RS100%04d%05d " , ( int ) nameValue1 , ( int ) nameValue2 ) ;
// snprintf(buf, sizeof(buf), "Version: zr-v4.0.3 ,ID: M660%04d%05d",(int)nameValue1,(int)nameValue2);
// snprintf(buf, sizeof(buf), "Version: zr-v4.0.3 ,ID: RF610%04d%05d",(int)nameValue1,(int)nameValue2);
break ;
case 1 :
snprintf ( buf , sizeof ( buf ) , " Version: zr-v4.0.3 ,ID: M660%04d%05d " , ( int ) nameValue1 , ( int ) nameValue2 ) ;
break ;
case 2 :
snprintf ( buf , sizeof ( buf ) , " Version: zr-v4.0.3 ,ID: RF610%04d%05d " , ( int ) nameValue1 , ( int ) nameValue2 ) ;
break ;
case 3 :
snprintf ( buf , sizeof ( buf ) , " Version: zr-v4.0.3 ,Board ID: ZRZK.20QT2.%d " , ( int ) nameValue2 ) ;
break ;
default :
break ;
}
AP : : logger ( ) . Write_Message ( buf ) ;
return buf ;
}