mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
Do some TODOs
This commit is contained in:
parent
a941ed8c2a
commit
e7707b31f0
5 changed files with 4 additions and 32 deletions
|
@ -7,21 +7,6 @@
|
|||
#define TAG "SubGhzDecodeRaw"
|
||||
#define SAMPLES_TO_READ_PER_TICK 400
|
||||
|
||||
// TODO:
|
||||
// [X] Remember RAW file after decoding
|
||||
// [X] Decode in tick events instead of on_enter
|
||||
// [X] Make "Config" label optional in subghz_view_receiver_draw (../views/receiver.c)
|
||||
// [X] Make "Scanning..." label optional in subghz_view_receiver_draw (../views/receiver.c)
|
||||
// [X] Add Decoding logo
|
||||
// [ ] Design nicer Decoding logo
|
||||
// [X] Check progress in stream_buffer, instead of raw stream
|
||||
// [X] Blink led while decoding
|
||||
// [X] Stop rx blink (blue, fast) on history item view
|
||||
// [X] Don't reparse file on back
|
||||
// [X] Fix: RX animation+LED returning from decoded detail view
|
||||
// [X] Find good value for SAMPLES_TO_READ_PER_TICK
|
||||
// [X] Fix: read errors (slow flash) after aborting decode read
|
||||
|
||||
static void subghz_scene_receiver_update_statusbar(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
FuriString* history_stat_str = furi_string_alloc();
|
||||
|
@ -163,7 +148,7 @@ void subghz_scene_decode_raw_on_enter(void* context) {
|
|||
FuriString* item_time = furi_string_alloc();
|
||||
|
||||
subghz_view_receiver_set_lock(
|
||||
subghz->subghz_receiver, subghz_is_locked(subghz)); //TODO Doesn't matter in DecodeRAW
|
||||
subghz->subghz_receiver, false); //TODO Doesn't matter in DecodeRAW
|
||||
subghz_view_receiver_set_mode(subghz->subghz_receiver, SubGhzViewReceiverModeFile);
|
||||
subghz_view_receiver_set_callback(
|
||||
subghz->subghz_receiver, subghz_scene_decode_raw_callback, subghz);
|
||||
|
@ -243,10 +228,6 @@ bool subghz_scene_decode_raw_on_event(void* context, SceneManagerEvent event) {
|
|||
notification_message(subghz->notifications, &sequence_display_backlight_off);
|
||||
consumed = true;
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverUnlock:
|
||||
subghz_unlock(subghz); //TODO There is no such event in DecodeRAW
|
||||
consumed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -42,10 +42,8 @@ static void subghz_scene_read_raw_update_statusbar(void* context) {
|
|||
|
||||
#ifdef SUBGHZ_EXT_PRESET_NAME
|
||||
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str, true);
|
||||
//TODO if need subghz_txrx_get_preset
|
||||
//furi_string_printf(modulation_str, "%s", furi_string_get_cstr(subghz->txrx->preset->name));
|
||||
#else
|
||||
subghz_get_frequency_modulation(subghz->txrx, frequency_str, modulation_str, false);
|
||||
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str, false);
|
||||
#endif
|
||||
subghz_read_raw_add_data_statusbar(
|
||||
subghz->subghz_read_raw,
|
||||
|
|
|
@ -27,7 +27,7 @@ static bool subghz_scene_receiver_info_update_parser(void* context) {
|
|||
if(subghz_txrx_load_decoder_by_name_protocol(
|
||||
subghz->txrx,
|
||||
subghz_history_get_protocol_name(subghz->history, subghz->idx_menu_chosen))) {
|
||||
//todo we are trying to deserialize without checking for errors, since it is assumed that we just received this chignal
|
||||
//todo we are trying to deserialize without checking for errors, since it is assumed that we just received this signal
|
||||
subghz_protocol_decoder_base_deserialize(
|
||||
subghz_txrx_get_decoder(subghz->txrx),
|
||||
subghz_history_get_raw_data(subghz->history, subghz->idx_menu_chosen));
|
||||
|
@ -140,7 +140,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||
widget_reset(subghz->widget);
|
||||
subghz_scene_receiver_info_draw_widget(subghz);
|
||||
|
||||
subghz_txrx_stop(subghz->txrx); //TODO this is probably a redundant call
|
||||
subghz_txrx_stop(subghz->txrx);
|
||||
if(!subghz->in_decoder_scene) {
|
||||
subghz_txrx_rx_start(subghz->txrx);
|
||||
|
||||
|
|
|
@ -562,11 +562,6 @@ bool subghz_scene_set_type_on_event(void* context, SceneManagerEvent event) {
|
|||
case SubmenuIndexSomfyTelis:
|
||||
generated_protocol = subghz_txrx_gen_somfy_telis_protocol(
|
||||
subghz->txrx, "AM650", 433920000, key & 0x00FFFFFF, 0x2, 0x0003);
|
||||
if(!generated_protocol) { //TODO does not use databases
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
}
|
||||
break;
|
||||
case SubmenuIndexDoorHan_433_92:
|
||||
generated_protocol = subghz_txrx_gen_keeloq_protocol(
|
||||
|
|
|
@ -81,8 +81,6 @@ bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) {
|
|||
uint8_t tmp_counter = furi_hal_subghz_get_rolling_counter_mult();
|
||||
furi_hal_subghz_set_rolling_counter_mult(0);
|
||||
// Calling restore!
|
||||
subghz_txrx_stop(subghz->txrx); //TODO this is probably a redundant call
|
||||
|
||||
if(!subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx))) {
|
||||
scene_manager_next_scene(
|
||||
subghz->scene_manager, SubGhzSceneShowOnlyRx); //TODO Is this necessary?
|
||||
|
|
Loading…
Reference in a new issue