Chronos > Chronos User Discussion

Making the camera record 1000 frames, then stop...

<< < (2/2)

clkdiv:
Yet I found another way to make the camera record x frames: Using the "delay" block on the IO-configuration page I succeeded to make the camera stop recording after x seconds... I attached a picture of the configuration again, and here also is a dump of the JSON object needed to put the whole configuration all at once into the camera via JavaScript.


--- Code: ---{
  "gate": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "toggleSet": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "delay": {
    "delayTime": 0.999997,
    "source": "io1",
    "debounce": true,
    "invert": false
  },
  "combAnd": {
    "source": "alwaysHigh",
    "debounce": false,
    "invert": false
  },
  "toggleFlip": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "start": {
    "source": "io1",
    "debounce": true,
    "invert": false
  },
  "combOr3": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "shutter": {
    "shutterTriggersFrame": false,
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "combOr1": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "combOr2": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "toggleClear": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "combXOr": {
    "source": "none",
    "debounce": false,
    "invert": false
  },
  "trigger": {
    "source": "io1",
    "debounce": true,
    "invert": false
  },
  "stop": {
    "source": "delay",
    "debounce": false,
    "invert": false
  },
  "io1In": {
    "threshold": 2.49929
  },
  "io2In": {
    "threshold": 2.49929
  },
  "io1": {
    "driveStrength": 2,
    "source": "alwaysHigh",
    "debounce": false,
    "invert": false
  },
  "io2": {
    "driveStrength": 0,
    "source": "alwaysHigh",
    "debounce": false,
    "invert": false
  }
}
--- End code ---

clkdiv:
Warning: There seems to be a bug in the REST API: When getting the the whole ioMapping configuration, the delayTime will be sent from the camera, but it refuses to accept the parameter when trying to set it.

When checking the whole ioMappings, there is an entry in the dictionary object like this:


--- Code: --- "delay": {
    "delayTime": 0.999997,
    "source": "io1",
    "debounce": true,
    "invert": false
  },
--- End code ---

But writing back this way is NOT possible. Instead one has to use the extra Parameter "ioDelayTime", that look like this:


--- Code: ---{
   "ioDelayTime": 0.999997
}

--- End code ---
I can't imagine, that this is wanted....



clkdiv:
Ok, yet the easiest way probably, without IO-Gear, thus it works with the red record knob:

Just set the "Delay" source to "While recording" and time to eg 0.05 seconds and the "Stop Recording" source to "Delay Block". Now when pushing the red button the camera records 0.05 second. So easy...



Navigation

[0] Message Index

[*] Previous page

Go to full version