summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco/ftnoir_tracker_aruco.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-03-29 12:40:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2020-03-29 12:40:24 +0200
commit4ed107dcc0889d8267d9a69bb6077576f81790ce (patch)
tree4fccd8bc12bcee8ab12dfd938c4432da98935d49 /tracker-aruco/ftnoir_tracker_aruco.cpp
parent8babfb4caff1c32d74a4f58d28eba13bd3b23f21 (diff)
tracker/aruco: add 720p to dropbox
Fixes #1062
Diffstat (limited to 'tracker-aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 0cdf4c2c..6e94e618 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -56,6 +56,7 @@ static const resolution_tuple resolution_choices[] =
{
{ 640, 480 },
{ 320, 240 },
+ { 1280, 720 },
{ 0, 0 }
};
@@ -157,9 +158,7 @@ static int enum_to_fps(int value)
bool aruco_tracker::open_camera()
{
- int rint = s.resolution;
- if (rint < 0 || rint >= (int)(sizeof(resolution_choices) / sizeof(resolution_tuple)))
- rint = 0;
+ int rint = std::clamp(*s.resolution, 0, (int)std::size(resolution_choices)-1);
resolution_tuple res = resolution_choices[rint];
int fps = enum_to_fps(s.force_fps);