Explorar el Código

Call power enable and disable for external module

Fixes issues with external module working on 5v line
MX hace 2 años
padre
commit
552bd12d0f
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      subbrute.c

+ 6 - 0
subbrute.c

@@ -179,9 +179,15 @@ int32_t subbrute_app(void* p) {
     scene_manager_next_scene(instance->scene_manager, SubBruteSceneStart);
 
     furi_hal_power_suppress_charge_enter();
+    // Enable power for External CC1101 if it is connected
+    furi_hal_subghz_enable_ext_power();
+
     notification_message(instance->notifications, &sequence_display_backlight_on);
     view_dispatcher_run(instance->view_dispatcher);
     furi_hal_power_suppress_charge_exit();
+    // Disable power for External CC1101 if it was enabled and module is connected
+    furi_hal_subghz_disable_ext_power();
+
     subbrute_free(instance);
 
     return 0;