Skip to content

Commit

Permalink
add sony A7C, A74A, FX3; fix reload issue after update
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahparker committed Feb 15, 2022
1 parent f2c25e7 commit e38f066
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
4 changes: 3 additions & 1 deletion camera/ptpjs/drivers/sony.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ driver.supportedCameras = {
'054c:0caa': { name: "Sony A6400", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 3000, newISO: false } },
'054c:0ccc': { name: "Sony A7R IV", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
'054c:0d18': { name: "Sony A7S III", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
'054c:0d9f': { name: "Sony A7R IV A", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
'054c:0d2b': { name: "Sony A7C", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
'054c:0d9f': { name: "Sony A7R IV A", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
'054c:0da3': { name: "Sony FX3", supports: { shutter: true, aperture: true, iso: true, liveview: true, destination: true, focus: true, _bufTime: 2500, newISO: true } },
}

var properties = {
Expand Down
23 changes: 14 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,17 @@ if (VIEW_HARDWARE) {
}
}

var reloadApp = function() {
closeSystem(function(){
var killServer = '';
if(core.processId) {
killServer = '; kill -s 9 ' + core.processId;
}
exec('nohup /bin/sh -c "killall node; sleep 2' + killServer + '; kill -s 9 ' + process.pid + '; /root/startup.sh"', function() {}); // restarting system
//exec('nohup /bin/sh -c "killall node; sleep 2; killall -s 9 node; /root/startup.sh"', function() {}); // restarting system
});
}

var versionUpdateConfirmMenuBuild = function(versionTarget) {
var statusValue = null;
return {
Expand Down Expand Up @@ -2612,9 +2623,7 @@ if (VIEW_HARDWARE) {
oled.progress("Installing " + versionTarget.version, "reloading app...", 1, false);
oled.update();
wifi.unblockBt(function(){
closeSystem(function(){
exec('nohup /bin/sh -c "killall node; sleep 2; killall -s 9 node; /root/startup.sh"', function() {}); // restarting system
});
reloadApp();
});
}
});
Expand All @@ -2638,9 +2647,7 @@ if (VIEW_HARDWARE) {
});
updates.setVersion(versionTarget, function(){
oled.progress("Installing " + versionTarget.version, "reloading app...", 1, false);
closeSystem(function(){
exec('nohup /bin/sh -c "killall node; sleep 2; killall -s 9 node; /root/startup.sh"', function() {}); // restarting system
});
reloadApp();
});
} else {
power.disableAutoOff();
Expand Down Expand Up @@ -2682,9 +2689,7 @@ if (VIEW_HARDWARE) {
oled.progress("Installing " + versionTarget.version, "reloading app...", 1, false);
oled.update();
wifi.unblockBt(function(){
closeSystem(function(){
exec('nohup /bin/sh -c "killall node; sleep 2; killall -s 9 node; /root/startup.sh"', function() {}); // restarting system
});
reloadApp();
});
});
} else {
Expand Down

0 comments on commit e38f066

Please sign in to comment.