summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-trackhat/settings.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tracker-trackhat/settings.cpp b/tracker-trackhat/settings.cpp
index 0ecca16d..eeec97ee 100644
--- a/tracker-trackhat/settings.cpp
+++ b/tracker-trackhat/settings.cpp
@@ -119,7 +119,17 @@ bool trackhat_camera::init_regs()
int i = 0;
for (i = 0; i < max; i++)
{
- auto status = th_check(trackHat_SetRegisterGroupValue(&*device, &regs));
+ TH_ErrorCode status = TH_SUCCESS;
+#if 1
+ for (trackHat_SetRegister_t& reg : regs.setRegisterGroupValue)
+ {
+ status = th_check(trackHat_SetRegisterValue(&*device, &reg));
+ if (status)
+ break;
+ }
+#else
+ status = th_check(trackHat_SetRegisterGroupValue(&*device, &regs));
+#endif
if (status == TH_SUCCESS)
break;
else if (status != TH_FAILED_TO_SET_REGISTER &&