mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
More precision for frequency editor + change text
This commit is contained in:
@@ -9,7 +9,7 @@ static void xtreme_app_scene_protocols_frequencies_add_text_input_callback(void*
|
|||||||
XtremeApp* app = context;
|
XtremeApp* app = context;
|
||||||
|
|
||||||
char* end;
|
char* end;
|
||||||
uint32_t value = strtol(app->subghz_freq_buffer, &end, 0) * 10000;
|
uint32_t value = strtol(app->subghz_freq_buffer, &end, 0) * 1000;
|
||||||
if(*end || !furi_hal_subghz_is_frequency_valid(value)) {
|
if(*end || !furi_hal_subghz_is_frequency_valid(value)) {
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, TextInputResultError);
|
view_dispatcher_send_custom_event(app->view_dispatcher, TextInputResultError);
|
||||||
return;
|
return;
|
||||||
@@ -29,7 +29,7 @@ void xtreme_app_scene_protocols_frequencies_add_on_enter(void* context) {
|
|||||||
XtremeApp* app = context;
|
XtremeApp* app = context;
|
||||||
TextInput* text_input = app->text_input;
|
TextInput* text_input = app->text_input;
|
||||||
|
|
||||||
text_input_set_header_text(text_input, "Format: 12356");
|
text_input_set_header_text(text_input, "Ex: 123456 for 123.456 MHz");
|
||||||
|
|
||||||
strlcpy(app->subghz_freq_buffer, "", XTREME_SUBGHZ_FREQ_BUFFER_SIZE);
|
strlcpy(app->subghz_freq_buffer, "", XTREME_SUBGHZ_FREQ_BUFFER_SIZE);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <namespoof.h>
|
#include <namespoof.h>
|
||||||
#include <xtreme.h>
|
#include <xtreme.h>
|
||||||
|
|
||||||
#define XTREME_SUBGHZ_FREQ_BUFFER_SIZE 6
|
#define XTREME_SUBGHZ_FREQ_BUFFER_SIZE 7
|
||||||
|
|
||||||
ARRAY_DEF(CharList, char*)
|
ARRAY_DEF(CharList, char*)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user