@blueharford/scrypted-spatial-awareness 0.6.22 → 0.6.23
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.
- package/dist/main.nodejs.js +1 -1
- package/dist/main.nodejs.js.map +1 -1
- package/dist/plugin.zip +0 -0
- package/out/main.nodejs.js +9 -5
- package/out/main.nodejs.js.map +1 -1
- package/out/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/core/topology-discovery.ts +8 -4
- package/src/main.ts +3 -0
package/out/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -748,16 +748,20 @@ Use the mount height to help estimate distances - objects at ground level will a
|
|
|
748
748
|
return null;
|
|
749
749
|
}
|
|
750
750
|
|
|
751
|
-
//
|
|
751
|
+
// ALWAYS generate suggestions from each camera's analysis first
|
|
752
|
+
// This ensures landmarks and zones from individual cameras are captured
|
|
753
|
+
for (const analysis of analyses) {
|
|
754
|
+
this.generateSuggestionsFromAnalysis(analysis);
|
|
755
|
+
}
|
|
756
|
+
this.console.log(`[Discovery] Generated suggestions from ${analyses.length} camera analyses`);
|
|
757
|
+
|
|
758
|
+
// Then correlate if we have multiple cameras (adds shared landmarks and connections)
|
|
752
759
|
let correlation: TopologyCorrelation | null = null;
|
|
753
760
|
if (analyses.length >= 2) {
|
|
754
761
|
correlation = await this.correlateScenes(analyses);
|
|
755
762
|
if (correlation) {
|
|
756
763
|
this.generateSuggestionsFromCorrelation(correlation);
|
|
757
764
|
}
|
|
758
|
-
} else if (analyses.length === 1) {
|
|
759
|
-
// Single camera - generate suggestions from its analysis
|
|
760
|
-
this.generateSuggestionsFromAnalysis(analyses[0]);
|
|
761
765
|
}
|
|
762
766
|
|
|
763
767
|
this.status.lastScanTime = Date.now();
|
package/src/main.ts
CHANGED
|
@@ -1919,6 +1919,9 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
1919
1919
|
const distanceFeet = landmarkData.distanceFeet || 50; // Default 50ft if not set
|
|
1920
1920
|
const distanceInPixels = distanceFeet * floorPlanScale;
|
|
1921
1921
|
|
|
1922
|
+
// Debug: log the distance data to verify it's being used correctly
|
|
1923
|
+
this.console.log(`[Discovery] Landmark "${suggestion.landmark.name}" distance data: distanceFeet=${distanceFeet}, distance="${landmarkData.distance || 'not set'}", floorPlanScale=${floorPlanScale}, distanceInPixels=${distanceInPixels}`);
|
|
1924
|
+
|
|
1922
1925
|
// Use bounding box for horizontal positioning within the FOV
|
|
1923
1926
|
const bbox = landmarkData.boundingBox as [number, number, number, number] | undefined;
|
|
1924
1927
|
|