User Tools

Site Tools


eeros_architecture:control_system:available_blocks:switch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
eeros_architecture:control_system:available_blocks:switch [2017/04/06 13:50] – [Auto Switching] grafeeros_architecture:control_system:available_blocks:switch [2019/08/14 10:04] – [Combining] graf
Line 15: Line 15:
   setCondition(T switchLevel, T delta, uint8_t index)   setCondition(T switchLevel, T delta, uint8_t index)
 </code> </code>
-where ''switchlevel'' is the level the switch has to reach within the margin ''delta''. ''index'' is the new index of the input. As soon as the signal type of the input is no longer the default type (''double'') but, for instance, a [[tools:matrix:start|]] you have to keep in mind that the condition for the switching has to be met for each single element of the matrix! \\+where ''switchlevel'' is the level the switch has to reach within the margin ''delta''. ''index'' is the new index of the input. As soon as the signal type of the input is no longer the default type (''double'') but, for instance, a vector ([[tools:matrix:start|]]you have to keep in mind that the condition for the switching has to be met for each single element of the vector! \\
 Before the switching can take place the switch must be armed with Before the switching can take place the switch must be armed with
 <code cpp> <code cpp>
Line 31: Line 31:
 </code> </code>
  
 +==== Combining ====
 +Switched can be combined. If switch 1 is combined with switch 2 and switch one changes its position then switch 2 will simultaneously change its position as well. To combine switches you have to call
 +<code cpp>
 +  s1.combine(s2)
 +</code>
 +where ''s2'' is the switch whose position will follow the position of ''s1''. You can combine as many switches as you want.
eeros_architecture/control_system/available_blocks/switch.txt · Last modified: 2021/07/07 20:09 by ursgraf