Browse Source

Add firmware and app version to log

Eric Betts 1 năm trước cách đây
mục cha
commit
4e880dfa7c
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      protocol/picopass_poller.c

+ 10 - 0
protocol/picopass_poller.c

@@ -4,6 +4,7 @@
 #include "../loclass/optimized_cipher.h"
 #include "../loclass/optimized_cipher.h"
 
 
 #include <furi/furi.h>
 #include <furi/furi.h>
+#include <toolbox/version.h>
 
 
 #define TAG "Picopass"
 #define TAG "Picopass"
 
 
@@ -88,6 +89,15 @@ NfcCommand picopass_poller_pre_auth_handler(PicopassPoller* instance) {
     NfcCommand command = NfcCommandContinue;
     NfcCommand command = NfcCommandContinue;
     PicopassError error = PicopassErrorNone;
     PicopassError error = PicopassErrorNone;
 
 
+    // Print version information for app and firmware for later review in log
+    const Version* version = version_get();
+    FURI_LOG_I(
+        TAG,
+        "Firmware origin: %s firmware version: %s app version: %s",
+        version_get_firmware_origin(version),
+        version_get_version(version),
+        FAP_VERSION);
+
     do {
     do {
         memcpy(
         memcpy(
             instance->data->card_data[PICOPASS_CSN_BLOCK_INDEX].data,
             instance->data->card_data[PICOPASS_CSN_BLOCK_INDEX].data,