File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -212,11 +212,11 @@ void supervisor_bluetooth_init(void) {
212
212
boot_in_discovery_mode = true;
213
213
reset_state = 0x0 ;
214
214
}
215
+ bool bonded = common_hal_bleio_adapter_is_bonded_to_central (& common_hal_bleio_adapter_obj );
215
216
#if !CIRCUITPY_USB_DEVICE
216
217
// Boot into discovery if USB isn't available and we aren't bonded already.
217
218
// Checking here allows us to have the status LED solidly on even if no button was
218
219
// pressed.
219
- bool bonded = common_hal_bleio_adapter_is_bonded_to_central (& common_hal_bleio_adapter_obj );
220
220
bool wifi_workflow_active = false;
221
221
#if CIRCUITPY_WEB_WORKFLOW && CIRCUITPY_WIFI && CIRCUITPY_OS_GETENV
222
222
char _api_password [64 ];
@@ -255,6 +255,11 @@ void supervisor_bluetooth_init(void) {
255
255
if (boot_in_discovery_mode ) {
256
256
common_hal_bleio_adapter_erase_bonding (& common_hal_bleio_adapter_obj );
257
257
}
258
+ if (boot_in_discovery_mode || bonded ) {
259
+ workflow_state = WORKFLOW_ENABLED ;
260
+ } else {
261
+ workflow_state = WORKFLOW_DISABLED ;
262
+ }
258
263
#if CIRCUITPY_STATUS_LED
259
264
new_status_color (BLACK );
260
265
status_led_deinit ();
@@ -358,7 +363,7 @@ void supervisor_bluetooth_disable_workflow(void) {
358
363
359
364
bool supervisor_bluetooth_workflow_is_enabled (void ) {
360
365
#if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE
361
- if (workflow_state == 1 ) {
366
+ if (workflow_state == WORKFLOW_ENABLED ) {
362
367
return true;
363
368
}
364
369
#endif
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ void supervisor_workflow_start(void) {
100
100
101
101
#if CIRCUITPY_BLEIO
102
102
bleio_reset ();
103
- supervisor_bluetooth_enable_workflow ();
104
103
supervisor_start_bluetooth ();
105
104
#endif
106
105
You can’t perform that action at this time.
0 commit comments