Просмотр исходного кода

README addition, disable string_element test

Zachary Weiss 3 лет назад
Родитель
Сommit
018c190179
3 измененных файлов с 9 добавлено и 7 удалено
  1. 1 0
      README.md
  2. 1 0
      mag.c
  3. 7 7
      scenes/mag_scene_emulate_test.c

+ 1 - 0
README.md

@@ -17,3 +17,4 @@ Other misc things to investigate / build:
 - Reverse-track emulate?
 - Tuning of parameters like pre-signal zeros?
 - "Interpacket delay" like the RedSpoof implementation?
+- (Less important) Any way to easily wrap text on screen, without having to manually calculate the number of chars that fit and splicing the string accordingly into lines? 

+ 1 - 0
mag.c

@@ -185,6 +185,7 @@ bool mag_load_key_data(Mag* mag, FuriString* path, bool show_dialog) {
     UNUSED(show_dialog);
 
     // TODO: Needs reworking from LFRFID version, as that goes through some custom protocol by key type.
+    //       Alternatively, co-opt the "protocol" typing as our way of encoding track # (Track 1, 2, 3, or some combination thereof)
 
     return result;
 }

+ 7 - 7
scenes/mag_scene_emulate_test.c

@@ -140,19 +140,19 @@ void mag_scene_emulate_test_on_enter(void *context) {
     Mag *mag = context;
     Widget *widget = mag->widget;
 
-    FuriString *tmp_string;
-    tmp_string = furi_string_alloc();
+    //FuriString *tmp_string;
+    //tmp_string = furi_string_alloc();
 
     widget_add_button_element(widget, GuiButtonTypeLeft, "Back", mag_widget_callback, mag);
     widget_add_button_element(widget, GuiButtonTypeRight, "Emulate", mag_widget_callback, mag);
 
-    furi_string_printf(tmp_string, test_str);
-    widget_add_string_element(
-        widget, 64, 0, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(tmp_string));
-    furi_string_reset(tmp_string);
+    //furi_string_printf(tmp_string, test_str);
+    //widget_add_string_element(
+    //    widget, 64, 0, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(tmp_string));
+    //furi_string_reset(tmp_string);
 
     view_dispatcher_switch_to_view(mag->view_dispatcher, MagViewWidget);
-    furi_string_free(tmp_string);
+    //furi_string_free(tmp_string);
 }
 
 bool mag_scene_emulate_test_on_event(void *context, SceneManagerEvent event) {