Skip to content

Commit

Permalink
corrections for OM-1
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahparker committed Aug 11, 2022
1 parent 4103dee commit 7f744be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions camera/ptpjs/drivers/olympus.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,8 @@ driver.set = function(camera, param, value, callback, _tries) {
}
if(properties[param] && properties[param].setFunction) {
if(cameraValue !== null) {
_logD("setting", ptp.hex(properties[param].code[camera.supports.codeIndex.hasOwnProperty(key) ? camera.supports.codeIndex[key] : 0]), "to", cameraValue);
properties[param].setFunction(camera._dev, properties[param].code[camera.supports.codeIndex.hasOwnProperty(key) ? camera.supports.codeIndex[key] : 0], cameraValue, function(err) {
_logD("setting", ptp.hex(properties[param].code[camera.supports.codeIndex.hasOwnProperty(param) ? camera.supports.codeIndex[param] : 0]), "to", cameraValue);
properties[param].setFunction(camera._dev, properties[param].code[camera.supports.codeIndex.hasOwnProperty(param) ? camera.supports.codeIndex[param] : 0], cameraValue, function(err) {
if(!err) {
if(!camera[properties[param].category]) camera[properties[param].category] = {};
if(!camera[properties[param].category][param]) camera[properties[param].category][param] = {};
Expand All @@ -742,7 +742,7 @@ driver.set = function(camera, param, value, callback, _tries) {
cb(err);
exposureEvent(camera);
} else {
_logE("error setting " + ptp.hex(properties[param].code[camera.supports.codeIndex.hasOwnProperty(key) ? camera.supports.codeIndex[key] : 0]) + ": " + err);
_logE("error setting " + ptp.hex(properties[param].code[camera.supports.codeIndex.hasOwnProperty(param) ? camera.supports.codeIndex[param] : 0]) + ": " + err);
return cb(err);
}
});
Expand Down Expand Up @@ -787,7 +787,7 @@ driver.get = function(camera, param, callback) {
async.series([
function(cb){
if(properties[param] && properties[param].getFunction) {
properties[param].getFunction(camera._dev, properties[param].code[camera.supports.codeIndex.hasOwnProperty(key) ? camera.supports.codeIndex[key] : 0], function(err, data, size) {
properties[param].getFunction(camera._dev, properties[param].code[camera.supports.codeIndex.hasOwnProperty(param) ? camera.supports.codeIndex[param] : 0], function(err, data, size) {
if(!err) {
properties[param].size = size;
if(properties[param].values) {
Expand Down

0 comments on commit 7f744be

Please sign in to comment.