Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Aptina Imaging software uses sensor specific .ini files for many of its applications. The .ini file contains groups of commands called presets. Each preset has a name enclosed in square brackets, like [Reset83269893]. Some presets are required for the DevWare application; while others can be added by the user. The DevWare application provides several tools which will allow the user to create and edit ini presets. There is also a function in the ApBase API which allows the user to load a preset from an .ini file in their own custom application (see ap_LoadINIPreset()).

...

[Toolbar: …]

The preset will get a button on the User Toolbar assigned to it. See below.

[Toolbar2: …]

The preset will get a button on the 2nd User Toolbar assigned to it. See below.

[Python: …]

The preset contains Python code instead of ini commands. See the DevWare Python Development Guide document.

[Hidden: …]

The preset will not appear in the DevWare Presets dialog list box. You can leave off the 'Hidden:' part in LOAD 83269893= commands. For example 'LOAD=PLL-On' can load [Hidden: PLL-On].

[Patch <id>; <color>; <description>]

A preset name formatted like this will be recognized as a firmware patch by the Load Patches dialog page of the Sensor Control dialog.
<id> is the patch ID, usually four hex digits.
<color> is one of "critical", "recommended", "feature-recommended", "feature recommended", "customer", "customer-specific", "customer specific".
<description> is a short text description of the patch.

...

If the name of a preset begins with "Toolbar:" or "Toolbar2:" then DevWare will create a button on the corresponding User Toolbar that executes the preset. The remainder of the preset name after "Toolbar:" or "Toolbar2:" will be used as the button label. You can further define the characteristics and behavior of the toolbar button with the ICON 83269893=, TOOLTIP 83269893=, MENUITEM 83269893= and SHORTCUT= special commands.
The maximum number of buttons on a User Toolbar is 20.

...

List of INI Commands


Command

Definition

BITFIELD83269893

Write a value to a bitfield of a register.

DATATYPE83269893

Define the data type and optional valid range of a named register or bitfield.

DELAY83269893

Delay a certain amount of time (in milliseconds) before continuing.

ERROR_IF83269893

Output an error message and stop execution if a condition is met.

FAR183269893

Write a value to a sensor register on the first attached camera.

FAR283269893

Write a value to a sensor register on the second attached camera.

FIELD_WR83269893

Write to a register or bitfield by name. Command works for any kind of register, variable or SFR.

ICON83269893

Define the icon for a User Toolbar button.

IF_FIELD83269893

Similar to LOAD, but conditioned on the value of a register.

IF_REG83269893

Similar to LOAD, but conditioned on the value of a register.

IF_SERIAL83269893

Similar to IF_REG, but can access any device on the SHiP bus.

IMAGE83269893

Set software to expect the given image size and type. Command does not change sensor mode.

LOAD83269893

Load a preset from an ini file.

LOAD_PROM83269893

Load a preset from an EEPROM.

LOG83269893

Add a text string to the Log window.

MEM83269893

Write a value to an SOC RAM location.

MEM883269893

Write a value to an 8-bit SOC RAM location.

MEM3283269893

Write a value to a 32-bit SOC RAM location.

MENUITEM83269893

Define sub-menu items for a User Toolbar button.

OPTION83269893

Set a DevWare Option variable.

POLL_FIELD83269893

Poll a register. Similar to DELAY, but conditioned on the value of a register.

POLL_REG83269893

Poll a register. Similar to DELAY, but conditioned on the value of a register.

POLL_VAR83269893

Poll a variable. Similar to DELAY, but conditioned on the value of a variable.

PROMPT83269893

Give the user a multiple-choice dialog, or show a message.

PYTHON83269893Invoke a one-line Python statement.

REG83269893

Write a value to a register.

REG_BURST83269893

Write a sequence of register values in one bus transaction.

SAVE_IMAGE83269893

Write image data to files.

SAVE_REGS83269893

Write register values to a file.

SENSOR_BASE83269893

Set or detect the sensor SHiP base address.

SERIAL_REG83269893

Low-level write to Two-Wire Serial Interface register.

SFR83269893

Write a value to a special function register, on certain sensors.

SFR883269893

Write a value to an 8-bit special function register, on certain sensors.

SHORTCUT83269893

Define a keyboard shortcut for a User Toolbar button.

STATE83269893

Set a variable within the software, not on the sensor.

TOOLTIP83269893

Define a tooltip for a User Toolbar button.

VAR83269893

Write a value to a firmware variable.

VAR3283269893

Write a value to a 32-bit firmware variable.

VAR883269893

Write a value to an 8-bit firmware variable.

XMCLK83269893

Set the XMCLK (sensor external clock) frequency.

...

Anchor
IMAGE
IMAGE
IMAGE = <width>, <height> [, < image type>]  [, <context>] //<comment>

Set software to expect the given image size and type. Command does not change sensor mode.

Width and height parameters are required, but you can use 0 for either value to mean "don't change". The image type is optional. Possible values for image type are: BAYER-8, BAYER-10, BAYER-8+2, BAYER-10IHDR, BAYER-12, BAYER-8+4, BAYER-12HDR, BAYER-14, BAYER-14HDR, BAYER-20, BAYER-16+4, YCBCR, YCBCR-16, YUV-420, M420, RGB-565, RGB-555, RGB-444X, RGB-X444, RGB-332, RGB-24, RGB-32, RGB-48, JPEG, JPEG-SPEEDTAGS

Context is optional, and represents the context number to apply the settings to.  Value is 0 to n, where n is the maximum number of contexts - 1.

Example: Tell the software that the sensor output will be 808 x 608, 10-bit Bayer.
IMAGE = 808, 608, BAYER-10, 0


Anchor
LOAD
LOAD
LOAD = [< ini file name>,] <preset> //<comment>

Load a preset from an ini file.

Examples:
Load preset [Video Capture On] from current INI file.
LOAD= Video Capture ON

Load preset [Day mode] from A-0360-REV2.ini.
LOAD= A-0360-REV2.ini, Day mode

...

Anchor
MENUITEM
MENUITEM
MENUITEM = "<menu text>", LOAD= <preset> [, ICON= <icon name>] [,CHECKED|RADIO= <register name>[:<bitfield name>|:<mask>]|STATE:<STATE variable> <condition>] [,ENABLED= <register name>[:<bitfield name>|:<mask>]|STATE:<STATE variable> <condition>][,SHORTCUT=<key combination>]  //<comment>

Defines a drop-down menu item for a User Toolbar button in DevWare. Only takes effect if the preset name begins with "Toolbar:" or "Toolbar2:". This command causes the toolbar button behavior to change to a drop-down menu action.

The ICON 83269893=, CHECKED=, RADIO= and ENABLED= attributes work as in the ICON= command, except they apply only to the menu item, not the toolbar button. The icon file must be a .bmp (32-bpp, R-G-B-alpha) file, 13x13 pixels for the normal Windows text size. SHORTCUT= attribute works like the SHORTCUT= command, but applies only to this menu item.

If ICON= is used then CHECKED= or RADIO= will may have no visible effect depending on OS or GUI library.

The maximum number of menu items on a single toolbar button is 25.

Example: Group multiple presets under one button, with a separator between Parallel and HiSPi.
[Toolbar: 1280x720]
MENUITEM= "Parallel 1280x720 36.19fps", LOAD= Parallel 1280x720 36.19fps XBin2YBin2_BinSum
MENUITEM= "Parallel 1280x720 51.69fps", LOAD= Parallel 1280x720 51.69fps XBin2YSkip2_ColSum2
MENUITEM="-"
MENUITEM= "HiSPi 1280x720 51.69fps", LOAD= HiSPi 1280x720 51.69fps XBin2YSkip2_ColSum2

Example: Image Orientation control for a SMIA sensor using radio button icons
[Toolbar: Orientation]
MENUITEM= "Normal", LOAD= Normal, RADIO= IMAGE_ORIENTATION==0
MENUITEM= "Mirror", LOAD= Horiz Mirror, RADIO= IMAGE_ORIENTATION==1
MENUITEM= "Flip", LOAD= Vertical Flip, RADIO= IMAGE_ORIENTATION==2
MENUITEM= "Rotate 180", LOAD= Rotate 180, RADIO= IMAGE_ORIENTATION==3
[Normal]
FIELD_WR= IMAGE_ORIENTATION, 0
[Horiz Mirror]
FIELD_WR= IMAGE_ORIENTATION, 1
[Vertical Flip]
FIELD_WR= IMAGE_ORIENTATION, 2
[Rotate 180]
FIELD_WR= IMAGE_ORIENTATION, 3

Note: if "LOAD=" is not supplied, then that MENUITEM will be disabled but still displayed. 
To to provide visual separators between MENUITEM sections, use MENUITEM= "-".

See also the ICON=, SHORTCUT= and TOOLTIP= commands.

...