mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
pybricks._common.IMU: Add rotation and orientation.
Also update implementation status for heading and reset_heading.
This commit is contained in:
committed by
laurensvalk
parent
8172d11ef6
commit
5b25606afa
@@ -79,7 +79,9 @@ def test_hub_dot_imu_dot():
|
||||
"acceleration",
|
||||
"angular_velocity",
|
||||
"heading",
|
||||
"orientation",
|
||||
"reset_heading",
|
||||
"rotation",
|
||||
"tilt",
|
||||
"up",
|
||||
]
|
||||
|
||||
@@ -97,7 +97,9 @@ def test_hub_dot_imu_dot():
|
||||
"acceleration",
|
||||
"angular_velocity",
|
||||
"heading",
|
||||
"orientation",
|
||||
"reset_heading",
|
||||
"rotation",
|
||||
"tilt",
|
||||
"up",
|
||||
]
|
||||
|
||||
@@ -67,7 +67,9 @@ def test_hub_dot_imu_dot():
|
||||
"acceleration",
|
||||
"angular_velocity",
|
||||
"heading",
|
||||
"orientation",
|
||||
"reset_heading",
|
||||
"rotation",
|
||||
"tilt",
|
||||
"up",
|
||||
]
|
||||
|
||||
@@ -308,12 +308,19 @@ METHOD_PARAMS = [
|
||||
[(["axis: Axis"], "float"), ([], "Matrix")],
|
||||
),
|
||||
pytest.param("pybricks.hubs", "TechnicHub", "imu.heading", [([], "float")]),
|
||||
pytest.param("pybricks.hubs", "TechnicHub", "imu.orientation", [([], "Matrix")]),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"TechnicHub",
|
||||
"imu.reset_heading",
|
||||
[(["angle: Number"], "None")],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"TechnicHub",
|
||||
"imu.rotation",
|
||||
[(["axis: Axis"], "float")],
|
||||
),
|
||||
pytest.param("pybricks.hubs", "TechnicHub", "battery.voltage", [([], "int")]),
|
||||
pytest.param("pybricks.hubs", "TechnicHub", "battery.current", [([], "int")]),
|
||||
pytest.param(
|
||||
@@ -400,12 +407,19 @@ METHOD_PARAMS = [
|
||||
[(["axis: Axis"], "float"), ([], "Matrix")],
|
||||
),
|
||||
pytest.param("pybricks.hubs", "PrimeHub", "imu.heading", [([], "float")]),
|
||||
pytest.param("pybricks.hubs", "PrimeHub", "imu.orientation", [([], "Matrix")]),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"PrimeHub",
|
||||
"imu.reset_heading",
|
||||
[(["angle: Number"], "None")],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"PrimeHub",
|
||||
"imu.rotation",
|
||||
[(["axis: Axis"], "float")],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"PrimeHub",
|
||||
@@ -483,12 +497,19 @@ METHOD_PARAMS = [
|
||||
[(["axis: Axis"], "float"), ([], "Matrix")],
|
||||
),
|
||||
pytest.param("pybricks.hubs", "EssentialHub", "imu.heading", [([], "float")]),
|
||||
pytest.param("pybricks.hubs", "EssentialHub", "imu.orientation", [([], "Matrix")]),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"EssentialHub",
|
||||
"imu.reset_heading",
|
||||
[(["angle: Number"], "None")],
|
||||
),
|
||||
pytest.param(
|
||||
"pybricks.hubs",
|
||||
"EssentialHub",
|
||||
"imu.rotation",
|
||||
[(["axis: Axis"], "float")],
|
||||
),
|
||||
pytest.param("pybricks.hubs", "EssentialHub", "battery.voltage", [([], "int")]),
|
||||
pytest.param("pybricks.hubs", "EssentialHub", "battery.current", [([], "int")]),
|
||||
pytest.param("pybricks.hubs", "EssentialHub", "charger.connected", [([], "bool")]),
|
||||
|
||||
Reference in New Issue
Block a user