Skip to content

device_orientation

clear_device_orientation_override()

Clears the overridden Device Orientation.

Source code in zendriver/cdp/device_orientation.py
def clear_device_orientation_override() -> (
    typing.Generator[T_JSON_DICT, T_JSON_DICT, None]
):
    """
    Clears the overridden Device Orientation.
    """
    cmd_dict: T_JSON_DICT = {
        "method": "DeviceOrientation.clearDeviceOrientationOverride",
    }
    json = yield cmd_dict

set_device_orientation_override(alpha, beta, gamma)

Overrides the Device Orientation.

Parameters:

Name Type Description Default
alpha float

Mock alpha

required
beta float

Mock beta

required
gamma float

Mock gamma

required
Source code in zendriver/cdp/device_orientation.py
def set_device_orientation_override(
    alpha: float, beta: float, gamma: float
) -> typing.Generator[T_JSON_DICT, T_JSON_DICT, None]:
    """
    Overrides the Device Orientation.

    :param alpha: Mock alpha
    :param beta: Mock beta
    :param gamma: Mock gamma
    """
    params: T_JSON_DICT = dict()
    params["alpha"] = alpha
    params["beta"] = beta
    params["gamma"] = gamma
    cmd_dict: T_JSON_DICT = {
        "method": "DeviceOrientation.setDeviceOrientationOverride",
        "params": params,
    }
    json = yield cmd_dict