diff --git a/Meshtastic Client.xcodeproj/xcuserdata/garthvanderhouwen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Meshtastic Client.xcodeproj/xcuserdata/garthvanderhouwen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 03791069..a69d2766 100644 --- a/Meshtastic Client.xcodeproj/xcuserdata/garthvanderhouwen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Meshtastic Client.xcodeproj/xcuserdata/garthvanderhouwen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -106,8 +106,8 @@ filePath = "MeshtasticClient/Helpers/BLEManager.swift" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "841" - endingLineNumber = "841" + startingLineNumber = "809" + endingLineNumber = "809" landmarkName = "sendMessage(message:toUserNum:)" landmarkType = "7"> @@ -115,48 +115,16 @@ - - - - - - - - diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Contents.json index f321d22c..510c27d0 100644 --- a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6.png", + "filename" : "Heltec_turq.jpg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png", + "filename" : "Heltec_turq-1.jpg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png", + "filename" : "Heltec_turq-2.jpg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-1.jpg b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-1.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-1.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-2.jpg b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-2.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq-2.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq.jpg b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV20.imageset/Heltec_turq.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png deleted file mode 100644 index b80e4b0c..00000000 Binary files a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/655DCEC0-309D-430A-AF50-2453B6ADB1F6.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Contents.json index f321d22c..510c27d0 100644 --- a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6.png", + "filename" : "Heltec_turq.jpg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6-1.png", + "filename" : "Heltec_turq-1.jpg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "655DCEC0-309D-430A-AF50-2453B6ADB1F6-2.png", + "filename" : "Heltec_turq-2.jpg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-1.jpg b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-1.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-1.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-2.jpg b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-2.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq-2.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq.jpg b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq.jpg new file mode 100644 index 00000000..d1b24b3b Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/HELTECV21.imageset/Heltec_turq.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/Contents.json new file mode 100644 index 00000000..d839cdeb --- /dev/null +++ b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "tbeam.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "tbeam-1.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "tbeam-2.jpg", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-1.jpg b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-1.jpg new file mode 100644 index 00000000..69865801 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-1.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-2.jpg b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-2.jpg new file mode 100644 index 00000000..69865801 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam-2.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam.jpg b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam.jpg new file mode 100644 index 00000000..69865801 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TBEAM0p7.imageset/tbeam.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/Contents.json index d72038af..38e3dcb7 100644 --- a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "tlora-2.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "tlora-3.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "tlora-4.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-2.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-2.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-2.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-3.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-3.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-3.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-4.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-4.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV2.imageset/tlora-4.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/Contents.json index d72038af..38e3dcb7 100644 --- a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "tlora-2.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "tlora-3.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "tlora-4.jpeg", + "filename" : "LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-1.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp-2.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg new file mode 100644 index 00000000..211ca924 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/LILYGO-TTGO-LoRa32-V2-1-1-6-Version-433-868-915Mhz-ESP32-LoRa-OLED-0-96.jpg_Q90.jpg_.webp.jpeg differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-2.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-2.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-2.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-3.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-3.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-3.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-4.jpeg b/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-4.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/TLORAV211p6.imageset/tlora-4.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/rak4631.imageset/Contents.json index 7f7e3a4b..f231e71f 100644 --- a/MeshtasticClient/Assets.xcassets/rak4631.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/rak4631.imageset/Contents.json @@ -1,16 +1,17 @@ { "images" : [ { + "filename" : "RAK_DEV_KIT.jpg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive-1.png", + "filename" : "RAK_DEV_KIT-1.jpg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive.png", + "filename" : "RAK_DEV_KIT-2.jpg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive-1.png b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive-1.png deleted file mode 100644 index 984c1117..00000000 Binary files a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive-1.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive.png b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive.png deleted file mode 100644 index 984c1117..00000000 Binary files a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK7205_Enclosure-With-Solar-Panel_Top-View_01_9ed42002-fb51-4c49-a69e-43fcef692ef6_739x@2x.progressive.png and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-1.jpg b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-1.jpg new file mode 100644 index 00000000..9300bed0 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-1.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-2.jpg b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-2.jpg new file mode 100644 index 00000000..9300bed0 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT-2.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT.jpg b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT.jpg new file mode 100644 index 00000000..9300bed0 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/rak4631.imageset/RAK_DEV_KIT.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/Contents.json b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/Contents.json index 1ff58079..e5902867 100644 --- a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/Contents.json +++ b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "tlora-2.jpeg", + "filename" : "TLORA_gray.jpg", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "tlora-1.jpeg", + "filename" : "TLORA_olive.jpg", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "tlora.jpeg", + "filename" : "TLORA_purple.jpg", "idiom" : "universal", "scale" : "3x" } diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_gray.jpg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_gray.jpg new file mode 100644 index 00000000..55394502 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_gray.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_olive.jpg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_olive.jpg new file mode 100644 index 00000000..cbd39331 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_olive.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_purple.jpg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_purple.jpg new file mode 100644 index 00000000..7199de02 Binary files /dev/null and b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/TLORA_purple.jpg differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-1.jpeg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-1.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-1.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-2.jpeg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-2.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora-2.jpeg and /dev/null differ diff --git a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora.jpeg b/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora.jpeg deleted file mode 100644 index 450bbb05..00000000 Binary files a/MeshtasticClient/Assets.xcassets/tlorav1.imageset/tlora.jpeg and /dev/null differ diff --git a/MeshtasticClient/Helpers/BLEManager.swift b/MeshtasticClient/Helpers/BLEManager.swift index bd25e63f..7ad8f118 100644 --- a/MeshtasticClient/Helpers/BLEManager.swift +++ b/MeshtasticClient/Helpers/BLEManager.swift @@ -49,7 +49,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph let FROMRADIO_UUID = CBUUID(string: "0x8BA2BCC2-EE02-4A55-A531-C525C5E454D5") let FROMNUM_UUID = CBUUID(string: "0xED9DA18C-A800-4F66-A670-AA7547E34453") - private var meshLoggingEnabled: Bool = false + private var meshLoggingEnabled: Bool = true let meshLog = documentsFolder.appendingPathComponent("meshlog.txt") // MARK: init BLEManager @@ -84,7 +84,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph centralManager.scanForPeripherals(withServices: [meshtasticServiceCBUUID], options: nil) self.isScanning = self.centralManager.isScanning - print("Scanning Started") + print("βœ… Scanning Started") } } @@ -96,7 +96,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph self.centralManager.stopScan() self.isScanning = self.centralManager.isScanning - print("Stopped Scanning") + print("πŸ›‘ Stopped Scanning") } } @@ -120,24 +120,24 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } connectedPeripheral = nil - self.lastConnectionError = "BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(name)." - print("BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(name).") - if meshLoggingEnabled { MeshLogger.log("BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(String(name)).") } + self.lastConnectionError = "🚫 BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(name)." + print("🚫 BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(name).") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Connecting Timeout after making \(timeoutTimerCount) attempts to connect to \(String(name)).") } self.timeoutTimerCount = 0 self.timeoutTimer?.invalidate() } else { - print("BLE Connecting 2 Second Timeout Timer Fired \(timeoutTimerCount) Time(s): \(name)") - if meshLoggingEnabled { MeshLogger.log("BLE Connecting 2 Second Timeout Timer Fired \(timeoutTimerCount) Time(s): \(name)") } + print("🚫 BLE Connecting 2 Second Timeout Timer Fired \(timeoutTimerCount) Time(s): \(name)") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Connecting 2 Second Timeout Timer Fired \(timeoutTimerCount) Time(s): \(name)") } } } // Connect to a specific peripheral func connectTo(peripheral: CBPeripheral) { - if meshLoggingEnabled { MeshLogger.log("BLE Connecting: \(peripheral.name ?? "Unknown")") } - print("BLE Connecting: \(peripheral.name ?? "Unknown")") + if meshLoggingEnabled { MeshLogger.log("βœ… BLE Connecting: \(peripheral.name ?? "Unknown")") } + print("βœ… BLE Connecting: \(peripheral.name ?? "Unknown")") stopScanning() @@ -178,14 +178,14 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph peripherals[peripheralIndex!] = newPeripheral peripherals.remove(at: peripheralIndex!) peripherals.append(newPeripheral) - print("Updating peripheral: \(peripheralName)") + print("ℹ️ Updating peripheral: \(peripheralName)") } else { if newPeripheral.peripheral.state != CBPeripheralState.connected { peripherals.append(newPeripheral) - print("Adding peripheral: \(peripheralName)") + print("ℹ️ Adding peripheral: \(peripheralName)") } } } @@ -219,23 +219,23 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } } catch { - print("Fetch NodeInfo Failed") + print("πŸ’₯ Fetch NodeInfo Failed") } lastConnectedPeripheral = peripheral.identifier.uuidString // Discover Services peripheral.discoverServices([meshtasticServiceCBUUID]) - if meshLoggingEnabled { MeshLogger.log("BLE Connected: \(peripheral.name ?? "Unknown")") } - print("BLE Connected: \(peripheral.name ?? "Unknown")") + if meshLoggingEnabled { MeshLogger.log("βœ… BLE Connected: \(peripheral.name ?? "Unknown")") } + print("βœ… BLE Connected: \(peripheral.name ?? "Unknown")") } // Called when a Peripheral fails to connect func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) { - if meshLoggingEnabled { MeshLogger.log("BLE Failed to Connect: \(peripheral.name ?? "Unknown")") } - print("BLE Failed to Connect: \(peripheral.name ?? "Unknown")") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Failed to Connect: \(peripheral.name ?? "Unknown")") } + print("🚫 BLE Failed to Connect: \(peripheral.name ?? "Unknown")") disconnectPeripheral() } @@ -255,7 +255,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph // Happens when device is manually reset / powered off // We will try and re-connect to this device - lastConnectionError = "\(e.localizedDescription) The app will automatically reconnect to the preferred radio if it reappears within 10 seconds." + lastConnectionError = "🚫 \(e.localizedDescription) The app will automatically reconnect to the preferred radio if it reappears within 10 seconds." if peripheral.identifier.uuidString == UserDefaults.standard.object(forKey: "preferredPeripheralId") as? String ?? "" { if meshLoggingEnabled { MeshLogger.log("BLE Reconnecting: \(peripheral.name ?? "Unknown")") } print("BLE Reconnecting: \(peripheral.name ?? "Unknown")") @@ -266,27 +266,27 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph // Seems to be what is received when a tbeam sleeps, immediately recconnecting does not work. lastConnectionError = e.localizedDescription - print("BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") - if meshLoggingEnabled { MeshLogger.log("BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") } + print("🚫 BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") } } else if errorCode == 14 { // Peer removed pairing information // Forgetting and reconnecting seems to be necessary so we need to show the user an error telling them to do that - lastConnectionError = "\(e.localizedDescription) This error usually cannot be fixed without forgetting the device unders Settings > Bluetooth and re-connecting to the radio." + lastConnectionError = "🚫 \(e.localizedDescription) This error usually cannot be fixed without forgetting the device unders Settings > Bluetooth and re-connecting to the radio." - if meshLoggingEnabled { MeshLogger.log("BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(lastConnectionError)") } + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(lastConnectionError)") } } else { lastConnectionError = e.localizedDescription - print("BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") - if meshLoggingEnabled { MeshLogger.log("BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") } + print("🚫 BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE Disconnected: \(peripheral.name ?? "Unknown") Error Code: \(errorCode) Error: \(e.localizedDescription)") } } } else { // Disconnected without error which indicates user intent to disconnect // Happens when swiping to disconnect - if meshLoggingEnabled { MeshLogger.log("BLE Disconnected: \(peripheral.name ?? "Unknown"): User Initiated Disconnect") } - print("BLE Disconnected: \(peripheral.name ?? "Unknown"): User Initiated Disconnect") + if meshLoggingEnabled { MeshLogger.log("ℹ️ BLE Disconnected: \(peripheral.name ?? "Unknown"): User Initiated Disconnect") } + print("ℹ️ BLE Disconnected: \(peripheral.name ?? "Unknown"): User Initiated Disconnect") } } @@ -295,7 +295,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph if let e = error { - print("Discover Services error \(e)") + print("🚫 Discover Services error \(e)") } guard let services = peripheral.services else { return } @@ -303,8 +303,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph for service in services { if service.uuid == meshtasticServiceCBUUID { - print("Meshtastic service discovered OK") - if meshLoggingEnabled { MeshLogger.log("BLE Service for Meshtastic discovered by \(peripheral.name ?? "Unknown")") } + print("βœ… Meshtastic service discovered OK") + if meshLoggingEnabled { MeshLogger.log("βœ… BLE Service for Meshtastic discovered by \(peripheral.name ?? "Unknown")") } peripheral.discoverCharacteristics(nil, for: service) // peripheral.discoverCharacteristics([TORADIO_UUID, FROMRADIO_UUID, FROMNUM_UUID], for: service) } @@ -315,8 +315,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { if let e = error { - print("Discover Characteristics error \(e)") - if meshLoggingEnabled { MeshLogger.log("BLE didDiscoverCharacteristicsFor error by \(peripheral.name ?? "Unknown") \(e)") } + print("🚫 Discover Characteristics error \(e)") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE didDiscoverCharacteristicsFor error by \(peripheral.name ?? "Unknown") \(e)") } } guard let characteristics = service.characteristics else { return } @@ -325,8 +325,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph switch characteristic.uuid { case TORADIO_UUID: - print("TORADIO characteristic OK") - if meshLoggingEnabled { MeshLogger.log("BLE did discover TORADIO characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } + print("βœ… TORADIO characteristic OK") + if meshLoggingEnabled { MeshLogger.log("βœ… BLE did discover TORADIO characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } TORADIO_characteristic = characteristic var toRadio: ToRadio = ToRadio() toRadio.wantConfigID = 32168 @@ -334,14 +334,14 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph peripheral.writeValue(binaryData, for: characteristic, type: .withResponse) case FROMRADIO_UUID: - print("FROMRADIO characteristic OK") - if meshLoggingEnabled { MeshLogger.log("BLE did discover FROMRADIO characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } + print("βœ… FROMRADIO characteristic OK") + if meshLoggingEnabled { MeshLogger.log("βœ… BLE did discover FROMRADIO characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } FROMRADIO_characteristic = characteristic peripheral.readValue(for: FROMRADIO_characteristic) case FROMNUM_UUID: print("FROMNUM (Notify) characteristic OK") - if meshLoggingEnabled { MeshLogger.log("BLE did discover FROMNUM (Notify) characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } + if meshLoggingEnabled { MeshLogger.log("βœ…BLE did discover FROMNUM (Notify) characteristic for Meshtastic by \(peripheral.name ?? "Unknown")") } FROMNUM_characteristic = characteristic peripheral.setNotifyValue(true, for: characteristic) @@ -354,11 +354,11 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) { - print("didUpdateNotificationStateFor char: \(characteristic.uuid.uuidString) \(characteristic.isNotifying)") - if meshLoggingEnabled { MeshLogger.log("didUpdateNotificationStateFor char: \(characteristic.uuid.uuidString) \(characteristic.isNotifying)") } + print("ℹ️ didUpdateNotificationStateFor char: \(characteristic.uuid.uuidString) \(characteristic.isNotifying)") + if meshLoggingEnabled { MeshLogger.log("ℹ️ didUpdateNotificationStateFor char: \(characteristic.uuid.uuidString) \(characteristic.isNotifying)") } if let errorText = error?.localizedDescription { - print("didUpdateNotificationStateFor error: \(errorText)") + print("🚫 didUpdateNotificationStateFor error: \(errorText)") } } @@ -368,8 +368,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { if let e = error { - print("didUpdateValueFor Characteristic error \(e)") - if meshLoggingEnabled { MeshLogger.log("BLE didUpdateValueFor characteristic error by \(peripheral.name ?? "Unknown") \(e)") } + print("🚫 didUpdateValueFor Characteristic error \(e)") + if meshLoggingEnabled { MeshLogger.log("🚫 BLE didUpdateValueFor characteristic error by \(peripheral.name ?? "Unknown") \(e)") } } switch characteristic.uuid { @@ -396,7 +396,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph // MyInfo Data if decodedInfo.myInfo.myNodeNum != 0 { - print("Save a CoreData MyInfoEntity") + print("πŸ’Ύ Save a CoreData MyInfoEntity") let fetchMyInfoRequest:NSFetchRequest = NSFetchRequest.init(entityName: "MyInfoEntity") fetchMyInfoRequest.predicate = NSPredicate(format: "myNodeNum == %lld", Int64(decodedInfo.myInfo.myNodeNum)) @@ -427,19 +427,19 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph do { try context!.save() - print("Saved a myInfo for \(decodedInfo.myInfo.myNodeNum)") - if meshLoggingEnabled { MeshLogger.log("BLE FROMRADIO received and myInfo saved for \(peripheral.name ?? String(decodedInfo.myInfo.myNodeNum))") } + print("πŸ’Ύ Saved a myInfo for \(decodedInfo.myInfo.myNodeNum)") + if meshLoggingEnabled { MeshLogger.log("πŸ’Ύ Saved a myInfo for \(peripheral.name ?? String(decodedInfo.myInfo.myNodeNum))") } } catch { context!.rollback() let nsError = error as NSError - print("Error Saving CoreData MyInfoEntity: \(nsError)") + print("πŸ’₯ Error Saving CoreData MyInfoEntity: \(nsError)") } } catch { - print("Fetch MyInfo Error") + print("πŸ’₯ Fetch MyInfo Error") } @@ -448,7 +448,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph // NodeInfo Data if decodedInfo.nodeInfo.num != 0 { - print("Save a CoreData NodeInfoEntity") + print("πŸ’Ύ Save a CoreData NodeInfoEntity") let fetchNodeRequest:NSFetchRequest = NSFetchRequest.init(entityName: "NodeInfoEntity") fetchNodeRequest.predicate = NSPredicate(format: "num == %lld", Int64(decodedInfo.nodeInfo.num)) @@ -514,7 +514,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } } catch { - print("Fetch MyInfo Error") + print("πŸ’₯ Fetch MyInfo Error") } } else { @@ -565,36 +565,36 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } } catch { - print("Fetch MyInfo Error") + print("πŸ’₯ Fetch MyInfo Error") } } do { try context!.save() - print("Saved a nodeInfo for \(decodedInfo.nodeInfo.num)") + print("πŸ’Ύ Saved a nodeInfo for \(decodedInfo.nodeInfo.num)") } catch { context!.rollback() let nsError = error as NSError - print("Error Saving CoreData NodeInfoEntity: \(nsError)") + print("πŸ’₯ Error Saving CoreData NodeInfoEntity: \(nsError)") } } catch { - print("Fetch NodeInfoEntity Error") + print("πŸ’₯ Fetch NodeInfoEntity Error") } if decodedInfo.nodeInfo.hasUser { - print("BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.user.longName)") - if meshLoggingEnabled { MeshLogger.log("BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.user.longName)") } + print("πŸ’Ύ BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.user.longName)") + if meshLoggingEnabled { MeshLogger.log("πŸ’Ύ BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.user.longName)") } } else { - print("BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.num)") - if meshLoggingEnabled { MeshLogger.log("BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.num)") } + print("πŸ’Ύ BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.num)") + if meshLoggingEnabled { MeshLogger.log("πŸ’Ύ BLE FROMRADIO received and nodeInfo saved for \(decodedInfo.nodeInfo.num)") } } } // Handle assorted app packets @@ -690,18 +690,6 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph fetchedNode[0].lastHeard = Date(timeIntervalSince1970: TimeInterval(Int64(decodedInfo.packet.rxTime))) fetchedNode[0].snr = decodedInfo.packet.rxSnr - let array = [UInt8](decodedInfo.packet.decoded.payload) - print (array[0]) - print (array[1]) - print (array[2]) - print (array[3]) - print (array[4]) - print (array) - - let bytes = decodedInfo.packet.decoded.payload - print(bytes, String(bytes: bytes, encoding: .utf8)) - - print(bytes2String(array)) } else { return @@ -737,11 +725,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph do { - - let fetchedNode = try context?.fetch(fetchNodePositionRequest) as! [NodeInfoEntity] - // Never run if fetchedNode.count == 1 { fetchedNode[0].id = Int64(decodedInfo.packet.from) fetchedNode[0].num = Int64(decodedInfo.packet.from) @@ -757,23 +742,6 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph } fetchedNode[0].snr = decodedInfo.packet.rxSnr - let array = [UInt8](decodedInfo.packet.decoded.payload) - //print(array) - //let payload = decodedInfo.packet.decoded.payload as NSData - let bytes = decodedInfo.packet.decoded.payload - print(bytes, String(bytes: bytes, encoding: .utf8)) - - // Get a string from the byte array. - if let result = String(bytes: bytes, encoding: .utf8) { - print(result) - } - - let testBytes : [UInt8] = [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64] - - - var test = bytes2String(testBytes) - print(test) - } else { return @@ -783,9 +751,9 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph try context!.save() if meshLoggingEnabled { - MeshLogger.log("MESH PACKET Updated NodeInfo SNR and Time from Node Info App Packet For: \(fetchedNode[0].num)") + MeshLogger.log("πŸ’Ύ Updated NodeInfo SNR and Time from Node Info App Packet For: \(fetchedNode[0].num)") } - print("Updated NodeInfo SNR and Time from Position Packet For: \(fetchedNode[0].num)") + print("πŸ’Ύ Updated NodeInfo SNR and Time from Position Packet For: \(fetchedNode[0].num)") } catch { @@ -823,8 +791,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph if decodedInfo.configCompleteID != 0 { - if meshLoggingEnabled { MeshLogger.log("BLE Config Complete Packet Id: \(decodedInfo.configCompleteID)") } - print("BLE Config Complete Packet Id: \(decodedInfo.configCompleteID)") + if meshLoggingEnabled { MeshLogger.log("🀜 BLE Config Complete Packet Id: \(decodedInfo.configCompleteID)") } + print("🀜 BLE Config Complete Packet Id: \(decodedInfo.configCompleteID)") self.connectedPeripheral.subscribed = true peripherals.removeAll(where: { $0.peripheral.state == CBPeripheralState.disconnected }) } @@ -858,9 +826,11 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph connectTo(peripheral: lastConnectedPeripheral!.peripheral) } } + print("Failed in the top message condition") success = false } else if message.count < 1 { // Don's send an empty message + print("Don't Send an Empty Message") success = false } else { @@ -878,7 +848,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph print("Message Users Not Found, Fail") success = false } - else if fetchedUsers.count == 2 { + else if fetchedUsers.count >= 1 { let newMessage = MessageEntity(context: context!) newMessage.messageId = nextSentMessageId @@ -886,6 +856,16 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph newMessage.receivedACK = false newMessage.direction = "IN" newMessage.toUser = fetchedUsers.first(where: { $0.num == toUserNum }) + if newMessage.toUser == nil { + + let bcu: UserEntity = UserEntity(context: context!) + bcu.shortName = "BC" + bcu.longName = "Broadcast" + bcu.hwModel = "UNSET" + bcu.num = Int64(broadcastNodeNum) + bcu.userId = "BROADCASTNODE" + newMessage.toUser = bcu + } newMessage.fromUser = fetchedUsers.first(where: { $0.num == fromUserNum }) newMessage.messagePayload = message diff --git a/MeshtasticClient/Views/Nodes/NodeMap.swift b/MeshtasticClient/Views/Nodes/NodeMap.swift index 0074f354..88211a53 100644 --- a/MeshtasticClient/Views/Nodes/NodeMap.swift +++ b/MeshtasticClient/Views/Nodes/NodeMap.swift @@ -47,6 +47,7 @@ struct NodeMap: View { NavigationView { + ZStack { @@ -57,6 +58,7 @@ struct NodeMap: View { userTrackingMode: .constant(.follow), annotationItems: self.locationNodes.filter({ nodeinfo in return nodeinfo.positions != nil && nodeinfo.positions!.count > 0// && (nodeinfo.positions?.lastObject as? AnyObject)?.coordinate != nil + }) ) { locationNode in @@ -67,6 +69,7 @@ struct NodeMap: View { } ) + }*/ MapView(nodes: self.locationNodes) diff --git a/MeshtasticClient/Views/Settings/AppSettings.swift b/MeshtasticClient/Views/Settings/AppSettings.swift index cb19d55e..d541e3d8 100644 --- a/MeshtasticClient/Views/Settings/AppSettings.swift +++ b/MeshtasticClient/Views/Settings/AppSettings.swift @@ -69,7 +69,7 @@ class UserSettings: ObservableObject { self.preferredPeripheralId = UserDefaults.standard.object(forKey: "preferredPeripheralId") as? String ?? "" //self.provideLocation = UserDefaults.standard.object(forKey: "provideLocation") as? Bool ?? false self.keyboardType = UserDefaults.standard.object(forKey: "keyboardType") as? Int ?? 0 - self.meshActivityLog = UserDefaults.standard.object(forKey: "meshActivityLog") as? Bool ?? true + self.meshActivityLog = UserDefaults.standard.object(forKey: "meshActivityLog") as? Bool ?? false } } @@ -127,19 +127,19 @@ struct AppSettings: View { } .pickerStyle(DefaultPickerStyle()) } -// Section(header: Text("MESH NETWORK OPTIONS")) { -// Toggle(isOn: $userSettings.meshActivityLog) { -// -// Label("Log all Mesh activity", systemImage: "network") -// } -// .toggleStyle(SwitchToggleStyle(tint: .accentColor)) -// if userSettings.meshActivityLog { -// NavigationLink(destination: MeshLog()) { -// Text("View Mesh Log") -// } -// .listRowSeparator(.visible) -// } -// } + Section(header: Text("MESH NETWORK OPTIONS")) { + //Toggle(isOn: $userSettings.meshActivityLog) { + + // Label("Log all Mesh activity", systemImage: "network") + //} + //.toggleStyle(SwitchToggleStyle(tint: .accentColor)) + if true {//userSettings.meshActivityLog { + NavigationLink(destination: MeshLog()) { + Text("View Mesh Log") + } + .listRowSeparator(.visible) + } + } } } .navigationTitle("App Settings")