@@ -166,6 +166,7 @@ void *showPreferencesThread(void *arg)
166
166
{
167
167
enum state {
168
168
PREFS_BEGIN,
169
+ PREFS_OPTION_HELP,
169
170
PREFS_OPTION_CAMERA,
170
171
PREFS_OPTION_CALIB_SAVE,
171
172
PREFS_OPTION_CALIB_SAVE_DIR,
@@ -196,21 +197,22 @@ void *showPreferencesThread(void *arg)
196
197
const char prompt[] =
197
198
" Preferences\n "
198
199
" \n "
199
- " 1. Camera.\n "
200
- " 2. Save calibration on/off.\n "
201
- " 3. Save calibration destination directory.\n "
200
+ " 1. Help.\n "
201
+ " 2. Camera.\n "
202
+ " 3. Save calibration on/off.\n "
203
+ " 4. Save calibration destination directory.\n "
202
204
#if defined(ARTOOLKIT6_CSUU) && defined(ARTOOLKIT6_CSAT)
203
- " 4 . Upload calibration to artoolkit.org on/off.\n "
204
- " 5 . Calibration pattern type.\n "
205
- " 6 . Calibration pattern size.\n "
206
- " 7 . Calibration pattern spacing.\n "
205
+ " 5 . Upload calibration to artoolkit.org on/off.\n "
206
+ " 6 . Calibration pattern type.\n "
207
+ " 7 . Calibration pattern size.\n "
208
+ " 8 . Calibration pattern spacing.\n "
207
209
#else
208
- " 4 . Upload calibration to my server on/off.\n "
209
- " 5 . My calibration server URL.\n "
210
- " 6 . My calibration server authentication token.\n "
211
- " 7 . Calibration pattern type.\n "
212
- " 8 . Calibration pattern size.\n "
213
- " 9 . Calibration pattern spacing.\n "
210
+ " 5 . Upload calibration to my server on/off.\n "
211
+ " 6 . My calibration server URL.\n "
212
+ " 7 . My calibration server authentication token.\n "
213
+ " 8 . Calibration pattern type.\n "
214
+ " 9 . Calibration pattern size.\n "
215
+ " 10 . Calibration pattern spacing.\n "
214
216
#endif
215
217
" \n "
216
218
" Press [esc] to finish or type number and press [return] " ;
@@ -222,22 +224,33 @@ void *showPreferencesThread(void *arg)
222
224
state = PREFS_END;
223
225
} else {
224
226
free (inputa);
225
- if (inputi == 1 ) state = PREFS_OPTION_CAMERA;
226
- else if (inputi == 2 ) state = PREFS_OPTION_CALIB_SAVE;
227
- else if (inputi == 3 ) state = PREFS_OPTION_CALIB_SAVE_DIR;
228
- else if (inputi == 4 ) state = PREFS_OPTION_CALIB_UPLOAD;
227
+ if (inputi == 1 ) state = PREFS_OPTION_HELP;
228
+ else if (inputi == 2 ) state = PREFS_OPTION_CAMERA;
229
+ else if (inputi == 3 ) state = PREFS_OPTION_CALIB_SAVE;
230
+ else if (inputi == 4 ) state = PREFS_OPTION_CALIB_SAVE_DIR;
231
+ else if (inputi == 5 ) state = PREFS_OPTION_CALIB_UPLOAD;
229
232
#if defined(ARTOOLKIT6_CSUU) && defined(ARTOOLKIT6_CSAT)
230
- else if (inputi == 5 ) state = PREFS_OPTION_CALIB_PATT_TYPE;
231
- else if (inputi == 6 ) state = PREFS_OPTION_CALIB_PATT_SIZE;
232
- else if (inputi == 7 ) state = PREFS_OPTION_CALIB_PATT_SPACING;
233
+ else if (inputi == 6 ) state = PREFS_OPTION_CALIB_PATT_TYPE;
234
+ else if (inputi == 7 ) state = PREFS_OPTION_CALIB_PATT_SIZE;
235
+ else if (inputi == 8 ) state = PREFS_OPTION_CALIB_PATT_SPACING;
233
236
#else
234
- else if (inputi == 5 ) state = PREFS_OPTION_CSUU;
235
- else if (inputi == 6 ) state = PREFS_OPTION_CSAT;
236
- else if (inputi == 7 ) state = PREFS_OPTION_CALIB_PATT_TYPE;
237
- else if (inputi == 8 ) state = PREFS_OPTION_CALIB_PATT_SIZE;
238
- else if (inputi == 9 ) state = PREFS_OPTION_CALIB_PATT_SPACING;
237
+ else if (inputi == 6 ) state = PREFS_OPTION_CSUU;
238
+ else if (inputi == 7 ) state = PREFS_OPTION_CSAT;
239
+ else if (inputi == 8 ) state = PREFS_OPTION_CALIB_PATT_TYPE;
240
+ else if (inputi == 9 ) state = PREFS_OPTION_CALIB_PATT_SIZE;
241
+ else if (inputi == 10 ) state = PREFS_OPTION_CALIB_PATT_SPACING;
239
242
#endif
240
243
}
244
+ } else if (state == PREFS_OPTION_HELP) {
245
+ int ret = system (" which xdg-open" );
246
+ if (ret != 0 ) {
247
+ EdenMessageInput ((const unsigned char *)" Unable to open help (missing xdg-open command). Press [return] to continue. " , 0 , 0 , 0 , 0 , 0 );
248
+ inputa = EdenMessageInputGetInput ();
249
+ free (inputa);
250
+ } else {
251
+ system (" xdg-open https://github.com/artoolkit/ar6-wiki/wiki/Camera-calibration-Linux" );
252
+ }
253
+ state = PREFS_BEGIN;
241
254
} else if (state == PREFS_OPTION_CAMERA) {
242
255
ARVideoSourceInfoListT *sil = ar2VideoCreateSourceInfoList (" " );
243
256
if (!sil) {
0 commit comments