File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -824,6 +824,15 @@ const FC = {
824824 return hasVcp ;
825825 } ,
826826
827+ boardHasFlashBootloader ( ) {
828+ let hasFlashBootloader = false ;
829+ if ( semver . gte ( this . CONFIG . apiVersion , API_VERSION_1_42 ) ) {
830+ hasFlashBootloader = bit_check ( this . CONFIG . targetCapabilities , this . TARGET_CAPABILITIES_FLAGS . HAS_FLASH_BOOTLOADER ) ;
831+ }
832+
833+ return hasFlashBootloader ;
834+ } ,
835+
827836 FILTER_TYPE_FLAGS : {
828837 PT1 : 0 ,
829838 BIQUAD : 1 ,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ function MspHelper() {
4040 BOOTLOADER : 1 ,
4141 MSC : 2 ,
4242 MSC_UTC : 3 ,
43+ BOOTLOADER_FLASH : 4 ,
4344 } ;
4445
4546 self . RESET_TYPES = {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ TABS.setup.initialize = function (callback) {
9393
9494 $ ( 'a.rebootBootloader' ) . click ( function ( ) {
9595 const buffer = [ ] ;
96- buffer . push ( mspHelper . REBOOT_TYPES . BOOTLOADER ) ;
96+ buffer . push ( FC . boardHasFlashBootloader ( ) ? mspHelper . REBOOT_TYPES . BOOTLOADER_FLASH : mspHelper . REBOOT_TYPES . BOOTLOADER ) ;
9797 MSP . send_message ( MSPCodes . MSP_SET_REBOOT , buffer , false ) ;
9898 } ) ;
9999 } else {
You can’t perform that action at this time.
0 commit comments