xp12camera

Owner: IIIlllIIIllI URL: git@github.com:nyangkosense/xp12camera.git

6

Commit f5689b1db201617d2427a45d9f4772dd2f4ce802 by SM <seb.michalk@gmail.com> on 2025-06-25 14:36:17 +0200
diff --git a/FLIR_Camera.cpp b/FLIR_Camera.cpp
index 346335f..a631582 100644
--- a/FLIR_Camera.cpp
+++ b/FLIR_Camera.cpp
@@ -497,7 +497,13 @@ static float GetDistanceToCamera(float x, float y, float z);
          
          if (gThermalMode == 1) {
              // White Hot mode - dark background with bright heat sources
-             glColor4f(0.0f, 0.0f, 0.1f, 0.7f);
+             if (callCount < 3) {
+            char debugMsg[256];
+            sprintf(debugMsg, "FLIR: Drawing thermal mode %d\n", gThermalMode);
+            XPLMDebugString(debugMsg);
+        }
+        
+        glColor4f(0.0f, 0.0f, 0.1f, 0.4f); // Make less opaque for testing
              glBegin(GL_QUADS);
              glVertex2f(0, 0);
              glVertex2f(screenWidth, 0);
@@ -506,7 +512,7 @@ static float GetDistanceToCamera(float x, float y, float z);
              glEnd();
          } else if (gThermalMode == 2) {
              // Enhanced mode - blue tint with enhanced contrast
-             glColor4f(0.1f, 0.3f, 0.6f, 0.5f);
+             glColor4f(0.1f, 0.3f, 0.6f, 0.3f); // Make less opaque for testing
              glBegin(GL_QUADS);
              glVertex2f(0, 0);
              glVertex2f(screenWidth, 0);
@@ -516,7 +522,33 @@ static float GetDistanceToCamera(float x, float y, float z);
          }
          
          // Draw realistic heat sources based on actual detected objects
-         DrawRealisticThermalOverlay();
+         // Draw some simple test heat sources first to verify basic thermal rendering
+        for (int i = 0; i < 4; i++) {
+            float x = (i + 1) * screenWidth / 5.0f;
+            float y = screenHeight / 2.0f;
+            
+            float size = 30.0f;
+            
+            if (gThermalMode == 1) {
+                // White hot - bright white
+                glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
+            } else {
+                // Enhanced mode - bright orange
+                glColor4f(1.0f, 0.8f, 0.0f, 0.9f);
+            }
+            
+            glBegin(GL_QUADS);
+            glVertex2f(x - size/2, y - size/2);
+            glVertex2f(x + size/2, y - size/2);
+            glVertex2f(x + size/2, y + size/2);
+            glVertex2f(x - size/2, y + size/2);
+            glEnd();
+        }
+        
+        // Draw realistic heat sources if we have any
+        if (gHeatSourceCount > 0) {
+            DrawRealisticThermalOverlay();
+        }
          
          // Also draw some simulated background thermal noise
          float time = XPLMGetElapsedTime();
diff --git a/FLIR_Camera.o b/FLIR_Camera.o
index b42eba3..d2e9fbb 100644
Binary files a/FLIR_Camera.o and b/FLIR_Camera.o differ
diff --git a/build/FLIR_Camera/win_x64/FLIR_Camera.xpl b/build/FLIR_Camera/win_x64/FLIR_Camera.xpl
index 85a341e..c4e58d7 100755
Binary files a/build/FLIR_Camera/win_x64/FLIR_Camera.xpl and b/build/FLIR_Camera/win_x64/FLIR_Camera.xpl differ