mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
Lockscreen: Separate 'Allow RPC While Locked' for USB/BLE (#343)
* Lockscreen: Separate 'Allow RPC While Locked' for USB/Bluetooth (BLE) - #330, split of the `allow_locked_rpc_commands` bool into `allow_locked_rpc_usb` and `allow_locked_rpc_ble` to allow the connections separately. * Shorter wording * Update changelog --------- Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
@@ -385,9 +385,10 @@ static void
|
||||
}
|
||||
|
||||
RpcSession* rpc_session_open(Rpc* rpc, RpcOwner owner) {
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock) &&
|
||||
!momentum_settings.allow_locked_rpc_commands)
|
||||
return NULL;
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
|
||||
if(owner == RpcOwnerUsb && !momentum_settings.allow_locked_rpc_usb) return NULL;
|
||||
if(owner == RpcOwnerBle && !momentum_settings.allow_locked_rpc_ble) return NULL;
|
||||
}
|
||||
|
||||
furi_check(rpc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user