Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion compile_transformations.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ function compile_transformations()

if isfile('miniVR_projection_wparameters.cpp')
fprintf('================== Compiling miniVR_projection_wparameters ============\n');
mex miniVR_projection_wparameters.cpp -R2018a
if ismac
% Newer Xcode linkers error on MATLAB's optional C++ MEX export
% symbols; the classic linker treats them as optional
mex('miniVR_projection_wparameters.cpp', '-R2018a', 'LDFLAGS=$LDFLAGS -Wl,-ld_classic');
else
mex miniVR_projection_wparameters.cpp -R2018a
end
end


Expand Down
14 changes: 9 additions & 5 deletions install_virmen.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ function install_virmen()
[scriptDir,scriptName] = fileparts(mfilename('fullpath'));
origLoc = cd(scriptDir);

fprintf(':: Copying git hooks...\n');
copyfile('git-hooks/*', '.git/hooks');
if exist('git-hooks', 'dir')
fprintf(':: Copying git hooks...\n');
copyfile('git-hooks/*', '.git/hooks');
end

fprintf(':: Logging git status to version.txt...\n');
system('git log -1 --pretty=oneline HEAD > $GIT_DIR/../version.txt');
system('git log -1 --pretty=oneline HEAD > version.txt');


try
Expand Down Expand Up @@ -35,14 +37,16 @@ function install_virmen()
' is properly configured, and then re-run ' scriptName '.\n' ...
'\n\n' ...
]);
displayException(err);
disp(getReport(err));

end

cd(scriptDir);

if exist('extras/RigParameters.m', 'file')
system('start winmerge extras/RigParameters.m extras/RigParameters.m.example');
if ispc
system('start winmerge extras/RigParameters.m extras/RigParameters.m.example');
end
fprintf(':: Please edit your existing RigParameters.m to match RigParameters.m.example.\n');
else
copyfile('extras/RigParameters.m.example', 'extras/RigParameters.m');
Expand Down
2 changes: 1 addition & 1 deletion sensors/calibrateBallMEX.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
while true
[dy1,dx1,dY,dX,dT] = arduinoReader('get');
arduinoReader('poll');
java.lang.Thread.sleep(8);
pause(0.008);

dx = dx + dX;
dy = dy + dY;
Expand Down
2 changes: 1 addition & 1 deletion sensors/calibrateBallMEX_2sensors.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
while true
[dy1,dx1,dY,dX,dT] = arduinoReader('get');
arduinoReader('poll');
java.lang.Thread.sleep(8);
pause(0.008);

dx_bottom = dx_bottom + dX;
dy_bottom = dy_bottom + dY;
Expand Down
6 changes: 6 additions & 0 deletions sensors/serialCommunications/compile_serialcomm.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
function compile_serialcomm()

% Serial.cpp uses the Windows COM-port API
if ~ispc
fprintf('!! WARNING: Serial communications MEX is only supported on Windows. Doing nothing.\n');
return;
end

% Compilation options
mexOpts = {'-O'};

Expand Down