Skip to content

Commit

Permalink
Add white screen option for calibration frames to perform
Browse files Browse the repository at this point in the history
flats with the tablet/phone screen without external light source
  • Loading branch information
artyom-beilis committed Jul 8, 2023
1 parent 77927ce commit 2accfb9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions www-data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
<tr class="dso_config stack_opt" ><td>Flats</td><td colspan="2"><select id="stack_flats" onchange="saveCalibValue(this);"></select></td></tr>
<tr class="dso_config stack_opt" ><td>Dark Flats</td><td colspan="2"><select id="stack_dark_flats" onchange="saveCalibValue(this); "></select></td></tr>
<tr class="stack_opt" ><td>Save All Frames</td><td><input class="saved_input" id="stack_save_data" type="checkbox" ></td><td>&nbsp;</td></tr>
<tr class="calib_config stack_opt" style='display:none'>
<td>White Screen</td>
<td>
<input class="saved_input val_input" id="white_delay" value="0" min="0" max="1000" type="number" />
</td>
<td>show white screen for</td>
</tr>
<tr class="stack_opt" >
<td>Delay (s)</td>
<td>
Expand Down Expand Up @@ -218,6 +225,7 @@
<button onclick="hideError();" id="confirm_cancel_button" >Cancel</button>
</p>
</div>
<div id="white_screen" ></div>
<script src="/media/js/jsdb.js"></script>
<script src="/media/js/code.js"></script>
</body>
Expand Down
10 changes: 10 additions & 0 deletions www-data/media/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,15 @@
width:100%;
height:100%;
}
#white_screen {
display:none;
position:absolute;
bottom:0;
left:0;
right:0;
top:0;
z-index:3;
background-color:white;
}


12 changes: 12 additions & 0 deletions www-data/media/js/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ function updateStackSelect()
for(var i=0;i<elements.length;i++) {
elements[i].style.display = new_style;
}
new_style = type != 'dso' ? '' : 'none';
elements = document.getElementsByClassName('calib_config');
for(var i=0;i<elements.length;i++) {
elements[i].style.display = new_style;
}
}

function checkOpenStatus(st)
Expand Down Expand Up @@ -1358,6 +1363,13 @@ function startStack()
document.getElementById('stack').style.display = 'none';
showNotification('Stacking',delay,true,doStackFunc);
}
var ws = parseFloat(document.getElementById('white_delay').value);
ws = isNaN(ws) ? 0 : ws;
if(ws > 0 && delay > 0 && calib) {
setTimeout(()=> { ctlStack('pause')},(delay + ws) * 1000);
setTimeout(()=> { document.getElementById('white_screen').style.display='none' },(delay *2 + ws) * 1000);
document.getElementById('white_screen').style.display='block';
}
}

function updateRADE(name)
Expand Down

0 comments on commit 2accfb9

Please sign in to comment.