Insta360Develop / CameraSDK-iOS

iOS SDK to control Insta360 cameras.
37 stars 5 forks source link

Incorrect responses to OSC requests on One R #2

Open nstansbury opened 3 years ago

nstansbury commented 3 years ago

Insta306 One R 1" Mod set to:

ISO 100 1/50 24 FPS 5.3K/16.9 5000k Log

http://192.168.42.1/osc/info

{
  "manufacturer": "Arashi Vision",
  "model": "Insta360 OneR",
  "serialNumber": "xxxxx,
  "firmwareVersion": "v1.2.18",
  "supportUrl": "https://www.insta360.com/product/insta360-oner/",
  "endpoints": {
    "httpPort": 80,
    "httpUpdatesPort": 10080
  },
  "gps": true,
  "gyro": true,
  "uptime": 508,
  "api": [
    "/osc/info",
    "/osc/state",
    "/osc/checkForUpdates",
    "/osc/commands/execute",
    "/osc/commands/status"
  ],
  "apiLevel": [
    2
  ],
  "_sensorModuleType": "Leica",
  "_vendorVersion": "v1.1_build1"
}

Request:

{
  "name": "camera.getOptions",
  "parameters": {
      "optionNames": [
          "iso",
          "isoSupport",
          "captureMode",
          "captureModeSupport",
          "exposureProgram",
          "exposureProgramSupport",
          "shutterSpeed",
          "shutterSpeedSupport",
          "aperture",
          "apertureSupport",
          "whiteBalance",
          "whiteBalanceSupport",
          "exposureCompensation",
          "exposureCompensationSupport",
          "fileFormat"
      ]
  }

Response:

{
  "name": "camera.getOptions",
  "state": "done",
  "results": {
    "options": {
      "iso": 0,
      "isoSupport": [
        0,
        100,
        125,
        160,
        200,
        250,
        320,
        400,
        500,
        640,
        800,
        1000,
        1250,
        1600,
        2000,
        2500,
        3200,
        4000,
        5000,
        6400
      ],
      "captureMode": "video",
      "captureModeSupport": [
        "image",
        "interval",
        "video",
        "_other"
      ],
      "exposureProgram": 2,
      "exposureProgramSupport": [
        0,
        1,
        4,
        9
      ],
      "shutterSpeed": 0,
      "shutterSpeedSupport": [
        0,
        60,
        30,
        15,
        8
      ],
      "aperture": 0,
      "apertureSupport": [
        0
      ],
      "whiteBalance": "datalight",
      "whiteBalanceSupport": [
        "auto",
        "incandescent",
        "fluorescent",
        "datalight",
        "cloudy-daylight",
        "shade"
      ],
      "exposureCompensation": 0,
      "exposureCompensationSupport": [
        -8,
        -7,
        -6,
        -5,
        -4,
        -3,
        -2,
        -1,
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8
      ],
      "fileFormat": {
        "type": "insv",
        "width": 3840,
        "height": 2160,
        "framerate": 60
      }
    }
  }
}

Expected:

iso should be 100 not 0 shutterspeed should be 50 not 0 shutterSpeedSupport should list the correct values from 1/40 to 1/8000 exposureProgramSupport should list option 2 fileFormat should list the correct resolution at 5312x2988, and framerate @24fps fileFormatSupport should not cause an error to be returned

When setting calling setOptions with an HTTP 200 response and state: "done" the options should be updated:

{
  "name": "camera.setOptions",
  "parameters": {
    "options": {
      "iso": 100,
      "shutterSpeed": 50
    }
  }
}