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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def adjust_volume(volume_diff=None, set_value=None):
|
| 2 |
+
"""
|
| 3 |
+
Adjusts the device's volume by a specified difference or sets it to a specified value. Only one operation can be performed at a time.
|
| 4 |
+
|
| 5 |
+
Parameters:
|
| 6 |
+
- volume_diff (int, optional): The amount to adjust the current volume by. Positive to increase, negative to decrease, optional to provide.
|
| 7 |
+
- set_value (int, optional): The target volume level to set, in the range of 0 to 50, optional to provide.
|
| 8 |
+
|
| 9 |
+
Note:
|
| 10 |
+
- If both `volume_diff` and `set_value` are provided, only one will be considered based on the implementation's logic.
|
| 11 |
+
|
| 12 |
+
Returns:
|
| 13 |
+
- bool: True if the volume was adjusted successfully, False otherwise.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
def set_climate_temperature(zone, temperature):
|
| 17 |
+
"""
|
| 18 |
+
Configures the temperature for a specific zone within the vehicle's climate control system.
|
| 19 |
+
|
| 20 |
+
Parameters:
|
| 21 |
+
- zone (str): The zone to set the temperature for ('driver', 'passenger', 'rear').
|
| 22 |
+
- temperature (int): The target temperature in Fahrenheit, within the range of 60 to 80 degrees.
|
| 23 |
+
|
| 24 |
+
Returns:
|
| 25 |
+
- bool: True if the temperature was set successfully, False otherwise.
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
def adjust_seat_position(seat, position, distance):
|
| 29 |
+
"""
|
| 30 |
+
Modifies the position of a specified seat by a certain distance.
|
| 31 |
+
|
| 32 |
+
Parameters:
|
| 33 |
+
- seat (str): The seat identifier ('driver', 'passenger').
|
| 34 |
+
- position (str): The direction to adjust the seat in ('forward', 'backward', 'up', 'down').
|
| 35 |
+
- distance (int): The amount of adjustment in millimeters.
|
| 36 |
+
|
| 37 |
+
Returns:
|
| 38 |
+
- bool: True if the seat was adjusted successfully, False otherwise.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
def control_window(window, position, distance):
|
| 42 |
+
"""
|
| 43 |
+
Adjusts a vehicle window's position by a specific distance.
|
| 44 |
+
|
| 45 |
+
Parameters:
|
| 46 |
+
- window (str): The window to control ('front left', 'front right', 'rear left', 'rear right').
|
| 47 |
+
- position (str): The direction to move the window ('up' or 'down').
|
| 48 |
+
- distance (int): The distance to move the window, in millimeters.
|
| 49 |
+
|
| 50 |
+
Returns:
|
| 51 |
+
- bool: True if the window was adjusted successfully, False otherwise.
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
def operate_sunroof(action, intensity=None):
|
| 55 |
+
"""
|
| 56 |
+
Operates the sunroof with a specified action and optional intensity.
|
| 57 |
+
|
| 58 |
+
Parameters:
|
| 59 |
+
- action (str): The sunroof operation to perform ('open', 'close', 'tilt').
|
| 60 |
+
- intensity (int, optional): The degree to which the sunroof should be opened or tilted, as a percentage, optional to provide.
|
| 61 |
+
|
| 62 |
+
Returns:
|
| 63 |
+
- bool: True if the sunroof was operated successfully, False otherwise.
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
def toggle_interior_lights(light, state):
|
| 67 |
+
"""
|
| 68 |
+
Changes the state of selected interior lights.
|
| 69 |
+
|
| 70 |
+
Parameters:
|
| 71 |
+
- light (str): The interior light to toggle ('dome', 'reading').
|
| 72 |
+
- state (bool): The desired state of the light (True for on, False for off).
|
| 73 |
+
|
| 74 |
+
Returns:
|
| 75 |
+
- bool: True if the light state was changed successfully, False otherwise.
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
def activate_seat_heater(seat, level):
|
| 79 |
+
"""
|
| 80 |
+
Activates the heating feature for a specified seat at a given level.
|
| 81 |
+
|
| 82 |
+
Parameters:
|
| 83 |
+
- seat (str): The seat to activate the heater in ('driver', 'passenger').
|
| 84 |
+
- level (int): The heating intensity level, from 1 to 3.
|
| 85 |
+
"""
|
| 86 |
+
|
| 87 |
+
def adjust_steering_wheel(position, distance):
|
| 88 |
+
"""
|
| 89 |
+
Adjusts the position of the steering wheel.
|
| 90 |
+
|
| 91 |
+
Parameters:
|
| 92 |
+
- position (str): The direction to adjust the steering wheel ('up', 'down', 'forward', 'backward').
|
| 93 |
+
- distance (int): The distance to adjust the steering wheel, in millimeters.
|
| 94 |
+
|
| 95 |
+
Returns:
|
| 96 |
+
- bool: True if the steering wheel was adjusted successfully, False otherwise.
|
| 97 |
+
"""
|
| 98 |
+
|
| 99 |
+
def set_ambient_lighting(color, brightness):
|
| 100 |
+
"""
|
| 101 |
+
Configures the ambient lighting of the vehicle.
|
| 102 |
+
|
| 103 |
+
Parameters:
|
| 104 |
+
- color (str): The color setting for the ambient light ('white', 'blue', 'green').
|
| 105 |
+
- brightness (int): The brightness level, from 1 to 5.
|
| 106 |
+
|
| 107 |
+
Returns:
|
| 108 |
+
- bool: True if the ambient lighting was set successfully, False otherwise.
|
| 109 |
+
"""
|
| 110 |
+
|
| 111 |
+
def change_media_source(source):
|
| 112 |
+
"""
|
| 113 |
+
Switches the current media source to the specified source.
|
| 114 |
+
|
| 115 |
+
Parameters:
|
| 116 |
+
- source (str): The media source to switch to ('radio', 'Bluetooth', 'USB').
|
| 117 |
+
|
| 118 |
+
Returns:
|
| 119 |
+
- bool: True if the media source was changed successfully, False otherwise.
|
| 120 |
+
"""
|
| 121 |
+
|
| 122 |
+
def navigate_media_tracks(direction):
|
| 123 |
+
"""
|
| 124 |
+
Navigates through media tracks in the current media source.
|
| 125 |
+
|
| 126 |
+
Parameters:
|
| 127 |
+
- direction (str): The direction to navigate ('next' or 'previous').
|
| 128 |
+
|
| 129 |
+
Returns:
|
| 130 |
+
- bool: True if the media tracks were navigated successfully, False otherwise.
|
| 131 |
+
"""
|
| 132 |
+
|
| 133 |
+
def set_navigation_destination(destination):
|
| 134 |
+
"""
|
| 135 |
+
Sets a destination in the vehicle's navigation system.
|
| 136 |
+
|
| 137 |
+
Parameters:
|
| 138 |
+
- destination (str): The address or location to navigate to.
|
| 139 |
+
|
| 140 |
+
Returns:
|
| 141 |
+
- bool: True if the destination was set successfully, False otherwise.
|
| 142 |
+
"""
|
| 143 |
+
|
| 144 |
+
def control_air_flow_direction(zone, direction):
|
| 145 |
+
"""
|
| 146 |
+
Adjusts the direction of air flow in the climate control system for a specific zone.
|
| 147 |
+
|
| 148 |
+
Parameters:
|
| 149 |
+
- zone (str): The zone to adjust air flow direction ('driver', 'passenger', 'rear').
|
| 150 |
+
- direction (str): The air flow direction ('face', 'feet', 'windshield').
|
| 151 |
+
|
| 152 |
+
Returns:
|
| 153 |
+
- bool: True if the air flow direction was adjusted successfully, False otherwise.
|
| 154 |
+
"""
|
| 155 |
+
|
| 156 |
+
def toggle_door_locks(door, state):
|
| 157 |
+
"""
|
| 158 |
+
Changes the lock state of a specific door.
|
| 159 |
+
|
| 160 |
+
Parameters:
|
| 161 |
+
- door (str): The door whose lock state is to be toggled ('front left', 'front right', 'rear left', 'rear right').
|
| 162 |
+
- state (bool): The desired lock state (True to lock, False to unlock).
|
| 163 |
+
|
| 164 |
+
Returns:
|
| 165 |
+
- bool: True if the door lock state was changed successfully, False otherwise.
|
| 166 |
+
"""
|
| 167 |
+
|
| 168 |
+
def adjust_cabin_fragrance(level):
|
| 169 |
+
"""
|
| 170 |
+
Modifies the intensity of the cabin fragrance system.
|
| 171 |
+
|
| 172 |
+
Parameters:
|
| 173 |
+
- level (int): The fragrance intensity level, from 1 to 5.
|
| 174 |
+
|
| 175 |
+
Returns:
|
| 176 |
+
- bool: True if the fragrance level was adjusted successfully, False otherwise.
|
| 177 |
+
"""
|
| 178 |
+
|
| 179 |
+
def activate_parking_sensors(activate):
|
| 180 |
+
"""
|
| 181 |
+
Turns the parking sensors on or off.
|
| 182 |
+
|
| 183 |
+
Parameters:
|
| 184 |
+
- activate (bool): True to activate the sensors, False to deactivate them.
|
| 185 |
+
|
| 186 |
+
Returns:
|
| 187 |
+
- bool: True if the parking sensors were activated or deactivated successfully, False otherwise.
|
| 188 |
+
"""
|
| 189 |
+
|
| 190 |
+
def control_infotainment_brightness(level):
|
| 191 |
+
"""
|
| 192 |
+
Sets the brightness level of the infotainment system display.
|
| 193 |
+
|
| 194 |
+
Parameters:
|
| 195 |
+
- level (int): The desired brightness level, from 1 to 5.
|
| 196 |
+
|
| 197 |
+
Returns:
|
| 198 |
+
- bool: True if the brightness level was set successfully, False otherwise.
|
| 199 |
+
"""
|
| 200 |
+
|
| 201 |
+
def adjust_head_up_display(visibility):
|
| 202 |
+
"""
|
| 203 |
+
Toggles the visibility of the head-up display (HUD).
|
| 204 |
+
|
| 205 |
+
Parameters:
|
| 206 |
+
- visibility (bool): True to make the HUD visible, False to hide it.
|
| 207 |
+
|
| 208 |
+
Returns:
|
| 209 |
+
- bool: True if the HUD visibility was toggled successfully, False otherwise.
|
| 210 |
+
"""
|
| 211 |
+
|
| 212 |
+
def control_heated_steering_wheel(state):
|
| 213 |
+
"""
|
| 214 |
+
Activates or deactivates the heated steering wheel.
|
| 215 |
+
|
| 216 |
+
Parameters:
|
| 217 |
+
- state (bool): True to turn the heating on, False to turn it off.
|
| 218 |
+
|
| 219 |
+
Returns:
|
| 220 |
+
- bool: True if the heated steering wheel was activated or deactivated successfully, False otherwise.
|
| 221 |
+
"""
|
| 222 |
+
|
| 223 |
+
def adjust_footwell_lighting(color, brightness):
|
| 224 |
+
"""
|
| 225 |
+
Customizes the footwell lighting in terms of color and brightness.
|
| 226 |
+
|
| 227 |
+
Parameters:
|
| 228 |
+
- color (str): The color of the footwell lighting ('red', 'green', 'blue', 'white').
|
| 229 |
+
- brightness (int): The brightness level, from 1 to 5.
|
| 230 |
+
|
| 231 |
+
Returns:
|
| 232 |
+
- bool: True if the footwell lighting was adjusted successfully, False otherwise.
|
| 233 |
+
"""
|