Skip to content

Commit 67923e9

Browse files
author
fukuchi_n
committed
modify setRRSCameraMode for Ubuntu
1 parent ddb76f2 commit 67923e9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

setRRSCameraMode.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@ function setRRSCameraMode(rrApp, mode, opt)
1313
warning("camera mode setting is enabled in R2024b or newer.");
1414
return;
1515
end
16+
rrInstallPath = rrApp.InstallationFolder;
1617

18+
os = computer();
19+
if startsWith(os, 'PC') %windows
20+
if ~endsWith(rrInstallPath, "bin\win64")
21+
rrInstallPath = rrInstallPath + "/bin/win64";
22+
end
23+
cmd_raw = "CmdRoadRunnerApi.exe";
24+
else %ubuntu
25+
if ~endsWith(rrInstallPath, "bin/glnxa64")
26+
rrInstallPath = rrInstallPath + "/bin/glnxa64";
27+
end
28+
cmd_raw = "CmdRoadRunnerApi";
29+
end
1730
%コマンド
18-
rrCmd = strcat('"',fullfile(rrApp.InstallationFolder, "CmdRoadRunnerApi.exe"),'"');
31+
rrCmd = strcat('"',fullfile(rrInstallPath, cmd_raw),'"');
1932
rrCmdBase = rrCmd + " --serverAddress localhost:" + string(rrApp.getAPIPort()) + " ";
2033

2134
% カメラをFollowに変更するコマンド

0 commit comments

Comments
 (0)