generic_ec_component_accel_examples¶
Examples for testing ec_component_accel components. ec_component_accel is called “Accelerometer/IMU” in AVL.
Inherit¶
BaseAccelerometersCalibrationByEC¶
run_if¶
not constants.has_device_data or device.component.has_base_accelerometer
pytest_name¶
args¶
device_name
"cros-ec-accel"
device_location
"base"
raw_entry_template
"in_accel_%s_raw"
calibbias_entry_template
"in_accel_%s_calibbias"
vpd_entry_template
"in_accel_%s_base_calibbias"
BaseAccelerometersLooserLimits¶
run_if¶
not constants.has_device_data or device.component.has_base_accelerometer
pytest_name¶
args¶
location
"base"
limits
{ "x": [ -1.0, 1.0 ], "y": [ -1.0, 1.0 ], "z": [ 8.0, 11.0 ] }
GoToTabletModeAndGoBack¶
run_if¶
not constants.has_device_data or device.component.has_tabletmode
pytest_name¶
args¶
timeout_secs
3600
prompt_flip_tablet
true
prompt_flip_notebook
true
lid_filter
"cros_ec_buttons"
GoToTabletModeAndGoBackSetLid¶
run_if¶
not constants.has_device_data or device.component.has_tabletmode
pytest_name¶
args¶
timeout_secs
3600
prompt_flip_tablet
true
prompt_flip_notebook
true
lid_filter
"Lid Switch"
GyroscopeCalibrationByEC¶
run_if¶
not constants.has_device_data or device.component.has_base_gyroscope
pytest_name¶
args¶
device_name
"cros-ec-gyro"
device_location
"base"
raw_entry_template
"in_anglvel_%s_raw"
calibbias_entry_template
"in_anglvel_%s_calibbias"
vpd_entry_template
"in_anglvel_%s_base_calibbias"
LidAccelerometersCalibrationByEC¶
run_if¶
not constants.has_device_data or device.component.has_lid_accelerometer
pytest_name¶
args¶
device_name
"cros-ec-accel"
device_location
"lid"
raw_entry_template
"in_accel_%s_raw"
calibbias_entry_template
"in_accel_%s_calibbias"
vpd_entry_template
"in_accel_%s_lid_calibbias"
SetHasBaseAccelerometer¶
pytest_name¶
args¶
commands
"factory device-data component.has_base_accelerometer=1"
SetHasBaseGyroscope¶
pytest_name¶
args¶
commands
"factory device-data component.has_base_gyroscope=1"
SetHasLidAccelerometer¶
pytest_name¶
args¶
commands
"factory device-data component.has_lid_accelerometer=1"
SetHasTabletmode¶
pytest_name¶
args¶
commands
"factory device-data component.has_tabletmode=1"
TabletRotationBase¶
run_if¶
constants.has_device_data and device.component.has_base_accelerometer
pytest_name¶
args¶
spec_offset
[ 1.5, 1.5 ]
timeout_secs
3600
degrees_to_orientations
{ "base": { "0": { "in_accel_x": 0, "in_accel_y": -1, "in_accel_z": 0 }, "180": { "in_accel_x": 0, "in_accel_y": 1, "in_accel_z": 0 }, "270": { "in_accel_x": -1, "in_accel_y": 0, "in_accel_z": 0 }, "90": { "in_accel_x": 1, "in_accel_y": 0, "in_accel_z": 0 } } }
TabletRotationLid¶
run_if¶
constants.has_device_data and device.component.has_lid_accelerometer
pytest_name¶
args¶
spec_offset
[ 1.5, 1.5 ]
timeout_secs
3600
degrees_to_orientations
{ "lid": { "0": { "in_accel_x": 0, "in_accel_y": 1, "in_accel_z": 0 }, "180": { "in_accel_x": 0, "in_accel_y": -1, "in_accel_z": 0 }, "270": { "in_accel_x": -1, "in_accel_y": 0, "in_accel_z": 0 }, "90": { "in_accel_x": 1, "in_accel_y": 0, "in_accel_z": 0 } } }
UnsetHasBaseAccelerometer¶
pytest_name¶
args¶
commands
"factory device-data component.has_base_accelerometer=0"
UnsetHasBaseGyroscope¶
pytest_name¶
args¶
commands
"factory device-data component.has_base_gyroscope=0"
UnsetHasLidAccelerometer¶
pytest_name¶
args¶
commands
"factory device-data component.has_lid_accelerometer=0"
UnsetHasTabletmode¶
pytest_name¶
args¶
commands
"factory device-data component.has_tabletmode=0"
AccelerometerIMUTests¶
Serial subtests¶
BaseAccelerometersCalibration
BaseAccelerometers
LidAccelerometersCalibration
LidAccelerometers
AccelerometersLidAngle
GyroscopeCalibration
Gyroscope
GyroscopeAngle
TabletRotation
ScreenRotation¶
run_if¶
not constants.has_device_data or device.component.has_tabletmode
Serial subtests¶
TabletMode
TabletRotationAll
NotebookMode