diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-11-04 18:54:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-03-29 00:04:48 +0200 |
commit | e36a7f7fd5f64b7f2c2abafc87d96631d1aa3415 (patch) | |
tree | 9ab7f8f7364e0ae1f3e501160b1c1f41ffba2499 | |
parent | 70cf57b7d5a2cc2ea7365a0026c885de7d54bd37 (diff) |
tracker/trackhat: fix retry on timeout
Retrying is already handled in `set_regs()'.
-rw-r--r-- | tracker-trackhat/camera.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tracker-trackhat/camera.cpp b/tracker-trackhat/camera.cpp index c6639391..b662dcdf 100644 --- a/tracker-trackhat/camera.cpp +++ b/tracker-trackhat/camera.cpp @@ -72,15 +72,7 @@ pt_camera::result trackhat_camera::get_frame(pt_frame& frame_) if (sig.test_and_clear()) { set_pt_options(); - TH_ErrorCode status; - int i; - for (i = 0; i < 5; i++) - { - status = (TH_ErrorCode)init_regs(); - if (status != TH_FAILED_TO_SET_REGISTER) - break; - } - if (i == 5) + if (!init_regs()) goto error; } |