mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix many SubGhz history bugs
No "history full" if "delete old signals" Delete more old signals if history full Fix visual offset bug with "delete old signals" Fix led and sound for full history / not "Delete old signals" in decode raw too
This commit is contained in:
@@ -182,15 +182,21 @@ FlipperFormat* subghz_history_get_raw_data(SubGhzHistory* instance, uint16_t idx
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
bool subghz_history_get_text_space_left(SubGhzHistory* instance, FuriString* output, uint8_t sats) {
|
||||
bool subghz_history_get_text_space_left(
|
||||
SubGhzHistory* instance,
|
||||
FuriString* output,
|
||||
uint8_t sats,
|
||||
bool ignore_full) {
|
||||
furi_assert(instance);
|
||||
if(memmgr_get_free_heap() < SUBGHZ_HISTORY_FREE_HEAP) {
|
||||
if(output != NULL) furi_string_printf(output, " Memory is FULL");
|
||||
return true;
|
||||
}
|
||||
if(instance->last_index_write == SUBGHZ_HISTORY_MAX) {
|
||||
if(output != NULL) furi_string_printf(output, " History is FULL");
|
||||
return true;
|
||||
if(!ignore_full) {
|
||||
if(memmgr_get_free_heap() < SUBGHZ_HISTORY_FREE_HEAP) {
|
||||
if(output != NULL) furi_string_printf(output, " Memory is FULL");
|
||||
return true;
|
||||
}
|
||||
if(instance->last_index_write == SUBGHZ_HISTORY_MAX) {
|
||||
if(output != NULL) furi_string_printf(output, " History is FULL");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(output != NULL) {
|
||||
if(sats == 0) {
|
||||
|
||||
Reference in New Issue
Block a user