Functions | |
def | json_to_dict (json) |
def | log_settings_differences (data) |
Variables | |
depth_sensor = device.first_depth_sensor() | |
device = devices[0] | |
devices = test.find_devices_by_product_line_or_exit(rs.product_line.L500) | |
equal = test.check_equal(visual_preset_name, rs.l500_visual_preset.low_ambient_light) | |
string | low_ambient_data_with_default_preset |
This test checks backward compatibility to old json files that saved with default preset The default preset is deprecated but json files that saved with default preset should be supported Here, we expect the data to fit a pre-defined "low-ambient" preset Note that, because FW defines them, the defaults can change from version to version and we need to keep this up-to-date with the latest. More... | |
list | presets |
sd = rs.serializable_device(device) | |
serialized_json = sd.serialize_json() | |
visual_preset_name = rs.l500_visual_preset(int(visual_preset_number)) | |
visual_preset_number = depth_sensor.get_option(rs.option.visual_preset) | |
string | wrong_data_with_default_preset |
There is no default preset: so when one is specified, the code should calculate the preset! Here, we intentionally should not fit into any of the defined presets, and check that the result is CUSTOM. More... | |
string | wrong_data_with_low_ambient_preset |
Here, the json specifies a "low-ambient" preset – so the values of the individual controls (that are part of this preset) should not matter. More... | |
:param json: a string representing a json file :return: a dictionary with all settings
Definition at line 17 of file test-l500-json-load.py.
Definition at line 33 of file test-l500-json-load.py.
Definition at line 11 of file test-l500-json-load.py.
Definition at line 10 of file test-l500-json-load.py.
test-l500-json-load.devices = test.find_devices_by_product_line_or_exit(rs.product_line.L500) |
Definition at line 9 of file test-l500-json-load.py.
test-l500-json-load.equal = test.check_equal(visual_preset_name, rs.l500_visual_preset.low_ambient_light) |
Definition at line 107 of file test-l500-json-load.py.
This test checks backward compatibility to old json files that saved with default preset The default preset is deprecated but json files that saved with default preset should be supported Here, we expect the data to fit a pre-defined "low-ambient" preset Note that, because FW defines them, the defaults can change from version to version and we need to keep this up-to-date with the latest.
If the FW changes, this test will fail and output (in debug mode) any settings that changed...
Definition at line 65 of file test-l500-json-load.py.
Definition at line 218 of file test-l500-json-load.py.
Definition at line 12 of file test-l500-json-load.py.
Definition at line 227 of file test-l500-json-load.py.
test-l500-json-load.visual_preset_name = rs.l500_visual_preset(int(visual_preset_number)) |
Definition at line 15 of file test-l500-json-load.py.
Definition at line 14 of file test-l500-json-load.py.
There is no default preset: so when one is specified, the code should calculate the preset! Here, we intentionally should not fit into any of the defined presets, and check that the result is CUSTOM.
Definition at line 119 of file test-l500-json-load.py.
Here, the json specifies a "low-ambient" preset – so the values of the individual controls (that are part of this preset) should not matter.
The result of loading the following should still result in LOW_AMBIENT even when the controls do not fit (because they're overridden).
Definition at line 170 of file test-l500-json-load.py.