Skip to content

Commit 545ea70

Browse files
committed
Merge branch 'feature/downloadplugins'
2 parents 71d40cc + f0e2465 commit 545ea70

11 files changed

Lines changed: 2974 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ We designed the onboard video platform using several key technologies:
2727

2828
Combining these great technologies provides a lot of power and room for future growth. But is also provides well documented means to extend OpenROV. With Node.js and Socket.io, not only are we able to stream video to a web browser by updating an image, but we are also able to control the ROV and view valuable sensor information. This is just the beginning.
2929

30+
Key Related Projects
31+
----------------
32+
33+
* The firmware for the arduino can be found in [openrov/openrov-software-arduino](https://github.com/OpenROV/openrov-software-arduino) in the /OpenROV project.
34+
* The dashboard project can be found in [openrov/openrov-dashboard](https://github.com/OpenROV/openrov-dashboard)
35+
3036
Note on Repository Branches
3137
---------------------------
3238

@@ -94,6 +100,11 @@ The easiest way to upgrade your installation is to ssh on to
94100

95101
This will go to the github repository and pull the latest code. You may need to reboot after the update. There is a known issue where the serial.io project sometimes fails to compile. You can ignore that, but you may have to try again if it aborts the update.
96102

103+
Plugins
104+
------------
105+
You can create your own plugins and share them with the community. Take a look at our [openrov-grunt-init-plugin](https://github.com/openrov/openrov-grunt-init-plugin) project.
106+
107+
97108
How to Contribute
98109
------------
99110

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"lazy" : ">= 1.0.11",
2222
"sync" : "",
2323
"os-utils" : "",
24-
"jquery-file-upload-middleware" : ""
24+
"jquery-file-upload-middleware" : "",
25+
"bower" : ""
2526
},
2627
"bundleDependencies": [
2728
"express",

src/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ var child = new forever.Monitor('/opt/openrov/cockpit/src/cockpit.js', {
1010
child.on('exit', function () {
1111
console.log('cockpit.js has exited after 3 restarts');
1212
});
13+
child.on('exit:code', function(err){
14+
console.log('detected error');
15+
if (err==17){ //Graceful restarts of the app need to process.exit(17)
16+
console.log('detected intentional restart');
17+
child.times+=-1;
18+
}
1319
if (process.platform === 'linux') {
1420
process.on('SIGTERM', function () {
1521
console.error('got SIGTERM, shutting down...');

src/cockpit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ function addPluginAssets(result) {
187187
var loader = new PluginLoader();
188188
loader.loadPlugins(path.join(__dirname, 'system-plugins'), '/system-plugin', deps, addPluginAssets);
189189
loader.loadPlugins(path.join(__dirname, 'plugins'), '/plugin', deps, addPluginAssets);
190+
mkdirp('/usr/share/cockpit/bower_components');
191+
loader.loadPlugins('/usr/share/cockpit/bower_components', '/community-plugin', deps, addPluginAssets);
190192

191193

192194
controller.start();

src/static/testviews.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
scripts.push('../system-plugins/input-controller/public/js/gamepad.js');
3333
scripts.push('../system-plugins/input-controller/public/js/input-controller.js');
3434
scripts.push('../system-plugins/input-controller/public/js/keyboard.js');
35+
scripts.push('../system-plugins/plugin-finder/public/js/config.js');
36+
scripts.push('../system-plugins/plugin-finder/public/js/plugin-finder.js');
37+
scripts.push('../system-plugins/plugin-manager/public/js/config.js');
38+
scripts.push('../system-plugins/plugin-manager/public/js/plugin-manager.js');
3539

3640
// Then the rest of the plugins
3741
scripts.push('../plugins/arduinofirmwareupload/public/js/arduinofirmwareupload.js');
@@ -49,8 +53,7 @@
4953
scripts.push('../plugins/horizon/public/js/horizon.js');
5054
scripts.push('../plugins/motor_diags/public/js/motor_diags.js');
5155
scripts.push('../plugins/photocapture/public/js/photocapture.js');
52-
scripts.push('../system-plugins/plugin-manager/public/js/config.js');
53-
scripts.push('../system-plugins/plugin-manager/public/js/plugin-manager.js');
56+
5457
scripts.push('../plugins/rovpilot/public/js/rovpilot.js');
5558
scripts.push('../plugins/serial-monitor/public/js/serial-monitor.js');
5659
scripts.push('../plugins/tankcontrol/public/js/tankcontrol.js');
@@ -73,6 +76,7 @@
7376
styles.push('../plugins/rovpilot/public/css/style.css');
7477
styles.push('../plugins/headsup-menu/public/css/style.css');
7578
styles.push('../plugins/topdowncompass/public/css/topdowncompass.css');
79+
styles.push('../system-plugins/plugin-finder/public/css/style.css');
7680

7781
frameDoc.writeln(new EJS({url: '../views/index.ejs'}).render({title: "testing", styles:styles, scripts:scripts}));
7882
frameDoc.close();

0 commit comments

Comments
 (0)