2021-09-10 00:29:57 +00: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 13:51:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <furi.h>
|
|
|
|
#include <furi_hal.h>
|
|
|
|
#include <lib/flipper_format/flipper_format.h>
|
2022-10-19 17:27:26 +00: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 13:51:48 +00:00
|
|
|
|
|
|
|
typedef struct SubGhzHistory SubGhzHistory;
|
|
|
|
|
2021-09-01 21:05:00 +00: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 13:51:48 +00:00
|
|
|
SubGhzHistory* subghz_history_alloc(void);
|
2021-09-01 21:05:00 +00: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 13:51:48 +00:00
|
|
|
void subghz_history_free(SubGhzHistory* instance);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Clear history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
*/
|
2022-01-21 17:32:03 +00:00
|
|
|
void subghz_history_reset(SubGhzHistory* instance);
|
2021-09-01 21:05:00 +00: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 13:51:48 +00:00
|
|
|
uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
2022-10-19 17:27:26 +00:00
|
|
|
SubGhzRadioPreset* subghz_history_get_radio_preset(SubGhzHistory* instance, uint16_t idx);
|
2022-07-26 14:16:59 +00:00
|
|
|
|
2021-09-01 21:05:00 +00:00
|
|
|
/** Get preset to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
2022-07-26 14:16:59 +00:00
|
|
|
* @return preset - preset name
|
2021-09-01 21:05:00 +00:00
|
|
|
*/
|
2022-07-26 14:16:59 +00:00
|
|
|
const char* subghz_history_get_preset(SubGhzHistory* instance, uint16_t idx);
|
2021-09-01 21:05:00 +00: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 13:51:48 +00:00
|
|
|
uint16_t subghz_history_get_item(SubGhzHistory* instance);
|
2021-09-01 21:05:00 +00: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 13:51:48 +00:00
|
|
|
uint8_t subghz_history_get_type_protocol(SubGhzHistory* instance, uint16_t idx);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Get name protocol to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return name - const char* name protocol
|
|
|
|
*/
|
2022-03-03 09:48:56 +00:00
|
|
|
const char* subghz_history_get_protocol_name(SubGhzHistory* instance, uint16_t idx);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Get string item menu to history[idx]
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
2022-10-05 15:15:23 +00:00
|
|
|
* @param output - FuriString* output
|
2021-09-01 21:05:00 +00:00
|
|
|
* @param idx - record index
|
|
|
|
*/
|
2022-10-05 15:15:23 +00:00
|
|
|
void subghz_history_get_text_item_menu(SubGhzHistory* instance, FuriString* output, uint16_t idx);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Get string the remaining number of records to history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
2022-10-05 15:15:23 +00:00
|
|
|
* @param output - FuriString* output
|
2021-09-01 21:05:00 +00:00
|
|
|
* @return bool - is FUUL
|
|
|
|
*/
|
2022-10-05 15:15:23 +00:00
|
|
|
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Add protocol to history
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param context - SubGhzProtocolCommon context
|
2022-10-19 17:27:26 +00:00
|
|
|
* @param preset - SubGhzRadioPreset preset
|
2021-09-10 00:29:57 +00:00
|
|
|
* @return bool;
|
2021-09-01 21:05:00 +00:00
|
|
|
*/
|
2021-09-10 00:29:57 +00:00
|
|
|
bool subghz_history_add_to_history(
|
|
|
|
SubGhzHistory* instance,
|
|
|
|
void* context,
|
2022-10-19 17:27:26 +00:00
|
|
|
SubGhzRadioPreset* preset);
|
2021-09-01 21:05:00 +00:00
|
|
|
|
|
|
|
/** Get SubGhzProtocolCommonLoad to load into the protocol decoder bin data
|
|
|
|
*
|
|
|
|
* @param instance - SubGhzHistory instance
|
|
|
|
* @param idx - record index
|
|
|
|
* @return SubGhzProtocolCommonLoad*
|
|
|
|
*/
|
2022-03-03 09:48:56 +00:00
|
|
|
FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx);
|