Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SITL for MacOS #2044

Merged
merged 7 commits into from
Apr 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
name: ${{ env.BUILD_NAME }}_ZIP
path: ./out/make/zip/linux/x64/*.zip
build-mac:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Setup environment
Expand Down
16 changes: 16 additions & 0 deletions js/sitl.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ var Ser2TCP = {
if (err)
console.log(err);
});
} else if (GUI.operating_system == 'MacOS') {
path = './../resources/sitl/macos/Ser2TCP'
chmod(path, 0o755, (err) => {
if (err)
console.log(err);
});
} else {
alert(GUI.operating_system);
return;
}

Expand Down Expand Up @@ -217,7 +224,16 @@ var SITLProcess = {
if (err)
console.log(err);
});
} else if (GUI.operating_system == 'MacOS') {
sitlExePath = path.join(__dirname, './../resources/sitl/macos/inav_SITL');
eepromPath = `${app.getPath('userData')}/${eepromFileName}`
chmod(sitlExePath, 0o755, err => {
if (err)
console.log(err);
});

} else {
alert(GUI.operating_system);
return;
}

Expand Down
Binary file added resources/sitl/macos/inav_SITL
Binary file not shown.
13 changes: 1 addition & 12 deletions tabs/sitl.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,6 @@ TABS.sitl.initialize = (callback) => {
GUI.load(path.join(__dirname, "sitl.html"), function () {
i18n.localize();

var os = GUI.operating_system;
if (os != 'Windows' && os != 'Linux') {

$('.content_wrapper').find('*').remove();
$('.content_wrapper').append(`<h2>${i18n.getMessage('sitlOSNotSupported')}</h2>`);

GUI.content_ready(callback);
return;
}


var currentSim, currentProfile, profiles;
var mapping = new Array(28).fill(0);
var serialProtocolls = Ser2TCP.getProtocolls();
Expand Down Expand Up @@ -524,4 +513,4 @@ TABS.sitl.cleanup = (callback) => {
Ser2TCP.stopPollSerialPorts();
if (callback)
callback();
};
};
Loading