mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
extra checks [ci skip]
This commit is contained in:
@@ -250,9 +250,9 @@ static bool expansion_worker_handle_state_connected(
|
||||
if(!expansion_worker_rpc_session_open(instance)) break;
|
||||
instance->state = ExpansionWorkerStateRpcActive;
|
||||
} else if(command == ExpansionFrameControlCommandEnableOtg) {
|
||||
furi_hal_power_enable_otg();
|
||||
if(!furi_hal_power_is_otg_enabled()) furi_hal_power_enable_otg();
|
||||
} else if(command == ExpansionFrameControlCommandDisableOtg) {
|
||||
furi_hal_power_disable_otg();
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -219,9 +219,9 @@ void rpc_system_gpio_set_otg_mode(const PB_Main* request, void* context) {
|
||||
const PB_Gpio_GpioOtgMode mode = request->content.gpio_set_otg_mode.mode;
|
||||
|
||||
if(mode == PB_Gpio_GpioOtgMode_OFF) {
|
||||
furi_hal_power_disable_otg();
|
||||
if(furi_hal_power_is_otg_enabled()) furi_hal_power_disable_otg();
|
||||
} else {
|
||||
furi_hal_power_enable_otg();
|
||||
if(!furi_hal_power_is_otg_enabled()) furi_hal_power_enable_otg();
|
||||
}
|
||||
|
||||
rpc_send_and_release_empty(session, request->command_id, PB_CommandStatus_OK);
|
||||
|
||||
Reference in New Issue
Block a user