Commit cbf709e8 authored by Joel Collins's avatar Joel Collins
Browse files

Added client option for bayer capture

parent b0d5426f
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ function getStagePositions() {
}

// Capture methods
function newCapture(filename, keep_on_disk, use_video_port, resizeWidth=null, resizeHeight=null) {
function newCapture(filename, keep_on_disk, use_video_port, bayer, resizeWidth=null, resizeHeight=null) {
    // Make a position request
    function newCaptureCallback(response, status) {
        if (status != 200) {
@@ -156,7 +156,8 @@ function newCapture(filename, keep_on_disk, use_video_port, resizeWidth=null, re
    payload = {
        "filename": filename,
        "keep_on_disk": keep_on_disk,
        "use_video_port": use_video_port
        "use_video_port": use_video_port,
        "bayer": bayer
    }

    if ((resizeWidth) && (resizeHeight)) {
@@ -174,6 +175,8 @@ function newCaptureFromInput() {
    captureFilenameInput = document.getElementById('captureFilenameInput');
    captureKeepOnDiskCheck = document.getElementById('captureKeepOnDiskCheck');
    captureFullResolutionCheck = document.getElementById('captureFullResolutionCheck');
    captureBayerCheck = document.getElementById('captureBayerCheck')

    captureResizeCheck = document.getElementById('captureResizeCheck');
    captureWidthInput = document.getElementById('captureWidthInput')
    captureHeightInput = document.getElementById('captureHeightInput')
@@ -195,7 +198,14 @@ function newCaptureFromInput() {
        resizeHeight = null;
    }

    newCapture(filename, captureKeepOnDiskCheck.checked, !(captureFullResolutionCheck.checked), resizeWidth, resizeHeight);
    newCapture(
        filename, 
        captureKeepOnDiskCheck.checked, 
        !(captureFullResolutionCheck.checked), 
        captureBayerCheck.checked, 
        resizeWidth, 
        resizeHeight
    );

}

+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@
        <input type="text" id="captureFilenameInput" placeholder="Leave blank for default"><br>
        Store on Pi: <input type="checkbox" id="captureKeepOnDiskCheck"><br>
        Full resolution: <input type="checkbox" id="captureFullResolutionCheck"><br>
        Keep raw data: <input type="checkbox" id="captureBayerCheck"><br>
        Resize capture: <input type="checkbox" id="captureResizeCheck" onclick="newCaptureResizeToggle(this);"><br>
        <input type="number" id="captureWidthInput" value="640" style="width: 7em" disabled>
        <input type="number" id="captureHeightInput" value="480" style="width: 7em" disabled><br>