MX vor 1 Jahr
Ursprung
Commit
567b717535
4 geänderte Dateien mit 21 neuen und 5 gelöschten Zeilen
  1. 1 1
      application.fam
  2. 6 1
      docs/CHANGELOG.md
  3. 12 1
      infrared_controller.c
  4. 2 2
      manifest.yml

+ 1 - 1
application.fam

@@ -6,7 +6,7 @@ App(
     cdefines=["APP_LASER_TAG"],
     cdefines=["APP_LASER_TAG"],
     fap_category="Games",
     fap_category="Games",
     fap_author="@RocketGod-git & @jamisonderek",
     fap_author="@RocketGod-git & @jamisonderek",
-    fap_version="2.1",
+    fap_version="2.2",
     fap_description="Laser Tag game for Flipper Zero",
     fap_description="Laser Tag game for Flipper Zero",
     fap_icon="icons/laser_tag_10px.png",
     fap_icon="icons/laser_tag_10px.png",
     fap_libs=["assets"],
     fap_libs=["assets"],

+ 6 - 1
docs/CHANGELOG.md

@@ -1,3 +1,8 @@
+## v2.2
+
+- Bug fix to avoid hit queueing by CodeAllNight (@jamisonderek)
+
+
 ## v2.1
 ## v2.1
 
 
 - Updates to Flipper App Catalog layout by RocketGod (@RocketGod-git)
 - Updates to Flipper App Catalog layout by RocketGod (@RocketGod-git)
@@ -5,7 +10,7 @@
 
 
 ## v2.0
 ## v2.0
 
 
-- Add RFID support for ammo reload by codeallnight (@jamisonderek)
+- Add RFID support for ammo reload by CodeAllNight (@jamisonderek)
 - Add external infrared board support by RocketGod (@RocketGod-git)
 - Add external infrared board support by RocketGod (@RocketGod-git)
 
 
 
 

+ 12 - 1
infrared_controller.c

@@ -59,6 +59,16 @@ void update_infrared_board_status(InfraredController* controller) {
     }
     }
 }
 }
 
 
+static int32_t infrared_reset(void* context) {
+    InfraredController* controller = (InfraredController*)context;
+    // furi_stream_buffer_reset(instance->stream) not exposed to the API.
+    // infrared_worker_rx_stop calls it internally.
+    infrared_worker_rx_stop(controller->worker);
+    infrared_worker_rx_start(controller->worker);
+    controller->processing_signal = false;
+    return 0;
+}
+
 static void infrared_rx_callback(void* context, InfraredWorkerSignal* received_signal) {
 static void infrared_rx_callback(void* context, InfraredWorkerSignal* received_signal) {
     FURI_LOG_I(TAG, "RX callback triggered");
     FURI_LOG_I(TAG, "RX callback triggered");
 
 
@@ -99,7 +109,8 @@ static void infrared_rx_callback(void* context, InfraredWorkerSignal* received_s
     }
     }
 
 
     FURI_LOG_I(TAG, "RX callback completed");
     FURI_LOG_I(TAG, "RX callback completed");
-    controller->processing_signal = false;
+    FuriThread* thread = furi_thread_alloc_ex("InfraredReset", 512, infrared_reset, controller);
+    furi_thread_start(thread);
 }
 }
 
 
 InfraredController* infrared_controller_alloc() {
 InfraredController* infrared_controller_alloc() {

+ 2 - 2
manifest.yml

@@ -13,8 +13,8 @@ screenshots:
 short_description: 'Laser Tag game for Flipper Zero'
 short_description: 'Laser Tag game for Flipper Zero'
 sourcecode:
 sourcecode:
   location:
   location:
-    commit_sha: f4ffc246367430547f649fc5a493bb939c9f6e7d3
+    commit_sha: 6c9239269cef8969908576e15e4c126d4386adb8
     origin: https://github.com/RocketGod-git/Flipper-Zero-Laser-Tag.git
     origin: https://github.com/RocketGod-git/Flipper-Zero-Laser-Tag.git
     subdir:
     subdir:
   type: git
   type: git
-version: 2.0
+version: 2.1