Merge branch 'fz-dev' into dev

This commit is contained in:
MX
2022-08-05 18:43:11 +03:00
12 changed files with 28 additions and 40 deletions
-16
View File
@@ -305,22 +305,6 @@ void ibutton_text_store_clear(iButton* ibutton) {
memset(ibutton->text_store, 0, IBUTTON_TEXT_STORE_SIZE);
}
void ibutton_switch_to_previous_scene_one_of(
iButton* ibutton,
const uint32_t* scene_ids,
size_t scene_ids_size) {
furi_assert(scene_ids_size);
SceneManager* scene_manager = ibutton->scene_manager;
for(size_t i = 0; i < scene_ids_size; ++i) {
const uint32_t scene_id = scene_ids[i];
if(scene_manager_has_previous_scene(scene_manager, scene_id)) {
scene_manager_search_and_switch_to_previous_scene(scene_manager, scene_id);
return;
}
}
}
void ibutton_notification_message(iButton* ibutton, uint32_t message) {
furi_assert(message < sizeof(ibutton_notification_sequences) / sizeof(NotificationSequence*));
notification_message(ibutton->notifications, ibutton_notification_sequences[message]);
-4
View File
@@ -83,8 +83,4 @@ bool ibutton_save_key(iButton* ibutton, const char* key_name);
bool ibutton_delete_key(iButton* ibutton);
void ibutton_text_store_set(iButton* ibutton, const char* text, ...);
void ibutton_text_store_clear(iButton* ibutton);
void ibutton_switch_to_previous_scene_one_of(
iButton* ibutton,
const uint32_t* scene_ids,
size_t scene_ids_size);
void ibutton_notification_message(iButton* ibutton, uint32_t message);
@@ -61,8 +61,8 @@ bool ibutton_scene_save_name_on_event(void* context, SceneManagerEvent event) {
} else {
const uint32_t possible_scenes[] = {
iButtonSceneReadKeyMenu, iButtonSceneSavedKeyMenu, iButtonSceneAddType};
ibutton_switch_to_previous_scene_one_of(
ibutton, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
scene_manager_search_and_switch_to_previous_scene_one_of(
ibutton->scene_manager, possible_scenes, COUNT_OF(possible_scenes));
}
}
}
@@ -31,8 +31,8 @@ bool ibutton_scene_save_success_on_event(void* context, SceneManagerEvent event)
if(event.event == iButtonCustomEventBack) {
const uint32_t possible_scenes[] = {
iButtonSceneReadKeyMenu, iButtonSceneSavedKeyMenu, iButtonSceneAddType};
ibutton_switch_to_previous_scene_one_of(
ibutton, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
scene_manager_search_and_switch_to_previous_scene_one_of(
ibutton->scene_manager, possible_scenes, COUNT_OF(possible_scenes));
}
}
@@ -31,8 +31,8 @@ bool ibutton_scene_write_success_on_event(void* context, SceneManagerEvent event
consumed = true;
if(event.event == iButtonCustomEventBack) {
const uint32_t possible_scenes[] = {iButtonSceneReadKeyMenu, iButtonSceneStart};
ibutton_switch_to_previous_scene_one_of(
ibutton, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
scene_manager_search_and_switch_to_previous_scene_one_of(
ibutton->scene_manager, possible_scenes, COUNT_OF(possible_scenes));
}
}
@@ -97,7 +97,7 @@ bool infrared_scene_edit_delete_on_event(void* context, SceneManagerEvent event)
} else {
const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
scene_manager_search_and_switch_to_previous_scene_one_of(
scene_manager, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
scene_manager, possible_scenes, COUNT_OF(possible_scenes));
}
consumed = true;
}
@@ -28,8 +28,10 @@ bool infrared_scene_edit_delete_done_on_event(void* context, SceneManagerEvent e
scene_manager, InfraredSceneRemote);
} else if(edit_target == InfraredEditTargetRemote) {
const uint32_t possible_scenes[] = {InfraredSceneStart, InfraredSceneRemoteList};
scene_manager_search_and_switch_to_previous_scene_one_of(
scene_manager, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
if(!scene_manager_search_and_switch_to_previous_scene_one_of(
scene_manager, possible_scenes, COUNT_OF(possible_scenes))) {
view_dispatcher_stop(infrared->view_dispatcher);
}
} else {
furi_assert(0);
}
@@ -21,7 +21,10 @@ bool infrared_scene_edit_rename_done_on_event(void* context, SceneManagerEvent e
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == InfraredCustomEventTypePopupClosed) {
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
if(!scene_manager_search_and_switch_to_previous_scene(
infrared->scene_manager, InfraredSceneRemote)) {
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
}
consumed = true;
}
}
@@ -29,7 +29,10 @@ bool infrared_scene_learn_done_on_event(void* context, SceneManagerEvent event)
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == InfraredCustomEventTypePopupClosed) {
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
if(!scene_manager_search_and_switch_to_previous_scene(
infrared->scene_manager, InfraredSceneRemote)) {
scene_manager_next_scene(infrared->scene_manager, InfraredSceneRemote);
}
consumed = true;
}
}
@@ -78,7 +78,7 @@ bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
if(event.type == SceneManagerEventTypeBack) {
const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
scene_manager, possible_scenes, sizeof(possible_scenes) / sizeof(uint32_t));
scene_manager, possible_scenes, COUNT_OF(possible_scenes));
} else if(event.type == SceneManagerEventTypeCustom) {
const uint16_t custom_type = infrared_custom_event_get_type(event.event);
const int16_t button_index = infrared_custom_event_get_value(event.event);
+6 -6
View File
@@ -38,10 +38,10 @@ Good starting point: https://docs.unrealengine.com/4.27/en-US/ProductionPipeline
Don't include assets that you are not using, compiler is not going to strip unused assets.
# Structure
- `compiled` - Output folder for compiled assets.
- `dolphin` - Dolphin game assets sources. Goes to `compiled` and `resources` folders.
- `icons` - Icons sources. Goes to `compiled` folder.
- `protobuf` - Protobuf sources. Goes to `compiled` folder.
- `compiled` - Output folder made for compiled assets, after building project, in `build` directory.
- `dolphin` - Dolphin game assets sources. Goes to `compiled` and `resources` folders in `build` directory.
- `icons` - Icons sources. Goes to `compiled` folder in `build` directory.
- `protobuf` - Protobuf sources. Goes to `compiled` folder in `build` directory.
- `resources` - Assets that is going to be provisioned to SD card.
- `slideshow` - One-time slideshows for desktop
- `slideshow` - One-time slideshows for desktop
- `unit_tests` - Some pre-defined signals for testing purposes.
+2 -2
View File
@@ -2,7 +2,7 @@
Dolphin assets are split into 3 parts:
- essential - Essential animations that are used for blocking system notifications. They are packed to `assets_dolphin_essential.[h,c]`.
- blocking - Essential animations that are used for blocking system notifications. They are packed to `assets_dolphin_blocking.[h,c]`.
- internal - Internal animations that are used for idle dolphin animation. Converted to `assets_dolphin_internal.[h,c]`.
- external - External animations that are used for idle dolphin animation. Packed to resource folder and placed on SD card.
@@ -10,7 +10,7 @@ Dolphin assets are split into 3 parts:
- `manifest.txt` - contains animations enumeration that is used for random animation selection. Starting point for Dolphin.
- `meta.txt` - contains data that describes how animation is drawn.
- `frame_X.bm` - Flipper Compressed Bitmap.
- `frame_X.png` - animation frame.
## File manifest.txt