Skip to content

Commit

Permalink
Fix V3 Configuration and outputValue2 parsing (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
daharoni committed Jan 25, 2020
1 parent df8c541 commit 2f17c7b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 26 deletions.
30 changes: 5 additions & 25 deletions deviceConfigs/miniscopes.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,11 @@
]
},
"frameRate": {
"displaySpinBoxValues":["10FPS", "15FPS", "20FPS", "30FPS", "60FPS"],
"displayTextValues": [10, 15, 20, 30, 60],
"outputValues":[49153250,43057902,57016641, 6160929, 6094881],
"outputValues2":[1720,1220,800,1000,500],
"startValue": "20FPS",
"displaySpinBoxValues":["10FPS", "30FPS", "60FPS"],
"displayTextValues": [10, 30, 60],
"outputValues":[49153250, 6160929, 6094881],
"outputValues2":[1720,1000,500],
"startValue": "30FPS",
"sendCommand": [

{
Expand Down Expand Up @@ -557,26 +557,6 @@
"dataLength": "2",
"data0": "0",
"data1": "0"
},
{
"description": "Image sensor shutter width",
"protocol": "I2C",
"addressW": "0xB8",
"regLength": "1",
"reg0": "0x0B",
"dataLength": "2",
"data0": "0",
"data1": "0xFF"
},
{
"description": "Image sensor vertical blanking",
"protocol": "I2C",
"addressW": "0xB8",
"regLength": "1",
"reg0": "0x06",
"dataLength": "2",
"data0": "0x02",
"data1": "0x21"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions source/miniscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ int Miniscope::processString2Int(QString s)
value = SEND_COMMAND_VALUE_L;
else if (s == "value")
value = SEND_COMMAND_VALUE;
else if (s == "value2H")
value = SEND_COMMAND_VALUE2_H;
else if (s == "value2L")
value = SEND_COMMAND_VALUE2_L;
else
value = SEND_COMMAND_ERROR;
ok = true;
Expand Down
2 changes: 1 addition & 1 deletion userConfigs/UserConfigExample_V3_Miniscope.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"deviceType": "Miniscope_V3",
"imageRegistration": "Off",
"streamHeadOrientation": false,
"deviceID": 2,
"deviceID": 1,
"compressionOptions": ["MJPG","MJ2C","XVID","FFV1"],
"compression": "FFV1",
"framesPerFile": 1000,
Expand Down
60 changes: 60 additions & 0 deletions userConfigs/UserConfigExample_V3_Miniscope_Plus_BehavCam.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"researcherName": "Dr_Miniscope",
"dataDirectory": "C:/Users/DBAharoni/Documents/Data",
"directoryStructure": [
"researcherName",
"experimentName",
"animalName",
"date",
"time"
],
"animalName": "testMouse",
"experimentName": "Linear Track Test",
"recordLengthinSeconds": 30,
"experiment_Not_Implemented": {
"type": "linearTrack",
"units": "cm",
"trackLength": 200
},
"behaviorTracker_Not_Implemented": {
"type": "HSV",
"hue": [0, 1],
"saturation": [0, 1],
"value": [0, 1]
},
"devices": {
"miniscopes": [
{
"deviceName": "Miniscope",
"deviceType": "Miniscope_V3",
"imageRegistration": "Off",
"streamHeadOrientation": false,
"deviceID": 1,
"compressionOptions": ["MJPG","MJ2C","XVID","FFV1"],
"compression": "FFV1",
"framesPerFile": 1000,
"windowScale": 0.75,
"windowX": 800,
"windowY": 100,
"gain": "Low",
"ewl": 50,
"led0": 30,
"frameRate": "30FPS"
}
],
"cameras": [
{
"deviceName": "BehavCam 0",
"deviceType": "WebCam",
"deviceID": 0,
"cameraCalibrationFileLocation": "",
"compressionOptions": ["MJPG","MJ2C","XVID","FFV1"],
"compression": "FFV1",
"framesPerFile": 1000,
"windowScale": 0.75,
"windowX": 800,
"windowY": 600
}
]
}
}

0 comments on commit 2f17c7b

Please sign in to comment.