Inputs and Functions

From STorM32-BGC Wiki
Jump to navigation Jump to search

The various inputs and functions of the STorM32 controller, and how they work together and are processed, are discussed here.

Concept

The STorM32 is build on the concept of input channels and functions.

Input Channel:

The STorM32 controller supports a rich set of different signal sources, such as PWM, sum-PPM, S-Bus or CRSF, analog signals, and buttons and combination of buttons. Any possible input data stream is called an input channel (in firmware v2.59e there are 43 input channels, see picture below). For each input the value range is -500 ... +500, which implies that the original data of the input source is converted such as to fit into this [-500,+500] range. By default every input channel yields a value of 0, unless it is explicitly activated by assigning it to any of the functions in the GUI.

Function:

A function is anything which can receive an input value and act upon it. The STorM32 controller provides a rich set of them, such as the possibility to control the camera orientation, the camera shutter, or a PWM output signal, to name some (in firmware v2.59e there are 12 functions).

How it works:

Any of the input channels can be assigned to any of the functions. One input can hence also drive two or more functions. This provides a great deal of possibilities, but some combinations don't make any sense and some can even lead to unwanted behavior. It is the user's responsibility to avoid nonsense.

Depending on the input and function, the hardware is configured accordingly. Possible conflicts are resolved by configuration settings in the [GUI:Setup] tab. For instance, the pin RC-0 may either be used as PWM input, S-Bus input, or CRSF input. This is determined by the Virtual Channel Configuration setting. If it is configured as a CRSF input, then the CRSF input data is available at the “Virtual-1” to “Virtual-16” input channels. The “Rc-0” input channel in contrast yields then the value zero. Similarly the RC-1 pin has dual function as PWM input or PWM output, and the RC-2 pin as PWM input or Sum-PPM input.

If a certain hardware resource/input pin is not used by any function, when it is disabled hardware-wise. This is for reliability reasons, to prevent that spurios signals enter the system and produce false behavior.

Overview Diagram

The available input channels, the conversion to the internal value range of [-500,+500], and how these values are used by the various functions are summarized in this diagram.

Storm32-inputs-channels.jpg

Rc Input Processing

The orientation of the camera can be controlled by any of the available input channels, the scripts, as well as various serial and MAVLink commands. The processing flow chart is as follows:

Storm32-rc-input-processing.jpg

GUI Inputs Tool

The GUI provides the [GUI:Inputs Tool], which is accessible from the [GUI:Experts Only] menu in the GUI.

It displays the raw values for all input channels, and the resulting input values for each function. The tool can thus be very helpful for diagnosis.

Comment: Only for firmware versions before v2.67a: The Rc and Virtual input values appear properly only if a function has been set to the respective input.

Storm32-inputs-tool.jpg