mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2025-02-17 13:58:32 +00:00
Merge branch 'Eng1n33r:dev' into feat/playlist
This commit is contained in:
commit
7acd814970
50 changed files with 410 additions and 284 deletions
|
@ -1,7 +1,9 @@
|
|||
### New changes
|
||||
* Fix qFlipper and other apps causes flipper crash while trying to interact with files - see commit `b2bd13`
|
||||
* NRF24 Sniffer update
|
||||
* Other fixes
|
||||
* Add extra frequencies and modulations in SubGHz
|
||||
* Allow setting custom flipper name - details -> [How to change Flipper name](https://github.com/Eng1n33r/flipperzero-firmware/blob/dev/documentation/CustomFlipperName.md)
|
||||
* Updated Universal remote assets
|
||||
* Some small changes, use record defines in apps
|
||||
* OFW: fbt: support for LOADER_AUTOSTART; post-build size stats
|
||||
|
||||
**Note: Prefer installing using web updater or by self update package, all needed assets will be installed**
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ See changelog in releases for latest updates!
|
|||
|
||||
## [- BadUSB: how to add new keyboard layouts](https://github.com/dummy-decoy/flipperzero_badusb_kl)
|
||||
|
||||
## [- How to change Flipper name](https://github.com/Eng1n33r/flipperzero-firmware/blob/dev/documentation/CustomFlipperName.md)
|
||||
|
||||
### **Plugins**
|
||||
|
||||
## [- Configure UniversalRF Remix App](https://github.com/Eng1n33r/flipperzero-firmware/blob/dev/documentation/UniRFRemix.md)
|
||||
|
@ -121,7 +123,7 @@ See changelog in releases for latest updates!
|
|||
# Where I can find IR, SubGhz, ... files, DBs, and other stuff?
|
||||
## [Awesome Flipper Zero - Github](https://github.com/djsime1/awesome-flipperzero)
|
||||
## [UberGuidoZ Playground - Large collection of files - Github](https://github.com/UberGuidoZ/Flipper)
|
||||
## [CAME, NICE, PT-2240, PT-2262 - SubGHz fixed code bruteforce](https://github.com/tobiabocchi/flipperzero-bruteforce)
|
||||
## [CAME-12bit, NICE-12bit, Linear-10bit, PT-2240 - SubGHz fixed code bruteforce](https://github.com/tobiabocchi/flipperzero-bruteforce)
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <gui/modules/empty_screen.h>
|
||||
#include <m-string.h>
|
||||
#include <furi_hal_version.h>
|
||||
#include <furi_hal_region.h>
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message);
|
||||
|
@ -114,12 +115,13 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage*
|
|||
|
||||
string_cat_printf(
|
||||
buffer,
|
||||
"%d.F%dB%dC%d %s %s\n",
|
||||
"%d.F%dB%dC%d %s:%s %s\n",
|
||||
furi_hal_version_get_hw_version(),
|
||||
furi_hal_version_get_hw_target(),
|
||||
furi_hal_version_get_hw_body(),
|
||||
furi_hal_version_get_hw_connect(),
|
||||
furi_hal_version_get_hw_region_name(),
|
||||
furi_hal_region_get_name(),
|
||||
my_name ? my_name : "Unknown");
|
||||
|
||||
string_cat_printf(buffer, "Serial Number:\n");
|
||||
|
|
|
@ -18,6 +18,8 @@ typedef struct {
|
|||
|
||||
typedef void (*FlipperOnStartHook)(void);
|
||||
|
||||
extern const char* FLIPPER_AUTORUN_APP_NAME;
|
||||
|
||||
/* Services list
|
||||
* Spawned on startup
|
||||
*/
|
||||
|
|
|
@ -423,7 +423,7 @@ int32_t barcode_UPCA_generator_app(void* p) {
|
|||
view_port_input_callback_set(view_port, input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
PluginEvent event;
|
||||
|
@ -537,7 +537,7 @@ int32_t barcode_UPCA_generator_app(void* p) {
|
|||
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ int32_t clock_app(void* p) {
|
|||
furi_timer_start(timer, furi_kernel_get_tick_frequency());
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
// Main loop
|
||||
|
@ -137,7 +137,7 @@ int32_t clock_app(void* p) {
|
|||
furi_timer_free(timer);
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
|
|
@ -333,7 +333,7 @@ int32_t dec_hex_converter_app(void* p) {
|
|||
view_port_input_callback_set(view_port, dec_hex_converter_input_callback, event_queue);
|
||||
|
||||
// open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
dec_hex_converter_init(dec_hex_converter_state);
|
||||
|
@ -394,7 +394,7 @@ int32_t dec_hex_converter_app(void* p) {
|
|||
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
|
|
@ -36,12 +36,13 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||
snprintf(
|
||||
buffer,
|
||||
sizeof(buffer),
|
||||
"%d.F%dB%dC%d %s %s",
|
||||
"%d.F%dB%dC%d %s:%s %s",
|
||||
furi_hal_version_get_hw_version(),
|
||||
furi_hal_version_get_hw_target(),
|
||||
furi_hal_version_get_hw_body(),
|
||||
furi_hal_version_get_hw_connect(),
|
||||
furi_hal_version_get_hw_region_name(),
|
||||
furi_hal_region_get_name(),
|
||||
my_name ? my_name : "Unknown");
|
||||
canvas_draw_str(canvas, 5, 19 + STATUS_BAR_Y_SHIFT, buffer);
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ 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("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
//notification_message(app->notification, &sequence_set_only_blue_255);
|
||||
|
@ -511,7 +511,7 @@ int32_t esp8266_deauth_app(void* p) {
|
|||
gui_remove_view_port(gui, view_port);
|
||||
|
||||
// Close gui record
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close("notification");
|
||||
app->m_gui = NULL;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ HIDApp::~HIDApp() {
|
|||
void HIDApp::run(void* _args) {
|
||||
UNUSED(_args);
|
||||
|
||||
view_controller.attach_to_gui(ViewDispatcherTypeFullscreen);
|
||||
scene_controller.add_scene(SceneType::Read, new HIDAppSceneRead());
|
||||
scene_controller.add_scene(SceneType::ReadSuccess, new HIDAppSceneReadSuccess());
|
||||
scene_controller.process(100, SceneType::Read);
|
||||
|
|
|
@ -295,6 +295,13 @@ bool infrared_rename_current_remote(Infrared* infrared, const char* name) {
|
|||
}
|
||||
|
||||
void infrared_tx_start_signal(Infrared* infrared, InfraredSignal* signal) {
|
||||
if(infrared->app_state.is_transmitting) {
|
||||
FURI_LOG_D(INFRARED_LOG_TAG, "Transmitter is already active");
|
||||
return;
|
||||
} else {
|
||||
infrared->app_state.is_transmitting = true;
|
||||
}
|
||||
|
||||
if(infrared_signal_is_raw(signal)) {
|
||||
InfraredRawSignal* raw = infrared_signal_get_raw_signal(signal);
|
||||
infrared_worker_set_raw_signal(infrared->worker, raw->timings, raw->timings_size);
|
||||
|
@ -304,8 +311,11 @@ void infrared_tx_start_signal(Infrared* infrared, InfraredSignal* signal) {
|
|||
}
|
||||
|
||||
DOLPHIN_DEED(DolphinDeedIrSend);
|
||||
infrared_worker_tx_start(infrared->worker);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStartSend);
|
||||
|
||||
infrared_worker_tx_set_get_signal_callback(
|
||||
infrared->worker, infrared_worker_tx_get_signal_steady_callback, infrared);
|
||||
infrared_worker_tx_start(infrared->worker);
|
||||
}
|
||||
|
||||
void infrared_tx_start_button_index(Infrared* infrared, size_t button_index) {
|
||||
|
@ -324,7 +334,16 @@ void infrared_tx_start_received(Infrared* infrared) {
|
|||
}
|
||||
|
||||
void infrared_tx_stop(Infrared* infrared) {
|
||||
if(!infrared->app_state.is_transmitting) {
|
||||
FURI_LOG_D(INFRARED_LOG_TAG, "Transmitter is already stopped");
|
||||
return;
|
||||
} else {
|
||||
infrared->app_state.is_transmitting = false;
|
||||
}
|
||||
|
||||
infrared_worker_tx_stop(infrared->worker);
|
||||
infrared_worker_tx_set_get_signal_callback(infrared->worker, NULL, NULL);
|
||||
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStop);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#define INFRARED_APP_EXTENSION ".ir"
|
||||
|
||||
#define INFRARED_DEFAULT_REMOTE_NAME "Remote"
|
||||
#define INFRARED_LOG_TAG "InfraredApp"
|
||||
|
||||
typedef enum {
|
||||
InfraredButtonIndexNone = -1,
|
||||
|
@ -63,6 +64,7 @@ typedef enum {
|
|||
typedef struct {
|
||||
bool is_learning_new_remote;
|
||||
bool is_debug_enabled;
|
||||
bool is_transmitting;
|
||||
InfraredEditTarget edit_target : 8;
|
||||
InfraredEditMode edit_mode : 8;
|
||||
int32_t current_button_index;
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
typedef enum {
|
||||
InfraredSceneLearnSuccessStateIdle = 0,
|
||||
InfraredSceneLearnSuccessStateSending = 1,
|
||||
} InfraredSceneLearnSuccessState;
|
||||
|
||||
static void
|
||||
infrared_scene_learn_success_dialog_result_callback(DialogExResult result, void* context) {
|
||||
Infrared* infrared = context;
|
||||
|
@ -21,9 +16,6 @@ void infrared_scene_learn_success_on_enter(void* context) {
|
|||
DOLPHIN_DEED(DolphinDeedIrLearnSuccess);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOn);
|
||||
|
||||
infrared_worker_tx_set_get_signal_callback(
|
||||
infrared->worker, infrared_worker_tx_get_signal_steady_callback, context);
|
||||
|
||||
if(infrared_signal_is_raw(signal)) {
|
||||
InfraredRawSignal* raw = infrared_signal_get_raw_signal(signal);
|
||||
dialog_ex_set_header(dialog_ex, "Unknown", 95, 10, AlignCenter, AlignCenter);
|
||||
|
@ -63,57 +55,42 @@ void infrared_scene_learn_success_on_enter(void* context) {
|
|||
dialog_ex_set_context(dialog_ex, context);
|
||||
dialog_ex_enable_extended_events(dialog_ex);
|
||||
|
||||
scene_manager_set_scene_state(
|
||||
infrared->scene_manager, InfraredSceneLearnSuccess, InfraredSceneLearnSuccessStateIdle);
|
||||
view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewDialogEx);
|
||||
}
|
||||
|
||||
bool infrared_scene_learn_success_on_event(void* context, SceneManagerEvent event) {
|
||||
Infrared* infrared = context;
|
||||
SceneManager* scene_manager = infrared->scene_manager;
|
||||
uint32_t scene_state = scene_manager_get_scene_state(scene_manager, InfraredSceneLearnSuccess);
|
||||
const bool is_transmitter_idle = !infrared->app_state.is_transmitting;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeTick) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateIdle) {
|
||||
if(is_transmitter_idle) {
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOn);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateIdle) {
|
||||
if(is_transmitter_idle) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneAskBack);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == DialogExResultLeft) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateIdle) {
|
||||
if(is_transmitter_idle) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneAskRetry);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.event == DialogExResultRight) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateIdle) {
|
||||
if(is_transmitter_idle) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneLearnEnterName);
|
||||
}
|
||||
consumed = true;
|
||||
} else if(event.event == DialogExPressCenter) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateIdle) {
|
||||
scene_manager_set_scene_state(
|
||||
scene_manager,
|
||||
InfraredSceneLearnSuccess,
|
||||
InfraredSceneLearnSuccessStateSending);
|
||||
infrared_tx_start_received(infrared);
|
||||
infrared_play_notification_message(
|
||||
infrared, InfraredNotificationMessageBlinkStartSend);
|
||||
}
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
|
||||
infrared_tx_start_received(infrared);
|
||||
consumed = true;
|
||||
} else if(event.event == DialogExReleaseCenter) {
|
||||
if(scene_state == InfraredSceneLearnSuccessStateSending) {
|
||||
scene_manager_set_scene_state(
|
||||
scene_manager, InfraredSceneLearnSuccess, InfraredSceneLearnSuccessStateIdle);
|
||||
infrared_tx_stop(infrared);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStop);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
|
||||
}
|
||||
infrared_tx_stop(infrared);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
|
@ -123,9 +100,6 @@ bool infrared_scene_learn_success_on_event(void* context, SceneManagerEvent even
|
|||
|
||||
void infrared_scene_learn_success_on_exit(void* context) {
|
||||
Infrared* infrared = context;
|
||||
InfraredWorker* worker = infrared->worker;
|
||||
dialog_ex_reset(infrared->dialog_ex);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStop);
|
||||
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
|
||||
infrared_worker_tx_set_get_signal_callback(worker, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -31,9 +31,6 @@ void infrared_scene_remote_on_enter(void* context) {
|
|||
ButtonMenu* button_menu = infrared->button_menu;
|
||||
SceneManager* scene_manager = infrared->scene_manager;
|
||||
|
||||
infrared_worker_tx_set_get_signal_callback(
|
||||
infrared->worker, infrared_worker_tx_get_signal_steady_callback, infrared);
|
||||
|
||||
size_t button_count = infrared_remote_get_button_count(remote);
|
||||
for(size_t i = 0; i < button_count; ++i) {
|
||||
InfraredRemoteButton* button = infrared_remote_get_button(remote, i);
|
||||
|
@ -73,12 +70,17 @@ void infrared_scene_remote_on_enter(void* context) {
|
|||
bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
|
||||
Infrared* infrared = context;
|
||||
SceneManager* scene_manager = infrared->scene_manager;
|
||||
const bool is_transmitter_idle = !infrared->app_state.is_transmitting;
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeBack) {
|
||||
const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
|
||||
scene_manager, possible_scenes, COUNT_OF(possible_scenes));
|
||||
if(is_transmitter_idle) {
|
||||
const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
|
||||
scene_manager, possible_scenes, COUNT_OF(possible_scenes));
|
||||
} else {
|
||||
consumed = true;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeCustom) {
|
||||
const uint16_t custom_type = infrared_custom_event_get_type(event.event);
|
||||
const int16_t button_index = infrared_custom_event_get_value(event.event);
|
||||
|
@ -92,14 +94,19 @@ bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
|
|||
consumed = true;
|
||||
} else if(custom_type == InfraredCustomEventTypeMenuSelected) {
|
||||
furi_assert(button_index < 0);
|
||||
scene_manager_set_scene_state(
|
||||
scene_manager, InfraredSceneRemote, (unsigned)button_index);
|
||||
if(button_index == ButtonIndexPlus) {
|
||||
infrared->app_state.is_learning_new_remote = false;
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneLearn);
|
||||
consumed = true;
|
||||
} else if(button_index == ButtonIndexEdit) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneEdit);
|
||||
if(is_transmitter_idle) {
|
||||
scene_manager_set_scene_state(
|
||||
scene_manager, InfraredSceneRemote, (unsigned)button_index);
|
||||
if(button_index == ButtonIndexPlus) {
|
||||
infrared->app_state.is_learning_new_remote = false;
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneLearn);
|
||||
consumed = true;
|
||||
} else if(button_index == ButtonIndexEdit) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneEdit);
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +117,5 @@ bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
|
|||
|
||||
void infrared_scene_remote_on_exit(void* context) {
|
||||
Infrared* infrared = context;
|
||||
infrared_tx_stop(infrared);
|
||||
infrared_worker_tx_set_get_signal_callback(infrared->worker, NULL, NULL);
|
||||
button_menu_reset(infrared->button_menu);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,6 @@ bool infrared_scene_rpc_on_event(void* context, SceneManagerEvent event) {
|
|||
if(arg && (state == InfraredRpcStateIdle)) {
|
||||
string_set_str(infrared->file_path, arg);
|
||||
result = infrared_remote_load(infrared->remote, infrared->file_path);
|
||||
infrared_worker_tx_set_get_signal_callback(
|
||||
infrared->worker, infrared_worker_tx_get_signal_steady_callback, infrared);
|
||||
if(result) {
|
||||
scene_manager_set_scene_state(
|
||||
infrared->scene_manager, InfraredSceneRpc, InfraredRpcStateLoaded);
|
||||
|
|
|
@ -503,9 +503,9 @@ int32_t loader_srv(void* p) {
|
|||
|
||||
furi_record_create(RECORD_LOADER, loader_instance);
|
||||
|
||||
#ifdef LOADER_AUTOSTART
|
||||
loader_start(loader_instance, LOADER_AUTOSTART, NULL);
|
||||
#endif
|
||||
if(FLIPPER_AUTORUN_APP_NAME && strlen(FLIPPER_AUTORUN_APP_NAME)) {
|
||||
loader_start(loader_instance, FLIPPER_AUTORUN_APP_NAME, NULL);
|
||||
}
|
||||
|
||||
while(1) {
|
||||
uint32_t flags =
|
||||
|
|
|
@ -240,10 +240,10 @@ int32_t mousejacker_app(void* p) {
|
|||
view_port_input_callback_set(view_port, input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
storage_common_mkdir(storage, MOUSEJACKER_APP_PATH_FOLDER);
|
||||
Stream* file_stream = file_stream_alloc(storage);
|
||||
|
||||
|
@ -329,8 +329,8 @@ int32_t mousejacker_app(void* p) {
|
|||
furi_hal_spi_release(nrf24_HANDLE);
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ int32_t sentry_safe_app(void* p) {
|
|||
view_port_input_callback_set(view_port, sentry_safe_input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
Event event;
|
||||
|
@ -156,7 +156,7 @@ int32_t sentry_safe_app(void* p) {
|
|||
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
|
|
@ -369,7 +369,7 @@ SpectrumAnalyzer* spectrum_analyzer_alloc() {
|
|||
view_port_input_callback_set(instance->view_port, spectrum_analyzer_input_callback, instance);
|
||||
|
||||
// Open GUI and register view_port
|
||||
instance->gui = furi_record_open("gui");
|
||||
instance->gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(instance->gui, instance->view_port, GuiLayerFullscreen);
|
||||
|
||||
return instance;
|
||||
|
@ -378,7 +378,7 @@ SpectrumAnalyzer* spectrum_analyzer_alloc() {
|
|||
void spectrum_analyzer_free(SpectrumAnalyzer* instance) {
|
||||
// view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(instance->gui, instance->view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(instance->view_port);
|
||||
|
||||
spectrum_analyzer_worker_free(instance->worker);
|
||||
|
|
|
@ -373,7 +373,7 @@ int32_t tetris_game_app() {
|
|||
view_port_input_callback_set(view_port, tetris_game_input_callback, event_queue);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
tetris_state->timer =
|
||||
|
@ -460,7 +460,7 @@ int32_t tetris_game_app() {
|
|||
furi_timer_free(tetris_state->timer);
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
|
|
@ -327,7 +327,7 @@ int32_t tictactoe_game_app(void* p) {
|
|||
tictactoe_state_init(tictactoe_state);
|
||||
|
||||
// Open GUI and register view_port
|
||||
Gui* gui = furi_record_open("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
GameEvent event;
|
||||
|
@ -373,7 +373,7 @@ int32_t tictactoe_game_app(void* p) {
|
|||
furi_timer_free(tictactoe_state->timer);
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
view_port_free(view_port);
|
||||
furi_message_queue_free(event_queue);
|
||||
delete_mutex(&state_mutex);
|
||||
|
|
|
@ -154,7 +154,7 @@ static char* extract_filename(const char* name, int len) {
|
|||
*/
|
||||
|
||||
void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FlipperFormat* fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
app->file_result = 3;
|
||||
|
@ -350,7 +350,7 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
//File Existence Check
|
||||
//Check each file definition if not already set to "N/A"
|
||||
|
@ -372,7 +372,7 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
//if button is still enabled, check that file exists
|
||||
if(app->up_enabled == 1) {
|
||||
string_set(file_name, app->up_file);
|
||||
storage = furi_record_open("storage");
|
||||
storage = furi_record_open(RECORD_STORAGE);
|
||||
fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) {
|
||||
|
@ -386,12 +386,12 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
|
||||
//close the file
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
if(app->down_enabled == 1) {
|
||||
string_set(file_name, app->down_file);
|
||||
storage = furi_record_open("storage");
|
||||
storage = furi_record_open(RECORD_STORAGE);
|
||||
fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) {
|
||||
|
@ -403,12 +403,12 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
if(app->left_enabled == 1) {
|
||||
string_set(file_name, app->left_file);
|
||||
storage = furi_record_open("storage");
|
||||
storage = furi_record_open(RECORD_STORAGE);
|
||||
fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) {
|
||||
|
@ -420,12 +420,12 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
if(app->right_enabled == 1) {
|
||||
string_set(file_name, app->right_file);
|
||||
storage = furi_record_open("storage");
|
||||
storage = furi_record_open(RECORD_STORAGE);
|
||||
fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) {
|
||||
|
@ -437,12 +437,12 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
if(app->ok_enabled == 1) {
|
||||
string_set(file_name, app->ok_file);
|
||||
storage = furi_record_open("storage");
|
||||
storage = furi_record_open(RECORD_STORAGE);
|
||||
fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) {
|
||||
|
@ -454,7 +454,7 @@ void unirfremix_cfg_set_check(UniRFRemix* app, string_t file_name) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
}
|
||||
|
||||
if(app->file_blank == 5) {
|
||||
|
@ -555,7 +555,7 @@ static void unirfremix_process_signal(UniRFRemix* app, string_t signal) {
|
|||
|
||||
string_set(file_name, string_get_cstr(signal));
|
||||
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FlipperFormat* fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name));
|
||||
|
@ -568,7 +568,7 @@ static void unirfremix_process_signal(UniRFRemix* app, string_t signal) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
FURI_LOG_I(TAG, "%lu", frequency_str);
|
||||
|
||||
|
@ -747,11 +747,11 @@ int32_t unirfremix_app(void* p) {
|
|||
|
||||
app->file_result = 3;
|
||||
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(!storage_simply_mkdir(storage, UNIRFMAP_FOLDER)) {
|
||||
FURI_LOG_E(TAG, "Could not create folder %s", UNIRFMAP_FOLDER);
|
||||
}
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
string_set_str(app->file_path, UNIRFMAP_FOLDER);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ static WavPlayerApp* app_alloc() {
|
|||
WavPlayerApp* app = malloc(sizeof(WavPlayerApp));
|
||||
app->samples_count_half = 1024 * 4;
|
||||
app->samples_count = app->samples_count_half * 2;
|
||||
app->storage = furi_record_open("storage");
|
||||
app->storage = furi_record_open(RECORD_STORAGE);
|
||||
app->stream = file_stream_alloc(app->storage);
|
||||
app->parser = wav_parser_alloc();
|
||||
app->sample_buffer = malloc(sizeof(uint16_t) * app->samples_count);
|
||||
|
@ -106,7 +106,7 @@ static WavPlayerApp* app_alloc() {
|
|||
app->volume = 10.0f;
|
||||
app->play = true;
|
||||
|
||||
app->gui = furi_record_open("gui");
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
app->view_dispatcher = view_dispatcher_alloc();
|
||||
app->view = wav_player_view_alloc();
|
||||
|
||||
|
@ -124,14 +124,14 @@ static void app_free(WavPlayerApp* app) {
|
|||
view_dispatcher_remove_view(app->view_dispatcher, 0);
|
||||
view_dispatcher_free(app->view_dispatcher);
|
||||
wav_player_view_free(app->view);
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
|
||||
furi_message_queue_free(app->queue);
|
||||
free(app->tmp_buffer);
|
||||
free(app->sample_buffer);
|
||||
wav_parser_free(app->parser);
|
||||
stream_free(app->stream);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
notification_message(app->notification, &sequence_display_backlight_enforce_auto);
|
||||
furi_record_close("notification");
|
||||
|
@ -296,11 +296,11 @@ int32_t wav_player_app(void* p) {
|
|||
UNUSED(p);
|
||||
WavPlayerApp* app = app_alloc();
|
||||
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(!storage_simply_mkdir(storage, WAVPLAYER_FOLDER)) {
|
||||
FURI_LOG_E(TAG, "Could not create folder %s", WAVPLAYER_FOLDER);
|
||||
}
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
app_run(app);
|
||||
app_free(app);
|
||||
|
|
|
@ -24,7 +24,7 @@ static void wifi_marauder_app_tick_event_callback(void* context) {
|
|||
WifiMarauderApp* wifi_marauder_app_alloc() {
|
||||
WifiMarauderApp* app = malloc(sizeof(WifiMarauderApp));
|
||||
|
||||
app->gui = furi_record_open("gui");
|
||||
app->gui = furi_record_open(RECORD_GUI);
|
||||
|
||||
app->view_dispatcher = view_dispatcher_alloc();
|
||||
app->scene_manager = scene_manager_alloc(&wifi_marauder_scene_handlers, app);
|
||||
|
@ -79,7 +79,7 @@ void wifi_marauder_app_free(WifiMarauderApp* app) {
|
|||
wifi_marauder_uart_free(app->uart);
|
||||
|
||||
// Close records
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
|
||||
free(app);
|
||||
}
|
||||
|
|
|
@ -685,7 +685,7 @@ 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("gui");
|
||||
Gui* gui = furi_record_open(RECORD_GUI);
|
||||
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
|
||||
|
||||
//notification_message(app->notification, &sequence_set_only_blue_255);
|
||||
|
@ -831,7 +831,7 @@ int32_t wifi_scanner_app(void* p) {
|
|||
gui_remove_view_port(gui, view_port);
|
||||
|
||||
// Close gui record
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
furi_record_close("notification");
|
||||
app->m_gui = NULL;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
V:0
|
||||
T:1660269956
|
||||
T:1660504621
|
||||
D:badusb
|
||||
D:dolphin
|
||||
D:infrared
|
||||
|
@ -241,9 +241,9 @@ F:33b8fde22f34ef556b64b77164bc19b0:578:dolphin/L3_Lab_research_128x54/frame_8.bm
|
|||
F:f267f0654781049ca323b11bb4375519:581:dolphin/L3_Lab_research_128x54/frame_9.bm
|
||||
F:41106c0cbc5144f151b2b2d3daaa0527:727:dolphin/L3_Lab_research_128x54/meta.txt
|
||||
D:infrared/assets
|
||||
F:0620df2adc5e12f2a9d9c3ac29826ce3:60950:infrared/assets/ac.ir
|
||||
F:19f64b475c0f07b11fe6745fae540956:25521:infrared/assets/audio.ir
|
||||
F:291a966df726aee2164a4f1068eaf8c5:130988:infrared/assets/tv.ir
|
||||
F:cedef6d481ec8a10072168bfe82b9ec4:60995:infrared/assets/ac.ir
|
||||
F:385a031948c1dce09131d1ee978afc19:25593:infrared/assets/audio.ir
|
||||
F:8c76edec36ff5ea6681e125018b73d77:123998:infrared/assets/tv.ir
|
||||
F:a157a80f5a668700403d870c23b9567d:470:music_player/Marble_Machine.fmf
|
||||
D:nfc/assets
|
||||
F:81dc04c7b181f94b644079a71476dff4:4742:nfc/assets/aid.nfc
|
||||
|
@ -256,7 +256,7 @@ F:50cf77ba8b935ee6cb3b6f111cf2d93d:286:subghz/assets/dangerous_settings
|
|||
F:111d2b8df83e27fd889fc5e270297865:3231:subghz/assets/keeloq_mfcodes
|
||||
F:bb48d7d7db4f6e849436d0e1a9b7a1a7:633:subghz/assets/keeloq_mfcodes_user_example
|
||||
F:653bd8d349055a41e1152e557d4a52d3:202:subghz/assets/nice_flor_s
|
||||
F:470919d764538023a7f73ebae2853797:2106:subghz/assets/setting_user
|
||||
F:9f7dea8ec70b2ce34eb57f009bd62033:2795:subghz/assets/setting_user
|
||||
D:u2f/assets
|
||||
F:7e11e688e39034bbb9d88410044795e1:365:u2f/assets/cert.der
|
||||
F:f60b88c20ed479ed9684e249f7134618:264:u2f/assets/cert_key.u2f
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
Filetype: IR signals file
|
||||
Version: 1
|
||||
#
|
||||
# Universal AC IR codes - Brute force updated by jaroslavmraz and fixed by MX
|
||||
# BETA version
|
||||
# Universal AC IR codes - Brute force updated by jaroslavmraz
|
||||
# Fixes and tweaks provided by MX (MasterX)
|
||||
#
|
||||
# BETA version - Aug 14, 2022
|
||||
#
|
||||
# Old SAMSUNG AC
|
||||
#
|
||||
|
|
|
@ -5,8 +5,11 @@ Version: 1
|
|||
# from https://github.com/UberGuidoZ/Flipper-IRDB
|
||||
# Some Buttons was labeled PowerToggle,Pwr, Sleep or Off. These was assumed to be POWER functions.
|
||||
# While Care was taken to remove all possible duplicates, some may still be lurking.
|
||||
#####################################################
|
||||
# HUGE thank you to Amec0e for continued maintenance!
|
||||
#####################################################
|
||||
#
|
||||
# Last Updated: 10th August 2022
|
||||
# Updated 14th August 2022
|
||||
#
|
||||
# | SPEAKERS |
|
||||
#
|
||||
|
@ -161,12 +164,6 @@ address: 02 BD 00 00
|
|||
command: AD 52 00 00
|
||||
#
|
||||
# SONY
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
protocol: SIRC
|
||||
address: 10 00 00 00
|
||||
command: 15 00 00 00
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
|
|
|
@ -7,8 +7,11 @@ Version: 1
|
|||
# Compiled by Hyper_Mash
|
||||
# Support/testing/additions from UberGuidoZ
|
||||
# Thank you to ChaoticDynamic aka c-nagy for cleanup
|
||||
############################################################
|
||||
# Also a HUGE thank you to Amec0e for continued maintenance!
|
||||
############################################################
|
||||
#
|
||||
# Updated on 10th August 2022
|
||||
# Updated on 14th August 2022
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
|
@ -106,12 +109,16 @@ protocol: Samsung32
|
|||
address: 0e 00 00 00
|
||||
command: 0d 00 00 00
|
||||
#
|
||||
# Keep an eye on this, it could be power.
|
||||
#
|
||||
name: VOL+
|
||||
type: parsed
|
||||
protocol: Samsung32
|
||||
address: 0e 00 00 00
|
||||
command: 14 00 00 00
|
||||
#
|
||||
#
|
||||
#
|
||||
name: VOL-
|
||||
type: parsed
|
||||
protocol: Samsung32
|
||||
|
@ -240,12 +247,6 @@ command: 13 00 00 00
|
|||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
protocol: Samsung32
|
||||
address: 0e 00 00 00
|
||||
command: 14 00 00 00
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: 80 7e 00 00
|
||||
command: 18 00 00 00
|
||||
|
@ -304,7 +305,6 @@ protocol: NEC
|
|||
address: 00 00 00 00
|
||||
command: 01 00 00 00
|
||||
#
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
protocol: Samsung32
|
||||
|
@ -1757,17 +1757,15 @@ protocol: NECext
|
|||
address: 02 7D 00 00
|
||||
command: 57 A8 00 00
|
||||
#
|
||||
# Keep an eye on this it might be volume down
|
||||
#
|
||||
name: VOL+
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: 02 7D 00 00
|
||||
command: 15 EA 00 00
|
||||
#
|
||||
name: VOL-
|
||||
type: parsed
|
||||
protocol: NECext
|
||||
address: 02 7D 00 00
|
||||
command: 15 EA 00 00
|
||||
#
|
||||
#
|
||||
name: POWER
|
||||
type: parsed
|
||||
|
@ -2069,42 +2067,6 @@ protocol: NECext
|
|||
address: EA C7 00 00
|
||||
command: 20 DF 00 00
|
||||
#
|
||||
name: POWER
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3477 1735 448 424 445 1301 448 425 444 429 450 422 447 426 443 430 449 423 446 427 452 421 448 424 445 428 451 422 447 1299 450 422 447 426 443 430 449 423 446 427 452 420 449 424 445 428 451 421 448 1298 451 422 447 425 444 429 450 423 446 426 443 430 449 423 446 427 452 1294 444 428 451 1295 443 1303 446 1300 449 1297 452 421 500 373 444 1302 447 426 443 1303 446 1300 449 1297 452 1294 444 428 451 1295 443 74431 3476 1736 448 425 444 1302 447 426 453 419 450 423 446 427 452 420 449 424 445 427 452 421 448 425 444 428 451 422 447 1299 450 422 447 426 453 420 449 423 446 427 452 420 449 424 445 428 451 421 448 1298 451 422 447 425 454 419 450 423 446 454 425 447 422 451 418 427 452 1294 444 428 451 1295 443 1302 447 1300 449 1297 452 420 449 451 418 1301 448 424 445 1302 447 1299 450 1296 442 1304 445 454 425 1294 444 74431 3475 1737 446 425 454 1293 445 426 453 420 449 424 445 427 452 421 448 424 445 428 451 422 447 425 454 419 450 422 447 1300 449 424 445 427 452 421 448 424 445 428 451 421 448 425 454 418 451 422 447 1300 449 424 445 454 425 420 449 424 445 428 451 421 448 425 444 429 450 1296 453 419 450 1297 452 1294 444 1301 448 1298 451 422 509 364 453 1293 445 427 452 1294 444 1301 448 1298 451 1296 453 420 449 1296 453
|
||||
#
|
||||
name: VOL+
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3474 1765 418 455 424 1323 415 458 421 451 418 456 423 422 447 454 415 458 421 452 417 456 423 450 419 454 425 448 421 1325 423 423 446 454 425 448 421 452 417 456 423 450 419 454 425 448 421 452 417 1330 418 455 424 448 421 453 416 457 422 451 418 455 424 449 420 453 416 457 422 451 418 455 424 449 420 453 416 1331 417 455 424 449 420 453 416 458 421 452 417 456 423 450 419 1327 421 424 445 1329 419
|
||||
#
|
||||
name: VOL-
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3475 1737 446 427 452 1294 444 456 423 423 446 454 425 421 448 452 417 456 423 423 446 455 424 449 420 425 444 457 422 1297 451 421 448 453 416 457 422 451 418 428 451 449 420 426 443 457 422 424 445 1301 447 426 443 458 421 451 418 456 423 449 420 454 415 458 421 452 417 1302 446 427 452 448 421 452 417 456 423 1296 452 448 421 453 416 1303 445 455 424 449 420 453 416 430 449 1297 451 421 448 1299 449
|
||||
#
|
||||
name: CH+
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3476 1764 419 454 425 1321 417 456 423 450 419 455 424 449 420 453 416 457 422 451 418 455 424 449 420 453 416 458 421 1325 423 450 419 454 414 458 421 452 417 456 423 450 419 455 424 449 420 453 416 1330 418 455 424 449 420 453 416 457 422 451 418 456 423 450 419 454 415 458 421 452 417 1330 418 454 425 1321 417 1330 418 455 424 449 420 453 416 458 421 1325 423 450 419 1327 421 1325 423 450 419 1327 421
|
||||
#
|
||||
name: CH-
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3480 1759 424 450 419 1300 448 452 417 456 423 450 419 454 425 448 421 452 417 457 422 451 418 455 424 449 420 453 416 1331 417 455 424 449 420 454 415 458 421 452 417 456 423 450 419 454 425 448 421 1325 423 450 419 455 424 448 421 453 416 457 422 451 418 455 424 449 420 1326 422 424 445 1329 419 426 443 1331 417 1302 446 454 425 420 449 1298 450 450 419 1328 420 452 417 1330 418 1301 447 425 444 1330 418
|
||||
#
|
||||
name: MUTE
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3477 1763 420 453 416 1330 418 455 424 449 420 453 415 458 421 452 417 456 423 450 419 454 425 448 421 452 417 456 423 1324 424 448 421 453 416 457 422 451 418 455 424 449 420 453 416 457 422 451 418 1329 419 454 415 458 421 452 417 456 423 450 419 427 452 448 421 452 417 456 423 1324 424 449 420 453 416 1330 418 1328 420 453 416 457 422 451 418 1329 419 454 415 458 421 1298 450 1323 425 448 421 1326 422
|
||||
#
|
||||
name: CH-
|
||||
type: raw
|
||||
frequency: 38000
|
||||
|
@ -2153,30 +2115,6 @@ frequency: 38000
|
|||
duty_cycle: 0.330000
|
||||
data: 182 7827 172 2332 177 2328 181 2323 176 2330 179 1309 175 1331 174 2331 178 1328 177 2328 181 1307 177 2327 182 1325 180 1326 179 1309 176 1331 174 1332 173 2333 176 2310 178 1328 177 2328 181 1325 180 2306 182 1325 180 2325 174 8340 183 7825 175 2330 179 2326 173 2333 176 2310 178 1328 177 1329 176 2329 180 1308 176 2329 180 1326 179 2326 173 1334 182 1306 179 1328 177 1329 176 1312 183 2322 177 2329 180 1326 179 2325 174 1315 180 2326 173 1333 183 2323 176 8339 183 7824 175 2330 179 2307 181 2324 175 2331 178 1328 177 1330 175 2311 177 1329 176 2329 180 1326 179 2327 182 1305 179 1328 177 1328 177 1311 173 1334 182 2323 176 2330 179 1326 571 1916 180 1327 178 2325 587 920 575 1930 579
|
||||
#
|
||||
name: VOL+
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 179 7828 182 2323 176 2328 181 2323 176 2329 180 1308 176 1330 175 2329 180 1326 179 2307 181 2323 176 2329 180 2325 174 1332 173 1315 180 1327 179 1328 177 2327 182 2322 177 1311 173 2332 177 1329 176 1330 175 1312 183 1324 181 8332 180 7826 174 2331 178 2326 173 2313 176 2330 179 1327 178 1328 177 2327 182 1306 179 2326 183 2322 177 2328 181 2323 176 1312 183 1324 181 1325 180 1325 180 2307 181 2323 176 1331 174 2330 179 1327 178 1310 175 1331 174 1332 173 8323 179 7845 176 2311 177 2327 182 2322 177 2328 181 1325 180 1308 177 2328 181 1325 180 2325 174 2330 179 2326 173 2314 174 1332 173 1332 173 1333 183 1306 178 2326 183 2322 177 1329 176 2328 181 1307 177 1329 176 1330 175 1313 182
|
||||
#
|
||||
name: VOL-
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 183 7824 176 2329 180 2324 175 2329 180 2324 175 1314 181 1325 180 2324 175 1331 174 2331 178 2307 181 2324 175 1331 174 1331 174 1314 181 1326 179 1326 179 2325 174 2332 177 1310 174 2330 179 1327 178 1328 177 1310 174 2330 179 8334 178 7827 173 2332 177 2327 182 2323 176 2310 178 1328 177 1328 177 2327 182 1306 179 2326 183 2322 177 2327 182 1324 181 1307 177 1329 176 1330 176 1331 174 2311 177 2328 181 1325 180 2324 175 1332 173 1313 182 1325 180 2324 175 8339 173 1383 2522 3925 179 2325 576 1909 590 1915 594 1910 589 918 588 919 576 1911 175 1332 173 2330 592 1912 587 1918 581 907 588 918 598 908 587 920 575 913 592 1914 182 2320 592 914 581 1927 180 1307 178 1327 592 915 580 1925 574
|
||||
#
|
||||
name: CH+
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 176 7830 180 2324 175 2329 180 2324 175 2329 180 1308 176 1329 176 2328 181 1325 180 2305 183 2321 178 1329 177 2327 182 1324 181 1306 178 1328 177 1329 176 2327 182 2304 174 1332 173 2332 177 1328 177 1310 174 2330 179 1327 178 8333 179 7826 174 2330 179 2325 174 2313 175 2329 180 1326 179 1326 179 2325 174 1315 180 2324 175 2329 180 1326 179 2325 174 1314 181 1325 180 1326 179 1308 177 2328 181 2323 176 1330 175 2329 180 1308 176 1330 175 2328 181 1325 180 8314 177 7845 176 2310 178 2327 182 2322 177 2327 182 1323 182 1306 179 2326 173 1333 183 2322 177 2327 182 1305 179 2326 173 1333 183 1323 182 1305 179 1327 178 2326 173 2331 178 1327 178 2308 180 1326 179 1327 178 2325 174 1315 180
|
||||
#
|
||||
name: CH-
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 182 7824 176 2328 181 2323 176 2328 181 2324 175 1312 183 1323 182 2322 177 1330 175 2309 179 2325 174 1332 173 1333 183 1305 179 1327 178 1328 177 1328 177 2308 180 262 177 1885 175 295 175 861 174 2330 179 99 313 911 573 915 590 1916 180 64 349 1910 176 265 174 7896 177 3081 835 3912 182 2322 177 207 179 1942 180 2304 174 268 181 1881 179 263 176 889 177 264 175 886 583 1925 182 271 178 855 180 240 178 1907 174 2331 178 1327 178 1309 176 1329 590 916 589 919 173 306 175 833 181 317 174 1832 175 2329 180 1325 180 309 182 1833 174 1313 182 1325 180 289 181 1853 175 2329 180 8313 178 7845 176 2309 179 2325 174 2331 178 2326 173 1333 183 1304 180 2324 175 1332 173 2330 179 2325 174 1314 181 1325 180 1326 179 1327 178 1308 177 1330 175 2329 180 2324 175 1312 183 2322 177 1329 176 1329 176 2329 180 2304 174 8339 173 351 3575 3902 594 1911 588 1916 593 1911 588 1916 583 904 591 916 589 1915 594 911 584 1920 579 1907 592 915 590 915 591 916 579 908 597 909 596 909 586 1919 580 1907 179 1326 592 1912 597 908 587 901 594 1911 588 1916 593
|
||||
#
|
||||
name: MUTE
|
||||
type: raw
|
||||
frequency: 38000
|
||||
|
|
|
@ -32,8 +32,10 @@ Frequency: 418000000
|
|||
Frequency: 433075000
|
||||
Frequency: 433220000
|
||||
Frequency: 433420000
|
||||
Frequency: 433657070
|
||||
Frequency: 433889000
|
||||
Frequency: 433920000
|
||||
Frequency: 434176948
|
||||
Frequency: 434420000
|
||||
Frequency: 434775000
|
||||
Frequency: 438900000
|
||||
|
@ -65,3 +67,13 @@ Hopper_frequency: 868350000
|
|||
#Custom_preset_name: AM_2
|
||||
#Custom_preset_module: CC1101
|
||||
#Custom_preset_data: 02 0D 03 07 08 32 0B 06 14 00 13 00 12 30 11 32 10 17 18 18 19 18 1D 91 1C 00 1B 07 20 FB 22 11 21 B6 00 00 00 C0 00 00 00 00 00 00
|
||||
|
||||
Custom_preset_name: HND_1
|
||||
Custom_preset_module: CC1101
|
||||
# G2 G3 G4 D L0 L1 L2
|
||||
Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 36 10 69 15 32 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00
|
||||
|
||||
Custom_preset_name: HND_2
|
||||
Custom_preset_module: CC1101
|
||||
# G2 G3 G4 D L0 L1 L2
|
||||
Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 07 11 36 10 E9 15 32 18 18 19 16 1D 92 1C 40 1B 03 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00
|
34
documentation/CustomFlipperName.md
Normal file
34
documentation/CustomFlipperName.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# How to change Flipper name:
|
||||
|
||||
## Instruction
|
||||
1. Read [How to build](https://github.com/Eng1n33r/flipperzero-firmware/blob/dev/documentation/HowToBuild.md) and [How to install](https://github.com/Eng1n33r/flipperzero-firmware/blob/dev/documentation/HowToInstall.md) to know how to build and install firmware
|
||||
2. Follow how to build instructions to prepare all things before continuing
|
||||
3. Run release build to verify all is ok - `./fbt COMPACT=1 DEBUG=0 updater_package`
|
||||
4. Clear build files - `./fbt COMPACT=1 DEBUG=0 updater_package -c`
|
||||
5. Run command with extra enviroment var before `./fbt` that variable should contain your custom name in alphanumeric characters - max length 8 chars
|
||||
`CUSTOM_FLIPPER_NAME=Name ./fbt COMPACT=1 DEBUG=0 updater_package` - where `Name` write your custom name
|
||||
6. Copy `dist/f7-C/f7-update-local` folder to microSD `update/myfw/` and run `update` file on flipper from file manager app (Archive)
|
||||
7. Flash from microSD card only, .dfu update from qFlipper will not work properly since name and serial number will be changed
|
||||
8. Done, you will have custom name, serial number and bluetooth mac address
|
||||
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
### I'm using Windows and name changing / building firmware doesn't work
|
||||
- Use PowerShell or VSCode terminal(powershell by default)
|
||||
- Clear build files - `.\fbt.cmd COMPACT=1 DEBUG=0 updater_package -c`
|
||||
- Enter this in same terminal `$Env:CUSTOM_FLIPPER_NAME="Name"`
|
||||
- Run release build - `.\fbt.cmd COMPACT=1 DEBUG=0 updater_package`
|
||||
- Flash as described before (see 6.)
|
||||
- If something still not work - Run powershell or VSCode as Admin
|
||||
### Name stays same for every new build
|
||||
- Clear build files - `./fbt COMPACT=1 DEBUG=0 updater_package -c`
|
||||
- Try again
|
||||
### I want to return my original name and serial number
|
||||
- Flash stock FW or any CFW using microSD card offline update method
|
||||
|
||||
Or
|
||||
- Clear build files - `./fbt COMPACT=1 DEBUG=0 updater_package -c`
|
||||
- Run release build - `./fbt COMPACT=1 DEBUG=0 updater_package`
|
||||
- Copy `dist/f7-C/f7-update-local` folder to microSD `update/myfw/` and run `update` file on flipper from file manager app (Archive)
|
||||
- Flash from microSD card only, .dfu update from qFlipper will not work properly since name and serial number will be changed
|
|
@ -1,6 +1,15 @@
|
|||
|
||||
# How to Build by yourself:
|
||||
|
||||
## Install required software
|
||||
|
||||
- Git - [Download](https://git-scm.com/downloads) for Windows, on Linux/Mac install via package manager (`brew`, `apt`, ...)
|
||||
|
||||
For development:
|
||||
- Git
|
||||
- Python3
|
||||
- VSCode
|
||||
|
||||
## Clone the Repository
|
||||
|
||||
You should clone with
|
||||
|
@ -8,6 +17,47 @@ You should clone with
|
|||
$ git clone --recursive https://github.com/Eng1n33r/flipperzero-firmware.git
|
||||
```
|
||||
|
||||
# Build on Linux/macOS
|
||||
|
||||
Check out `documentation/fbt.md` for details on building and flashing firmware.
|
||||
|
||||
### Compile everything for development
|
||||
|
||||
```sh
|
||||
./fbt
|
||||
```
|
||||
|
||||
### Compile everything for release + get updater package to update from microSD card
|
||||
|
||||
```sh
|
||||
./fbt COMPACT=1 DEBUG=0 updater_package
|
||||
```
|
||||
|
||||
Check `dist/` for build outputs.
|
||||
|
||||
Use **`flipper-z-{target}-full-{suffix}.dfu`** to flash your device.
|
||||
|
||||
|
||||
# Build on Windows
|
||||
|
||||
Check out `documentation/fbt.md` for details on building and flashing firmware.
|
||||
|
||||
### Compile everything for development
|
||||
|
||||
```sh
|
||||
.\fbt.cmd
|
||||
```
|
||||
|
||||
### Compile everything for release + get updater package to update from microSD card
|
||||
|
||||
```sh
|
||||
.\fbt.cmd COMPACT=1 DEBUG=0 updater_package
|
||||
```
|
||||
|
||||
Check `dist/` for build outputs.
|
||||
|
||||
Use **`flipper-z-{target}-full-{suffix}.dfu`** to flash your device.
|
||||
|
||||
## Build with Docker
|
||||
|
||||
### Prerequisites
|
||||
|
@ -28,7 +78,7 @@ docker-compose exec dev ./fbt
|
|||
### Compile everything for release + get updater package to update from microSD card
|
||||
|
||||
```sh
|
||||
docker-compose exec dev ./fbt --with-updater COMPACT=1 DEBUG=0 updater_package
|
||||
docker-compose exec dev ./fbt COMPACT=1 DEBUG=0 updater_package
|
||||
```
|
||||
|
||||
Check `dist/` for build outputs.
|
||||
|
@ -36,44 +86,3 @@ Check `dist/` for build outputs.
|
|||
Use **`flipper-z-{target}-full-{suffix}.dfu`** to flash your device.
|
||||
|
||||
If compilation fails, make sure all submodules are all initialized. Either clone with `--recursive` or use `git submodule update --init --recursive`.
|
||||
|
||||
# Build on Linux/macOS
|
||||
|
||||
Check out `documentation/fbt.md` for details on building and flashing firmware.
|
||||
|
||||
### Compile everything for development
|
||||
|
||||
```sh
|
||||
./fbt
|
||||
```
|
||||
|
||||
### Compile everything for release + get updater package to update from microSD card
|
||||
|
||||
```sh
|
||||
./fbt --with-updater COMPACT=1 DEBUG=0 updater_package
|
||||
```
|
||||
|
||||
Check `dist/` for build outputs.
|
||||
|
||||
Use **`flipper-z-{target}-full-{suffix}.dfu`** to flash your device.
|
||||
|
||||
|
||||
# Build on Windows
|
||||
|
||||
Check out `documentation/fbt.md` for details on building and flashing firmware.
|
||||
|
||||
### Compile everything for development
|
||||
|
||||
```sh
|
||||
.\fbt.cmd
|
||||
```
|
||||
|
||||
### Compile everything for release + get updater package to update from microSD card
|
||||
|
||||
```sh
|
||||
.\fbt.cmd --with-updater COMPACT=1 DEBUG=0 updater_package
|
||||
```
|
||||
|
||||
Check `dist/` for build outputs.
|
||||
|
||||
Use **`flipper-z-{target}-full-{suffix}.dfu`** to flash your device.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import posixpath
|
||||
|
||||
# For more details on these options, run 'fbt -h'
|
||||
|
||||
|
||||
# Default hardware target
|
||||
TARGET_HW = 7
|
||||
|
@ -59,6 +61,9 @@ SVD_FILE = "debug/STM32WB55_CM4.svd"
|
|||
# Look for blackmagic probe on serial ports and local network
|
||||
BLACKMAGIC = "auto"
|
||||
|
||||
# Application to start on boot
|
||||
LOADER_AUTOSTART = ""
|
||||
|
||||
FIRMWARE_APPS = {
|
||||
"default": [
|
||||
"crypto_start",
|
||||
|
|
|
@ -139,7 +139,7 @@ fwenv.AppendUnique(
|
|||
# Depends on virtual value-only node, so it only gets rebuilt when set of apps changes
|
||||
apps_c = fwenv.ApplicationsC(
|
||||
"applications/applications.c",
|
||||
Value(fwenv["APPS"]),
|
||||
[Value(fwenv["APPS"]), Value(fwenv["LOADER_AUTOSTART"])],
|
||||
)
|
||||
# Adding dependency on manifest files so apps.c is rebuilt when any manifest is changed
|
||||
fwenv.Depends(apps_c, fwenv.GlobRecursive("*.fam", "#/applications"))
|
||||
|
@ -210,11 +210,19 @@ fwelf = fwenv["FW_ELF"] = fwenv.Program(
|
|||
Depends(fwelf, lib_targets)
|
||||
# Output extra details after building firmware
|
||||
AddPostAction(fwelf, fwenv["APPBUILD_DUMP"])
|
||||
AddPostAction(fwelf, Action("@$SIZECOM"))
|
||||
AddPostAction(
|
||||
fwelf,
|
||||
Action('${PYTHON3} "${ROOT_DIR}/scripts/fwsize.py" elf ${TARGET}', "Firmware size"),
|
||||
)
|
||||
|
||||
# Produce extra firmware files
|
||||
fwhex = fwenv["FW_HEX"] = fwenv.HEXBuilder("${FIRMWARE_BUILD_CFG}")
|
||||
fwbin = fwenv["FW_BIN"] = fwenv.BINBuilder("${FIRMWARE_BUILD_CFG}")
|
||||
AddPostAction(
|
||||
fwbin,
|
||||
Action('@${PYTHON3} "${ROOT_DIR}/scripts/fwsize.py" bin ${TARGET}'),
|
||||
)
|
||||
|
||||
fwdfu = fwenv["FW_DFU"] = fwenv.DFUBuilder("${FIRMWARE_BUILD_CFG}")
|
||||
Alias(fwenv["FIRMWARE_BUILD_CFG"] + "_dfu", fwdfu)
|
||||
|
||||
|
|
|
@ -75,7 +75,10 @@ void furi_hal_clock_init() {
|
|||
LL_EXTI_LINE_18); /* Why? Because that's why. See RM0434, Table 61. CPU1 vector table. */
|
||||
LL_EXTI_EnableRisingTrig_0_31(LL_EXTI_LINE_18);
|
||||
LL_RCC_EnableIT_LSECSS();
|
||||
LL_RCC_LSE_EnableCSS();
|
||||
/* ES0394, extended case of 2.2.2 */
|
||||
if(!LL_RCC_IsActiveFlag_BORRST()) {
|
||||
LL_RCC_LSE_EnableCSS();
|
||||
}
|
||||
|
||||
/* Main PLL configuration and activation */
|
||||
LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE, LL_RCC_PLLM_DIV_2, 8, LL_RCC_PLLR_DIV_2);
|
||||
|
|
|
@ -320,7 +320,7 @@ bool furi_hal_subghz_is_tx_allowed(uint32_t value) {
|
|||
bool is_extended = false;
|
||||
|
||||
// TODO: !!! Move file check to another place
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FlipperFormat* fff_data_file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(flipper_format_file_open_existing(fff_data_file, "/ext/subghz/assets/dangerous_settings")) {
|
||||
|
@ -329,7 +329,7 @@ bool furi_hal_subghz_is_tx_allowed(uint32_t value) {
|
|||
}
|
||||
|
||||
flipper_format_free(fff_data_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
if(!(value >= 299999755 && value <= 348000335) &&
|
||||
!(value >= 386999938 && value <= 464000000) &&
|
||||
|
|
|
@ -106,6 +106,10 @@ static void furi_hal_version_set_name(const char* name) {
|
|||
|
||||
// BLE Mac address
|
||||
uint32_t udn = LL_FLASH_GetUDN();
|
||||
if(version_get_custom_name(NULL) != NULL) {
|
||||
udn = (uint32_t)*version_get_custom_name(NULL);
|
||||
}
|
||||
|
||||
uint32_t company_id = LL_FLASH_GetSTCompanyID();
|
||||
uint32_t device_id = LL_FLASH_GetDeviceID();
|
||||
furi_hal_version.ble_mac[0] = (uint8_t)(udn & 0x000000FF);
|
||||
|
@ -129,7 +133,11 @@ static void furi_hal_version_load_otp_v0() {
|
|||
furi_hal_version.board_body = otp->board_body;
|
||||
furi_hal_version.board_connect = otp->board_connect;
|
||||
|
||||
furi_hal_version_set_name(otp->name);
|
||||
if(version_get_custom_name(NULL) != NULL) {
|
||||
furi_hal_version_set_name(version_get_custom_name(NULL));
|
||||
} else {
|
||||
furi_hal_version_set_name(otp->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void furi_hal_version_load_otp_v1() {
|
||||
|
@ -143,7 +151,11 @@ static void furi_hal_version_load_otp_v1() {
|
|||
furi_hal_version.board_color = otp->board_color;
|
||||
furi_hal_version.board_region = otp->board_region;
|
||||
|
||||
furi_hal_version_set_name(otp->name);
|
||||
if(version_get_custom_name(NULL) != NULL) {
|
||||
furi_hal_version_set_name(version_get_custom_name(NULL));
|
||||
} else {
|
||||
furi_hal_version_set_name(otp->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void furi_hal_version_load_otp_v2() {
|
||||
|
@ -163,7 +175,11 @@ static void furi_hal_version_load_otp_v2() {
|
|||
if(otp->board_color != 0xFF) {
|
||||
furi_hal_version.board_color = otp->board_color;
|
||||
furi_hal_version.board_region = otp->board_region;
|
||||
furi_hal_version_set_name(otp->name);
|
||||
if(version_get_custom_name(NULL) != NULL) {
|
||||
furi_hal_version_set_name(version_get_custom_name(NULL));
|
||||
} else {
|
||||
furi_hal_version_set_name(otp->name);
|
||||
}
|
||||
} else {
|
||||
furi_hal_version.board_color = 0;
|
||||
furi_hal_version.board_region = 0;
|
||||
|
@ -262,6 +278,8 @@ const char* furi_hal_version_get_hw_region_name() {
|
|||
return "R02";
|
||||
case FuriHalVersionRegionJp:
|
||||
return "R03";
|
||||
case FuriHalVersionRegionWorld:
|
||||
return "R04";
|
||||
}
|
||||
return "R??";
|
||||
}
|
||||
|
@ -299,5 +317,8 @@ size_t furi_hal_version_uid_size() {
|
|||
}
|
||||
|
||||
const uint8_t* furi_hal_version_uid() {
|
||||
if(version_get_custom_name(NULL) != NULL) {
|
||||
return (const uint8_t*)((uint32_t)*version_get_custom_name(NULL));
|
||||
}
|
||||
return (const uint8_t*)UID64_BASE;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ typedef enum {
|
|||
FuriHalVersionRegionEuRu = 0x01,
|
||||
FuriHalVersionRegionUsCaAu = 0x02,
|
||||
FuriHalVersionRegionJp = 0x03,
|
||||
FuriHalVersionRegionWorld = 0x04,
|
||||
} FuriHalVersionRegion;
|
||||
|
||||
/** Device Display */
|
||||
|
|
|
@ -8,6 +8,7 @@ struct Version {
|
|||
const char* git_branch;
|
||||
const char* git_branch_num;
|
||||
const char* build_date;
|
||||
const char* custom_flipper_name;
|
||||
const char* version;
|
||||
const uint8_t target;
|
||||
const bool build_is_dirty;
|
||||
|
@ -19,6 +20,11 @@ static const Version version = {
|
|||
.git_branch = GIT_BRANCH,
|
||||
.git_branch_num = GIT_BRANCH_NUM,
|
||||
.build_date = BUILD_DATE,
|
||||
#ifdef FURI_CUSTOM_FLIPPER_NAME
|
||||
.custom_flipper_name = FURI_CUSTOM_FLIPPER_NAME,
|
||||
#else
|
||||
.custom_flipper_name = NULL,
|
||||
#endif
|
||||
.version = VERSION
|
||||
#ifdef FURI_RAM_EXEC
|
||||
" (RAM)"
|
||||
|
@ -52,6 +58,10 @@ const char* version_get_version(const Version* v) {
|
|||
return v ? v->version : version.version;
|
||||
}
|
||||
|
||||
const char* version_get_custom_name(const Version* v) {
|
||||
return v ? v->custom_flipper_name : version.custom_flipper_name;
|
||||
}
|
||||
|
||||
uint8_t version_get_target(const Version* v) {
|
||||
return v ? v->target : version.target;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -64,6 +65,15 @@ const char* version_get_builddate(const Version* v);
|
|||
*/
|
||||
const char* version_get_version(const Version* v);
|
||||
|
||||
/** Get custom flipper name if set in ENV
|
||||
*
|
||||
* @param v pointer to Version data. NULL for currently running
|
||||
* software.
|
||||
*
|
||||
* @return custom name or NULL
|
||||
*/
|
||||
const char* version_get_custom_name(const Version* v);
|
||||
|
||||
/** Get hardware target this firmware was built for
|
||||
*
|
||||
* @param v pointer to Version data. NULL for currently running
|
||||
|
|
52
scripts/fwsize.py
Normal file
52
scripts/fwsize.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from flipper.app import App
|
||||
import subprocess
|
||||
import os
|
||||
import math
|
||||
|
||||
|
||||
class Main(App):
|
||||
def init(self):
|
||||
self.subparsers = self.parser.add_subparsers(help="sub-command help")
|
||||
|
||||
self.parser_elfsize = self.subparsers.add_parser("elf", help="Dump elf stats")
|
||||
self.parser_elfsize.add_argument("elfname", action="store")
|
||||
self.parser_elfsize.set_defaults(func=self.process_elf)
|
||||
|
||||
self.parser_binsize = self.subparsers.add_parser("bin", help="Dump bin stats")
|
||||
self.parser_binsize.add_argument("binname", action="store")
|
||||
self.parser_binsize.set_defaults(func=self.process_bin)
|
||||
|
||||
def process_elf(self):
|
||||
all_sizes = subprocess.check_output(
|
||||
["arm-none-eabi-size", "-A", self.args.elfname], shell=False
|
||||
)
|
||||
all_sizes = all_sizes.splitlines()
|
||||
|
||||
sections_to_keep = (".text", ".rodata", ".data", ".bss", ".free_flash")
|
||||
for line in all_sizes:
|
||||
line = line.decode("utf-8")
|
||||
parts = line.split()
|
||||
if len(parts) != 3:
|
||||
continue
|
||||
section, size, _ = parts
|
||||
if section not in sections_to_keep:
|
||||
continue
|
||||
print(f"{section:<11} {size:>8} ({(int(size)/1024):6.2f} K)")
|
||||
|
||||
return 0
|
||||
|
||||
def process_bin(self):
|
||||
PAGE_SIZE = 4096
|
||||
binsize = os.path.getsize(self.args.binname)
|
||||
pages = math.ceil(binsize / PAGE_SIZE)
|
||||
last_page_state = (binsize % PAGE_SIZE) * 100 / PAGE_SIZE
|
||||
print(
|
||||
f"{os.path.basename(self.args.binname):<11}: {pages:>4} flash pages (last page {last_page_state:.02f}% full)"
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Main()()
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from flipper.app import App
|
||||
from os.path import join, exists
|
||||
from os import makedirs
|
||||
from os import makedirs, environ
|
||||
from update import Main as UpdateMain
|
||||
import shutil
|
||||
|
||||
|
@ -134,6 +134,15 @@ class Main(App):
|
|||
self.logger.info(
|
||||
f"Use this directory to self-update your Flipper:\n\t{bundle_dir}"
|
||||
)
|
||||
log_custom_fz_name = (
|
||||
environ.get("CUSTOM_FLIPPER_NAME", None)
|
||||
or ""
|
||||
)
|
||||
if (log_custom_fz_name != ""):
|
||||
self.logger.info(
|
||||
f"Flipper Custom Name is set:\n\tName: {log_custom_fz_name} : length - {len(log_custom_fz_name)} chars"
|
||||
)
|
||||
|
||||
return UpdateMain(no_exit=True)(bundle_args)
|
||||
|
||||
return 0
|
||||
|
|
|
@ -31,6 +31,7 @@ if not "%REAL_TOOLCHAIN_VERSION%" == "%FLIPPER_TOOLCHAIN_VERSION%" (
|
|||
|
||||
set "HOME=%USERPROFILE%"
|
||||
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
|
||||
set "PYTHONPATH="
|
||||
set "PATH=%FBT_TOOLCHAIN_ROOT%\python;%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\protoc\bin;%FBT_TOOLCHAIN_ROOT%\openocd\bin;%PATH%"
|
||||
set "PROMPT=(fbt) %PROMPT%"
|
||||
|
||||
|
|
|
@ -37,13 +37,28 @@ class GitVersion:
|
|||
or "unknown"
|
||||
)
|
||||
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
"GIT_BRANCH": branch,
|
||||
"GIT_BRANCH_NUM": branch_num,
|
||||
"VERSION": version,
|
||||
"BUILD_DIRTY": dirty and 1 or 0,
|
||||
}
|
||||
custom_fz_name = (
|
||||
os.environ.get("CUSTOM_FLIPPER_NAME", None)
|
||||
or ""
|
||||
)
|
||||
|
||||
if (custom_fz_name != "") and (len(custom_fz_name) <= 8):
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
"GIT_BRANCH": branch,
|
||||
"GIT_BRANCH_NUM": branch_num,
|
||||
"FURI_CUSTOM_FLIPPER_NAME": custom_fz_name,
|
||||
"VERSION": version,
|
||||
"BUILD_DIRTY": dirty and 1 or 0,
|
||||
}
|
||||
else:
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
"GIT_BRANCH": branch,
|
||||
"GIT_BRANCH_NUM": branch_num,
|
||||
"VERSION": version,
|
||||
"BUILD_DIRTY": dirty and 1 or 0,
|
||||
}
|
||||
|
||||
def _exec_git(self, args):
|
||||
cmd = ["git"]
|
||||
|
|
|
@ -76,6 +76,12 @@ vars.Add(
|
|||
default="local",
|
||||
)
|
||||
|
||||
vars.Add(
|
||||
"CUSTOM_FLIPPER_NAME",
|
||||
help="Replaces OTP flipper name with custom string of 8 chars",
|
||||
default="",
|
||||
)
|
||||
|
||||
vars.Add(
|
||||
"UPDATE_VERSION_STRING",
|
||||
help="Version string for updater package",
|
||||
|
@ -174,6 +180,12 @@ vars.Add(
|
|||
default="update_default",
|
||||
)
|
||||
|
||||
vars.Add(
|
||||
"LOADER_AUTOSTART",
|
||||
help="Application name to automatically run on Flipper boot",
|
||||
default="",
|
||||
)
|
||||
|
||||
|
||||
vars.Add(
|
||||
"FIRMWARE_APPS",
|
||||
|
|
|
@ -12,7 +12,7 @@ forward_os_env = {
|
|||
"PATH": os.environ["PATH"],
|
||||
}
|
||||
# Proxying CI environment to child processes & scripts
|
||||
for env_value_name in ("WORKFLOW_BRANCH_OR_TAG", "DIST_SUFFIX", "HOME", "APPDATA"):
|
||||
for env_value_name in ("WORKFLOW_BRANCH_OR_TAG", "DIST_SUFFIX", "CUSTOM_FLIPPER_NAME", "HOME", "APPDATA"):
|
||||
if environ_value := os.environ.get(env_value_name, None):
|
||||
forward_os_env[env_value_name] = environ_value
|
||||
|
||||
|
|
|
@ -203,8 +203,9 @@ class ApplicationsCGenerator:
|
|||
FlipperAppType.STARTUP: ("FlipperOnStartHook", "FLIPPER_ON_SYSTEM_START"),
|
||||
}
|
||||
|
||||
def __init__(self, buildset: AppBuildset):
|
||||
def __init__(self, buildset: AppBuildset, autorun_app: str = ""):
|
||||
self.buildset = buildset
|
||||
self.autorun = autorun_app
|
||||
|
||||
def get_app_ep_forward(self, app: FlipperApplication):
|
||||
if app.apptype == FlipperAppType.STARTUP:
|
||||
|
@ -222,7 +223,11 @@ class ApplicationsCGenerator:
|
|||
.flags = {'|'.join(f"FlipperApplicationFlag{flag}" for flag in app.flags)} }}"""
|
||||
|
||||
def generate(self):
|
||||
contents = ['#include "applications.h"', "#include <assets_icons.h>"]
|
||||
contents = [
|
||||
'#include "applications.h"',
|
||||
"#include <assets_icons.h>",
|
||||
f'const char* FLIPPER_AUTORUN_APP_NAME = "{self.autorun}";',
|
||||
]
|
||||
for apptype in self.APP_TYPE_MAP:
|
||||
contents.extend(
|
||||
map(self.get_app_ep_forward, self.buildset.get_apps_of_type(apptype))
|
||||
|
|
|
@ -7,7 +7,6 @@ from SCons.Tool import gnulink
|
|||
import strip
|
||||
import gdb
|
||||
import objdump
|
||||
import size
|
||||
|
||||
from SCons.Action import _subproc
|
||||
import subprocess
|
||||
|
@ -38,7 +37,7 @@ def _get_tool_version(env, tool):
|
|||
|
||||
|
||||
def generate(env, **kw):
|
||||
for orig_tool in (asm, gcc, gxx, ar, gnulink, strip, gdb, objdump, size):
|
||||
for orig_tool in (asm, gcc, gxx, ar, gnulink, strip, gdb, objdump):
|
||||
orig_tool.generate(env)
|
||||
env.SetDefault(
|
||||
TOOLCHAIN_PREFIX=kw.get("toolchain_prefix"),
|
||||
|
@ -57,7 +56,6 @@ def generate(env, **kw):
|
|||
"GDB",
|
||||
"GDBPY",
|
||||
"OBJDUMP",
|
||||
"SIZE",
|
||||
],
|
||||
)
|
||||
# Call CC to check version
|
||||
|
|
|
@ -51,7 +51,7 @@ def DumpApplicationConfig(target, source, env):
|
|||
def build_apps_c(target, source, env):
|
||||
target_file_name = target[0].path
|
||||
|
||||
gen = ApplicationsCGenerator(env["APPBUILD"])
|
||||
gen = ApplicationsCGenerator(env["APPBUILD"], env.subst("$LOADER_AUTOSTART"))
|
||||
with open(target_file_name, "w") as file:
|
||||
file.write(gen.generate())
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
from SCons.Builder import Builder
|
||||
from SCons.Action import Action
|
||||
|
||||
|
||||
def generate(env):
|
||||
env.SetDefault(
|
||||
SIZE="size",
|
||||
SIZEFLAGS=[],
|
||||
SIZECOM="$SIZE $SIZEFLAGS $TARGETS",
|
||||
)
|
||||
env.Append(
|
||||
BUILDERS={
|
||||
"ELFSize": Builder(
|
||||
action=Action(
|
||||
"${SIZECOM}",
|
||||
"${SIZECOMSTR}",
|
||||
),
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def exists(env):
|
||||
return True
|
Loading…
Add table
Reference in a new issue