xp12camera

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

remove arrow key steering

Commit 408bea4baf14e8200903a7b456e3252f8d7f105a by SM <seb.michalk@gmail.com> on 2025-08-20 09:08:37 +0200
diff --git a/FLIR_Camera.cpp b/FLIR_Camera.cpp
index 4ab6981..a91b274 100644
--- a/FLIR_Camera.cpp
+++ b/FLIR_Camera.cpp
@@ -48,10 +48,6 @@
 static XPLMHotKeyID gActivateKey = NULL;
 static XPLMHotKeyID gZoomInKey = NULL;
 static XPLMHotKeyID gZoomOutKey = NULL;
-static XPLMHotKeyID gPanLeftKey = NULL;
-static XPLMHotKeyID gPanRightKey = NULL;
-static XPLMHotKeyID gTiltUpKey = NULL;
-static XPLMHotKeyID gTiltDownKey = NULL;
 static XPLMHotKeyID gThermalToggleKey = NULL;
 static XPLMHotKeyID gFocusLockKey = NULL;
 
@@ -76,10 +72,6 @@ static float gMouseSensitivity = 0.2f;
 static void ActivateFLIRCallback(void* inRefcon);
 static void ZoomInCallback(void* inRefcon);
 static void ZoomOutCallback(void* inRefcon);
-static void PanLeftCallback(void* inRefcon);
-static void PanRightCallback(void* inRefcon);
-static void TiltUpCallback(void* inRefcon);
-static void TiltDownCallback(void* inRefcon);
 static void ThermalToggleCallback(void* inRefcon);
 static void FocusLockCallback(void* inRefcon);
 static int FLIRCameraFunc(XPLMCameraPosition_t* outCameraPosition, int inIsLosingControl, void* inRefcon);
@@ -105,10 +97,6 @@ PLUGIN_API int XPluginStart(char* outName, char* outSig, char* outDesc)
     gActivateKey = XPLMRegisterHotKey(XPLM_VK_F9, xplm_DownFlag, "Activate FLIR Camera", ActivateFLIRCallback, NULL);
     gZoomInKey = XPLMRegisterHotKey(XPLM_VK_EQUAL, xplm_DownFlag, "FLIR Zoom In", ZoomInCallback, NULL);
     gZoomOutKey = XPLMRegisterHotKey(XPLM_VK_MINUS, xplm_DownFlag, "FLIR Zoom Out", ZoomOutCallback, NULL);
-    gPanLeftKey = XPLMRegisterHotKey(XPLM_VK_LEFT, xplm_DownFlag, "FLIR Pan Left", PanLeftCallback, NULL);
-    gPanRightKey = XPLMRegisterHotKey(XPLM_VK_RIGHT, xplm_DownFlag, "FLIR Pan Right", PanRightCallback, NULL);
-    gTiltUpKey = XPLMRegisterHotKey(XPLM_VK_UP, xplm_DownFlag, "FLIR Tilt Up", TiltUpCallback, NULL);
-    gTiltDownKey = XPLMRegisterHotKey(XPLM_VK_DOWN, xplm_DownFlag, "FLIR Tilt Down", TiltDownCallback, NULL);
     gThermalToggleKey = XPLMRegisterHotKey(XPLM_VK_T, xplm_DownFlag, "FLIR Visual Effects Toggle", ThermalToggleCallback, NULL);
     gFocusLockKey = XPLMRegisterHotKey(XPLM_VK_SPACE, xplm_DownFlag, "FLIR Focus/Lock Target", FocusLockCallback, NULL);
 
@@ -119,10 +107,6 @@ PLUGIN_API void XPluginStop(void)
     if (gActivateKey) XPLMUnregisterHotKey(gActivateKey);
     if (gZoomInKey) XPLMUnregisterHotKey(gZoomInKey);
     if (gZoomOutKey) XPLMUnregisterHotKey(gZoomOutKey);
-    if (gPanLeftKey) XPLMUnregisterHotKey(gPanLeftKey);
-    if (gPanRightKey) XPLMUnregisterHotKey(gPanRightKey);
-    if (gTiltUpKey) XPLMUnregisterHotKey(gTiltUpKey);
-    if (gTiltDownKey) XPLMUnregisterHotKey(gTiltDownKey);
     if (gThermalToggleKey) XPLMUnregisterHotKey(gThermalToggleKey);
     if (gFocusLockKey) XPLMUnregisterHotKey(gFocusLockKey);
 
@@ -236,39 +220,6 @@ static float GetZoomBasedSensitivity(float baseSpeed)
     return fmaxf(finalSensitivity, minSensitivity);
 }
 
-static void PanLeftCallback(void* inRefcon)
-{
-    if (gCameraActive && !IsSimpleLockActive()) {
-        float speed = GetZoomBasedSensitivity(0.5f);
-        gCameraPan -= speed;
-        if (gCameraPan < -180.0f) gCameraPan += 360.0f;
-    }
-}
- 
-static void PanRightCallback(void* inRefcon)
-{
-    if (gCameraActive && !IsSimpleLockActive()) {
-        float speed = GetZoomBasedSensitivity(0.5f);
-        gCameraPan += speed;
-        if (gCameraPan > 180.0f) gCameraPan -= 360.0f;
-    }
-}
- 
-static void TiltUpCallback(void* inRefcon)
-{
-    if (gCameraActive && !IsSimpleLockActive()) {
-        float speed = GetZoomBasedSensitivity(0.5f);
-        gCameraTilt = fminf(gCameraTilt + speed, 45.0f);
-    }
-}
- 
-static void TiltDownCallback(void* inRefcon)
-{
-    if (gCameraActive && !IsSimpleLockActive()) {
-        float speed = GetZoomBasedSensitivity(0.5f);
-        gCameraTilt = fmaxf(gCameraTilt - speed, -90.0f);
-    }
-}
  
 static void ThermalToggleCallback(void* inRefcon)
 {
diff --git a/FLIR_Camera.o b/FLIR_Camera.o
index d65f985..d61a464 100644
Binary files a/FLIR_Camera.o and b/FLIR_Camera.o differ
diff --git a/README.md b/README.md
index 76fafad..1a9e58a 100644
--- a/README.md
+++ b/README.md
@@ -11,10 +11,10 @@ Features
 --------
 - Belly-mounted camera positioning under aircraft
 - True optical zoom (1x-64x range)
-- Pan/tilt controls via mouse or keyboard
+- Pan/tilt controls via mouse
 - Target lock system with visual feedback
 - Multiple visual modes: standard, monochrome, thermal, IR
-- Military-style HUD overlay with telemetry (lua script)
+- (OPTIONAL) Military-style HUD overlay with telemetry (lua script / FlyWithLua)
 - Camera noise and scan line effects
 - Real-time flight data display
 
@@ -22,7 +22,6 @@ Controls
 --------
 F9      - Toggle FLIR camera on/off
 +/-     - Zoom in/out
-Arrows  - Pan/tilt camera
 Space   - Lock/unlock target
 T       - Cycle visual modes
 Mouse   - Pan/tilt when unlocked
diff --git a/build/FLIR_Camera/win_x64/FLIR_Camera.xpl b/build/FLIR_Camera/win_x64/FLIR_Camera.xpl
index 9f064e0..3ccd587 100755
Binary files a/build/FLIR_Camera/win_x64/FLIR_Camera.xpl and b/build/FLIR_Camera/win_x64/FLIR_Camera.xpl differ