Complete the code to initialize the drone's firmware stability control.
firmware = DroneFirmware()
firmware.[1]()The start_stability_control method activates the firmware's stability system, which is essential for drone balance.
Complete the code to read sensor data for stability adjustments.
sensor_data = firmware.[1]()The read_sensors method collects data from the drone's sensors, which is crucial for stability control.
Fix the error in the code that updates motor speeds based on stability data.
firmware.update_motor_speeds([1])The method update_motor_speeds needs sensor data to adjust the motors for stability.
Fill both blanks to create a dictionary of motor adjustments for stability.
adjustments = {motor: [1] for motor, [2] in sensor_data.items() if motor.startswith('M')}The dictionary comprehension maps each motor to its speed correction using the correction value from sensor data.
Fill all three blanks to filter and apply stability corrections to motors.
corrected = {motor: speed * [1] for motor, speed in adjustments.items() if speed [2] [3]This code multiplies motor speeds by 0.95 if the speed is greater than 0, applying a slight reduction for stability.
