Merge remote-tracking branch 'UFW/dev' into Fuzzer

This commit is contained in:
gid9798 2023-06-07 12:51:27 +03:00
commit 5fc6659e50
154 changed files with 1797 additions and 955 deletions

538
.ci_files/rgb.patch Normal file
View file

@ -0,0 +1,538 @@
diff --git a/applications/services/notification/notification_app.c b/applications/services/notification/notification_app.c
index 2f947fe..03c4c76 100644
--- a/applications/services/notification/notification_app.c
+++ b/applications/services/notification/notification_app.c
@@ -9,6 +9,7 @@
#include "notification.h"
#include "notification_messages.h"
#include "notification_app.h"
+#include "applications/settings/notification_settings/rgb_backlight.h"
#define TAG "NotificationSrv"
@@ -579,6 +580,7 @@ int32_t notification_srv(void* p) {
break;
case SaveSettingsMessage:
notification_save_settings(app);
+ rgb_backlight_save_settings();
break;
}
diff --git a/applications/settings/notification_settings/notification_settings_app.c b/applications/settings/notification_settings/notification_settings_app.c
index 565d4f1..bae9299 100644
--- a/applications/settings/notification_settings/notification_settings_app.c
+++ b/applications/settings/notification_settings/notification_settings_app.c
@@ -3,6 +3,7 @@
#include <gui/modules/variable_item_list.h>
#include <gui/view_dispatcher.h>
#include <lib/toolbox/value_index.h>
+#include <applications/settings/notification_settings/rgb_backlight.h>
#define MAX_NOTIFICATION_SETTINGS 4
@@ -162,6 +163,14 @@ static void vibro_changed(VariableItem* item) {
notification_message(app->notification, &sequence_single_vibro);
}
+static void color_changed(VariableItem* item) {
+ NotificationAppSettings* app = variable_item_get_context(item);
+ uint8_t index = variable_item_get_current_value_index(item);
+ rgb_backlight_set_color(index);
+ variable_item_set_current_value_text(item, rgb_backlight_get_color_text(index));
+ notification_message(app->notification, &sequence_display_backlight_on);
+}
+
static uint32_t notification_app_settings_exit(void* context) {
UNUSED(context);
return VIEW_NONE;
@@ -187,7 +196,13 @@ static NotificationAppSettings* alloc_settings() {
variable_item_set_current_value_text(item, contrast_text[value_index]);
item = variable_item_list_add(
- app->variable_item_list, "LCD Backlight", BACKLIGHT_COUNT, backlight_changed, app);
+ app->variable_item_list, "LCD Color", rgb_backlight_get_color_count(), color_changed, app);
+ value_index = rgb_backlight_get_settings()->display_color_index;
+ variable_item_set_current_value_index(item, value_index);
+ variable_item_set_current_value_text(item, rgb_backlight_get_color_text(value_index));
+
+ item = variable_item_list_add(
+ app->variable_item_list, "LCD Brightness", BACKLIGHT_COUNT, backlight_changed, app);
value_index = value_index_float(
app->notification->settings.display_brightness, backlight_value, BACKLIGHT_COUNT);
variable_item_set_current_value_index(item, value_index);
diff --git a/applications/settings/notification_settings/rgb_backlight.c b/applications/settings/notification_settings/rgb_backlight.c
new file mode 100644
index 0000000..269b544
--- /dev/null
+++ b/applications/settings/notification_settings/rgb_backlight.c
@@ -0,0 +1,171 @@
+/*
+ RGB backlight FlipperZero driver
+ Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+#include "rgb_backlight.h"
+#include <furi_hal.h>
+#include <storage/storage.h>
+
+#define RGB_BACKLIGHT_SETTINGS_VERSION 5
+#define RGB_BACKLIGHT_SETTINGS_FILE_NAME ".rgb_backlight.settings"
+#define RGB_BACKLIGHT_SETTINGS_PATH EXT_PATH(RGB_BACKLIGHT_SETTINGS_FILE_NAME)
+
+#define COLOR_COUNT (sizeof(colors) / sizeof(RGBBacklightColor))
+
+#define TAG "RGB Backlight"
+
+static RGBBacklightSettings rgb_settings = {
+ .version = RGB_BACKLIGHT_SETTINGS_VERSION,
+ .display_color_index = 0,
+ .settings_is_loaded = false};
+
+static const RGBBacklightColor colors[] = {
+ {"Orange", 255, 79, 0},
+ {"Yellow", 255, 170, 0},
+ {"Spring", 167, 255, 0},
+ {"Lime", 0, 255, 0},
+ {"Aqua", 0, 255, 127},
+ {"Cyan", 0, 210, 210},
+ {"Azure", 0, 127, 255},
+ {"Blue", 0, 0, 255},
+ {"Purple", 127, 0, 255},
+ {"Magenta", 210, 0, 210},
+ {"Pink", 255, 0, 127},
+ {"Red", 255, 0, 0},
+ {"White", 140, 140, 140},
+};
+
+uint8_t rgb_backlight_get_color_count(void) {
+ return COLOR_COUNT;
+}
+
+const char* rgb_backlight_get_color_text(uint8_t index) {
+ return colors[index].name;
+}
+
+void rgb_backlight_load_settings(void) {
+ //Не загружать данные из внутренней памяти при загрузке в режиме DFU
+ FuriHalRtcBootMode bm = furi_hal_rtc_get_boot_mode();
+ if(bm == FuriHalRtcBootModeDfu) {
+ rgb_settings.settings_is_loaded = true;
+ return;
+ }
+
+ RGBBacklightSettings settings;
+ File* file = storage_file_alloc(furi_record_open(RECORD_STORAGE));
+ const size_t settings_size = sizeof(RGBBacklightSettings);
+
+ FURI_LOG_I(TAG, "loading settings from \"%s\"", RGB_BACKLIGHT_SETTINGS_PATH);
+ bool fs_result =
+ storage_file_open(file, RGB_BACKLIGHT_SETTINGS_PATH, FSAM_READ, FSOM_OPEN_EXISTING);
+
+ if(fs_result) {
+ uint16_t bytes_count = storage_file_read(file, &settings, settings_size);
+
+ if(bytes_count != settings_size) {
+ fs_result = false;
+ }
+ }
+
+ if(fs_result) {
+ FURI_LOG_I(TAG, "load success");
+ if(settings.version != RGB_BACKLIGHT_SETTINGS_VERSION) {
+ FURI_LOG_E(
+ TAG,
+ "version(%d != %d) mismatch",
+ settings.version,
+ RGB_BACKLIGHT_SETTINGS_VERSION);
+ } else {
+ memcpy(&rgb_settings, &settings, settings_size);
+ }
+ } else {
+ FURI_LOG_E(TAG, "load failed, %s", storage_file_get_error_desc(file));
+ }
+
+ storage_file_close(file);
+ storage_file_free(file);
+ furi_record_close(RECORD_STORAGE);
+ rgb_settings.settings_is_loaded = true;
+};
+
+void rgb_backlight_save_settings(void) {
+ RGBBacklightSettings settings;
+ File* file = storage_file_alloc(furi_record_open(RECORD_STORAGE));
+ const size_t settings_size = sizeof(RGBBacklightSettings);
+
+ FURI_LOG_I(TAG, "saving settings to \"%s\"", RGB_BACKLIGHT_SETTINGS_PATH);
+
+ memcpy(&settings, &rgb_settings, settings_size);
+
+ bool fs_result =
+ storage_file_open(file, RGB_BACKLIGHT_SETTINGS_PATH, FSAM_WRITE, FSOM_CREATE_ALWAYS);
+
+ if(fs_result) {
+ uint16_t bytes_count = storage_file_write(file, &settings, settings_size);
+
+ if(bytes_count != settings_size) {
+ fs_result = false;
+ }
+ }
+
+ if(fs_result) {
+ FURI_LOG_I(TAG, "save success");
+ } else {
+ FURI_LOG_E(TAG, "save failed, %s", storage_file_get_error_desc(file));
+ }
+
+ storage_file_close(file);
+ storage_file_free(file);
+ furi_record_close(RECORD_STORAGE);
+};
+
+RGBBacklightSettings* rgb_backlight_get_settings(void) {
+ if(!rgb_settings.settings_is_loaded) {
+ rgb_backlight_load_settings();
+ }
+ return &rgb_settings;
+}
+
+void rgb_backlight_set_color(uint8_t color_index) {
+ if(color_index > (rgb_backlight_get_color_count() - 1)) color_index = 0;
+ rgb_settings.display_color_index = color_index;
+}
+
+void rgb_backlight_update(uint8_t brightness) {
+ if(!rgb_settings.settings_is_loaded) {
+ rgb_backlight_load_settings();
+ }
+
+ static uint8_t last_color_index = 255;
+ static uint8_t last_brightness = 123;
+
+ if(last_brightness == brightness && last_color_index == rgb_settings.display_color_index)
+ return;
+
+ last_brightness = brightness;
+ last_color_index = rgb_settings.display_color_index;
+
+ for(uint8_t i = 0; i < SK6805_get_led_count(); i++) {
+ uint8_t r = colors[rgb_settings.display_color_index].red * (brightness / 255.0f);
+ uint8_t g = colors[rgb_settings.display_color_index].green * (brightness / 255.0f);
+ uint8_t b = colors[rgb_settings.display_color_index].blue * (brightness / 255.0f);
+
+ SK6805_set_led_color(i, r, g, b);
+ }
+
+ SK6805_update();
+}
diff --git a/applications/settings/notification_settings/rgb_backlight.h b/applications/settings/notification_settings/rgb_backlight.h
new file mode 100644
index 0000000..b63d223
--- /dev/null
+++ b/applications/settings/notification_settings/rgb_backlight.h
@@ -0,0 +1,79 @@
+/*
+ RGB backlight FlipperZero driver
+ Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+#include <furi.h>
+#include "SK6805.h"
+
+typedef struct {
+ char* name;
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
+} RGBBacklightColor;
+
+typedef struct {
+ uint8_t version;
+ uint8_t display_color_index;
+ bool settings_is_loaded;
+} RGBBacklightSettings;
+
+/**
+ * @brief Получить текущие настройки RGB-подсветки
+ *
+ * @return Указатель на структуру настроек
+ */
+RGBBacklightSettings* rgb_backlight_get_settings(void);
+
+/**
+ * @brief Загрузить настройки подсветки с SD-карты
+ */
+void rgb_backlight_load_settings(void);
+
+/**
+ * @brief Сохранить текущие настройки RGB-подсветки
+ */
+void rgb_backlight_save_settings(void);
+
+/**
+ * @brief Применить текущие настройки RGB-подсветки
+ *
+ * @param brightness Яркость свечения (0-255)
+ */
+void rgb_backlight_update(uint8_t brightness);
+
+/**
+ * @brief Установить цвет RGB-подсветки
+ *
+ * @param color_index Индекс цвета (0 - rgb_backlight_get_color_count())
+ */
+void rgb_backlight_set_color(uint8_t color_index);
+
+/**
+ * @brief Получить количество доступных цветов
+ *
+ * @return Число доступных вариантов цвета
+ */
+uint8_t rgb_backlight_get_color_count(void);
+
+/**
+ * @brief Получить текстовое название цвета
+ *
+ * @param index Индекс из доступных вариантов цвета
+ * @return Указатель на строку с названием цвета
+ */
+const char* rgb_backlight_get_color_text(uint8_t index);
\ No newline at end of file
diff --git a/firmware/targets/f7/furi_hal/furi_hal_light.c b/firmware/targets/f7/furi_hal/furi_hal_light.c
index 83e1603..cad5b86 100644
--- a/firmware/targets/f7/furi_hal/furi_hal_light.c
+++ b/firmware/targets/f7/furi_hal/furi_hal_light.c
@@ -3,6 +3,7 @@
#include <furi_hal_light.h>
#include <lp5562.h>
#include <stdint.h>
+#include <applications/settings/notification_settings/rgb_backlight.h>
#define LED_CURRENT_RED 50
#define LED_CURRENT_GREEN 50
@@ -31,22 +32,21 @@ void furi_hal_light_init() {
}
void furi_hal_light_set(Light light, uint8_t value) {
- furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
- if(light & LightRed) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
- }
- if(light & LightGreen) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
- }
- if(light & LightBlue) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
- }
if(light & LightBacklight) {
- uint8_t prev = lp5562_get_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelWhite);
- lp5562_execute_ramp(
- &furi_hal_i2c_handle_power, LP5562Engine1, LP5562ChannelWhite, prev, value, 100);
+ rgb_backlight_update(value);
+ } else {
+ furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
+ if(light & LightRed) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
+ }
+ if(light & LightGreen) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
+ }
+ if(light & LightBlue) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
+ }
+ furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
- furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
void furi_hal_light_blink_start(Light light, uint8_t brightness, uint16_t on_time, uint16_t period) {
diff --git a/lib/drivers/SK6805.c b/lib/drivers/SK6805.c
new file mode 100644
index 0000000..572e1df
--- /dev/null
+++ b/lib/drivers/SK6805.c
@@ -0,0 +1,101 @@
+/*
+ SK6805 FlipperZero driver
+ Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+#include "SK6805.h"
+#include <furi_hal.h>
+
+/* Настройки */
+#define SK6805_LED_COUNT 3 //Количество светодиодов на плате подсветки
+#define SK6805_LED_PIN &led_pin //Порт подключения светодиодов
+
+#ifdef FURI_DEBUG
+#define DEBUG_PIN &gpio_ext_pa7
+#define DEBUG_INIT() \
+ furi_hal_gpio_init(DEBUG_PIN, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh)
+#define DEBUG_SET_HIGH() furi_hal_gpio_write(DEBUG_PIN, true)
+#define DEBUG_SET_LOW() furi_hal_gpio_write(DEBUG_PIN, false)
+#else
+#define DEBUG_INIT()
+#define DEBUG_SET_HIGH()
+#define DEBUG_SET_LOW()
+#endif
+
+static const GpioPin led_pin = {.port = GPIOA, .pin = LL_GPIO_PIN_8};
+static uint8_t led_buffer[SK6805_LED_COUNT][3];
+
+void SK6805_init(void) {
+ DEBUG_INIT();
+ furi_hal_gpio_write(SK6805_LED_PIN, false);
+ furi_hal_gpio_init(SK6805_LED_PIN, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh);
+}
+
+uint8_t SK6805_get_led_count(void) {
+ return (const uint8_t)SK6805_LED_COUNT;
+}
+void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b) {
+ furi_check(led_index < SK6805_LED_COUNT);
+
+ led_buffer[led_index][0] = g;
+ led_buffer[led_index][1] = r;
+ led_buffer[led_index][2] = b;
+}
+
+void SK6805_update(void) {
+ SK6805_init();
+ furi_kernel_lock();
+ uint32_t end;
+ /* Последовательная отправка цветов светодиодов */
+ for(uint8_t lednumber = 0; lednumber < SK6805_LED_COUNT; lednumber++) {
+ //Последовательная отправка цветов светодиода
+ for(uint8_t color = 0; color < 3; color++) {
+ //Последовательная отправка битов цвета
+ uint8_t i = 0b10000000;
+ while(i != 0) {
+ if(led_buffer[lednumber][color] & (i)) {
+ furi_hal_gpio_write(SK6805_LED_PIN, true);
+ DEBUG_SET_HIGH();
+ end = DWT->CYCCNT + 30;
+ //T1H 600 us (615 us)
+ while(DWT->CYCCNT < end) {
+ }
+ furi_hal_gpio_write(SK6805_LED_PIN, false);
+ DEBUG_SET_LOW();
+ end = DWT->CYCCNT + 26;
+ //T1L 600 us (587 us)
+ while(DWT->CYCCNT < end) {
+ }
+ } else {
+ furi_hal_gpio_write(SK6805_LED_PIN, true);
+ DEBUG_SET_HIGH();
+ end = DWT->CYCCNT + 11;
+ //T0H 300 ns (312 ns)
+ while(DWT->CYCCNT < end) {
+ }
+ furi_hal_gpio_write(SK6805_LED_PIN, false);
+ DEBUG_SET_LOW();
+ end = DWT->CYCCNT + 43;
+ //T0L 900 ns (890 ns)
+ while(DWT->CYCCNT < end) {
+ }
+ }
+ i >>= 1;
+ }
+ }
+ }
+ furi_kernel_unlock();
+}
diff --git a/lib/drivers/SK6805.h b/lib/drivers/SK6805.h
new file mode 100644
index 0000000..7c58956
--- /dev/null
+++ b/lib/drivers/SK6805.h
@@ -0,0 +1,51 @@
+/*
+ SK6805 FlipperZero driver
+ Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+#ifndef SK6805_H_
+#define SK6805_H_
+
+#include <furi.h>
+
+/**
+ * @brief Инициализация линии управления подсветкой
+ */
+void SK6805_init(void);
+
+/**
+ * @brief Получить количество светодиодов в подсветке
+ *
+ * @return Количество светодиодов
+ */
+uint8_t SK6805_get_led_count(void);
+
+/**
+ * @brief Установить цвет свечения светодиода
+ *
+ * @param led_index номер светодиода (от 0 до SK6805_get_led_count())
+ * @param r значение красного (0-255)
+ * @param g значение зелёного (0-255)
+ * @param b значение синего (0-255)
+ */
+void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b);
+
+/**
+ * @brief Обновление состояния подсветки дисплея
+ */
+void SK6805_update(void);
+
+#endif /* SK6805_H_ */
\ No newline at end of file

View file

@ -31,7 +31,9 @@ steps:
- echo '' >> CHANGELOG.md
- echo '### [Version without custom animations - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)' >> CHANGELOG.md
- echo '' >> CHANGELOG.md
- echo '### [Version with extra apps - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)' >> CHANGELOG.md
- echo '### [Version with RGB patch - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz&channel=release-cfw&version='${DRONE_TAG}'r)' >> CHANGELOG.md
- echo '' >> CHANGELOG.md
- echo '## [Version with Extra apps - Install via Web Updater](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)' >> CHANGELOG.md
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
@ -56,10 +58,30 @@ steps:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: "Build with RGB patch"
image: hfdj/fztools
pull: never
commands:
- git apply .ci_files/rgb.patch
- export DIST_SUFFIX=${DRONE_TAG}r
- export WORKFLOW_BRANCH_OR_TAG=release-cfw-rgb
- export FORCE_NO_DIRTY=yes
- 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/
- ls -laS artifacts-rgb-patch
- ls -laS artifacts-rgb-patch/f7-update-${DRONE_TAG}r
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: "Build with ofw anims"
image: hfdj/fztools
pull: never
commands:
- git clean -df
- git checkout -- .
- rm -f assets/dolphin/external/manifest.txt
- cp .ci_files/anims_ofw.txt assets/dolphin/external/manifest.txt
- rm -rf assets/resources/apps/
@ -80,16 +102,20 @@ steps:
image: kramos/alpine-zip
commands:
- cp artifacts-extra-apps/flipper-z-f7-update-${DRONE_TAG}e.tgz .
- cp artifacts-rgb-patch/flipper-z-f7-update-${DRONE_TAG}r.tgz .
- cp artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}n.tgz .
- cp artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz .
- zip -r artifacts-extra-apps/flipper-z-f7-update-${DRONE_TAG}e.zip artifacts-extra-apps/f7-update-${DRONE_TAG}e
- zip -r artifacts-rgb-patch/flipper-z-f7-update-${DRONE_TAG}r.zip artifacts-rgb-patch/f7-update-${DRONE_TAG}r
- zip -r artifacts-ofw-anims/flipper-z-f7-update-${DRONE_TAG}n.zip artifacts-ofw-anims/f7-update-${DRONE_TAG}n
- zip -r artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip artifacts-default/f7-update-${DRONE_TAG}
- tar czpf artifacts-default/flipper-z-any-scripts-${DRONE_TAG}.tgz scripts
- rm -rf artifacts-extra-apps/f7-update-${DRONE_TAG}
- rm -rf artifacts-rgb-patch/f7-update-${DRONE_TAG}
- rm -rf artifacts-ofw-anims/f7-update-${DRONE_TAG}
- rm -rf artifacts-default/f7-update-${DRONE_TAG}
- ls -laS artifacts-extra-apps
- ls -laS artifacts-rgb-patch
- ls -laS artifacts-ofw-anims
- ls -laS artifacts-default
- mv artifacts-default/ ${DRONE_TAG}
@ -146,6 +172,21 @@ steps:
from_secret: dep_target_extra
source: flipper-z-f7-update-${DRONE_TAG}e.tgz
- name: "Upload rgb patch version to updates srv"
image: appleboy/drone-scp:linux-amd64
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
target:
from_secret: dep_target_extra
source: flipper-z-f7-update-${DRONE_TAG}r.tgz
- name: "Do Github release"
image: ddplugins/github-release
pull: never
@ -160,6 +201,7 @@ steps:
- ${DRONE_TAG}/*.zip
- artifacts-ofw-anims/*.tgz
- artifacts-extra-apps/*.tgz
- artifacts-rgb-patch/*.tgz
title: ${DRONE_TAG}
note: CHANGELOG.md
checksum:
@ -210,7 +252,13 @@ steps:
[-Version without custom animations - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-${DRONE_TAG}n.tgz&channel=release-cfw&version=${DRONE_TAG}n)
[-Version with extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_TAG}e.tgz&channel=release-cfw&version=${DRONE_TAG}e)"
[-Version with RGB patch - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_TAG}r.tgz&channel=release-cfw&version=${DRONE_TAG}r)
[-Version with RGB patch - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_TAG}r.tgz)
[-Version with Extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_TAG}e.tgz&channel=release-cfw&version=${DRONE_TAG}e)"
document:
- ${DRONE_TAG}/flipper-z-f7-update-${DRONE_TAG}.tgz
@ -223,7 +271,7 @@ steps:
commands:
- wget "https://raw.githubusercontent.com/fieu/discord.sh/e1dc1a7595efad2cad8f072f0b3531c470f5b7c8/discord.sh"
- chmod +x ./discord.sh
- ./discord.sh --text 'New Unleashed firmware released!\n\nVersion - '${DRONE_TAG}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[[Github - Changelog]](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/'${DRONE_TAG}')\n\n[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)\n\n[-Download latest extra apps pack-](https://github.com/xMasterX/all-the-plugins/archive/refs/heads/main.zip)\n\n[-Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/'${DRONE_TAG}'/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}')\n\n[-Version without custom animations - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)\n\n[-Version with extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)'
- ./discord.sh --text 'New Unleashed firmware released!\n\nVersion - '${DRONE_TAG}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[[Github - Changelog]](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/'${DRONE_TAG}')\n\n[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)\n\n[-Download latest extra apps pack-](https://github.com/xMasterX/all-the-plugins/archive/refs/heads/main.zip)\n\n[-Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/'${DRONE_TAG}'/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}')\n\n[-Version without custom animations - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)\n\n[-Version with RGB patch - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz&channel=release-cfw&version='${DRONE_TAG}'r)\n\n[-Version with RGB patch - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz)\n\n[-Version with Extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)'
- name: "Send extra pack build to telegram"
image: appleboy/drone-telegram
@ -297,10 +345,29 @@ steps:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: "Build dev with rgb patch"
image: hfdj/fztools
pull: never
commands:
- git apply .ci_files/rgb.patch
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}r
- export WORKFLOW_BRANCH_OR_TAG=dev-cfw-rgb
- export FORCE_NO_DIRTY=yes
- 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/
- ls -laS artifacts-rgb-patch
- ls -laS artifacts-rgb-patch/f7-update-${DRONE_BUILD_NUMBER}r
environment:
FBT_TOOLS_CUSTOM_LINK:
from_secret: fbt_link
- name: "Bundle self-update packages"
image: kramos/alpine-zip
commands:
- cp artifacts-extra-apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz .
- cp artifacts-rgb-patch/flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz .
- cp artifacts-default/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz .
- rm -rf artifacts-default/f7-update-${DRONE_BUILD_NUMBER}
- ls -laS artifacts-default
@ -358,6 +425,21 @@ steps:
from_secret: dep_target_extra
source: flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz
- name: "Upload rgb patch version to updates srv"
image: appleboy/drone-scp:linux-amd64
settings:
host:
from_secret: dep_host
username:
from_secret: dep_user
password:
from_secret: dep_passwd
port:
from_secret: dep_port
target:
from_secret: dep_target_extra
source: flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz
- name: "Trigger update server reindex"
image: hfdj/fztools
pull: never
@ -392,7 +474,13 @@ steps:
[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-${DRONE_BUILD_NUMBER}.tgz&channel=dev-cfw&version=${DRONE_BUILD_NUMBER})
[-Version with extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz&channel=dev-cfw&version=${DRONE_BUILD_NUMBER}e)"
[-Version with RGB patch - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz&channel=dev-cfw&version=${DRONE_BUILD_NUMBER}r)
[-Version with RGB patch - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}r.tgz)
[-Version with Extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-${DRONE_BUILD_NUMBER}e.tgz&channel=dev-cfw&version=${DRONE_BUILD_NUMBER}e)"
- name: "Send build to telegram"
image: appleboy/drone-telegram
@ -427,7 +515,7 @@ steps:
commands:
- wget "https://raw.githubusercontent.com/fieu/discord.sh/e1dc1a7595efad2cad8f072f0b3531c470f5b7c8/discord.sh"
- chmod +x ./discord.sh
- ./discord.sh --text 'Unleashed firmware dev build successful!\n\nBuild - '${DRONE_BUILD_NUMBER}'\n\nCommit - https://github.com/DarkFlippers/unleashed-firmware/commit/'${DRONE_COMMIT_SHA}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[-Version with extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'e.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'e)\n\n[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}')'
- ./discord.sh --text 'Unleashed firmware dev build successful!\n\nBuild - '${DRONE_BUILD_NUMBER}'\n\nCommit - https://github.com/DarkFlippers/unleashed-firmware/commit/'${DRONE_COMMIT_SHA}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[-Version with Extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'e.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'e)\n\n[-Version with RGB patch - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'r)\n\n[-Version with RGB patch - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz)\n\n[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}')'
trigger:
branch:

View file

@ -1,40 +1,38 @@
### New changes
* !!! **Warning! After installing, Desktop settings (Favoutite apps, PIN Code, AutoLock time..) will be resetted to default due to settings changes, Please set your PIN code, Favourite apps again in Settings->Desktop** !!!
* If you have copied any apps manually into `apps` folder - remove `apps` folder or that specific apps you copied on your microSD before installing this release to avoid issues due to OFW API version update! If you using regular builds or extra pack builds (e) without your manually added apps, all included apps will be installed automatically, no extra actions needed!
-----
* Desktop: **Show clock on main screen** (Enable in Settings->Desktop->Show Clock) (by @gid9798 | PR #484)
* SubGHz Remote: New plugin - Configurator (Remote Maker) - Now you can create and edit map files on flipper! (by @gid9798 | PR #487)
* SubGHz Remote: Full refactoring, app was re-made from scratch (by @gid9798)
* Archive: Fix rename, show error message to user
* API: Cleanup, mini refactoring of some apps (+6k of free flash space)
* LFRFID: Debug: Allow PSK RAW emulation in gui
* SubGHz: Security+ 2.0 -> add extra custom button `0x78` - Fixes issue #469
* SubGHz: Various fixes (by @gid9798)
* SubGHz: Fix counter settings in debug
* SubGHz: Move dangerous_settings check (by @gid9798 | PR #475)
* Misc: Move NFC plugins into NFC folder
* Misc: Name changer code moved to proper place, load after system startup + extra checks
* Plugins: Merge tiktok and ytshorts remote into one (by @Willy-JL)
* Plugins: NMEA GPS UART - stability fix
* Plugins: Port XFW keyboard with extra symbols to WiFi Marauder instead of using UART Term keyboard (thanks to @Willy-JL)
* Plugins: Moved from extra pack to main FW: Mifare Nested [(by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested) - Works with PC and python app `FlipperNested`
* Plugins: Update TOTP (Authenticator) [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator) (+ Add option to set custom fonts)
* Plugins: Update NMEA GPS UART [(by ezod)](https://github.com/ezod/flipperzero-gps) (GLL support)
* Plugins: Update WiFi Marauder [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion)
* OFW PR 2680: RFID - Add support for Nexkey/Nexwatch (by @mauimauer)
* OFW: nfc: Mifare Ultralight C detection
* OFW: api: added toolbox/api_lock.h
* OFW: NFC: Add support for Gen4 "ultimate card" in Magic app
* OFW: desktop: Refactor favorites settings and allow app browser in selection
* OFW: Infrared: respect carrier frequency and duty cycle settings -> **Breaking API change, API version was changed from 26.x to 27.x**
* OFW: Desktop,Rpc: desktop status subscription
* OFW: Storage, common_rename: check that old path is exists
* OFW: Services: remove deallocator for persistent services
* OFW: Storage: common_rename is now POSIX compliant
* OFW: Removed user-specific data from tar artifacts
* OFW: fbt: Fix tar uid overflow when packaging
* OFW: fbt: Use union for old py (Fix builds if using older python versions)
* OFW: USB HID report timeout
* Only in release 052 -> **Multiple Extra pack apps was fixed!** -> TAMA P1, Flizzer Tracker, Video Player, Music Tracker
* NFC V: Remove delay from emulation loop. This improves compatibility when the reader is Android.
* Plugins: iButton Fuzzer -> Fix v2 key files load (all new saved files)
### Previous changes
* SubGHz Remote: Fixed BinRAW support, + many other fixes (by @gid9798 | PR #492)
* SubGHz: Fix KL: Stilmatic support + add manually support
* SubGHz: Keeloq mfname refactoring (by @gid9798 | PR #479)
* Desktop Clock: Some improvements and fixes (by @gid9798 | PR #490)
* LF RFID: Cleanup duplicated code (by @gid9798 | PR #493)
* NFC V: Code review fixes + some GUI rework (by @nvx & @xMasterX)
* NFC V: Fixed crash when exiting emulation and starting it again
* Infrared: Use Universal AC Remote from OFW, same for Audio remote, and rename buttons in OFW naming scheme
* Infrared: Update universal remote assets (by @amec0e)
* GUI Keyboard: Fix crash when renaming files with long file name (Fixed issue #489)
* Misc: Fix APP_IDs to match new regex (regex check will be added in OFW soon)
* Plugins: Protoview, WAV Player, DTMF Dolphin - fixed all known crashes, ported to latest hal bus system
* Plugins: ESP8266 Deauther - Crash fix (Fixed issue #497)
* Plugins: Update -> Mifare Nested [(by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested)
* Plugins: Update -> TOTP (Authenticator) [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator)
* Plugins: Update -> ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-wifi-marauder)
* Plugins: Update -> UART Terminal [(by cool4uma)](https://github.com/cool4uma/UART_Terminal/tree/main)
* OFW: FuriHal: disable bus re-initialization on early init and extra asserts for AHB1,AHB2,AHB3 which must be left intact on entering to FUS -> **Fixes updater error 1-100**
* OFW: NFC: fix MFC timings -> **Fixes issues with Mifare Classic emulation that could happen after unlshd-049 release**
* OFW: Update dolphin.py
* OFW: NFC Magic: Fix gen1 writing with invalid BCC (lost fix from PR 2511)
* OFW: SubGhz: fix flipper crashes after exiting broadcast blocking message and crash cli
* OFW: Dolphin: new animation
* OFW: fbt: added hooks for build & dist environments; added FW_ORIGIN_* macro for apps & SDK
* OFW: FuriHal: add bus abstraction -> **Breaking API change, API version was changed from 27.x to 28.x**
* OFW: Implement support for reading Opal card (Sydney, Australia)
* OFW: BadUSB: script execution pause
* OFW: IR Universal AC: Add Carrier 42QHB12D8S
#### [🎲 Download latest extra apps pack](https://github.com/xMasterX/all-the-plugins/archive/refs/heads/main.zip)

View file

@ -88,7 +88,7 @@ Encoders or sending made by @xMasterX:
- Keeloq: Mutancode
- Keeloq: Normstahl
- Keeloq: Beninca + Allmatic
- Keeloq: Stilmatic / Schellenberg
- Keeloq: Stilmatic
- Keeloq: CAME Space
- Keeloq: Aprimatic (model TR and similar)
@ -143,7 +143,7 @@ You can support us by using links or addresses below:
- WAV Player [(OFW: DrZlo13)](https://github.com/flipperdevices/flipperzero-firmware/tree/zlo/wav-player) - Fixed and improved by [LTVA1](https://github.com/LTVA1/wav_player) -> Also outputs audio on `PA6` - `3(A6)` pin
- Barcode generator plugin [(original by McAzzaMan)](https://github.com/McAzzaMan/flipperzero-firmware/tree/UPC-A_Barcode_Generator/applications/barcode_generator) - [EAN-8 and refactoring](https://github.com/DarkFlippers/unleashed-firmware/pull/154) by @msvsergey
- GPIO: Sentry Safe plugin [(by H4ckd4ddy)](https://github.com/H4ckd4ddy/flipperzero-sentry-safe-plugin)
- ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-firmware-with-wifi-marauder-companion) - Saving .pcap on flipper microSD [by tcpassos](https://github.com/tcpassos/flipperzero-firmware-with-wifi-marauder-companion) -> Only with custom marauder build (It is necessary to uncomment "#define WRITE_PACKETS_SERIAL" in configs.h (in marauder fw) and compile the firmware for the wifi board.) Or download precompiled build -> [Download esp32_marauder_ver_flipper_sd_serial.bin](https://github.com/justcallmekoko/ESP32Marauder/releases/latest)
- ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-wifi-marauder) - Saving .pcap on flipper microSD [by tcpassos](https://github.com/tcpassos/flipperzero-firmware-with-wifi-marauder-companion) -> Only with custom marauder build (It is necessary to uncomment "#define WRITE_PACKETS_SERIAL" in configs.h (in marauder fw) and compile the firmware for the wifi board.) Or download precompiled build -> [Download esp32_marauder_ver_flipper_sd_serial.bin](https://github.com/justcallmekoko/ESP32Marauder/releases/latest)
- NRF24: Sniffer & MouseJacker (with changes) [(by mothball187)](https://github.com/mothball187/flipperzero-nrf24/tree/main/mousejacker)
- Simple Clock (timer by GMMan) [(original by CompaqDisc)](https://gist.github.com/CompaqDisc/4e329c501bd03c1e801849b81f48ea61)
- **Sub-GHz Remote** [(by @gid9798)](https://github.com/gid9798)

View file

@ -7,8 +7,8 @@ App(
"vibro_test",
"keypad_test",
"usb_test",
"USB_Mouse",
"UART_Echo",
"usb_mouse",
"uart_echo",
"display_test",
"text_box_test",
"file_browser_test",

View file

@ -1,5 +1,5 @@
App(
appid="UART_Echo",
appid="uart_echo",
name="UART Echo",
apptype=FlipperAppType.DEBUG,
entry_point="uart_echo_app",

View file

@ -1,5 +1,5 @@
App(
appid="USB_Mouse",
appid="usb_mouse",
name="USB Mouse",
apptype=FlipperAppType.DEBUG,
entry_point="usb_mouse_app",

View file

@ -1,5 +1,5 @@
App(
appid="Arkanoid",
appid="arkanoid",
name="Arkanoid",
apptype=FlipperAppType.EXTERNAL,
entry_point="arkanoid_game_app",

View file

@ -1,5 +1,5 @@
App(
appid="Barcode_Generator",
appid="barcode_generator",
name="Barcode Generator",
apptype=FlipperAppType.EXTERNAL,
entry_point="barcode_generator_app",

View file

@ -1,5 +1,5 @@
App(
appid="Blackjack",
appid="blackjack",
name="Blackjack",
apptype=FlipperAppType.EXTERNAL,
entry_point="blackjack_app",

View file

@ -14,7 +14,7 @@
#include "util.h"
#include "ui.h"
#include "Blackjack_icons.h"
#include "blackjack_icons.h"
#define DEALER_MAX 17

View file

@ -1,5 +1,5 @@
App(
appid="DOOM",
appid="doom",
name="DOOM",
apptype=FlipperAppType.EXTERNAL,
entry_point="doom_app",

View file

@ -214,12 +214,12 @@ bool dtmf_dolphin_audio_play_tones(
generate_waveform(current_player, 0);
generate_waveform(current_player, current_player->half_buffer_length);
dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_init((uint32_t)current_player->sample_buffer, current_player->buffer_length);
furi_hal_interrupt_set_isr(
FuriHalInterruptIdDma1Ch1, dtmf_dolphin_audio_dma_isr, current_player->queue);
if(furi_hal_speaker_acquire(1000)) {
dtmf_dolphin_speaker_init();
dtmf_dolphin_dma_start();
dtmf_dolphin_speaker_start();
current_player->playing = true;

View file

@ -1,5 +1,5 @@
App(
appid="ESP8266_Deauther",
appid="esp8266_deauther",
name="[ESP8266] Deauther",
apptype=FlipperAppType.EXTERNAL,
entry_point="esp8266_deauth_app",

View file

@ -371,8 +371,8 @@ int32_t esp8266_deauth_app(void* p) {
view_port_input_callback_set(view_port, esp8266_deauth_module_input_callback, event_queue);
// Open GUI and register view_port
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
app->m_gui = furi_record_open(RECORD_GUI);
gui_add_view_port(app->m_gui, view_port, GuiLayerFullscreen);
//notification_message(app->notification, &sequence_set_only_blue_255);
@ -513,7 +513,7 @@ int32_t esp8266_deauth_app(void* p) {
view_port_enabled_set(view_port, false);
gui_remove_view_port(gui, view_port);
gui_remove_view_port(app->m_gui, view_port);
// Close gui record
furi_record_close(RECORD_GUI);

View file

@ -1,5 +1,5 @@
App(
appid="FlappyBird",
appid="flappy_bird",
name="Flappy Bird",
apptype=FlipperAppType.EXTERNAL,
entry_point="flappy_game_app",

View file

@ -1,6 +1,6 @@
#include <stdlib.h>
#include <FlappyBird_icons.h>
#include <flappy_bird_icons.h>
#include <furi.h>
#include <gui/gui.h>
#include <gui/icon_animation_i.h>

View file

@ -1,5 +1,5 @@
App(
appid="RFID_Fuzzer",
appid="rfid_fuzzer",
name="RFID Fuzzer",
apptype=FlipperAppType.EXTERNAL,
entry_point="flipfrid_start",

View file

@ -15,7 +15,7 @@
#include <toolbox/stream/file_stream.h>
#include <toolbox/stream/buffered_file_stream.h>
#include <RFID_Fuzzer_icons.h>
#include <rfid_fuzzer_icons.h>
#include <lib/lfrfid/lfrfid_worker.h>
#include <lfrfid/protocols/lfrfid_protocols.h>

View file

@ -1,5 +1,5 @@
App(
appid="i2cTools",
appid="i2c_tools",
name="[GPIO] i2c Tools",
apptype=FlipperAppType.EXTERNAL,
entry_point="i2ctools_app",

View file

@ -1,7 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <i2cTools_icons.h>
#include <i2c_tools_icons.h>
#define APP_NAME "I2C Tools"
#define SCAN_MENU_TEXT "Scan"

View file

@ -1,7 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <i2cTools_icons.h>
#include <i2c_tools_icons.h>
#include "../i2cscanner.h"
#define SCAN_TEXT "SCAN"

View file

@ -1,7 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <i2cTools_icons.h>
#include <i2c_tools_icons.h>
#include "../i2csender.h"
#define SEND_TEXT "SEND"

View file

@ -1,7 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <i2cTools_icons.h>
#include <i2c_tools_icons.h>
#include "../i2csniffer.h"
#define SNIFF_TEXT "SNIFF"

View file

@ -1,5 +1,5 @@
App(
appid="iBtn_Fuzzer",
appid="ibtn_fuzzer",
name="iButton Fuzzer",
apptype=FlipperAppType.EXTERNAL,
entry_point="ibtnfuzzer_start",

View file

@ -15,7 +15,7 @@
#include <toolbox/stream/file_stream.h>
#include <toolbox/stream/buffered_file_stream.h>
#include <iBtn_Fuzzer_icons.h>
#include <ibtn_fuzzer_icons.h>
#include <lib/ibutton/ibutton_worker.h>
#include <lib/ibutton/ibutton_key.h>

View file

@ -10,6 +10,7 @@ bool ibtnfuzzer_load(iBtnFuzzerState* context, const char* file_path) {
FlipperFormat* fff_data_file = flipper_format_file_alloc(storage);
FuriString* temp_str;
temp_str = furi_string_alloc();
bool key_v2 = false;
do {
if(!flipper_format_file_open_existing(fff_data_file, file_path)) {
FURI_LOG_E(TAG, "Error open file %s", file_path);
@ -30,10 +31,43 @@ bool ibtnfuzzer_load(iBtnFuzzerState* context, const char* file_path) {
// Key type
if(!flipper_format_read_string(fff_data_file, "Key type", temp_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Key type");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Key type");
break;
FURI_LOG_E(TAG, "Missing or incorrect Key type, checking for typ2..");
if(!flipper_format_rewind(fff_data_file)) {
FURI_LOG_E(TAG, "Failed to rewind file");
break;
}
if(!flipper_format_read_string(fff_data_file, "Protocol", temp_str)) {
furi_string_reset(context->notification_msg);
furi_string_set(
context->notification_msg, "Missing or incorrect Protocol or Key type");
break;
}
FURI_LOG_I(TAG, "Key type V2: %s", furi_string_get_cstr(temp_str));
key_v2 = true;
if(context->proto == DS1990) {
if(strcmp(furi_string_get_cstr(temp_str), "DS1990") != 0) {
FURI_LOG_E(TAG, "Unsupported Key type");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Unsupported Key type");
break;
}
} else if(context->proto == Cyfral) {
if(strcmp(furi_string_get_cstr(temp_str), "Cyfral") != 0) {
FURI_LOG_E(TAG, "Unsupported Key type");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Unsupported Key type");
break;
}
} else {
if(strcmp(furi_string_get_cstr(temp_str), "Metakom") != 0) {
FURI_LOG_E(TAG, "Unsupported Key type");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Unsupported Key type");
break;
}
}
} else {
FURI_LOG_I(TAG, "Key type: %s", furi_string_get_cstr(temp_str));
@ -60,46 +94,125 @@ bool ibtnfuzzer_load(iBtnFuzzerState* context, const char* file_path) {
}
}
}
// Data
if(!flipper_format_read_string(fff_data_file, "Data", context->data_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Data");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Key");
break;
} else {
FURI_LOG_I(TAG, "Key: %s", furi_string_get_cstr(context->data_str));
if(context->proto == DS1990) {
if(furi_string_size(context->data_str) != 23) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
} else if(context->proto == Cyfral) {
if(furi_string_size(context->data_str) != 5) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
if(!key_v2) {
// Data
if(!flipper_format_read_string(fff_data_file, "Data", context->data_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Data");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Key");
break;
} else {
if(furi_string_size(context->data_str) != 11) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
FURI_LOG_I(TAG, "Key: %s", furi_string_get_cstr(context->data_str));
if(context->proto == DS1990) {
if(furi_string_size(context->data_str) != 23) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
} else if(context->proto == Cyfral) {
if(furi_string_size(context->data_str) != 5) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
} else {
if(furi_string_size(context->data_str) != 11) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
}
// String to uint8_t
for(uint8_t i = 0; i < 8; i++) {
char temp_str2[3];
temp_str2[0] = furi_string_get_cstr(context->data_str)[i * 3];
temp_str2[1] = furi_string_get_cstr(context->data_str)[i * 3 + 1];
temp_str2[2] = '\0';
context->data[i] = (uint8_t)strtol(temp_str2, NULL, 16);
}
}
} else {
// Data
if(context->proto == DS1990) {
if(!flipper_format_read_string(fff_data_file, "Rom Data", context->data_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Rom Data");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Rom Data");
break;
} else {
FURI_LOG_I(TAG, "Key: %s", furi_string_get_cstr(context->data_str));
// String to uint8_t
for(uint8_t i = 0; i < 8; i++) {
char temp_str2[3];
temp_str2[0] = furi_string_get_cstr(context->data_str)[i * 3];
temp_str2[1] = furi_string_get_cstr(context->data_str)[i * 3 + 1];
temp_str2[2] = '\0';
context->data[i] = (uint8_t)strtol(temp_str2, NULL, 16);
if(furi_string_size(context->data_str) != 23) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
// String to uint8_t
for(uint8_t i = 0; i < 8; i++) {
char temp_str2[3];
temp_str2[0] = furi_string_get_cstr(context->data_str)[i * 3];
temp_str2[1] = furi_string_get_cstr(context->data_str)[i * 3 + 1];
temp_str2[2] = '\0';
context->data[i] = (uint8_t)strtol(temp_str2, NULL, 16);
}
}
} else if(context->proto == Cyfral) {
if(!flipper_format_read_string(fff_data_file, "Data", context->data_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Data");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Data");
break;
} else {
FURI_LOG_I(TAG, "Key: %s", furi_string_get_cstr(context->data_str));
if(furi_string_size(context->data_str) != 5) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
// String to uint8_t
for(uint8_t i = 0; i < 8; i++) {
char temp_str2[3];
temp_str2[0] = furi_string_get_cstr(context->data_str)[i * 3];
temp_str2[1] = furi_string_get_cstr(context->data_str)[i * 3 + 1];
temp_str2[2] = '\0';
context->data[i] = (uint8_t)strtol(temp_str2, NULL, 16);
}
}
} else {
if(!flipper_format_read_string(fff_data_file, "Data", context->data_str)) {
FURI_LOG_E(TAG, "Missing or incorrect Data");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Missing or incorrect Data");
break;
} else {
FURI_LOG_I(TAG, "Key: %s", furi_string_get_cstr(context->data_str));
if(furi_string_size(context->data_str) != 11) {
FURI_LOG_E(TAG, "Incorrect Key length");
furi_string_reset(context->notification_msg);
furi_string_set(context->notification_msg, "Incorrect Key length");
break;
}
// String to uint8_t
for(uint8_t i = 0; i < 8; i++) {
char temp_str2[3];
temp_str2[0] = furi_string_get_cstr(context->data_str)[i * 3];
temp_str2[1] = furi_string_get_cstr(context->data_str)[i * 3 + 1];
temp_str2[2] = '\0';
context->data[i] = (uint8_t)strtol(temp_str2, NULL, 16);
}
}
}
}

View file

@ -1,5 +1,5 @@
App(
appid="Metronome",
appid="metronome",
name="Metronome",
apptype=FlipperAppType.EXTERNAL,
entry_point="metronome_app",

View file

@ -1,6 +1,6 @@
#include <gui/canvas.h>
#include <gui/icon_i.h>
#include <Metronome_icons.h>
#include <metronome_icons.h>
//lib can only do bottom left/right
void elements_button_top_left(Canvas* canvas, const char* str) {

View file

@ -1,5 +1,5 @@
App(
appid="Minesweeper",
appid="minesweeper",
name="Minesweeper",
apptype=FlipperAppType.EXTERNAL,
entry_point="minesweeper_app",

View file

@ -1,5 +1,5 @@
App(
appid="NRF24_Mouse_Jacker",
appid="nrf24_mouse_jacker",
name="[NRF24] Mouse Jacker",
apptype=FlipperAppType.EXTERNAL,
entry_point="mousejacker_app",

View file

@ -10,7 +10,7 @@
#include <furi_hal_resources.h>
#include <nrf24.h>
#include "mousejacker_ducky.h"
#include <NRF24_Mouse_Jacker_icons.h>
#include <nrf24_mouse_jacker_icons.h>
#define TAG "mousejacker"
#define LOGITECH_MAX_CHANNEL 85

View file

@ -1,5 +1,5 @@
App(
appid="Multi_Converter",
appid="multi_converter",
name="Multi Converter",
apptype=FlipperAppType.EXTERNAL,
entry_point="multi_converter_app",

View file

@ -1,5 +1,5 @@
App(
appid="Music_Player",
appid="music_player",
name="Music Player",
apptype=FlipperAppType.EXTERNAL,
entry_point="music_player_app",

View file

@ -3,7 +3,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <Music_Player_icons.h>
#include <music_player_icons.h>
#include <gui/gui.h>
#include <dialogs/dialogs.h>
#include <storage/storage.h>

View file

@ -1,5 +1,5 @@
App(
appid="NRF24_Sniffer",
appid="nrf24_sniffer",
name="[NRF24] Sniffer",
apptype=FlipperAppType.EXTERNAL,
entry_point="nrfsniff_app",

View file

@ -1,5 +1,5 @@
App(
appid="Picopass",
appid="picopass",
name="[iClass] PicoPass",
apptype=FlipperAppType.EXTERNAL,
targets=["f7"],

View file

@ -2,7 +2,7 @@
#include <toolbox/path.h>
#include <flipper_format/flipper_format.h>
#include <Picopass_icons.h>
#include <picopass_icons.h>
#define TAG "PicopassDevice"

View file

@ -25,7 +25,7 @@
#include <storage/storage.h>
#include <lib/toolbox/path.h>
#include <Picopass_icons.h>
#include <picopass_icons.h>
#define PICOPASS_TEXT_STORE_SIZE 128

View file

@ -1,5 +1,5 @@
App(
appid="SubGHz_Playlist",
appid="subghz_playlist",
name="Sub-GHz Playlist",
apptype=FlipperAppType.EXTERNAL,
entry_point="playlist_app",

View file

@ -6,7 +6,7 @@
#include <storage/storage.h>
#include <lib/toolbox/path.h>
#include <SubGHz_Playlist_icons.h>
#include <subghz_playlist_icons.h>
#include <lib/subghz/protocols/protocol_items.h>
#include <flipper_format/flipper_format_i.h>

View file

@ -173,6 +173,8 @@ void protoview_timer_isr(void* ctx) {
void raw_sampling_worker_start(ProtoViewApp* app) {
UNUSED(app);
furi_hal_bus_enable(FuriHalBusTIM2);
LL_TIM_InitTypeDef tim_init = {
.Prescaler = 63, /* CPU frequency is ~64Mhz. */
.CounterMode = LL_TIM_COUNTERMODE_UP,
@ -195,6 +197,6 @@ void raw_sampling_worker_stop(ProtoViewApp* app) {
LL_TIM_DisableCounter(TIM2);
LL_TIM_DisableIT_UPDATE(TIM2);
furi_hal_interrupt_set_isr(FuriHalInterruptIdTIM2, NULL, NULL);
LL_TIM_DeInit(TIM2);
furi_hal_bus_disable(FuriHalBusTIM2);
FURI_CRITICAL_EXIT();
}

View file

@ -251,7 +251,7 @@ static bool decode(uint8_t* bits, uint32_t numbytes, uint32_t numbits, ProtoView
linecode = LineCodeManchester;
start1 = tmp1;
msgbits = manchester_bits * 2;
FURI_LOG_E(TAG, "MANCHESTER START: %lu", tmp1);
//FURI_LOG_T(TAG, "MANCHESTER START: %lu", tmp1);
}
if(linecode == LineCodeNone) return false;
@ -284,11 +284,11 @@ static bool decode(uint8_t* bits, uint32_t numbytes, uint32_t numbits, ProtoView
* transfer all that is needed, like a message
* terminator (that we don't detect). */
if(preamble_found) FURI_LOG_E(TAG, "PREAMBLE AT: %lu", preamble_start);
FURI_LOG_E(TAG, "START: %lu", info->start_off);
FURI_LOG_E(TAG, "MSGBITS: %lu", msgbits);
FURI_LOG_E(TAG, "DATASTART: %lu", start1);
FURI_LOG_E(TAG, "PULSES: %lu", info->pulses_count);
/*if(preamble_found) FURI_LOG_T(TAG, "PREAMBLE AT: %lu", preamble_start);
FURI_LOG_T(TAG, "START: %lu", info->start_off);
FURI_LOG_T(TAG, "MSGBITS: %lu", msgbits);
FURI_LOG_T(TAG, "DATASTART: %lu", start1);
FURI_LOG_T(TAG, "PULSES: %lu", info->pulses_count);*/
/* We think there is a message and we know where it starts and the
* line code used. We can turn it into bits and bytes. */

View file

@ -137,6 +137,8 @@ static void ds_timer_isr(void* ctx) {
static void direct_sampling_timer_start(ProtoViewApp* app) {
DirectSamplingViewPrivData* privdata = app->view_privdata;
furi_hal_bus_enable(FuriHalBusTIM2);
LL_TIM_InitTypeDef tim_init = {
.Prescaler = 63, /* CPU frequency is ~64Mhz. */
.CounterMode = LL_TIM_COUNTERMODE_UP,
@ -157,6 +159,6 @@ static void direct_sampling_timer_stop(ProtoViewApp* app) {
LL_TIM_DisableCounter(TIM2);
LL_TIM_DisableIT_UPDATE(TIM2);
furi_hal_interrupt_set_isr(FuriHalInterruptIdTIM2, NULL, NULL);
LL_TIM_DeInit(TIM2);
furi_hal_bus_disable(FuriHalBusTIM2);
FURI_CRITICAL_EXIT();
}

View file

@ -1,5 +1,5 @@
App(
appid="GPIO_Sentry_Safe",
appid="gpio_sentry_safe",
name="[GPIO] Sentry Safe",
apptype=FlipperAppType.EXTERNAL,
entry_point="sentry_safe_app",

View file

@ -1,5 +1,5 @@
App(
appid="Signal_Generator",
appid="signal_generator",
name="Signal Generator",
apptype=FlipperAppType.EXTERNAL,
entry_point="signal_gen_app",

View file

@ -1,7 +1,7 @@
#include "../signal_gen_app_i.h"
#include <furi_hal.h>
#include <gui/elements.h>
#include <Signal_Generator_icons.h>
#include <signal_generator_icons.h>
typedef enum {
LineIndexChannel,

View file

@ -1,5 +1,5 @@
App(
appid="Snake",
appid="snake",
name="Snake Game",
apptype=FlipperAppType.EXTERNAL,
entry_point="snake_game_app",

View file

@ -1,5 +1,5 @@
App(
appid="Solitaire",
appid="solitaire",
name="Solitaire",
apptype=FlipperAppType.EXTERNAL,
entry_point="solitaire_app",

View file

@ -4,7 +4,7 @@
#include <gui/canvas_i.h>
#include "defines.h"
#include "common/ui.h"
#include "Solitaire_icons.h"
#include "solitaire_icons.h"
#include <notification/notification.h>
#include <notification/notification_messages.h>
void init(GameState* game_state);

View file

@ -1,5 +1,5 @@
App(
appid="Spectrum_Analyzer",
appid="spectrum_analyzer",
name="Spectrum Analyzer",
apptype=FlipperAppType.EXTERNAL,
entry_point="spectrum_analyzer_app",

@ -1 +1 @@
Subproject commit d1317392a4a7dadd34157e66c73fee6990fd2100
Subproject commit c55814712d07cb5983c0c46dfc1386ab973358c3

View file

@ -1,5 +1,5 @@
App(
appid="Tetris",
appid="tetris",
name="Tetris",
apptype=FlipperAppType.EXTERNAL,
entry_point="tetris_game_app",

View file

@ -1,5 +1,5 @@
App(
appid="TicTacToe",
appid="tictactoe",
name="Tic Tac Toe",
apptype=FlipperAppType.EXTERNAL,
entry_point="tictactoe_game_app",

View file

@ -89,8 +89,11 @@ CryptoSeedIVResult
} else {
max_i = uid_size;
}
#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_UL_XFW
const uint8_t* uid = furi_hal_version_uid_default();
#else
const uint8_t* uid = furi_hal_version_uid();
#endif
for(uint8_t i = 0; i < max_i; i++) {
plugin_state->iv[i] = plugin_state->iv[i] ^ uid[i];
}

View file

@ -1,5 +1,5 @@
App(
appid="WAV_Player",
appid="wav_player",
name="WAV Player",
apptype=FlipperAppType.EXTERNAL,
entry_point="wav_player_app",

View file

@ -12,7 +12,7 @@
#include "wav_player_view.h"
#include <math.h>
#include <WAV_Player_icons.h>
#include <wav_player_icons.h>
#define TAG "WavPlayer"
@ -357,12 +357,12 @@ static void app_run(WavPlayerApp* app) {
bool eof = fill_data(app, 0);
eof = fill_data(app, app->samples_count_half);
wav_player_speaker_init(app->sample_rate);
wav_player_dma_init((uint32_t)app->sample_buffer, app->samples_count);
furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, wav_player_dma_isr, app->queue);
if(furi_hal_speaker_acquire(1000)) {
wav_player_speaker_init(app->sample_rate);
wav_player_dma_init((uint32_t)app->sample_buffer, app->samples_count);
furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, wav_player_dma_isr, app->queue);
wav_player_dma_start();
wav_player_speaker_start();
@ -440,6 +440,9 @@ static void app_run(WavPlayerApp* app) {
furi_hal_speaker_release();
}
// Reset GPIO pin and bus states
wav_player_hal_deinit();
furi_hal_interrupt_set_isr(FuriHalInterruptIdDma1Ch1, NULL, NULL);
}

View file

@ -17,6 +17,9 @@
#define DMA_INSTANCE DMA1, LL_DMA_CHANNEL_1
void wav_player_speaker_init(uint32_t sample_rate) {
// Enable bus
furi_hal_bus_enable(FuriHalBusTIM2);
LL_TIM_InitTypeDef TIM_InitStruct = {0};
//TIM_InitStruct.Prescaler = 4;
TIM_InitStruct.Prescaler = 1;
@ -56,6 +59,13 @@ void wav_player_speaker_init(uint32_t sample_rate) {
GpioAltFn14TIM16);
}
void wav_player_hal_deinit() {
furi_hal_gpio_init(&gpio_ext_pa6, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
// Disable bus
furi_hal_bus_disable(FuriHalBusTIM2);
}
void wav_player_speaker_start() {
LL_TIM_EnableAllOutputs(FURI_HAL_SPEAKER_TIMER);
LL_TIM_EnableCounter(FURI_HAL_SPEAKER_TIMER);

View file

@ -18,6 +18,8 @@ void wav_player_dma_start();
void wav_player_dma_stop();
void wav_player_hal_deinit();
#ifdef __cplusplus
}
#endif

View file

@ -1,5 +1,5 @@
App(
appid="ESP32_WiFi_Marauder",
appid="esp32_wifi_marauder",
name="[ESP32] WiFi Marauder",
apptype=FlipperAppType.EXTERNAL,
entry_point="wifi_marauder_app",

View file

@ -21,7 +21,7 @@
#include <gui/modules/widget.h>
#include "wifi_marauder_text_input.h"
#include <ESP32_WiFi_Marauder_icons.h>
#include <esp32_wifi_marauder_icons.h>
#include <storage/storage.h>
#include <lib/toolbox/path.h>
#include <dialogs/dialogs.h>

View file

@ -1,6 +1,6 @@
#include "wifi_marauder_text_input.h"
#include <gui/elements.h>
#include "ESP32_WiFi_Marauder_icons.h"
#include "esp32_wifi_marauder_icons.h"
#include "wifi_marauder_app_i.h"
#include <furi.h>

View file

@ -1,5 +1,5 @@
App(
appid="WiFi_Scanner",
appid="wifi_scanner",
name="[WiFi] Scanner",
apptype=FlipperAppType.EXTERNAL,
entry_point="wifi_scanner_app",

View file

@ -889,8 +889,8 @@ int32_t wifi_scanner_app(void* p) {
view_port_input_callback_set(view_port, wifi_module_input_callback, event_queue);
// Open GUI and register view_port
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
app->m_gui = furi_record_open(RECORD_GUI);
gui_add_view_port(app->m_gui, view_port, GuiLayerFullscreen);
//notification_message(app->notification, &sequence_set_only_blue_255);
@ -1040,7 +1040,7 @@ int32_t wifi_scanner_app(void* p) {
view_port_enabled_set(view_port, false);
gui_remove_view_port(gui, view_port);
gui_remove_view_port(app->m_gui, view_port);
// Close gui record
furi_record_close(RECORD_GUI);

View file

@ -1,5 +1,5 @@
App(
appid="Zombiez",
appid="zombiez",
name="Zombiez",
apptype=FlipperAppType.EXTERNAL,
entry_point="zombiez_game_app",

View file

@ -20,6 +20,7 @@ ADD_SCENE(nfc, nfcv_key_input, NfcVKeyInput)
ADD_SCENE(nfc, nfcv_unlock, NfcVUnlock)
ADD_SCENE(nfc, nfcv_emulate, NfcVEmulate)
ADD_SCENE(nfc, nfcv_sniff, NfcVSniff)
ADD_SCENE(nfc, nfcv_read_success, NfcVReadSuccess)
ADD_SCENE(nfc, mf_ultralight_read_success, MfUltralightReadSuccess)
ADD_SCENE(nfc, mf_ultralight_data, MfUltralightData)
ADD_SCENE(nfc, mf_ultralight_menu, MfUltralightMenu)

View file

@ -15,7 +15,7 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
NfcProtocol protocol = dev_data->protocol;
uint8_t text_scroll_height = 0;
if((protocol == NfcDeviceProtocolMifareDesfire) || (protocol == NfcDeviceProtocolMifareUl) ||
(protocol == NfcDeviceProtocolMifareClassic) || (protocol == NfcDeviceProtocolNfcV)) {
(protocol == NfcDeviceProtocolMifareClassic)) {
widget_add_button_element(
widget, GuiButtonTypeRight, "More", nfc_scene_nfc_data_info_widget_callback, nfc);
text_scroll_height = 52;
@ -90,25 +90,6 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
furi_string_cat_printf(temp_str, "Blocks: %02X\n", nfcv_data->block_num);
furi_string_cat_printf(temp_str, "Blocksize: %02X\n", nfcv_data->block_size);
furi_string_cat_printf(
temp_str, "Data (%d byte)\n", nfcv_data->block_num * nfcv_data->block_size);
int maxBlocks = nfcv_data->block_num;
if(maxBlocks > 32) {
maxBlocks = 32;
furi_string_cat_printf(temp_str, "(truncated to %d blocks)\n", maxBlocks);
}
for(int block = 0; block < maxBlocks; block++) {
const char* status = (nfcv_data->security_status[block] & 0x01) ? "(lck)" : "";
for(int pos = 0; pos < nfcv_data->block_size; pos++) {
furi_string_cat_printf(
temp_str, " %02X", nfcv_data->data[block * nfcv_data->block_size + pos]);
}
furi_string_cat_printf(temp_str, " %s\n", status);
}
furi_string_cat_printf(temp_str, "\n");
switch(dev_data->nfcv_data.sub_type) {
case NfcVTypePlain:
furi_string_cat_printf(temp_str, "Type: Plain\n");
@ -189,6 +170,25 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
furi_string_cat_printf(temp_str, "\e#ISO15693 (unknown)\n");
break;
}
furi_string_cat_printf(
temp_str, "Data (%d byte)\n", nfcv_data->block_num * nfcv_data->block_size);
int maxBlocks = nfcv_data->block_num;
if(maxBlocks > 32) {
maxBlocks = 32;
furi_string_cat_printf(temp_str, "(truncated to %d blocks)\n", maxBlocks);
}
for(int block = 0; block < maxBlocks; block++) {
const char* status = (nfcv_data->security_status[block] & 0x01) ? "(lck)" : "";
for(int pos = 0; pos < nfcv_data->block_size; pos++) {
furi_string_cat_printf(
temp_str, " %02X", nfcv_data->data[block * nfcv_data->block_size + pos]);
}
furi_string_cat_printf(temp_str, " %s\n", status);
}
} else {
char iso_type = FURI_BIT(nfc_data->sak, 5) ? '4' : '3';
furi_string_cat_printf(temp_str, "ISO 14443-%c (NFC-A)\n", iso_type);

View file

@ -13,7 +13,9 @@ bool nfc_scene_nfcv_emulate_worker_callback(NfcWorkerEvent event, void* context)
switch(event) {
case NfcWorkerEventNfcVCommandExecuted:
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventUpdateLog);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventUpdateLog);
}
break;
case NfcWorkerEventNfcVContentChanged:
view_dispatcher_send_custom_event(nfc->view_dispatcher, NfcCustomEventSaveShadow);
@ -45,9 +47,9 @@ static void nfc_scene_nfcv_emulate_widget_config(Nfc* nfc, bool data_received) {
FuriString* info_str;
info_str = furi_string_alloc();
widget_add_icon_element(widget, 0, 3, &I_RFIDDolphinSend_97x61);
widget_add_string_element(
widget, 89, 32, AlignCenter, AlignTop, FontPrimary, "Emulating NfcV");
widget_add_icon_element(widget, 0, 3, &I_NFC_dolphin_emulation_47x61);
widget_add_string_multiline_element(
widget, 87, 13, AlignCenter, AlignTop, FontPrimary, "Emulating\nNFC V");
if(strcmp(nfc->dev->dev_name, "")) {
furi_string_printf(info_str, "%s", nfc->dev->dev_name);
} else {
@ -57,11 +59,13 @@ static void nfc_scene_nfcv_emulate_widget_config(Nfc* nfc, bool data_received) {
}
furi_string_trim(info_str);
widget_add_text_box_element(
widget, 56, 43, 70, 21, AlignCenter, AlignTop, furi_string_get_cstr(info_str), true);
widget, 52, 40, 70, 21, AlignCenter, AlignTop, furi_string_get_cstr(info_str), true);
furi_string_free(info_str);
if(data_received) {
widget_add_button_element(
widget, GuiButtonTypeCenter, "Log", nfc_scene_nfcv_emulate_widget_callback, nfc);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
widget_add_button_element(
widget, GuiButtonTypeCenter, "Log", nfc_scene_nfcv_emulate_widget_callback, nfc);
}
}
}
@ -126,9 +130,11 @@ bool nfc_scene_nfcv_emulate_on_event(void* context, SceneManagerEvent event) {
}
consumed = true;
} else if(event.event == GuiButtonTypeCenter && state == NfcSceneNfcVEmulateStateWidget) {
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextBox);
scene_manager_set_scene_state(
nfc->scene_manager, NfcSceneNfcVEmulate, NfcSceneNfcVEmulateStateTextBox);
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewTextBox);
scene_manager_set_scene_state(
nfc->scene_manager, NfcSceneNfcVEmulate, NfcSceneNfcVEmulateStateTextBox);
}
consumed = true;
} else if(event.event == NfcCustomEventViewExit && state == NfcSceneNfcVEmulateStateTextBox) {
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget);

View file

@ -4,6 +4,7 @@
enum SubmenuIndex {
SubmenuIndexSave,
SubmenuIndexEmulate,
SubmenuIndexInfo,
};
void nfc_scene_nfcv_menu_submenu_callback(void* context, uint32_t index) {
@ -19,6 +20,7 @@ void nfc_scene_nfcv_menu_on_enter(void* context) {
submenu_add_item(
submenu, "Emulate", SubmenuIndexEmulate, nfc_scene_nfcv_menu_submenu_callback, nfc);
submenu_add_item(submenu, "Save", SubmenuIndexSave, nfc_scene_nfcv_menu_submenu_callback, nfc);
submenu_add_item(submenu, "Info", SubmenuIndexInfo, nfc_scene_nfcv_menu_submenu_callback, nfc);
submenu_set_selected_item(
nfc->submenu, scene_manager_get_scene_state(nfc->scene_manager, NfcSceneNfcVMenu));
@ -45,6 +47,9 @@ bool nfc_scene_nfcv_menu_on_event(void* context, SceneManagerEvent event) {
DOLPHIN_DEED(DolphinDeedNfcEmulate);
}
consumed = true;
} else if(event.event == SubmenuIndexInfo) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);
consumed = true;
}
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneNfcVMenu, event.event);

View file

@ -0,0 +1,94 @@
#include "../nfc_i.h"
void nfc_scene_nfcv_read_success_widget_callback(
GuiButtonType result,
InputType type,
void* context) {
furi_assert(context);
Nfc* nfc = context;
if(type == InputTypeShort) {
view_dispatcher_send_custom_event(nfc->view_dispatcher, result);
}
}
void nfc_scene_nfcv_read_success_on_enter(void* context) {
Nfc* nfc = context;
NfcDeviceData* dev_data = &nfc->dev->dev_data;
FuriHalNfcDevData* nfc_data = &nfc->dev->dev_data.nfc_data;
NfcVData* nfcv_data = &nfc->dev->dev_data.nfcv_data;
// Setup view
Widget* widget = nfc->widget;
widget_add_button_element(
widget, GuiButtonTypeLeft, "Retry", nfc_scene_nfcv_read_success_widget_callback, nfc);
widget_add_button_element(
widget, GuiButtonTypeRight, "More", nfc_scene_nfcv_read_success_widget_callback, nfc);
FuriString* temp_str = furi_string_alloc();
switch(dev_data->nfcv_data.sub_type) {
case NfcVTypePlain:
furi_string_cat_printf(temp_str, "\e#ISO15693\n");
break;
case NfcVTypeSlix:
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX\n");
break;
case NfcVTypeSlixS:
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX-S\n");
break;
case NfcVTypeSlixL:
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX-L\n");
break;
case NfcVTypeSlix2:
furi_string_cat_printf(temp_str, "\e#ISO15693 SLIX2\n");
break;
default:
furi_string_cat_printf(temp_str, "\e#ISO15693 (unknown)\n");
break;
}
furi_string_cat_printf(temp_str, "UID:");
for(size_t i = 0; i < nfc_data->uid_len; i++) {
furi_string_cat_printf(temp_str, " %02X", nfc_data->uid[i]);
}
furi_string_cat_printf(temp_str, "\n");
furi_string_cat_printf(temp_str, "Blocks: %02X\n", nfcv_data->block_num);
furi_string_cat_printf(temp_str, "Blocksize: %02X\n", nfcv_data->block_size);
widget_add_text_scroll_element(widget, 0, 0, 128, 52, furi_string_get_cstr(temp_str));
furi_string_free(temp_str);
notification_message_block(nfc->notifications, &sequence_set_green_255);
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewWidget);
}
bool nfc_scene_nfcv_read_success_on_event(void* context, SceneManagerEvent event) {
Nfc* nfc = context;
bool consumed = false;
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == GuiButtonTypeLeft) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneRetryConfirm);
consumed = true;
} else if(event.event == GuiButtonTypeRight) {
// Clear device name
nfc_device_set_name(nfc->dev, "");
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVMenu);
consumed = true;
}
} else if(event.type == SceneManagerEventTypeBack) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneExitConfirm);
consumed = true;
}
return consumed;
}
void nfc_scene_nfcv_read_success_on_exit(void* context) {
Nfc* nfc = context;
notification_message_block(nfc->notifications, &sequence_reset_green);
// Clear view
widget_reset(nfc->widget);
}

View file

@ -70,7 +70,7 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) {
consumed = true;
} else if(event.event == NfcWorkerEventReadNfcV) {
notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
consumed = true;
} else if(event.event == NfcWorkerEventReadMfUltralight) {

View file

@ -11,7 +11,7 @@ void nfc_scene_restore_original_confirm_on_enter(void* context) {
DialogEx* dialog_ex = nfc->dialog_ex;
dialog_ex_set_header(dialog_ex, "Restore Card Data?", 64, 0, AlignCenter, AlignTop);
dialog_ex_set_icon(dialog_ex, 5, 15, &I_Restoring_38x32);
dialog_ex_set_icon(dialog_ex, 5, 11, &I_ArrowC_1_36x36);
dialog_ex_set_text(
dialog_ex, "It will be returned\nto its original state.", 47, 21, AlignLeft, AlignTop);
dialog_ex_set_left_button_text(dialog_ex, "Cancel");

View file

@ -19,6 +19,7 @@ typedef enum {
SubmenuIndexElmesElectronic,
SubmenuIndexSommer_FM_434,
SubmenuIndexSommer_FM_868,
SubmenuIndexStilmatic,
SubmenuIndexDTMNeo433,
SubmenuIndexGibidi433,
SubmenuIndexGSN,

View file

@ -103,6 +103,12 @@ void subghz_scene_set_type_on_enter(void* context) {
SubmenuIndexSommer_FM_868,
subghz_scene_set_type_submenu_callback,
subghz);
submenu_add_item(
subghz->submenu,
"KL: Stilmatic 433MHz",
SubmenuIndexStilmatic,
subghz_scene_set_type_submenu_callback,
subghz);
submenu_add_item(
subghz->submenu,
"KL: IronLogic 433MHz",
@ -510,6 +516,15 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
}
break;
case SubmenuIndexStilmatic:
generated_protocol = subghz_txrx_gen_keeloq_protocol(
subghz->txrx, "AM650", 433920000, key & 0x0FFFFFFF, 0x1, 0x0003, "Stilmatic");
if(!generated_protocol) {
furi_string_set(
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
}
break;
case SubmenuIndexSommer_FM_434:
generated_protocol = subghz_txrx_gen_keeloq_protocol(
subghz->txrx, "FM476", 434420000, key & 0x0FFFFFFF, 0x4, 0x0003, "Sommer(fsk476)");

View file

@ -200,23 +200,23 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
break;
}
case DesktopMainEventOpenGameMenu: {
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/Snake.fap"));
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/snake.fap"));
break;
}
case DesktopMainEventOpenTetris: {
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/Tetris.fap"));
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/tetris.fap"));
break;
}
case DesktopMainEventOpenArkanoid: {
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/Arkanoid.fap"));
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/arkanoid.fap"));
break;
}
case DesktopMainEventOpenDOOM: {
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/DOOM.fap"));
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/doom.fap"));
break;
}
case DesktopMainEventOpenZombiez: {
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/Zombiez.fap"));
desktop_scene_main_open_app_or_profile(desktop, EXT_PATH("/apps/Games/zombiez.fap"));
break;
}
case DesktopMainEventOpenHeap: {

View file

@ -79,8 +79,8 @@ Dolphin* dolphin_alloc() {
dolphin->state = dolphin_state_alloc();
dolphin->event_queue = furi_message_queue_alloc(8, sizeof(DolphinEvent));
dolphin->pubsub = furi_pubsub_alloc();
dolphin->butthurt_timer = xTimerCreate(
NULL, HOURS_IN_TICKS(2 * 24), pdTRUE, dolphin, dolphin_butthurt_timer_callback);
dolphin->butthurt_timer =
xTimerCreate(NULL, HOURS_IN_TICKS(24), pdTRUE, dolphin, dolphin_butthurt_timer_callback);
dolphin->flush_timer =
xTimerCreate(NULL, 30 * 1000, pdFALSE, dolphin, dolphin_flush_timer_callback);
dolphin->clear_limits_timer = xTimerCreate(

View file

@ -75,6 +75,8 @@ typedef enum {
NotificationMessageTypeForceDisplayBrightnessSetting,
NotificationMessageTypeLedBrightnessSettingApply,
NotificationMessageTypeLcdContrastUpdate,
} NotificationMessageType;
typedef struct {

View file

@ -3,6 +3,9 @@
#include <furi_hal.h>
#include <storage/storage.h>
#include <input/input.h>
#include <gui/gui_i.h>
#include <u8g2_glue.h>
#include "notification.h"
#include "notification_messages.h"
#include "notification_app.h"
@ -20,14 +23,14 @@ 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(bool force);
void notification_vibro_off();
void notification_sound_on(float freq, float volume, bool force);
void notification_sound_off();
static void notification_vibro_on(bool force);
static void notification_vibro_off();
static void notification_sound_on(float freq, float volume, bool force);
static void notification_sound_off();
uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8_t value);
uint8_t notification_settings_get_rgb_led_brightness(NotificationApp* app, uint8_t value);
uint32_t notification_settings_display_off_delay_ticks(NotificationApp* app);
static uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8_t value);
static uint8_t notification_settings_get_rgb_led_brightness(NotificationApp* app, uint8_t value);
static uint32_t notification_settings_display_off_delay_ticks(NotificationApp* app);
void notification_message_save_settings(NotificationApp* app) {
NotificationAppMessage m = {
@ -39,7 +42,8 @@ void notification_message_save_settings(NotificationApp* app) {
};
// internal layer
void notification_apply_internal_led_layer(NotificationLedLayer* layer, uint8_t layer_value) {
static void
notification_apply_internal_led_layer(NotificationLedLayer* layer, uint8_t layer_value) {
furi_assert(layer);
furi_assert(layer->index < LayerMAX);
@ -52,7 +56,13 @@ void notification_apply_internal_led_layer(NotificationLedLayer* layer, uint8_t
}
}
bool notification_is_any_led_layer_internal_and_not_empty(NotificationApp* app) {
static void notification_apply_lcd_contrast(NotificationApp* app) {
Gui* gui = furi_record_open(RECORD_GUI);
u8x8_d_st756x_set_contrast(&gui->canvas->fb.u8x8, app->settings.contrast);
furi_record_close(RECORD_GUI);
}
static bool notification_is_any_led_layer_internal_and_not_empty(NotificationApp* app) {
bool result = false;
if((app->led[0].index == LayerInternal) || (app->led[1].index == LayerInternal) ||
(app->led[2].index == LayerInternal)) {
@ -67,7 +77,7 @@ bool notification_is_any_led_layer_internal_and_not_empty(NotificationApp* app)
}
// notification layer
void notification_apply_notification_led_layer(
static void notification_apply_notification_led_layer(
NotificationLedLayer* layer,
const uint8_t layer_value) {
furi_assert(layer);
@ -81,7 +91,7 @@ void notification_apply_notification_led_layer(
furi_hal_light_set(layer->light, layer->value[LayerNotification]);
}
void notification_reset_notification_led_layer(NotificationLedLayer* layer) {
static void notification_reset_notification_led_layer(NotificationLedLayer* layer) {
furi_assert(layer);
furi_assert(layer->index < LayerMAX);
@ -94,7 +104,7 @@ void notification_reset_notification_led_layer(NotificationLedLayer* layer) {
furi_hal_light_set(layer->light, layer->value[LayerInternal]);
}
void notification_reset_notification_layer(NotificationApp* app, uint8_t reset_mask) {
static void notification_reset_notification_layer(NotificationApp* app, uint8_t reset_mask) {
if(reset_mask & reset_blink_mask) {
furi_hal_light_blink_stop();
}
@ -130,28 +140,28 @@ uint8_t notification_settings_get_display_brightness(NotificationApp* app, uint8
return (value * app->settings.display_brightness);
}
uint8_t notification_settings_get_rgb_led_brightness(NotificationApp* app, uint8_t value) {
static uint8_t notification_settings_get_rgb_led_brightness(NotificationApp* app, uint8_t value) {
return (value * app->settings.led_brightness);
}
uint32_t notification_settings_display_off_delay_ticks(NotificationApp* app) {
static uint32_t notification_settings_display_off_delay_ticks(NotificationApp* app) {
return (
(float)(app->settings.display_off_delay_ms) /
(1000.0f / furi_kernel_get_tick_frequency()));
}
// generics
void notification_vibro_on(bool force) {
static void notification_vibro_on(bool force) {
if(!furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode) || force) {
furi_hal_vibro_on(true);
}
}
void notification_vibro_off() {
static void notification_vibro_off() {
furi_hal_vibro_on(false);
}
void notification_sound_on(float freq, float volume, bool force) {
static 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);
@ -159,7 +169,7 @@ void notification_sound_on(float freq, float volume, bool force) {
}
}
void notification_sound_off() {
static void notification_sound_off() {
if(furi_hal_speaker_is_mine()) {
furi_hal_speaker_stop();
furi_hal_speaker_release();
@ -174,7 +184,7 @@ static void notification_display_timer(void* ctx) {
}
// message processing
void notification_process_notification_message(
static void notification_process_notification_message(
NotificationApp* app,
NotificationAppMessage* message) {
uint32_t notification_message_index = 0;
@ -333,6 +343,9 @@ void notification_process_notification_message(
reset_mask |= reset_green_mask;
reset_mask |= reset_blue_mask;
break;
case NotificationMessageTypeLcdContrastUpdate:
notification_apply_lcd_contrast(app);
break;
}
notification_message_index++;
notification_message = (*message->sequence)[notification_message_index];
@ -361,7 +374,8 @@ void notification_process_notification_message(
}
}
void notification_process_internal_message(NotificationApp* app, NotificationAppMessage* message) {
static void
notification_process_internal_message(NotificationApp* app, NotificationAppMessage* message) {
uint32_t notification_message_index = 0;
const NotificationMessage* notification_message;
notification_message = (*message->sequence)[notification_message_index];
@ -548,6 +562,7 @@ int32_t notification_srv(void* p) {
notification_apply_internal_led_layer(&app->led[0], 0x00);
notification_apply_internal_led_layer(&app->led[1], 0x00);
notification_apply_internal_led_layer(&app->led[2], 0x00);
notification_apply_lcd_contrast(app);
furi_record_create(RECORD_NOTIFICATION, app);

View file

@ -32,7 +32,7 @@ typedef struct {
Light light;
} NotificationLedLayer;
#define NOTIFICATION_SETTINGS_VERSION 0x01
#define NOTIFICATION_SETTINGS_VERSION 0x02
#define NOTIFICATION_SETTINGS_PATH INT_PATH(NOTIFICATION_SETTINGS_FILE_NAME)
typedef struct {
@ -41,6 +41,7 @@ typedef struct {
float led_brightness;
float speaker_volume;
uint32_t display_off_delay_ms;
int8_t contrast;
bool vibro_on;
} NotificationSettings;

View file

@ -197,6 +197,10 @@ const NotificationMessage message_force_display_brightness_setting_1f = {
.data.forced_settings.display_brightness = 1.0f,
};
const NotificationMessage message_lcd_contrast_update = {
.type = NotificationMessageTypeLcdContrastUpdate,
};
/****************************** Message sequences ******************************/
// Reset
@ -566,3 +570,8 @@ const NotificationSequence sequence_audiovisual_alert = {
&message_vibro_off,
NULL,
};
const NotificationSequence sequence_lcd_contrast_update = {
&message_lcd_contrast_update,
NULL,
};

View file

@ -63,6 +63,9 @@ extern const NotificationMessage message_force_vibro_setting_on;
extern const NotificationMessage message_force_vibro_setting_off;
extern const NotificationMessage message_force_display_brightness_setting_1f;
// LCD Messages
extern const NotificationMessage message_lcd_contrast_update;
/****************************** Message sequences ******************************/
// Reset
@ -138,6 +141,9 @@ extern const NotificationSequence sequence_success;
extern const NotificationSequence sequence_error;
extern const NotificationSequence sequence_audiovisual_alert;
// LCD
extern const NotificationSequence sequence_lcd_contrast_update;
#ifdef __cplusplus
}
#endif

View file

@ -20,6 +20,34 @@ static const NotificationSequence sequence_note_c = {
NULL,
};
#define CONTRAST_COUNT 11
const char* const contrast_text[CONTRAST_COUNT] = {
"-5",
"-4",
"-3",
"-2",
"-1",
"0",
"+1",
"+2",
"+3",
"+4",
"+5",
};
const int32_t contrast_value[CONTRAST_COUNT] = {
-5,
-4,
-3,
-2,
-1,
0,
1,
2,
3,
4,
5,
};
#define BACKLIGHT_COUNT 5
const char* const backlight_text[BACKLIGHT_COUNT] = {
"0%",
@ -70,6 +98,15 @@ const char* const vibro_text[VIBRO_COUNT] = {
};
const bool vibro_value[VIBRO_COUNT] = {false, true};
static void contrast_changed(VariableItem* item) {
NotificationAppSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, contrast_text[index]);
app->notification->settings.contrast = contrast_value[index];
notification_message(app->notification, &sequence_lcd_contrast_update);
}
static void backlight_changed(VariableItem* item) {
NotificationAppSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
@ -142,6 +179,13 @@ static NotificationAppSettings* alloc_settings() {
VariableItem* item;
uint8_t value_index;
item = variable_item_list_add(
app->variable_item_list, "LCD Contrast", CONTRAST_COUNT, contrast_changed, app);
value_index =
value_index_int32(app->notification->settings.contrast, contrast_value, CONTRAST_COUNT);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, contrast_text[value_index]);
item = variable_item_list_add(
app->variable_item_list, "LCD Backlight", BACKLIGHT_COUNT, backlight_changed, app);
value_index = value_index_float(

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Some files were not shown because too many files have changed in this diff Show more