2021-09-10 03:29:57 +03:00
|
|
|
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
#pragma once
|
|
|
|
|
2022-03-03 12:48:56 +03:00
|
|
|
#include <math.h>
|
|
|
|
#include <furi.h>
|
|
|
|
#include <furi_hal.h>
|
|
|
|
#include <lib/flipper_format/flipper_format.h>
|
2022-10-18 19:51:44 +03:00
|
|
|
#include <lib/subghz/types.h>
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
|
|
|
|
typedef struct SubGhzHistory SubGhzHistory;
|
|
|
|
|
2021-09-02 00:05:00 +03:00
|
|
|
/** Allocate SubGhzHistory
|
|
|
|
*
|
|
|
|
* @return SubGhzHistory*
|
|
|
|
*/
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
SubGhzHistory* subghz_history_alloc(void);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Free SubGhzHistory
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
*/
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
void subghz_history_free(SubGhzHistory* instance);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Clear history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
*/
|
2022-01-21 20:32:03 +03:00
|
|
|
void subghz_history_reset(SubGhzHistory* instance);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
2023-12-21 03:16:16 +03:00
|
|
|
void subghz_history_delete_item(SubGhzHistory* instance, uint16_t idx);
|
2023-02-25 22:28:35 +03:00
|
|
|
|
2021-09-02 00:05:00 +03:00
|
|
|
/** Get frequency to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return frequency - frequency Hz
|
|
|
|
*/
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
2022-10-19 18:52:21 +03:00
|
|
|
SubGhzRadioPreset* subghz_history_get_radio_preset(SubGhzHistory* instance, uint16_t idx);
|
2022-07-26 17:16:59 +03:00
|
|
|
|
2021-09-02 00:05:00 +03:00
|
|
|
/** Get preset to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
2022-07-26 17:16:59 +03:00
|
|
|
* @return preset - preset name
|
2021-09-02 00:05:00 +03:00
|
|
|
*/
|
2022-07-26 17:16:59 +03:00
|
|
|
const char* subghz_history_get_preset(SubGhzHistory* instance, uint16_t idx);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get history index write
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @return idx - current record index
|
|
|
|
*/
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
uint16_t subghz_history_get_item(SubGhzHistory* instance);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get type protocol to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return type - type protocol
|
|
|
|
*/
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 16:51:48 +03:00
|
|
|
uint8_t subghz_history_get_type_protocol(SubGhzHistory* instance, uint16_t idx);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get name protocol to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return name - const char* name protocol
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
const char* subghz_history_get_protocol_name(SubGhzHistory* instance, uint16_t idx);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get string item menu to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
2022-10-05 18:15:23 +03:00
|
|
|
* @param output - FuriString* output
|
2021-09-02 00:05:00 +03:00
|
|
|
* @param idx - record index
|
|
|
|
*/
|
2022-10-05 18:15:23 +03:00
|
|
|
void subghz_history_get_text_item_menu(SubGhzHistory* instance, FuriString* output, uint16_t idx);
|
2023-04-21 03:08:38 +03:00
|
|
|
|
|
|
|
/** Get time item menu to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param output - FuriString* output
|
|
|
|
* @param idx - record index
|
|
|
|
*/
|
|
|
|
void subghz_history_get_time_item_menu(SubGhzHistory* instance, FuriString* output, uint16_t idx);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get string the remaining number of records to history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
2022-10-05 18:15:23 +03:00
|
|
|
* @param output - FuriString* output
|
2023-02-20 18:55:53 +03:00
|
|
|
* @return bool - is FULL
|
2021-09-02 00:05:00 +03:00
|
|
|
*/
|
2022-10-05 18:15:23 +03:00
|
|
|
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
2022-10-11 17:26:16 +03:00
|
|
|
/** Return last index
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
uint16_t subghz_history_get_last_index(SubGhzHistory* instance);
|
|
|
|
|
2021-09-02 00:05:00 +03:00
|
|
|
/** Add protocol to history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param context - SubGhzProtocolCommon context
|
2022-10-19 18:52:21 +03:00
|
|
|
* @param preset - SubGhzRadioPreset preset
|
2021-09-10 03:29:57 +03:00
|
|
|
* @return bool;
|
2021-09-02 00:05:00 +03:00
|
|
|
*/
|
2021-09-10 03:29:57 +03:00
|
|
|
bool subghz_history_add_to_history(
|
|
|
|
SubGhzHistory* instance,
|
|
|
|
void* context,
|
2022-10-19 18:52:21 +03:00
|
|
|
SubGhzRadioPreset* preset);
|
2021-09-02 00:05:00 +03:00
|
|
|
|
|
|
|
/** Get SubGhzProtocolCommonLoad to load into the protocol decoder bin data
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return SubGhzProtocolCommonLoad*
|
|
|
|
*/
|
2022-03-03 12:48:56 +03:00
|
|
|
FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx);
|