Skip to content

Commit

Permalink
[modules] dc: remove unused dc_probing
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Nov 24, 2014
1 parent 598ad67 commit c166aec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
15 changes: 0 additions & 15 deletions sw/airborne/modules/digital_cam/dc.c
Expand Up @@ -63,8 +63,6 @@ float dc_gps_next_dist = 0;
float dc_gps_x = 0;
float dc_gps_y = 0;

bool_t dc_probing = FALSE;

uint8_t dc_autoshoot_distance_interval;
uint8_t dc_autoshoot_quartersec_period;

Expand Down Expand Up @@ -160,7 +158,6 @@ uint8_t dc_circle(float interval, float start) {
//dc_circle_last_block = floorf(dc_circle_start_angle/dc_circle_interval);
dc_circle_last_block = 0;
dc_circle_max_blocks = floorf(360./dc_circle_interval);
dc_probing = TRUE;
dc_info();
return 0;
}
Expand Down Expand Up @@ -239,12 +236,6 @@ void dc_periodic_4Hz(void)
course += 360.;
float current_block = floorf(course/dc_circle_interval);

if (dc_probing) {
if (current_block == dc_circle_last_block) {
dc_probing = FALSE;
}
}

if (dim_mod(current_block, dc_circle_last_block, dc_circle_max_blocks) == 1) {
dc_gps_count++;
dc_circle_last_block = current_block;
Expand All @@ -258,12 +249,6 @@ void dc_periodic_4Hz(void)
float dist_x = dc_gps_x - stateGetPositionEnu_f()->x;
float dist_y = dc_gps_y - stateGetPositionEnu_f()->y;

if (dc_probing) {
if (dist_x*dist_x + dist_y*dist_y < dc_gps_dist*dc_gps_dist) {
dc_probing = FALSE;
}
}

if (dist_x*dist_x + dist_y*dist_y >= dc_gps_next_dist*dc_gps_next_dist) {
dc_gps_next_dist += dc_gps_dist;
dc_gps_count++;
Expand Down
2 changes: 0 additions & 2 deletions sw/airborne/modules/digital_cam/dc.h
Expand Up @@ -66,8 +66,6 @@ extern float dc_gps_x, dc_gps_y;

extern float dc_circle_last_block;

extern bool_t dc_probing;

extern uint8_t dc_buffer_timer;

/** camera angle */
Expand Down

0 comments on commit c166aec

Please sign in to comment.