Set IMU pin as input pin when using camera
If we don't set this as an input, it interferes with our PWM signal
Also, setting LED duty_cycle to 0.25, to make it less blinding
Change-Id: I6660273753b42141bf72b6617b06d15a4f97071f
Signed-off-by: Jim Ostrowski <yimmy13@gmail.com>
diff --git a/y2022/vision/camera_reader.h b/y2022/vision/camera_reader.h
index 2a0bfbc..d3dd202 100644
--- a/y2022/vision/camera_reader.h
+++ b/y2022/vision/camera_reader.h
@@ -39,6 +39,7 @@
target_estimate_sender_(
event_loop->MakeSender<TargetEstimate>("/camera")),
read_image_timer_(event_loop->AddTimer([this]() { ReadImage(); })),
+ gpio_imu_pin_(GPIOControl(GPIO_PIN_SCLK_IMU, kGPIOIn)),
gpio_pwm_control_(GPIOPWMControl(GPIO_PIN_SCK_PWM, duty_cycle_)),
gpio_disable_control_(
GPIOControl(GPIO_PIN_MOSI_DISABLE, kGPIOOut, kGPIOLow)) {
@@ -100,6 +101,7 @@
aos::TimerHandler *const read_image_timer_;
double duty_cycle_ = 0.0;
+ GPIOControl gpio_imu_pin_;
GPIOPWMControl gpio_pwm_control_;
GPIOControl gpio_disable_control_;
};