ilabs-flir 2.1.37 → 2.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,7 @@ android {
38
38
 
39
39
  dependencies {
40
40
  // React Native
41
- implementation("com.facebook.react:react-native:+")66a6f83912ba50ae5553aff1f5b0
41
+ implementation("com.facebook.react:react-native:+")
42
42
 
43
43
  // Kotlin coroutines
44
44
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
@@ -1,43 +1,67 @@
1
1
  import Foundation
2
2
  import UIKit
3
3
 
4
+ /// ObjC-compatible shim that forwards to FlirManager
5
+ /// This provides a clean API for native consumers (FilterDataProvider, etc.)
4
6
  @objc public class FLIRManager: NSObject {
5
7
  @objc public static let shared = FLIRManager()
8
+
9
+ private override init() {
10
+ super.init()
11
+ }
6
12
 
13
+ // MARK: - SDK Availability
14
+
7
15
  @objc public func isAvailable() -> Bool {
8
16
  return FlirManager.isSDKAvailable
9
17
  }
18
+
19
+ @objc public static var isSDKAvailable: Bool {
20
+ return FlirManager.isSDKAvailable
21
+ }
10
22
 
23
+ // MARK: - Temperature APIs
24
+
11
25
  @objc public func getTemperatureAtPoint(x: Int, y: Int) -> Double {
12
- // FlirManager currently doesn't expose a direct getTemperatureAtPoint API.
13
- // Return NaN for now (consumers should handle NaN) until full parity is implemented.
14
- return Double.nan
26
+ return FlirManager.shared.getTemperatureAtPoint(x, y: y)
15
27
  }
16
28
 
17
29
  @objc public func getTemperatureAtNormalized(_ nx: Double, y: Double) -> Double {
18
- return Double.nan
30
+ return FlirManager.shared.getTemperatureAtNormalized(nx, y: y)
19
31
  }
20
32
 
33
+ // MARK: - Battery APIs
34
+
21
35
  @objc public func getBatteryLevel() -> Int {
22
- return -1
36
+ return FlirManager.shared.getBatteryLevel()
23
37
  }
24
38
 
25
39
  @objc public func isBatteryCharging() -> Bool {
26
- return false
40
+ return FlirManager.shared.isBatteryCharging()
27
41
  }
28
42
 
43
+ // MARK: - Rotation Preference
44
+
29
45
  @objc public func setPreferSdkRotation(_ prefer: Bool) {
30
- // FlirManager doesn't currently support rotation preference; no-op
46
+ FlirManager.shared.setPreferSdkRotation(prefer)
31
47
  }
32
48
 
33
49
  @objc public func isPreferSdkRotation() -> Bool {
34
- return false
50
+ return FlirManager.shared.isPreferSdkRotation()
35
51
  }
36
52
 
53
+ // MARK: - Frame Access
54
+
37
55
  @objc public func latestFrameImage() -> UIImage? {
38
56
  return FlirManager.shared.latestImage
39
57
  }
58
+
59
+ @objc public var latestImage: UIImage? {
60
+ return FlirManager.shared.latestImage
61
+ }
40
62
 
63
+ // MARK: - Discovery & Connection
64
+
41
65
  @objc public func startDiscovery() {
42
66
  FlirManager.shared.startDiscovery()
43
67
  }
@@ -45,4 +69,36 @@ import UIKit
45
69
  @objc public func stopDiscovery() {
46
70
  FlirManager.shared.stopDiscovery()
47
71
  }
72
+
73
+ @objc public var isConnected: Bool {
74
+ return FlirManager.shared.isConnected
75
+ }
76
+
77
+ @objc public var isStreaming: Bool {
78
+ return FlirManager.shared.isStreaming
79
+ }
80
+
81
+ @objc public var isEmulator: Bool {
82
+ return FlirManager.shared.isEmulator
83
+ }
84
+
85
+ // MARK: - Palette Control
86
+
87
+ @objc public func setPalette(_ name: String) {
88
+ FlirManager.shared.setPalette(name)
89
+ }
90
+
91
+ @objc public func setPaletteFromAcol(_ acol: Float) {
92
+ FlirManager.shared.setPaletteFromAcol(acol)
93
+ }
94
+
95
+ // MARK: - Client Lifecycle
96
+
97
+ @objc public func retainClient(_ clientId: String) {
98
+ FlirManager.shared.retainClient(clientId)
99
+ }
100
+
101
+ @objc public func releaseClient(_ clientId: String) {
102
+ FlirManager.shared.releaseClient(clientId)
103
+ }
48
104
  }
@@ -97,6 +97,17 @@ import ThermalSDK
97
97
  connectedDeviceName?.lowercased().contains("emulat") == true
98
98
  }
99
99
 
100
+ // Preference: ask SDK to deliver oriented/rotated frames (if SDK supports it)
101
+ private var _preferSdkRotation: Bool = false
102
+
103
+ @objc public func setPreferSdkRotation(_ prefer: Bool) {
104
+ _preferSdkRotation = prefer
105
+ }
106
+
107
+ @objc public func isPreferSdkRotation() -> Bool {
108
+ return _preferSdkRotation
109
+ }
110
+
100
111
  @objc public func getConnectedDeviceInfo() -> String {
101
112
  return connectedDeviceName ?? "Not connected"
102
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ilabs-flir",
3
- "version": "2.1.37",
3
+ "version": "2.1.38",
4
4
  "description": "FLIR Thermal SDK for React Native - iOS & Android (bundled at compile time via postinstall)",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",