Class CompareCondition - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | Sketch Made EASY combines inputs with actuators through logic. The logic is defined by the conditions. If a condition is true, the relation to the actuator is active. This condition compares the value of an input with a parameter value. |
Constructor |
CompareCondition(Input* Input, ECompareOperator CompareOperator, int CompareParameter) Parameter Input: Any input whose value should be compared.CompareOperator: Operator* OpEQ (1): Equals = * OpGT (2): Greater than > * OpLT (3): Less than < * OpNEQ (4): Not equal to != * OpGTE (5): greater than or equal to >= * OpLTE (6): less than or equal to <= CompareParameter: Value to compare with |
Samples | CompareCondition* motorStopCondition = new CompareCondition(mainSwitch, OpEQ, Switch2Position::Off); |
Examples |
01-Switch and Lamp 03-Dimming LED with Switch 04-Blinking LED 05‐Motor fix speed, direction‐switch 06‐Motor variable speed, direction‐switch 07‐Motor variable speed, direction‐ and main‐switch 08‐Motor toggles between limit switches 09‐Motor toggles between limit switches, main switch 10‐Main Motor turns between limit switches, second follows 11-Two motors, one turns after the other 16-EncoderMotor and LED controlled by FlySky-RemoteControl 21-Alternate blink |