소스 검색

[FL-1881] iButton cli: enable "OTG" when performing "onewire search" #725

SG 4 년 전
부모
커밋
416e1bda35
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      applications/ibutton/ibutton-cli.cpp

+ 4 - 0
applications/ibutton/ibutton-cli.cpp

@@ -248,6 +248,8 @@ void onewire_cli_search(Cli* cli) {
     printf("Search started\r\n");
 
     onewire.start();
+    furi_hal_power_enable_otg();
+
     while(!done) {
         if(onewire.search(address, true) != 1) {
             printf("Search finished\r\n");
@@ -263,6 +265,8 @@ void onewire_cli_search(Cli* cli) {
         }
         delay(100);
     }
+
+    furi_hal_power_disable_otg();
     onewire.stop();
 }