From 319af970ba74d8a9c75390b68c0109c46e74b8e8 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 3 Jan 2019 15:58:19 -0800 Subject: [PATCH] Fix copy camera settings (#30) --- .../tools/rpiConfigServer_src/resources/frcvision.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deps/tools/rpiConfigServer_src/resources/frcvision.js b/deps/tools/rpiConfigServer_src/resources/frcvision.js index ebb51bc..bbe52ff 100644 --- a/deps/tools/rpiConfigServer_src/resources/frcvision.js +++ b/deps/tools/rpiConfigServer_src/resources/frcvision.js @@ -364,8 +364,8 @@ function updateVisionCameraDataFromJson(i, data) { var wbAuto = false; var exAuto = false; - for (var i = 0; i < data.properties.length; i++) { - var name = data.properties[i].name; + for (var j = 0; j < data.properties.length; j++) { + var name = data.properties[j].name; // remove all raw properties if (name.startsWith('raw_')) { @@ -374,13 +374,13 @@ function updateVisionCameraDataFromJson(i, data) { // brightness if (name === 'brightness') { - data.brightness = data.properties[i].value; + data.brightness = data.properties[j].value; continue; } // white balance if (name === 'white_balance_temperature_auto') { - if (data.properties[i].value === true) { + if (data.properties[j].value === true) { data['white balance'] = 'auto'; wbAuto = true; } @@ -395,7 +395,7 @@ function updateVisionCameraDataFromJson(i, data) { // exposure if (name === 'exposure_auto') { - if (data.properties[i].value === 3) { + if (data.properties[j].value === 3) { data.exposure = 'auto'; exAuto = true; } @@ -407,7 +407,7 @@ function updateVisionCameraDataFromJson(i, data) { } continue; } - newProps.push(data.properties[i]); + newProps.push(data.properties[j]); } data.properties = newProps; }