Hello everyone!
I would like to control Miniscope V4 parameters (LED power, EWL focus, etc.) with the external software (I am using Labview 2020).
As far as I understand from videostreamocv.cpp, 6 bytes of the command that are sent sending are split to 2 bytes to Contrast, Gamma, and Sharpness attributes of the camera and the order of the command is : data2 data1 | data0 reg0 | packet.length address and packet.length is 2+number of data chunks. So data2 and data1 go to Sharpness (if there is no data2 and data1, it is just 0), data0 reg0 to Gamma and packet.length address - to Contrast.
I managed to control EWL focus - for this I am writing the following hex values (that get transformed to int): "04EE" to Contrast, "Focus_value 08" to Gamma and "0002" to Sharpness, according to the commands specified in videoDevices.json (I am curious though what's the purpose of writing 0x02 data after focus value).
But I can't manage to control LED: there are 2 possible commands, and each is sent to a different address. I tried to send both these commands and it doesn't work. Do you have ideas about what I could do wrong? As I can control EWL focus, it means that the problem is not in Labview/DAQ not receiving commands. As side questions, I wonder what these 2 possible commands represent and why in the second command we need to send 114 as data0?
LED hex strings that I am sending (to set LED to half the power - I assume that value 127 (0x7F) means half of the power):
command1: "00 00 7F 01 03 20" (reg0=0x01, length=3, addressW=0b00100000=0x20)
command2: "00 7F 72 00 04 58" (reg0=0x00, length=4, addressW=0b01011000=0x58, data0=114=0x72).
Maybe it is not relevant, but to make EWL focus work, I had to divide int values of Contrast and Gamma by 100 as I noticed (in NI MAX explorer) that max values for Contrast and Gamma attributes are 655.36 - exactly 2 bytes divided by 100, which is peculiar. For Sharpness I didn't have to do any division.
Thanks!