1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

fixes and corrections

This commit is contained in:
MX
2025-02-13 03:56:04 +03:00
parent 00f332eaf1
commit e22669da96
7 changed files with 6 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
## Main changes ## Main changes
- Current API: 79.3 - Current API: 79.4
* OFW: LFRFID - **EM4305 support** * OFW: LFRFID - **EM4305 support**
* Apps: **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev) * Apps: **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev)
## Other changes ## Other changes

View File

@@ -82,17 +82,6 @@ const char* input_get_type_name(InputType type) {
} }
} }
// allocate memory for input_settings structure
static InputSettings* input_settings_alloc(void) {
InputSettings* settings = malloc(sizeof(InputSettings));
return settings;
}
//free memory from input_settings structure
void input_settings_free(InputSettings* settings) {
free(settings);
}
int32_t input_srv(void* p) { int32_t input_srv(void* p) {
UNUSED(p); UNUSED(p);
@@ -102,7 +91,7 @@ int32_t input_srv(void* p) {
furi_record_create(RECORD_INPUT_EVENTS, event_pubsub); furi_record_create(RECORD_INPUT_EVENTS, event_pubsub);
//define object input_settings, take memory load (or init) settings and create record for access to settings structure from outside //define object input_settings, take memory load (or init) settings and create record for access to settings structure from outside
InputSettings* settings = input_settings_alloc(); InputSettings* settings = malloc(sizeof(InputSettings));
furi_record_create(RECORD_INPUT_SETTINGS, settings); furi_record_create(RECORD_INPUT_SETTINGS, settings);
input_settings_load(settings); input_settings_load(settings);

View File

@@ -6,15 +6,10 @@
#define TAG "InputSettings" #define TAG "InputSettings"
#define INPUT_SETTINGS_VER_0 (0) // OLD version number #define INPUT_SETTINGS_VER (1) // version nnumber
#define INPUT_SETTINGS_VER (1) // NEW actual version nnumber
#define INPUT_SETTINGS_PATH INT_PATH(INPUT_SETTINGS_FILE_NAME) #define INPUT_SETTINGS_PATH INT_PATH(INPUT_SETTINGS_FILE_NAME)
#define INPUT_SETTINGS_MAGIC (0x19) #define INPUT_SETTINGS_MAGIC (0x29)
typedef struct {
//inital set - empty
} InputSettingsV0;
void input_settings_load(InputSettings* settings) { void input_settings_load(InputSettings* settings) {
furi_assert(settings); furi_assert(settings);
@@ -36,23 +31,6 @@ void input_settings_load(InputSettings* settings) {
INPUT_SETTINGS_MAGIC, INPUT_SETTINGS_MAGIC,
INPUT_SETTINGS_VER); INPUT_SETTINGS_VER);
// if config previous version - load it and inicialize new settings // if config previous version - load it and inicialize new settings
} else if(
version ==
INPUT_SETTINGS_VER_0) { // if config previous version - load it and manual set new settings to inital value
InputSettingsV0* settings_v0 = malloc(sizeof(InputSettingsV0));
success = saved_struct_load(
INPUT_SETTINGS_PATH,
settings_v0,
sizeof(InputSettingsV0),
INPUT_SETTINGS_MAGIC,
INPUT_SETTINGS_VER_0);
if(success) {
settings->vibro_touch_level = 0;
}
free(settings_v0);
} }
// in case of another config version we exit from useless cycle to next step // in case of another config version we exit from useless cycle to next step
} while(false); } while(false);
@@ -75,12 +53,6 @@ void input_settings_save(const InputSettings* settings) {
INPUT_SETTINGS_MAGIC, INPUT_SETTINGS_MAGIC,
INPUT_SETTINGS_VER); INPUT_SETTINGS_VER);
// debug log
// FURI_LOG_D(TAG,"SAVE");
// char buffer[12] = {};
// snprintf(buffer, sizeof(buffer), "%d",settings->vibro_touch_level);
// FURI_LOG_D(TAG,buffer);
if(!success) { if(!success) {
FURI_LOG_E(TAG, "Failed to save file"); FURI_LOG_E(TAG, "Failed to save file");
} }

View File

@@ -42,8 +42,6 @@ static uint32_t input_settings_app_exit(void* context) {
InputSettingsApp* input_settings_app_alloc(void) { InputSettingsApp* input_settings_app_alloc(void) {
InputSettingsApp* app = malloc(sizeof(InputSettingsApp)); InputSettingsApp* app = malloc(sizeof(InputSettingsApp));
//app->inputservice = furi_record_open(RECORD_INPUT_EVENTS);
app->gui = furi_record_open(RECORD_GUI); app->gui = furi_record_open(RECORD_GUI);
app->settings = malloc(sizeof(InputSettings)); app->settings = malloc(sizeof(InputSettings));
@@ -58,7 +56,7 @@ InputSettingsApp* input_settings_app_alloc(void) {
item = variable_item_list_add( item = variable_item_list_add(
app->variable_item_list, app->variable_item_list,
"VibroTouchLevel", "Buttons Vibro",
VIBRO_TOUCH_LEVEL_COUNT, VIBRO_TOUCH_LEVEL_COUNT,
input_settings_vibro_touch_level_changed, input_settings_vibro_touch_level_changed,
app); app);
@@ -101,12 +99,6 @@ int32_t input_settings_app(void* p) {
view_dispatcher_run(app->view_dispatcher); view_dispatcher_run(app->view_dispatcher);
// // debug code
// FURI_LOG_D(TAG,"Vibro Touch level before save");
// char buffer[12] = {};
// snprintf(buffer, sizeof(buffer), "%d",app->settings->vibro_touch_level);
// FURI_LOG_D(TAG,buffer);
//save current settings; //save current settings;
input_settings_save(app->settings); input_settings_save(app->settings);

View File

@@ -73,7 +73,7 @@ void power_settings_scene_start_on_enter(void* context) {
item = variable_item_list_add( item = variable_item_list_add(
variable_item_list, variable_item_list,
"Safe Charging", "Limit Charge",
CHARGE_SUPRESS_PERCENT_COUNT, CHARGE_SUPRESS_PERCENT_COUNT,
power_settings_scene_start_charge_supress_percent_changed, power_settings_scene_start_charge_supress_percent_changed,
app); app);

View File

@@ -1,9 +0,0 @@
wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-extra.tgz
tar zxf all-the-apps-extra.tgz
mkdir -p applications/main/clock_app/resources/apps
cp -R extra_pack_build/artifacts-extra/* applications/main/clock_app/resources/apps/
rm -rf extra_pack_build
rm -f build/f7-firmware-C/toolbox/version.*
./fbt COMPACT=1 DEBUG=0 updater_package
mkdir artifacts-extra-apps
mv dist/f7-C/* artifacts-extra-apps/

5
rgb.sh
View File

@@ -1,5 +0,0 @@
git apply .ci_files/rgb.patch
rm -f build/f7-firmware-C/toolbox/version.*
./fbt COMPACT=1 DEBUG=0 updater_package
mkdir artifacts-rgb-patch
mv dist/f7-C/* artifacts-rgb-patch/