This commit is contained in:
Willy-JL
2023-11-13 21:07:33 +00:00
12 changed files with 134 additions and 1568 deletions
@@ -23,15 +23,15 @@ void ibutton_scene_emulate_on_enter(void* context) {
furi_string_printf(
tmp,
"%s\n[%s]",
furi_string_empty(ibutton->file_path) ? "Unsaved Key" : ibutton->key_name,
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key)));
"[%s]\n%s",
ibutton_protocols_get_name(ibutton->protocols, ibutton_key_get_protocol_id(key)),
furi_string_empty(ibutton->file_path) ? "Unsaved Key" : ibutton->key_name);
widget_add_text_box_element(
widget, 52, 38, 75, 26, AlignCenter, AlignCenter, furi_string_get_cstr(tmp), true);
widget, 52, 30, 75, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tmp), true);
widget_add_string_multiline_element(
widget, 88, 10, AlignCenter, AlignTop, FontPrimary, "iButton\nemulating");
widget, 88, 5, AlignCenter, AlignTop, FontPrimary, "iButton\nemulating");
ibutton_worker_emulate_set_callback(ibutton->worker, ibutton_scene_emulate_callback, ibutton);
ibutton_worker_emulate_start(ibutton->worker, key);
@@ -11,12 +11,12 @@ void ibutton_scene_info_on_enter(void* context) {
furi_string_printf(
tmp,
"\e#%s [%s]\e#",
"\e#%s\n[%s]\e#",
ibutton->key_name,
ibutton_protocols_get_name(ibutton->protocols, protocol_id));
widget_add_text_box_element(
widget, 0, 2, 128, 12, AlignLeft, AlignTop, furi_string_get_cstr(tmp), true);
widget, 0, 2, 128, 40, AlignLeft, AlignTop, furi_string_get_cstr(tmp), true);
furi_string_reset(tmp);
ibutton_protocols_render_brief_data(ibutton->protocols, key, tmp);
@@ -42,12 +42,12 @@ void ibutton_scene_write_on_enter(void* context) {
furi_string_printf(
tmp,
"%s\n[%s]",
ibutton->key_name,
ibutton_protocols_get_name(ibutton->protocols, protocol_id));
"[%s]\n%s",
ibutton_protocols_get_name(ibutton->protocols, protocol_id),
ibutton->key_name);
widget_add_text_box_element(
widget, 52, 38, 75, 26, AlignCenter, AlignCenter, furi_string_get_cstr(tmp), true);
widget, 52, 30, 75, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tmp), true);
ibutton_worker_write_set_callback(worker, ibutton_scene_write_callback, ibutton);
@@ -63,7 +63,7 @@ void ibutton_scene_write_on_enter(void* context) {
}
widget_add_string_multiline_element(
widget, 88, 10, AlignCenter, AlignTop, FontPrimary, furi_string_get_cstr(tmp));
widget, 88, 5, AlignCenter, AlignTop, FontPrimary, furi_string_get_cstr(tmp));
ibutton_notification_message(ibutton, iButtonNotificationMessageEmulateStart);
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget);
+7 -12
View File
@@ -167,16 +167,16 @@ static InfraredApp* infrared_alloc() {
view_dispatcher_add_view(
view_dispatcher, InfraredViewTextInput, text_input_get_view(infrared->text_input));
infrared->dialog_ex = dialog_ex_alloc();
view_dispatcher_add_view(
view_dispatcher, InfraredViewDialogEx, dialog_ex_get_view(infrared->dialog_ex));
infrared->variable_item_list = variable_item_list_alloc();
view_dispatcher_add_view(
infrared->view_dispatcher,
InfraredViewVariableItemList,
variable_item_list_get_view(infrared->variable_item_list));
infrared->dialog_ex = dialog_ex_alloc();
view_dispatcher_add_view(
view_dispatcher, InfraredViewDialogEx, dialog_ex_get_view(infrared->dialog_ex));
infrared->button_menu = button_menu_alloc();
view_dispatcher_add_view(
view_dispatcher, InfraredViewButtonMenu, button_menu_get_view(infrared->button_menu));
@@ -224,12 +224,12 @@ static void infrared_free(InfraredApp* infrared) {
view_dispatcher_remove_view(view_dispatcher, InfraredViewTextInput);
text_input_free(infrared->text_input);
view_dispatcher_remove_view(infrared->view_dispatcher, InfraredViewVariableItemList);
variable_item_list_free(infrared->variable_item_list);
view_dispatcher_remove_view(view_dispatcher, InfraredViewDialogEx);
dialog_ex_free(infrared->dialog_ex);
view_dispatcher_remove_view(infrared->view_dispatcher, InfraredViewVariableItemList);
variable_item_list_free(infrared->variable_item_list);
view_dispatcher_remove_view(view_dispatcher, InfraredViewButtonMenu);
button_menu_free(infrared->button_menu);
@@ -271,11 +271,6 @@ static void infrared_free(InfraredApp* infrared) {
furi_string_free(infrared->file_path);
furi_string_free(infrared->button_name);
// Disable 5v power if was enabled for external module
if(furi_hal_power_is_otg_enabled()) {
furi_hal_power_disable_otg();
}
free(infrared);
}
+3 -3
View File
@@ -15,10 +15,10 @@
#include <gui/modules/loading.h>
#include <gui/modules/submenu.h>
#include <gui/modules/dialog_ex.h>
#include <gui/modules/variable_item_list.h>
#include <gui/modules/text_input.h>
#include <gui/modules/button_menu.h>
#include <gui/modules/button_panel.h>
#include <gui/modules/variable_item_list.h>
#include <storage/storage.h>
#include <dialogs/dialogs.h>
@@ -109,10 +109,10 @@ struct InfraredApp {
Submenu* submenu; /**< Standard view for displaying application menus. */
TextInput* text_input; /**< Standard view for receiving user text input. */
VariableItemList* variable_item_list; /**< Standard view for displaying option menus. */
DialogEx* dialog_ex; /**< Standard view for displaying dialogs. */
ButtonMenu* button_menu; /**< Custom view for interacting with IR remotes. */
Popup* popup; /**< Standard view for displaying messages. */
VariableItemList* variable_item_list;
ViewStack* view_stack; /**< Standard view for displaying stacked interfaces. */
InfraredDebugView* debug_view; /**< Custom view for displaying debug information. */
@@ -137,13 +137,13 @@ struct InfraredApp {
typedef enum {
InfraredViewSubmenu,
InfraredViewTextInput,
InfraredViewVariableItemList,
InfraredViewDialogEx,
InfraredViewButtonMenu,
InfraredViewPopup,
InfraredViewStack,
InfraredViewDebugView,
InfraredViewMove,
InfraredViewVariableItemList,
} InfraredView;
/**
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
Filetype: IR library file
Version: 1
# Last Updated 1st Oct, 2023
# Last Checked 1st Oct, 2023
# Last Updated 29th Oct, 2023
# Last Checked 29th Oct, 2023
#
name: Power
type: parsed
@@ -2393,3 +2393,69 @@ type: parsed
protocol: NECext
address: 69 69 00 00
command: 0E F1 00 00
#
name: Power
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 0A F5 00 00
#
name: Mute
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 0B F4 00 00
#
name: Vol_up
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 1E E1 00 00
#
name: Vol_dn
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 5F A0 00 00
#
name: Ch_next
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 1F E0 00 00
#
name: Ch_prev
type: parsed
protocol: NECext
address: 01 3E 00 00
command: 5C A3 00 00
#
name: Power
type: parsed
protocol: NEC
address: 38 00 00 00
command: 01 00 00 00
#
name: Vol_up
type: parsed
protocol: NEC
address: 38 00 00 00
command: 0C 00 00 00
#
name: Vol_dn
type: parsed
protocol: NEC
address: 38 00 00 00
command: 10 00 00 00
#
name: Ch_next
type: parsed
protocol: NEC
address: 38 00 00 00
command: 18 00 00 00
#
name: Ch_prev
type: parsed
protocol: NEC
address: 38 00 00 00
command: 1C 00 00 00
+41 -3
View File
@@ -31,7 +31,7 @@ bool subghz_protocol_secplus_v2_create_data(
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 28 bit
* @param btn Button number, 4 bit
* @param cnt Container value, 16 bit
* @param cnt Counter value, 16 bit
* @param manufacture_name Name of manufacturer's key
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
@@ -107,6 +107,22 @@ bool subghz_protocol_alutech_at_4n_create_data(
uint16_t cnt,
SubGhzRadioPreset* preset);
/**
* Key generation from simple data.
* @param context Pointer to a SubGhzProtocolEncoderCameAtomo instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 24 bit
* @param cnt Counter value, 16 bit
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_came_atomo_create_data(
void* context,
FlipperFormat* flipper_format,
uint32_t serial,
uint16_t cnt,
SubGhzRadioPreset* preset);
/**
* New remote generation.
* @param context Pointer to a SubGhzProtocolEncoderNiceFlorS instance
@@ -129,18 +145,22 @@ bool subghz_protocol_nice_flor_s_create_data(
/**
* Key generation from simple data.
* @param context Pointer to a SubGhzProtocolEncoderCameAtomo instance
* @param context Pointer to a SubGhzProtocolEncoderStarLine instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 24 bit
* @param btn Button number, 8 bit
* @param cnt Counter value, 16 bit
* @param manufacture_name Name of manufacturer's key
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_came_atomo_create_data(
bool subghz_protocol_star_line_create_data(
void* context,
FlipperFormat* flipper_format,
uint32_t serial,
uint8_t btn,
uint16_t cnt,
const char* manufacture_name,
SubGhzRadioPreset* preset);
/**
@@ -161,6 +181,24 @@ bool subghz_protocol_somfy_telis_create_data(
uint16_t cnt,
SubGhzRadioPreset* preset);
/**
* Key generation from simple data.
* @param context Pointer to a SubGhzProtocolEncoderSomfyKeytis instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 24 bit
* @param btn Button number, 8 bit
* @param cnt Counter value, 16 bit
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_somfy_keytis_create_data(
void* context,
FlipperFormat* flipper_format,
uint32_t serial,
uint8_t btn,
uint16_t cnt,
SubGhzRadioPreset* preset);
typedef struct SubGhzProtocolDecoderBinRAW SubGhzProtocolDecoderBinRAW;
void subghz_protocol_decoder_bin_raw_data_input_rssi(
-18
View File
@@ -24,24 +24,6 @@ void* subghz_protocol_encoder_somfy_keytis_alloc(SubGhzEnvironment* environment)
*/
void subghz_protocol_encoder_somfy_keytis_free(void* context);
/**
* Key generation from simple data.
* @param context Pointer to a SubGhzProtocolEncoderSomfyKeytis instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 24 bit
* @param btn Button number, 8 bit
* @param cnt Counter value, 16 bit
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_somfy_keytis_create_data(
void* context,
FlipperFormat* flipper_format,
uint32_t serial,
uint8_t btn,
uint16_t cnt,
SubGhzRadioPreset* preset);
/**
* Deserialize and generating an upload to send.
* @param context Pointer to a SubGhzProtocolEncoderSomfyKeytis instance
-20
View File
@@ -24,26 +24,6 @@ void* subghz_protocol_encoder_star_line_alloc(SubGhzEnvironment* environment);
*/
void subghz_protocol_encoder_star_line_free(void* context);
/**
* Key generation from simple data.
* @param context Pointer to a SubGhzProtocolEncoderStarLine instance
* @param flipper_format Pointer to a FlipperFormat instance
* @param serial Serial number, 24 bit
* @param btn Button number, 8 bit
* @param cnt Counter value, 16 bit
* @param manufacture_name Name of manufacturer's key
* @param preset Modulation, SubGhzRadioPreset
* @return true On success
*/
bool subghz_protocol_star_line_create_data(
void* context,
FlipperFormat* flipper_format,
uint32_t serial,
uint8_t btn,
uint16_t cnt,
const char* manufacture_name,
SubGhzRadioPreset* preset);
/**
* Deserialize and generating an upload to send.
* @param context Pointer to a SubGhzProtocolEncoderStarLine instance
+2
View File
@@ -2999,7 +2999,9 @@ Function,+,subghz_protocol_registry_get_by_index,const SubGhzProtocol*,"const Su
Function,+,subghz_protocol_registry_get_by_name,const SubGhzProtocol*,"const SubGhzProtocolRegistry*, const char*"
Function,+,subghz_protocol_secplus_v1_check_fixed,_Bool,uint32_t
Function,+,subghz_protocol_secplus_v2_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint32_t, SubGhzRadioPreset*"
Function,+,subghz_protocol_somfy_keytis_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, SubGhzRadioPreset*"
Function,+,subghz_protocol_somfy_telis_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, SubGhzRadioPreset*"
Function,+,subghz_protocol_star_line_create_data,_Bool,"void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, const char*, SubGhzRadioPreset*"
Function,+,subghz_receiver_alloc_init,SubGhzReceiver*,SubGhzEnvironment*
Function,+,subghz_receiver_decode,void,"SubGhzReceiver*, _Bool, uint32_t"
Function,+,subghz_receiver_free,void,SubGhzReceiver*
1 entry status name type params
2999 Function + subghz_protocol_registry_get_by_name const SubGhzProtocol* const SubGhzProtocolRegistry*, const char*
3000 Function + subghz_protocol_secplus_v1_check_fixed _Bool uint32_t
3001 Function + subghz_protocol_secplus_v2_create_data _Bool void*, FlipperFormat*, uint32_t, uint8_t, uint32_t, SubGhzRadioPreset*
3002 Function + subghz_protocol_somfy_keytis_create_data _Bool void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, SubGhzRadioPreset*
3003 Function + subghz_protocol_somfy_telis_create_data _Bool void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, SubGhzRadioPreset*
3004 Function + subghz_protocol_star_line_create_data _Bool void*, FlipperFormat*, uint32_t, uint8_t, uint16_t, const char*, SubGhzRadioPreset*
3005 Function + subghz_receiver_alloc_init SubGhzReceiver* SubGhzEnvironment*
3006 Function + subghz_receiver_decode void SubGhzReceiver*, _Bool, uint32_t
3007 Function + subghz_receiver_free void SubGhzReceiver*
+1 -1
View File
@@ -1,3 +1,3 @@
#pragma once
void furi_hal_subghz_set_extended_frequency(bool state_i);
void furi_hal_subghz_set_extended_frequency(bool state_i);