Skip to content

Commit

Permalink
preliminary fixing bias'
Browse files Browse the repository at this point in the history
  • Loading branch information
duguyue100 committed Nov 13, 2018
1 parent 4496547 commit ad474fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions pyaer/davis.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,30 +146,26 @@ def obtain_device_info(self, handle):
self.device_usb_bus_number = info.deviceUSBBusNumber
self.device_usb_device_address = info.deviceUSBDeviceAddress
self.device_string = info.deviceString
self.firmware_version = info.firmwareVersion
self.logic_version = info.logicVersion
self.device_is_master = info.deviceIsMaster
self.logic_clock = info.logicClock
self.adc_clock = info.adcClock
self.chip_id = info.chipID
self.device_is_master = info.deviceIsMaster
self.mux_has_statistics = info.muxHasStatistics
self.dvs_size_X = info.dvsSizeX
self.dvs_size_Y = info.dvsSizeY
self.dvs_has_pixel_filter = info.dvsHasPixelFilter
self.dvs_has_background_activity_filter = \
info.dvsHasBackgroundActivityFilter
self.dvs_has_test_event_generator = info.dvsHasTestEventGenerator
self.dvs_has_ROI_filter = info.dvsHasROIFilter
self.dvs_has_skip_filter = info.dvsHasSkipFilter
self.dvs_has_polarity_filter = info.dvsHasPolarityFilter
self.dvs_has_statistics = info.dvsHasStatistics
self.aps_size_X = info.apsSizeX
self.aps_size_Y = info.apsSizeY
self.aps_color_filter = info.apsColorFilter
self.aps_has_global_shutter = info.apsHasGlobalShutter
self.aps_has_quad_ROI = info.apsHasQuadROI
self.aps_has_external_ADC = info.apsHasExternalADC
self.aps_has_internal_ADC = info.apsHasInternalADC
self.imu_type = info.imuType
self.ext_input_has_generator = info.extInputHasGenerator
self.ext_input_has_extra_detectors = \
info.extInputHasExtraDetectors
self.dvs_has_ROI_filter = info.dvsHasROIFilter
self.dvs_has_statistics = info.dvsHasStatistics
self.mux_has_statistics = info.muxHasStatistics

def open(self,
device_id=1,
Expand Down Expand Up @@ -257,7 +253,13 @@ def set_bias(self, bias_obj):
libcaer.DAVIS_CONFIG_DVS_RUN,
bias_obj["dvs_enabled"])
self.set_config(libcaer.DAVIS_CONFIG_IMU,
libcaer.DAVIS_CONFIG_IMU_RUN,
libcaer.DAVIS_CONFIG_IMU_RUN_ACCELEROMETER,
bias_obj["imu_enabled"])
self.set_config(libcaer.DAVIS_CONFIG_IMU,
libcaer.DAVIS_CONFIG_IMU_RUN_GYROSCOPE,
bias_obj["imu_enabled"])
self.set_config(libcaer.DAVIS_CONFIG_IMU,
libcaer.DAVIS_CONFIG_IMU_RUN_TEMPERATURE,
bias_obj["imu_enabled"])

# global settings for APS
Expand All @@ -268,8 +270,8 @@ def set_bias(self, bias_obj):
libcaer.DAVIS_CONFIG_APS_EXPOSURE,
bias_obj["exposure"])
self.set_config(libcaer.DAVIS_CONFIG_APS,
libcaer.DAVIS_CONFIG_APS_FRAME_DELAY,
bias_obj["frame_delay"])
libcaer.DAVIS_CONFIG_APS_FRAME_INTERVAL,
bias_obj["frame_interval"])

# setting for noise filter
if self.filter_noise is True:
Expand Down
2 changes: 1 addition & 1 deletion scripts/configs/davis240c_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"dvs_enabled": true,
"exposure": 4000,
"autoexposure": true,
"frame_delay": 0,
"frame_interval": 0,
"imu_enabled": true,
"imu_acc_scale": 3,
"imu_gyro_scale": 3,
Expand Down
2 changes: 1 addition & 1 deletion scripts/configs/davis346_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dvs_enabled": true,
"exposure": 4000,
"autoexposure": true,
"frame_delay": 0,
"frame_interval": 0,
"imu_enabled": true,
"imu_acc_scale": 3,
"imu_gyro_scale": 3,
Expand Down

0 comments on commit ad474fe

Please sign in to comment.