@@ -29,8 +29,12 @@ class KeyboardController:
2929 - y - Land the drone.
3030 - p - Takes a photo.
3131 - z - Resets the gimbal camera position.
32- - x - Tilts the gimbal camera position 30 degrees.
33- - c - Tilts the gimbal camera position 90 degrees.
32+ - x - Tilts the gimbal camera position 15 degrees.
33+ - c - Tilts the gimbal camera position 30 degrees.
34+ - v - Tilts the gimbal camera position 45 degrees.
35+ - s - Tilts the gimbal camera position 60 degrees.
36+ - d - Tilts the gimbal camera position 75 degrees.
37+ - f - Tilts the gimbal camera position 90 degrees.
3438 """
3539
3640 MOVEMENT_KEYS : Final [dict [str , tuple [str , int ]]] = {
@@ -49,8 +53,12 @@ class KeyboardController:
4953 "y" : DroneCommand .LAND ,
5054 "p" : DroneCommand .PHOTO ,
5155 "z" : DroneCommand .TILT_RESET ,
52- "x" : DroneCommand .TILT_30 ,
53- "c" : DroneCommand .TILT_90 ,
56+ "x" : DroneCommand .TILT_15 ,
57+ "c" : DroneCommand .TILT_30 ,
58+ "v" : DroneCommand .TILT_45 ,
59+ "s" : DroneCommand .TILT_60 ,
60+ "d" : DroneCommand .TILT_75 ,
61+ "f" : DroneCommand .TILT_90 ,
5462 "q" : DroneCommand .EMERGENCY_STOP ,
5563 }
5664
@@ -143,8 +151,16 @@ def _execute_command(self, command: DroneCommand):
143151 self .logger .info ("Photo taken." )
144152 elif command == DroneCommand .TILT_RESET :
145153 self .commander .tilt_camera (pitch_deg = 0 , reference_type = GimbalType .REF_ABSOLUTE )
154+ elif command == DroneCommand .TILT_15 :
155+ self .commander .tilt_camera (pitch_deg = - 15 , reference_type = GimbalType .REF_ABSOLUTE )
146156 elif command == DroneCommand .TILT_30 :
147157 self .commander .tilt_camera (pitch_deg = - 30 , reference_type = GimbalType .REF_ABSOLUTE )
158+ elif command == DroneCommand .TILT_45 :
159+ self .commander .tilt_camera (pitch_deg = - 45 , reference_type = GimbalType .REF_ABSOLUTE )
160+ elif command == DroneCommand .TILT_60 :
161+ self .commander .tilt_camera (pitch_deg = - 60 , reference_type = GimbalType .REF_ABSOLUTE )
162+ elif command == DroneCommand .TILT_75 :
163+ self .commander .tilt_camera (pitch_deg = - 75 , reference_type = GimbalType .REF_ABSOLUTE )
148164 elif command == DroneCommand .TILT_90 :
149165 self .commander .tilt_camera (pitch_deg = - 90 , reference_type = GimbalType .REF_ABSOLUTE )
150166 elif command == DroneCommand .EMERGENCY_STOP :
0 commit comments