Merge branch 'fz-dev' into dev

This commit is contained in:
MX 2023-04-19 17:03:56 +03:00
commit 2de476b11d
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
21 changed files with 218 additions and 40 deletions

View File

@ -84,7 +84,7 @@ static void test_rpc_setup(void) {
rpc = furi_record_open(RECORD_RPC);
for(int i = 0; !(rpc_session[0].session) && (i < 10000); ++i) {
rpc_session[0].session = rpc_session_open(rpc);
rpc_session[0].session = rpc_session_open(rpc, RpcOwnerUnknown);
furi_delay_tick(1);
}
furi_check(rpc_session[0].session);
@ -104,7 +104,7 @@ static void test_rpc_setup_second_session(void) {
furi_check(!(rpc_session[1].session));
for(int i = 0; !(rpc_session[1].session) && (i < 10000); ++i) {
rpc_session[1].session = rpc_session_open(rpc);
rpc_session[1].session = rpc_session_open(rpc, RpcOwnerUnknown);
furi_delay_tick(1);
}
furi_check(rpc_session[1].session);

View File

@ -225,7 +225,7 @@ static bool bt_on_gap_event_callback(GapEvent event, void* context) {
furi_event_flag_clear(bt->rpc_event, BT_RPC_EVENT_DISCONNECTED);
if(bt->profile == BtProfileSerial) {
// Open RPC session
bt->rpc_session = rpc_session_open(bt->rpc);
bt->rpc_session = rpc_session_open(bt->rpc, RpcOwnerBle);
if(bt->rpc_session) {
FURI_LOG_I(TAG, "Open RPC connection");
rpc_session_set_send_bytes_callback(bt->rpc_session, bt_rpc_send_bytes_callback);

View File

@ -46,6 +46,12 @@ static void desktop_dummy_mode_icon_draw_callback(Canvas* canvas, void* context)
canvas_draw_icon(canvas, 0, 0, &I_GameMode_11x8);
}
static void desktop_stealth_mode_icon_draw_callback(Canvas* canvas, void* context) {
UNUSED(context);
furi_assert(canvas);
canvas_draw_icon(canvas, 0, 0, &I_Muted_8x8);
}
static bool desktop_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
Desktop* desktop = (Desktop*)context;
@ -156,6 +162,17 @@ void desktop_set_dummy_mode_state(Desktop* desktop, bool enabled) {
desktop->in_transition = false;
}
void desktop_set_stealth_mode_state(Desktop* desktop, bool enabled) {
desktop->in_transition = true;
if(enabled) {
furi_hal_rtc_set_flag(FuriHalRtcFlagStealthMode);
} else {
furi_hal_rtc_reset_flag(FuriHalRtcFlagStealthMode);
}
view_port_enabled_set(desktop->stealth_mode_icon_viewport, enabled);
desktop->in_transition = false;
}
Desktop* desktop_alloc() {
Desktop* desktop = malloc(sizeof(Desktop));
@ -247,6 +264,18 @@ Desktop* desktop_alloc() {
view_port_enabled_set(desktop->dummy_mode_icon_viewport, false);
gui_add_view_port(desktop->gui, desktop->dummy_mode_icon_viewport, GuiLayerStatusBarLeft);
// Stealth mode icon
desktop->stealth_mode_icon_viewport = view_port_alloc();
view_port_set_width(desktop->stealth_mode_icon_viewport, icon_get_width(&I_Muted_8x8));
view_port_draw_callback_set(
desktop->stealth_mode_icon_viewport, desktop_stealth_mode_icon_draw_callback, desktop);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode)) {
view_port_enabled_set(desktop->stealth_mode_icon_viewport, true);
} else {
view_port_enabled_set(desktop->stealth_mode_icon_viewport, false);
}
gui_add_view_port(desktop->gui, desktop->stealth_mode_icon_viewport, GuiLayerStatusBarLeft);
// Special case: autostart application is already running
desktop->loader = furi_record_open(RECORD_LOADER);
if(loader_is_locked(desktop->loader) &&

View File

@ -59,6 +59,7 @@ struct Desktop {
ViewPort* lock_icon_viewport;
ViewPort* dummy_mode_icon_viewport;
ViewPort* stealth_mode_icon_viewport;
AnimationManager* animation_manager;
@ -79,3 +80,4 @@ void desktop_free(Desktop* desktop);
void desktop_lock(Desktop* desktop);
void desktop_unlock(Desktop* desktop);
void desktop_set_dummy_mode_state(Desktop* desktop, bool enabled);
void desktop_set_stealth_mode_state(Desktop* desktop, bool enabled);

View File

@ -27,6 +27,8 @@ void desktop_scene_lock_menu_on_enter(void* context) {
desktop_lock_menu_set_callback(desktop->lock_menu, desktop_scene_lock_menu_callback, desktop);
desktop_lock_menu_set_pin_state(desktop->lock_menu, desktop->settings.pin_code.length > 0);
desktop_lock_menu_set_dummy_mode_state(desktop->lock_menu, desktop->settings.dummy_mode);
desktop_lock_menu_set_stealth_mode_state(
desktop->lock_menu, furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode));
desktop_lock_menu_set_idx(desktop->lock_menu, 0);
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewIdLockMenu);
@ -78,6 +80,16 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
scene_manager_search_and_switch_to_previous_scene(
desktop->scene_manager, DesktopSceneMain);
break;
case DesktopLockMenuEventStealthModeOn:
desktop_set_stealth_mode_state(desktop, true);
scene_manager_search_and_switch_to_previous_scene(
desktop->scene_manager, DesktopSceneMain);
break;
case DesktopLockMenuEventStealthModeOff:
desktop_set_stealth_mode_state(desktop, false);
scene_manager_search_and_switch_to_previous_scene(
desktop->scene_manager, DesktopSceneMain);
break;
default:
break;
}

View File

@ -39,6 +39,8 @@ typedef enum {
DesktopLockMenuEventPinLock,
DesktopLockMenuEventDummyModeOn,
DesktopLockMenuEventDummyModeOff,
DesktopLockMenuEventStealthModeOn,
DesktopLockMenuEventStealthModeOff,
DesktopAnimationEventCheckAnimation,
DesktopAnimationEventNewIdleAnimation,

View File

@ -7,7 +7,7 @@
typedef enum {
DesktopLockMenuIndexLock,
DesktopLockMenuIndexPinLock,
DesktopLockMenuIndexStealth,
DesktopLockMenuIndexDummy,
DesktopLockMenuIndexTotalCount
@ -39,6 +39,14 @@ void desktop_lock_menu_set_dummy_mode_state(DesktopLockMenuView* lock_menu, bool
true);
}
void desktop_lock_menu_set_stealth_mode_state(DesktopLockMenuView* lock_menu, bool stealth_mode) {
with_view_model(
lock_menu->view,
DesktopLockMenuViewModel * model,
{ model->stealth_mode = stealth_mode; },
true);
}
void desktop_lock_menu_set_idx(DesktopLockMenuView* lock_menu, uint8_t idx) {
furi_assert(idx < DesktopLockMenuIndexTotalCount);
with_view_model(
@ -58,11 +66,11 @@ void desktop_lock_menu_draw_callback(Canvas* canvas, void* model) {
if(i == DesktopLockMenuIndexLock) {
str = "Lock";
} else if(i == DesktopLockMenuIndexPinLock) {
if(m->pin_is_set) {
str = "Lock with PIN";
} else if(i == DesktopLockMenuIndexStealth) {
if(m->stealth_mode) {
str = "Sound Mode";
} else {
str = "Set PIN";
str = "Stealth Mode";
}
} else if(i == DesktopLockMenuIndexDummy) { //-V547
if(m->dummy_mode) {
@ -93,6 +101,8 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
uint8_t idx = 0;
bool consumed = false;
bool dummy_mode = false;
bool stealth_mode = false;
bool pin_is_set = false;
bool update = false;
with_view_model(
@ -120,14 +130,24 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
}
idx = model->idx;
dummy_mode = model->dummy_mode;
stealth_mode = model->stealth_mode;
pin_is_set = model->pin_is_set;
},
update);
if(event->key == InputKeyOk) {
if((idx == DesktopLockMenuIndexLock) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventLock, lock_menu->context);
} else if((idx == DesktopLockMenuIndexPinLock) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventPinLock, lock_menu->context);
if((idx == DesktopLockMenuIndexLock)) {
if((pin_is_set) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventPinLock, lock_menu->context);
} else if((pin_is_set == false) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventLock, lock_menu->context);
}
} else if(idx == DesktopLockMenuIndexStealth) {
if((stealth_mode == false) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventStealthModeOn, lock_menu->context);
} else if((stealth_mode == true) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventStealthModeOff, lock_menu->context);
}
} else if(idx == DesktopLockMenuIndexDummy) {
if((dummy_mode == false) && (event->type == InputTypeShort)) {
lock_menu->callback(DesktopLockMenuEventDummyModeOn, lock_menu->context);

View File

@ -19,6 +19,7 @@ typedef struct {
uint8_t idx;
bool pin_is_set;
bool dummy_mode;
bool stealth_mode;
} DesktopLockMenuViewModel;
void desktop_lock_menu_set_callback(
@ -29,6 +30,7 @@ void desktop_lock_menu_set_callback(
View* desktop_lock_menu_get_view(DesktopLockMenuView* lock_menu);
void desktop_lock_menu_set_pin_state(DesktopLockMenuView* lock_menu, bool pin_is_set);
void desktop_lock_menu_set_dummy_mode_state(DesktopLockMenuView* lock_menu, bool dummy_mode);
void desktop_lock_menu_set_stealth_mode_state(DesktopLockMenuView* lock_menu, bool stealth_mode);
void desktop_lock_menu_set_idx(DesktopLockMenuView* lock_menu, uint8_t idx);
DesktopLockMenuView* desktop_lock_menu_alloc();
void desktop_lock_menu_free(DesktopLockMenuView* lock_menu);

View File

@ -20,9 +20,9 @@ static const uint8_t reset_sound_mask = 1 << 4;
static const uint8_t reset_display_mask = 1 << 5;
static const uint8_t reset_blink_mask = 1 << 6;
void notification_vibro_on();
void notification_vibro_on(bool force);
void notification_vibro_off();
void notification_sound_on(float freq, float volume);
void notification_sound_on(float freq, float volume, bool force);
void notification_sound_off();
uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8_t value);
@ -141,17 +141,21 @@ uint32_t notification_settings_display_off_delay_ticks(NotificationApp* app) {
}
// generics
void notification_vibro_on() {
furi_hal_vibro_on(true);
void notification_vibro_on(bool force) {
if(!furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode) || force) {
furi_hal_vibro_on(true);
}
}
void notification_vibro_off() {
furi_hal_vibro_on(false);
}
void notification_sound_on(float freq, float volume) {
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
furi_hal_speaker_start(freq, volume);
void notification_sound_on(float freq, float volume, bool force) {
if(!furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode) || force) {
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(30)) {
furi_hal_speaker_start(freq, volume);
}
}
}
@ -174,6 +178,8 @@ void notification_process_notification_message(
NotificationApp* app,
NotificationAppMessage* message) {
uint32_t notification_message_index = 0;
bool force_volume = false;
bool force_vibro = false;
const NotificationMessage* notification_message;
notification_message = (*message->sequence)[notification_message_index];
@ -269,7 +275,7 @@ void notification_process_notification_message(
break;
case NotificationMessageTypeVibro:
if(notification_message->data.vibro.on) {
if(vibro_setting) notification_vibro_on();
if(vibro_setting) notification_vibro_on(force_vibro);
} else {
notification_vibro_off();
}
@ -278,7 +284,8 @@ void notification_process_notification_message(
case NotificationMessageTypeSoundOn:
notification_sound_on(
notification_message->data.sound.frequency,
notification_message->data.sound.volume * speaker_volume_setting);
notification_message->data.sound.volume * speaker_volume_setting,
force_volume);
reset_mask |= reset_sound_mask;
break;
case NotificationMessageTypeSoundOff:
@ -307,9 +314,11 @@ void notification_process_notification_message(
break;
case NotificationMessageTypeForceSpeakerVolumeSetting:
speaker_volume_setting = notification_message->data.forced_settings.speaker_volume;
force_volume = true;
break;
case NotificationMessageTypeForceVibroSetting:
vibro_setting = notification_message->data.forced_settings.vibro;
force_vibro = true;
break;
case NotificationMessageTypeForceDisplayBrightnessSetting:
display_brightness_setting =

View File

@ -76,6 +76,7 @@ struct RpcSession {
RpcBufferIsEmptyCallback buffer_is_empty_callback;
RpcSessionClosedCallback closed_callback;
RpcSessionTerminatedCallback terminated_callback;
RpcOwner owner;
void* context;
};
@ -83,6 +84,11 @@ struct Rpc {
FuriMutex* busy_mutex;
};
RpcOwner rpc_session_get_owner(RpcSession* session) {
furi_assert(session);
return session->owner;
}
static void rpc_close_session_process(const PB_Main* request, void* context) {
furi_assert(request);
furi_assert(context);
@ -348,7 +354,7 @@ static void rpc_session_free_callback(FuriThreadState thread_state, void* contex
}
}
RpcSession* rpc_session_open(Rpc* rpc) {
RpcSession* rpc_session_open(Rpc* rpc, RpcOwner owner) {
furi_assert(rpc);
RpcSession* session = malloc(sizeof(RpcSession));
@ -357,6 +363,7 @@ RpcSession* rpc_session_open(Rpc* rpc) {
session->rpc = rpc;
session->terminate = false;
session->decode_error = false;
session->owner = owner;
RpcHandlerDict_init(session->handlers);
session->decoded_message = malloc(sizeof(PB_Main));

View File

@ -30,6 +30,21 @@ typedef void (*RpcSessionClosedCallback)(void* context);
* and all operations were finished */
typedef void (*RpcSessionTerminatedCallback)(void* context);
/** RPC owner */
typedef enum {
RpcOwnerUnknown = 0,
RpcOwnerBle,
RpcOwnerUsb,
RpcOwnerCount,
} RpcOwner;
/** Get RPC session owner
*
* @param session pointer to RpcSession descriptor
* @return session owner
*/
RpcOwner rpc_session_get_owner(RpcSession* session);
/** Open RPC session
*
* USAGE:
@ -44,10 +59,11 @@ typedef void (*RpcSessionTerminatedCallback)(void* context);
*
*
* @param rpc instance
* @param owner owner of session
* @return pointer to RpcSession descriptor, or
* NULL if RPC is busy and can't open session now
*/
RpcSession* rpc_session_open(Rpc* rpc);
RpcSession* rpc_session_open(Rpc* rpc, RpcOwner owner);
/** Close RPC session
* It is guaranteed that no callbacks will be called

View File

@ -47,7 +47,7 @@ void rpc_cli_command_start_session(Cli* cli, FuriString* args, void* context) {
FURI_LOG_D(TAG, "Free memory %lu", mem_before);
furi_hal_usb_lock();
RpcSession* rpc_session = rpc_session_open(rpc);
RpcSession* rpc_session = rpc_session_open(rpc, RpcOwnerUsb);
if(rpc_session == NULL) {
printf("Session start error\r\n");
furi_hal_usb_unlock();

View File

@ -2,6 +2,7 @@
#include "rpc_i.h"
#include "gui.pb.h"
#include <gui/gui_i.h>
#include <assets_icons.h>
#define TAG "RpcGui"
@ -31,6 +32,8 @@ typedef struct {
uint32_t input_key_counter[InputKeyMAX];
uint32_t input_counter;
ViewPort* rpc_session_active_viewport;
} RpcGuiSystem;
static const PB_Gui_ScreenOrientation rpc_system_gui_screen_orientation_map[] = {
@ -352,6 +355,12 @@ static void rpc_system_gui_virtual_display_frame_process(const PB_Main* request,
(void)session;
}
static void rpc_active_session_icon_draw_callback(Canvas* canvas, void* context) {
UNUSED(context);
furi_assert(canvas);
canvas_draw_icon(canvas, 0, 0, &I_Rpc_active_7x8);
}
void* rpc_system_gui_alloc(RpcSession* session) {
furi_assert(session);
@ -359,6 +368,18 @@ void* rpc_system_gui_alloc(RpcSession* session) {
rpc_gui->gui = furi_record_open(RECORD_GUI);
rpc_gui->session = session;
// Active session icon
rpc_gui->rpc_session_active_viewport = view_port_alloc();
view_port_set_width(rpc_gui->rpc_session_active_viewport, icon_get_width(&I_Rpc_active_7x8));
view_port_draw_callback_set(
rpc_gui->rpc_session_active_viewport, rpc_active_session_icon_draw_callback, session);
if(rpc_session_get_owner(rpc_gui->session) != RpcOwnerBle) {
view_port_enabled_set(rpc_gui->rpc_session_active_viewport, true);
} else {
view_port_enabled_set(rpc_gui->rpc_session_active_viewport, false);
}
gui_add_view_port(rpc_gui->gui, rpc_gui->rpc_session_active_viewport, GuiLayerStatusBarLeft);
RpcHandler rpc_handler = {
.message_handler = NULL,
.decode_submessage = NULL,
@ -399,6 +420,9 @@ void rpc_system_gui_free(void* context) {
rpc_gui->virtual_display_not_empty = false;
}
gui_remove_view_port(rpc_gui->gui, rpc_gui->rpc_session_active_viewport);
view_port_free(rpc_gui->rpc_session_active_viewport);
if(rpc_gui->is_streaming) {
rpc_gui->is_streaming = false;
// Remove GUI framebuffer callback
@ -415,4 +439,4 @@ void rpc_system_gui_free(void* context) {
}
furi_record_close(RECORD_GUI);
free(rpc_gui);
}
}

View File

@ -163,18 +163,33 @@ static NotificationAppSettings* alloc_settings() {
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, backlight_text[value_index]);
item = variable_item_list_add(
app->variable_item_list, "Volume", VOLUME_COUNT, volume_changed, app);
value_index =
value_index_float(app->notification->settings.speaker_volume, volume_value, VOLUME_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, volume_text[value_index]);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode)) {
item = variable_item_list_add(app->variable_item_list, "Volume", 1, NULL, app);
value_index = 0;
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, "Stealth");
} else {
item = variable_item_list_add(
app->variable_item_list, "Volume", VOLUME_COUNT, volume_changed, app);
value_index = value_index_float(
app->notification->settings.speaker_volume, volume_value, VOLUME_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, volume_text[value_index]);
}
item =
variable_item_list_add(app->variable_item_list, "Vibro", VIBRO_COUNT, vibro_changed, app);
value_index = value_index_bool(app->notification->settings.vibro_on, vibro_value, VIBRO_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, vibro_text[value_index]);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode)) {
item = variable_item_list_add(app->variable_item_list, "Vibro", 1, NULL, app);
value_index = 0;
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, "Stealth");
} else {
item = variable_item_list_add(
app->variable_item_list, "Vibro", VIBRO_COUNT, vibro_changed, app);
value_index =
value_index_bool(app->notification->settings.vibro_on, vibro_value, VIBRO_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, vibro_text[value_index]);
}
app->view_dispatcher = view_dispatcher_alloc();
view_dispatcher_enable_queue(app->view_dispatcher);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,23 @@
# Reading RAW RFID data
Flipper Zero has the option to read RAW data from 125 kHz cards that allows you to record the card's data and save it, similar to how a dictaphone records sound.
To use this function, you need to activate the Debug mode on your Flipper Zero by doing the following:
1. Go to **Main Menu****Settings****System**.
2. Set **Debug** to **ON**.
Once the Debug mode is activated on your Flipper Zero, you can read RAW data from 125 kHz RFID cards:
1. Go to **Main Menu****125 kHz RFID****Extra Actions**.
2. Select **RAW RFID** data and name the raw file.
3. Read instructions and press **OK**.
4. Apply the card to Flipper Zero's back.
5. Once the reading is finished, press **OK**.
Two files with data (with ASK and PSK modulations) will be saved in the `lfrfid` folder on the microSD card. Now, you can share it and the card's photo with developers by creating an issue on GitHub.

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,22.0,,
Version,+,23.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -1596,7 +1596,8 @@ Function,-,rindex,char*,"const char*, int"
Function,+,rpc_session_close,void,RpcSession*
Function,+,rpc_session_feed,size_t,"RpcSession*, uint8_t*, size_t, TickType_t"
Function,+,rpc_session_get_available_size,size_t,RpcSession*
Function,+,rpc_session_open,RpcSession*,Rpc*
Function,+,rpc_session_get_owner,RpcOwner,RpcSession*
Function,+,rpc_session_open,RpcSession*,"Rpc*, RpcOwner"
Function,+,rpc_session_set_buffer_is_empty_callback,void,"RpcSession*, RpcBufferIsEmptyCallback"
Function,+,rpc_session_set_close_callback,void,"RpcSession*, RpcSessionClosedCallback"
Function,+,rpc_session_set_context,void,"RpcSession*, void*"

1 entry status name type params
2 Version + 22.0 23.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
1596 Function + rpc_session_close void RpcSession*
1597 Function + rpc_session_feed size_t RpcSession*, uint8_t*, size_t, TickType_t
1598 Function + rpc_session_get_available_size size_t RpcSession*
1599 Function + rpc_session_open rpc_session_get_owner RpcSession* RpcOwner Rpc* RpcSession*
1600 Function + rpc_session_open RpcSession* Rpc*, RpcOwner
1601 Function + rpc_session_set_buffer_is_empty_callback void RpcSession*, RpcBufferIsEmptyCallback
1602 Function + rpc_session_set_close_callback void RpcSession*, RpcSessionClosedCallback
1603 Function + rpc_session_set_context void RpcSession*, void*

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,22.0,,
Version,+,23.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -2414,7 +2414,8 @@ Function,-,roundl,long double,long double
Function,+,rpc_session_close,void,RpcSession*
Function,+,rpc_session_feed,size_t,"RpcSession*, uint8_t*, size_t, TickType_t"
Function,+,rpc_session_get_available_size,size_t,RpcSession*
Function,+,rpc_session_open,RpcSession*,Rpc*
Function,+,rpc_session_get_owner,RpcOwner,RpcSession*
Function,+,rpc_session_open,RpcSession*,"Rpc*, RpcOwner"
Function,+,rpc_session_set_buffer_is_empty_callback,void,"RpcSession*, RpcBufferIsEmptyCallback"
Function,+,rpc_session_set_close_callback,void,"RpcSession*, RpcSessionClosedCallback"
Function,+,rpc_session_set_context,void,"RpcSession*, void*"

1 entry status name type params
2 Version + 22.0 23.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
2414 Function + rpc_session_close void RpcSession*
2415 Function + rpc_session_feed size_t RpcSession*, uint8_t*, size_t, TickType_t
2416 Function + rpc_session_get_available_size size_t RpcSession*
2417 Function + rpc_session_open rpc_session_get_owner RpcSession* RpcOwner Rpc* RpcSession*
2418 Function + rpc_session_open RpcSession* Rpc*, RpcOwner
2419 Function + rpc_session_set_buffer_is_empty_callback void RpcSession*, RpcBufferIsEmptyCallback
2420 Function + rpc_session_set_close_callback void RpcSession*, RpcSessionClosedCallback
2421 Function + rpc_session_set_context void RpcSession*, void*

View File

@ -31,6 +31,7 @@ typedef enum {
FuriHalRtcFlagC2Update = (1 << 3),
FuriHalRtcFlagHandOrient = (1 << 4),
FuriHalRtcFlagLegacySleep = (1 << 5),
FuriHalRtcFlagStealthMode = (1 << 6),
} FuriHalRtcFlag;
typedef enum {

View File

@ -1,6 +1,8 @@
from SCons.Platform import TempFileMunge
from SCons.Node import FS
from SCons.Errors import UserError
from SCons.Warnings import warn, WarningOnByDefault
import os
import multiprocessing
@ -246,7 +248,12 @@ known_extapps = [
for apptype in apps_to_build_as_faps
for app in appenv["APPBUILD"].get_apps_of_type(apptype, True)
]
incompatible_apps = []
for app in known_extapps:
if not app.supports_hardware_target(appenv.subst("f${TARGET_HW}")):
incompatible_apps.append(app)
continue
app_artifacts = appenv.BuildAppElf(app)
app_src_dir = extract_abs_dir(app_artifacts.app._appdir)
app_artifacts.installer = [
@ -254,6 +261,13 @@ for app in known_extapps:
appenv.Install(app_src_dir.Dir("dist").Dir("debug"), app_artifacts.debug),
]
if len(incompatible_apps):
print(
"WARNING: The following apps are not compatible with the current target hardware and will not be built: {}".format(
", ".join([app.name for app in incompatible_apps])
)
)
if appenv["FORCE"]:
appenv.AlwaysBuild([extapp.compact for extapp in apps_artifacts.values()])