Integration Manual
Mandala variables
Autopilot algorithms
shiva
Comm ports
vcp
Controls mixer
controls
Core modules
mod
Data Broker
mdb
GPIO ports
controls.gpio
Inertial Navigation
ahrs
Node modules tree
node
PHY Multiplexer
ifc.mux
Protocols
protocols
Telemetry streamer
telemetry
Vehicle Identity
identity
Vehicle limits
vehicle
WASM engine
script
GPIO ports
Nodes:ghanta
nav
com
ifc
| Module:controls.gpio
| Parameters:controls
The module provides node’s GPIO signals management:
- configure GPIO physical driver parameters and mode;
- output digital signal depending on mandala variable value;
- measure signal input parameters and output to mandala variable;
This module works in combination with controls module to provide PWM output for servos.
The multiplier
mult
is applied always beforebias
, for both inputs and outputs when applicable.
Configuration parameters
-
controls
-
gpio
GPIO Mapping
-
mode
Gpio pin modeoption
[off,OUT,OUT_PWM,OUT_DUTY,OUT_PULSE,IN,IN_FREQ,IN_WIDTH,IN_DUTY,IN_SET]
off
- the port is shutdown (floating);OUT
- the port is configured as logical output;OUT_PWM
- outputs PWM signal for servos;OUT_DUTY
- outputs PWM signal with controllable duty cycle;OUT_PULSE
- outputs logical pulse(s) with controllable frequency and width;IN
- measures logical level[0/1]
;IN_FREQ
- measures signal frequency[Hz]
;IN_WIDTH
- measures pulse width[s]
;IN_DUTY
- measures duty cycle[1]
;IN_SET
- measures logical level and sets the binding variable on high level only;
-
inv
Signal invertedoption
When this option is
on
- the physical TTL level [0/1] of the pin is inverted.inputs
: level is inverted before processing,outputs
: level is inverted after processing, before applying.
-
bind
Binded variablebind
inputs
: the measured value will be stored in this variable and broadcasted to network, this parameter is mandatory for inputs;outputs
: the value of the variable will be applied immediately to the port logic. If this parameter is omitted - the channel of controls module output is used as value when assigned, i.e. thech
of control must be equal to the gpio port number, starting from 1;
-
mult
Value multiplierreal
OUT
,OUT_PWM
,OUT_DUTY
: variable value is multiplied by this factor;OUT_PULSE
: if this parameter is set more thanbias
- the pulse will be emitted with the set period[s]
, otherwise, the pulse will be shot just once. The pulse will be emitted when thebind
value is more than zero. Use cases:- engine starters;
- strobe lights;
inputs
: measured value is multiplied by this factor;
-
bias
Value biasreal
outputs
: variable value, after multiplying bymult
is adjusted with the value of this parameter before applying to TTL logic;inputs
: this parameter is added to measured value, after applying themult
;
-
label
User descriptionstring
Used for display/notes purposes only, as the value is stored in node and can be shared within the crew as a comment.
-
-