diff --git a/deviceConfigs/behaviorCams.json b/deviceConfigs/behaviorCams.json index 503d9b8..204456c 100644 --- a/deviceConfigs/behaviorCams.json +++ b/deviceConfigs/behaviorCams.json @@ -7,5 +7,192 @@ "isColor": true, "controlSettings": { } + }, + + "Minicam-Mono5": { + "qmlFile": "qrc:/behaviorCam.qml", + "sensor": "MT9P031", + "frameRate": "adjustable", + "width": 1296, + "height": 972, + "headOrientation": false, + "isColor": false, + "controlSettings": { + "gain": { + "displaySpinBoxValues":["Low", "Medium", "High"], + "displayTextValues": [1, 4, 8], + "outputValues":[8,32,96], + "startValue": "Low", + "sendCommand": [ + { + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x35", + "dataLength": "2", + "data0": "valueH", + "data1": "valueL" + } + ] + }, + "frameRate": { + "displaySpinBoxValues":["10FPS", "15FPS", "20FPS"], + "displayTextValues": [10, 15, 20], + "outputValues":[2048,1536,1024], + "startValue": "30FPS", + "sendCommand": [ + { + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x09", + "dataLength": "2", + "data0": "valueH", + "data1": "valueL" + } + ] + }, + "led0": { + "startValue": 0, + "min": 0, + "max": 100, + "stepSize": 1, + "displayValueScale": 0.31, + "displayValueOffset": 0, + "sendCommand": [ + { + "protocol": "I2C", + "addressW": "0x6C", + "regLength": "1", + "reg0": "0b10100000", + "dataLength": "1", + "data0": "value" + } + ] + } + }, + "initialize": [ + { + "description": "Speed up i2c bus timer to 50us max", + "protocol": "I2C", + "addressW": "0xC0", + "regLength": "1", + "reg0": "0x22", + "dataLength": "1", + "data0": "0b00000010" + }, + { + "description": "Decrease BCC timeout, units in 2ms XX", + "protocol": "I2C", + "addressW": "0xC0", + "regLength": "1", + "reg0": "0x20", + "dataLength": "1", + "data0": "0b00001010" + }, + { + "description": "Make sure DES has SER ADDR", + "protocol": "I2C", + "addressW": "0x07", + "regLength": "1", + "reg0": "0x07", + "dataLength": "1", + "data0": "0xB0" + }, + { + "description": "Speed up I2c bus timer to 50u Max", + "protocol": "I2C", + "addressW": "0xB0", + "regLength": "1", + "reg0": "0x0F", + "dataLength": "1", + "data0": "0b00000010" + }, + { + "description": "Decrease BCC timeout, units in 2ms", + "protocol": "I2C", + "addressW": "0xB0", + "regLength": "1", + "reg0": "0x1E", + "dataLength": "1", + "data0": "0b00001010" + }, + { + "description": "sets allowable i2c addresses to send through serializer", + "protocol": "I2C", + "addressW": "0xC0", + "regLength": "1", + "reg0": "0x08", + "dataLength": "2", + "device0": "MT9P031", + "data0": "0xBA", + "device1": "Digital LED Driver", + "data1": "0x6C" + + }, + { + "description": "sets sudo allowable i2c addresses to send through serializer", + "protocol": "I2C", + "addressW": "0xC0", + "regLength": "1", + "reg0": "0x10", + "dataLength": "2", + "device0": "MT9P031", + "data0": "0xBA", + "device1": "Digital LED Driver", + "data1": "0x6C" + + }, + { + "description": "2x subsamp and binning 1", + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x22", + "dataLength": "2", + "data0": "0x00", + "data1": "0b00010001" + }, + { + "description": "2x subsamp and binning 2", + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x23", + "dataLength": "2", + "data0": "0x00", + "data1": "0b00010001" + }, + { + "description": "Set column binning to summing instead of averaging", + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x20", + "dataLength": "2", + "data0": "0x00", + "data1": "0b01100000" + }, + { + "description": "Change shutter width", + "protocol": "I2C", + "addressW": "0xBA", + "regLength": "1", + "reg0": "0x09", + "dataLength": "2", + "data0": "0b00000100", + "data1": "0x00" + }, + { + "description": "LED Driver LM3509", + "protocol": "I2C", + "addressW": "0x6C", + "regLength": "1", + "reg0": "0x10", + "dataLength": "1", + "data0": "0b11010111" + + } + ] } } diff --git a/source/behaviorCam.qml b/source/behaviorCam.qml index 97596ad..ba7c482 100644 --- a/source/behaviorCam.qml +++ b/source/behaviorCam.qml @@ -336,6 +336,16 @@ Item { } + VideoSliderControl { + id: led0 + objectName: "led0" + max: 100 + startValue: 0 + iconPath: "img/icon/led.png" + textColor: "black" + visible: false + } + VideoSliderControl{ id: alpha objectName: "alpha" @@ -361,6 +371,10 @@ Item { } + Connections{ + target: led0 + onValueChangedSignal: vidPropChangedSignal(led0.objectName, displayValue, i2cValue, i2cValue2) + } Connections{ target: alpha onValueChangedSignal: vidPropChangedSignal(alpha.objectName, displayValue, i2cValue, i2cValue2) diff --git a/source/behaviorcam.cpp b/source/behaviorcam.cpp index dc0e663..378f109 100644 --- a/source/behaviorcam.cpp +++ b/source/behaviorcam.cpp @@ -276,6 +276,7 @@ void BehaviorCam::configureBehavCamControls() { keys = values.keys(); if (controlItem) { + controlItem->setVisible(true); for (int j = 0; j < keys.size(); j++) { // Set min, max, startValue, and stepSize in order found in 'format' if (keys[j] == "sendCommand") { // m_controlSendCommand[controlName[i]] = parseSendCommand(values["sendCommand"].toArray());