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 = {
824
824
return hasVcp ;
825
825
} ,
826
826
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
+
827
836
FILTER_TYPE_FLAGS : {
828
837
PT1 : 0 ,
829
838
BIQUAD : 1 ,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ function MspHelper() {
40
40
BOOTLOADER : 1 ,
41
41
MSC : 2 ,
42
42
MSC_UTC : 3 ,
43
+ BOOTLOADER_FLASH : 4 ,
43
44
} ;
44
45
45
46
self . RESET_TYPES = {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ TABS.setup.initialize = function (callback) {
93
93
94
94
$ ( 'a.rebootBootloader' ) . click ( function ( ) {
95
95
const buffer = [ ] ;
96
- buffer . push ( mspHelper . REBOOT_TYPES . BOOTLOADER ) ;
96
+ buffer . push ( FC . boardHasFlashBootloader ( ) ? mspHelper . REBOOT_TYPES . BOOTLOADER_FLASH : mspHelper . REBOOT_TYPES . BOOTLOADER ) ;
97
97
MSP . send_message ( MSPCodes . MSP_SET_REBOOT , buffer , false ) ;
98
98
} ) ;
99
99
} else {
You can’t perform that action at this time.
0 commit comments