mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 09:08:35 -07:00
Rename cycle anims
This commit is contained in:
@@ -203,10 +203,10 @@ static void animation_manager_start_new_idle(AnimationManager* animation_manager
|
|||||||
animation_manager->state = AnimationManagerStateIdle;
|
animation_manager->state = AnimationManagerStateIdle;
|
||||||
XtremeSettings* xtreme = XTREME_SETTINGS();
|
XtremeSettings* xtreme = XTREME_SETTINGS();
|
||||||
int32_t duration = 0;
|
int32_t duration = 0;
|
||||||
if (xtreme->cycle_animation == 0) {
|
if (xtreme->cycle_anims == 0) {
|
||||||
duration = bubble_animation->duration;
|
duration = bubble_animation->duration;
|
||||||
} else if (xtreme->cycle_animation != -1) {
|
} else if (xtreme->cycle_anims != -1) {
|
||||||
duration = xtreme->cycle_animation;
|
duration = xtreme->cycle_anims;
|
||||||
}
|
}
|
||||||
furi_timer_start(animation_manager->idle_animation_timer, duration * 1000);
|
furi_timer_start(animation_manager->idle_animation_timer, duration * 1000);
|
||||||
}
|
}
|
||||||
@@ -520,10 +520,10 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
|||||||
animation_manager->current_animation);
|
animation_manager->current_animation);
|
||||||
XtremeSettings* xtreme = XTREME_SETTINGS();
|
XtremeSettings* xtreme = XTREME_SETTINGS();
|
||||||
int32_t duration = 0;
|
int32_t duration = 0;
|
||||||
if (xtreme->cycle_animation == 0) {
|
if (xtreme->cycle_anims == 0) {
|
||||||
duration = bubble_animation->duration;
|
duration = bubble_animation->duration;
|
||||||
} else if (xtreme->cycle_animation != -1) {
|
} else if (xtreme->cycle_anims != -1) {
|
||||||
duration = xtreme->cycle_animation;
|
duration = xtreme->cycle_anims;
|
||||||
}
|
}
|
||||||
furi_timer_start(
|
furi_timer_start(
|
||||||
animation_manager->idle_animation_timer, duration * 1000);
|
animation_manager->idle_animation_timer, duration * 1000);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "../xtreme_settings_app.h"
|
#include "../xtreme_settings_app.h"
|
||||||
#include <lib/toolbox/value_index.h>
|
#include <lib/toolbox/value_index.h>
|
||||||
|
|
||||||
#define CYCLE_ANIMATION_COUNT 13
|
#define CYCLE_ANIMS_COUNT 13
|
||||||
const char* const cycle_animation_names[CYCLE_ANIMATION_COUNT] = {
|
const char* const cycle_anims_names[CYCLE_ANIMS_COUNT] = {
|
||||||
"OFF",
|
"OFF",
|
||||||
"Manifest",
|
"Manifest",
|
||||||
"30 S",
|
"30 S",
|
||||||
@@ -18,13 +18,13 @@ const char* const cycle_animation_names[CYCLE_ANIMATION_COUNT] = {
|
|||||||
"24 H",
|
"24 H",
|
||||||
};
|
};
|
||||||
|
|
||||||
const int32_t cycle_animation_values[CYCLE_ANIMATION_COUNT] =
|
const int32_t cycle_anims_values[CYCLE_ANIMS_COUNT] =
|
||||||
{-1, 0, 30, 60, 300, 600, 900, 1800, 3600, 7200, 21600, 43200, 86400};
|
{-1, 0, 30, 60, 300, 600, 900, 1800, 3600, 7200, 21600, 43200, 86400};
|
||||||
|
|
||||||
static void xtreme_settings_scene_start_cycle_animation_changed(VariableItem* item) {
|
static void xtreme_settings_scene_start_cycle_anims_changed(VariableItem* item) {
|
||||||
uint8_t index = variable_item_get_current_value_index(item);
|
uint8_t index = variable_item_get_current_value_index(item);
|
||||||
variable_item_set_current_value_text(item, cycle_animation_names[index]);
|
variable_item_set_current_value_text(item, cycle_anims_names[index]);
|
||||||
XTREME_SETTINGS()->cycle_animation = cycle_animation_values[index];
|
XTREME_SETTINGS()->cycle_anims = cycle_anims_values[index];
|
||||||
XTREME_SETTINGS_SAVE();
|
XTREME_SETTINGS_SAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,14 +37,14 @@ void xtreme_settings_scene_start_on_enter(void* context) {
|
|||||||
|
|
||||||
item = variable_item_list_add(
|
item = variable_item_list_add(
|
||||||
var_item_list,
|
var_item_list,
|
||||||
"Cycle Animation",
|
"Cycle Anims",
|
||||||
CYCLE_ANIMATION_COUNT,
|
CYCLE_ANIMS_COUNT,
|
||||||
xtreme_settings_scene_start_cycle_animation_changed,
|
xtreme_settings_scene_start_cycle_anims_changed,
|
||||||
app);
|
app);
|
||||||
value_index = value_index_int32(
|
value_index = value_index_int32(
|
||||||
xtreme->unlock_animations, cycle_animation_values, CYCLE_ANIMATION_COUNT);
|
xtreme->cycle_anims, cycle_anims_values, CYCLE_ANIMS_COUNT);
|
||||||
variable_item_set_current_value_index(item, value_index);
|
variable_item_set_current_value_index(item, value_index);
|
||||||
variable_item_set_current_value_text(item, cycle_animation_names[value_index]);
|
variable_item_set_current_value_text(item, cycle_anims_names[value_index]);
|
||||||
|
|
||||||
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeSettingsAppViewVarItemList);
|
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeSettingsAppViewVarItemList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
#define XTREME_SETTINGS_MAGIC (0x69)
|
#define XTREME_SETTINGS_MAGIC (0x69)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t cycle_animation;
|
int32_t cycle_anims;
|
||||||
bool unlock_animations;
|
bool unlock_anims;
|
||||||
// uint8_t sfw_mode;
|
// uint8_t sfw_mode;
|
||||||
} XtremeSettings;
|
} XtremeSettings;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user