Skip to content

Commit 54946f1

Browse files
committed
Merge branch 'master' into canonical
* master: Uploading distortion model v5 parameter files requires bumping required server version. Move version number setting out of fileUploader so it can be set based on the distortion model version.
2 parents 9d1badf + e39c2b0 commit 54946f1

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

Linux/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ include_directories(${ARTOOLKITX_HOME}/Source/depends/linux/include)
115115
include(${ARTOOLKITX_HOME}/SDK/lib/ARX/ARX.cmake)
116116

117117
set(SOURCE
118+
../version.h
118119
../calib_camera.cpp
119120
../calib_camera.h
120121
../Calibration.hpp

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Get our location.
1414
OURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1515

16-
SDK_VERSION='1.0.2'
16+
SDK_VERSION='1.0.3'
1717
# If the tiny version number is 0, drop it.
1818
SDK_VERSION_PRETTY=`echo -n "${SDK_VERSION}" | sed -E -e 's/([0-9]+\.[0-9]+)\.0/\1/'`
1919
SDK_URL_DIR="https://github.com/artoolkitx/artoolkitx/releases/download/${SDK_VERSION_PRETTY}/"

calib_camera.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,9 @@ static void saveParam(const ARParam *param, ARdouble err_min, ARdouble err_avg,
12261226
goodWrite = false;
12271227
}
12281228

1229+
// Add a version to the request. "2" if sending a v5 distortion function file, "1" otherwise.
1230+
if (goodWrite) fprintf(fp, "version,%d\n", param->dist_function_version == 5 ? 2 : 1);
1231+
12291232
// File name.
12301233
if (goodWrite) fprintf(fp, "file,%s\n", paramPathname);
12311234

fileUploader.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,6 @@ static void *fileUploader(THREAD_HANDLE_T *threadHandle)
343343
break;
344344
}
345345

346-
// Add a version to the request.
347-
curl_formadd(&post, &last, CURLFORM_COPYNAME, "version", CURLFORM_COPYCONTENTS, "1", CURLFORM_END);
348-
349346
curlErr = curl_easy_setopt(curlHandle, CURLOPT_HTTPPOST, post); // Automatically sets CURLOPT_NOBODY to 0.
350347
if (curlErr != CURLE_OK) {
351348
ARLOGe("Error setting CURL form data: %s (%d)\n", curl_easy_strerror(curlErr), curlErr);

iOS/ARViewController.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,9 @@ - (void) saveParam2:(const ARParam *)param err_min:(ARdouble)err_min err_avg:(AR
11611161
goodWrite = false;
11621162
}
11631163

1164+
// Add a version to the request. "2" if sending a v5 distortion function file, "1" otherwise.
1165+
if (goodWrite) fprintf(fp, "version,%d\n", param->dist_function_version == 5 ? 2 : 1);
1166+
11641167
// File name.
11651168
if (goodWrite) fprintf(fp, "file,%s\n", paramPathname);
11661169

iOS/artoolkitX Camera Calibration Utility.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
/* End PBXBuildFile section */
6969

7070
/* Begin PBXFileReference section */
71+
4A01554A21645B3D00FE1CE5 /* version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = version.h; path = ../version.h; sourceTree = "<group>"; };
72+
4A01554B21645B3D00FE1CE5 /* readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = readme.md; path = ../readme.md; sourceTree = "<group>"; };
7173
4A0AB67F1E81DA6900F6EBB9 /* ARViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARViewController.h; sourceTree = "<group>"; };
7274
4A0AB6801E81DA6900F6EBB9 /* ARViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ARViewController.mm; sourceTree = "<group>"; };
7375
4A0AB6821E81DFCE00F6EBB9 /* prefs.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = prefs.hpp; path = ../prefs.hpp; sourceTree = "<group>"; };
@@ -214,6 +216,7 @@
214216
isa = PBXGroup;
215217
children = (
216218
4A60A98F1EF367EF00BEBF8A /* user-config.xcconfig */,
219+
4A01554B21645B3D00FE1CE5 /* readme.md */,
217220
4A4793611E80CF24002C3631 /* Source */,
218221
4A47936F1E80CF9B002C3631 /* Resources */,
219222
4A4793961E80D072002C3631 /* Dependencies */,
@@ -233,6 +236,7 @@
233236
4A4793611E80CF24002C3631 /* Source */ = {
234237
isa = PBXGroup;
235238
children = (
239+
4A01554A21645B3D00FE1CE5 /* version.h */,
236240
4A47934D1E80CDBE002C3631 /* AppDelegate.h */,
237241
4A47934E1E80CDBE002C3631 /* AppDelegate.m */,
238242
4A0AB67F1E81DA6900F6EBB9 /* ARViewController.h */,

macOS/artoolkitX Camera Calibration Utility.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
/* End PBXCopyFilesBuildPhase section */
8181

8282
/* Begin PBXFileReference section */
83+
4A01554821645AF900FE1CE5 /* version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = version.h; path = ../version.h; sourceTree = "<group>"; };
84+
4A01554921645AFA00FE1CE5 /* readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = readme.md; path = ../readme.md; sourceTree = "<group>"; };
8385
4A0720F81E6637FE00084FB6 /* PrefsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PrefsWindow.xib; sourceTree = "<group>"; };
8486
4A0720FA1E663EBA00084FB6 /* PrefsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefsWindowController.h; sourceTree = "<group>"; };
8587
4A0720FB1E663EBA00084FB6 /* PrefsWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PrefsWindowController.mm; sourceTree = "<group>"; };
@@ -346,6 +348,7 @@
346348
isa = PBXGroup;
347349
children = (
348350
4A60A98E1EF3675000BEBF8A /* user-config.xcconfig */,
351+
4A01554921645AFA00FE1CE5 /* readme.md */,
349352
4A9142151DF6459900DF4FEE /* Source */,
350353
4A91421E1DF6466A00DF4FEE /* Dependencies */,
351354
4A9142141DF6453500DF4FEE /* Resources */,
@@ -376,6 +379,7 @@
376379
4A9142151DF6459900DF4FEE /* Source */ = {
377380
isa = PBXGroup;
378381
children = (
382+
4A01554821645AF900FE1CE5 /* version.h */,
379383
4A5FA0BF1DFE160500795630 /* calib_camera.h */,
380384
4A9142181DF645A900DF4FEE /* calib_camera.cpp */,
381385
4A47933C1E7F676E002C3631 /* Calibration.hpp */,

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
extern "C" {
4343
#endif
4444

45-
#define VERSION_STRING "1.0.1"
45+
#define VERSION_STRING "1.0.3"
4646

4747
#ifdef __cplusplus
4848
}

0 commit comments

Comments
 (0)