Skip to content
Snippets Groups Projects
Commit 5f0bac6f authored by co3050-12_user's avatar co3050-12_user
Browse files

wip: fixed a couple issues with opticla flow reading.

parent 49331ebf
No related branches found
No related tags found
No related merge requests found
...@@ -483,7 +483,6 @@ int control_algorithm_init(parameter_t * ps) ...@@ -483,7 +483,6 @@ int control_algorithm_init(parameter_t * ps)
//Optical flow //Optical flow
graph_set_param_val(graph, ps->flow_vel_x, CONST_SET, sensor_struct->optical_flow.xVel); graph_set_param_val(graph, ps->flow_vel_x, CONST_SET, sensor_struct->optical_flow.xVel);
graph_set_param_val(graph, ps->flow_vel_y, CONST_SET, sensor_struct->optical_flow.yVel); graph_set_param_val(graph, ps->flow_vel_y, CONST_SET, sensor_struct->optical_flow.yVel);
graph_set_param_val(graph, ps->flow_distance, CONST_SET, sensor_struct->optical_flow.distance);
graph_set_param_val(graph, ps->flow_vel_x_filt, CONST_SET, sensor_struct->optical_flow.xVelFilt); graph_set_param_val(graph, ps->flow_vel_x_filt, CONST_SET, sensor_struct->optical_flow.xVelFilt);
graph_set_param_val(graph, ps->flow_vel_y_filt, CONST_SET, sensor_struct->optical_flow.yVelFilt); graph_set_param_val(graph, ps->flow_vel_y_filt, CONST_SET, sensor_struct->optical_flow.yVelFilt);
......
...@@ -17,7 +17,7 @@ int zybo_optical_flow_read(struct OpticalFlowDriver *self, px4flow_t *of) { ...@@ -17,7 +17,7 @@ int zybo_optical_flow_read(struct OpticalFlowDriver *self, px4flow_t *of) {
struct I2CDriver *i2c = self->i2c; struct I2CDriver *i2c = self->i2c;
int error = 0; int error = 0;
typedef struct i2c_integral_frame struct i2c_integral_frame
{ {
uint16_t frame_count_since_last_readout;//number of flow measurements since last I2C readout [#frames] uint16_t frame_count_since_last_readout;//number of flow measurements since last I2C readout [#frames]
int16_t pixel_flow_x_integral;//accumulated flow in radians*10000 around x axis since last I2C readout [rad*10000] int16_t pixel_flow_x_integral;//accumulated flow in radians*10000 around x axis since last I2C readout [rad*10000]
......
...@@ -48,7 +48,7 @@ int main() ...@@ -48,7 +48,7 @@ int main()
#ifdef RUN_TESTS #ifdef RUN_TESTS
//test_zybo_mio7_led_and_system(); //test_zybo_mio7_led_and_system();
//test_zybo_i2c(); //test_zybo_i2c();
test_zybo_i2c_imu(); //test_zybo_i2c_imu();
//test_zybo_i2c_px4flow(); //test_zybo_i2c_px4flow();
//test_zybo_i2c_lidar(); //test_zybo_i2c_lidar();
//test_zybo_i2c_all(); //test_zybo_i2c_all();
...@@ -56,7 +56,7 @@ int main() ...@@ -56,7 +56,7 @@ int main()
//test_zybo_motors(); //test_zybo_motors();
//test_zybo_uart(); //test_zybo_uart();
//test_zybo_axi_timer(); //test_zybo_axi_timer();
test_zybo_uart_comm(); //test_zybo_uart_comm();
return 0; return 0;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment