Skip to content

Commit

Permalink
camera_trigger replace math::Vector with matrix::Vector
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Mar 21, 2018
1 parent ac72429 commit c3861c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/drivers/camera_trigger/camera_trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class CameraTrigger
bool _one_shot;
bool _test_shot;
bool _turning_on;
math::Vector<2> _last_shoot_position;
matrix::Vector2f _last_shoot_position;
bool _valid_position;

int _command_sub;
Expand Down Expand Up @@ -366,7 +366,7 @@ CameraTrigger::update_distance()
if (local.xy_valid) {

// Initialize position if not done yet
math::Vector<2> current_position(local.x, local.y);
matrix::Vector2f current_position(local.x, local.y);

if (!_valid_position) {
// First time valid position, take first shot
Expand All @@ -376,7 +376,7 @@ CameraTrigger::update_distance()
}

// Check that distance threshold is exceeded
if ((_last_shoot_position - current_position).length() >= _distance) {
if (matrix::Vector2f(_last_shoot_position - current_position).length() >= _distance) {
shoot_once();
_last_shoot_position = current_position;

Expand Down

0 comments on commit c3861c1

Please sign in to comment.