1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-14 11:59:53 +03:00

Add 'Pilot name' to the Configurator UI; rename 'Display name' to 'Pilot name'; rename 'name' to 'craft_name'

- add pilot name (display_name) to the Configuration tab

  - add handling for the 'MSP2_GET_TEXT' and 'MSP2_SET_TEXT' commands

    - with support for the 'MSP2TEXT_PILOT_DISPLAY_NAME' ('displayName') config prop

  - backup handling of the 'displayName' config prop

  - add a text field to configure the pilot name in the 'Configuration/Personalization' box

    - using the 'display_name' FC config prop and the 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT' MSP commands
    - add tooltips for both the 'Craft name' and 'Pilot name' fileds

  - rename the 'Display name' OSD element to 'Display name (Pilot name)'

    - expand the tooltip descriptions of 'Craft name' and 'Display name (Pilot name)'
    - change the default 'DISPLAY_NAME' OSD element preview to 'PILOT_NAME'

  - remove the default 'JOE PILOT' string value of the 'displayName' FC initial config

  - backwards compatibility handling for 'display_name' pre MSP v1.45

- rename 'display name' to 'pilot name'

  - add 'FC.CONFIG.pilotName' in place of 'FC.CONFIG.displayName'
  - add the 'PILOT_NAME' OSD element and keep backwards compatibility
    for the 'DISPLAY_NAME' OSD element (depending on the MSP version)

- rename 'FC.CONFIG.name' to 'FC.CONFIG.craftName'

  - add the 'MSP2TEXT_CRAFT_NAME' const for 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT'
  - use 'MSP2_GET_TEXT' / 'MSP2_SET_TEXT' to get/set 'FC.CONFIG.craftName'
  - keep full backwards compatibility pre MSP v1.45 (using the legacy 'MSP_NAME' / 'MSP_SET_NAME')
This commit is contained in:
Krasiyan Nedelchev 2022-02-07 00:49:21 +01:00
parent 3c776758a3
commit 3873f82c23
11 changed files with 254 additions and 47 deletions

View file

@ -8,8 +8,8 @@ const MSPCodes = {
MSP_BOARD_INFO: 4,
MSP_BUILD_INFO: 5,
MSP_NAME: 10,
MSP_SET_NAME: 11,
MSP_NAME: 10, // DEPRECATED IN MSP 1.45
MSP_SET_NAME: 11, // DEPRECATED IN MSP 1.45
MSP_BATTERY_CONFIG: 32,
MSP_SET_BATTERY_CONFIG: 33,
@ -192,4 +192,10 @@ const MSPCodes = {
MSP2_SET_MOTOR_OUTPUT_REORDERING: 0x3002,
MSP2_SEND_DSHOT_COMMAND: 0x3003,
MSP2_GET_VTX_DEVICE_STATUS: 0x3004,
MSP2_GET_TEXT: 0x3006,
MSP2_SET_TEXT: 0x3007,
// MSP2_GET_TEXT and MSP2_SET_TEXT variable types
MSP2TEXT_PILOT_NAME: 1,
MSP2TEXT_CRAFT_NAME: 2,
};