Skip to content

Commit

Permalink
ev fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahparker committed Oct 11, 2019
1 parent 4a0fa85 commit b8aa59b
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,8 @@ if (VIEW_HARDWARE) {
getSettingsTimer = null;
}
core.setEv(ev, {
cameraSettings: core.cameraSettings
cameraSettings: core.cameraSettings,
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
getSettingsTimer = setTimeout(function(){
core.getSettings(function() {
Expand All @@ -1533,7 +1534,8 @@ if (VIEW_HARDWARE) {
getSettingsTimer = null;
}
core.setEv(ev, {
cameraSettings: core.cameraSettings
cameraSettings: core.cameraSettings,
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
getSettingsTimer = setTimeout(function(){
core.getSettings(function() {
Expand Down Expand Up @@ -2441,7 +2443,8 @@ if (VIEW_HARDWARE) {
getSettingsTimer = null;
}
core.setEv(ev, {
cameraSettings: core.cameraSettings
cameraSettings: core.cameraSettings,
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
getSettingsTimer = setTimeout(function(){
core.getSettings(function() {
Expand All @@ -2460,7 +2463,8 @@ if (VIEW_HARDWARE) {
getSettingsTimer = null;
}
core.setEv(ev, {
cameraSettings: core.cameraSettings
cameraSettings: core.cameraSettings,
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
getSettingsTimer = setTimeout(function(){
core.getSettings(function() {
Expand Down Expand Up @@ -5361,7 +5365,9 @@ app.on('message', function(msg) {
case 'setEv':
if (msg.ev) {
if (core.cameraConnected) {
core.setEv(msg.ev, {}, function() {
core.setEv(msg.ev, {
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
core.getSettings(function() {
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
msg.reply('settings', {
Expand All @@ -5376,8 +5382,11 @@ app.on('message', function(msg) {
case 'setEvUp':
if (core.cameraConnected) {
core.getSettings(function() {
lists.fixedApertureEv = core.currentProgram.manualAperture;
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
core.setEv(core.cameraSettings.stats.ev+1/3, {}, function() {
core.setEv(core.cameraSettings.stats.ev+1/3, {
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
core.getSettings(function() {
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
msg.reply('settings', {
Expand All @@ -5392,8 +5401,11 @@ app.on('message', function(msg) {
case 'setEvDown':
if (core.cameraConnected) {
core.getSettings(function() {
lists.fixedApertureEv = core.currentProgram.manualAperture;
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
core.setEv(core.cameraSettings.stats.ev-1/3, {}, function() {
core.setEv(core.cameraSettings.stats.ev-1/3, {
fixedApertureEv: core.currentProgram.manualAperture
}, function() {
core.getSettings(function() {
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
msg.reply('settings', {
Expand All @@ -5412,6 +5424,7 @@ app.on('message', function(msg) {
settings: core.cameraSettings
} else {
core.getSettings(function() {
lists.fixedApertureEv = core.currentProgram.manualAperture;
core.cameraSettings.stats = lists.evStats(core.cameraSettings);
msg.reply('settings', {
settings: core.cameraSettings
Expand Down

0 comments on commit b8aa59b

Please sign in to comment.