Class IteratorValue - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | Iterator steps by StepWidth between FromValue and ToValue. ECycleMode defines the kind and direction. StepTimeWidthMSec defines the duration of each step. Used e.g. to tests motors from MinSpeed to MaxSpeed, Servo between two angles, .... |
Constructor |
IteratorValue(int FromValue, int ToValue, int StepWidth, int StepTimeWidthMSec, ECycleMode CycleMode) Parameter FromValue: Start valueToValue: End valueStepWidth: Optional with default 1. Step increment.StepTimeWidthMSec: Optional with default 50. Duration of each step in Milliseconds.CycleMode : Optional with default cmMin2Max_Min2Max (0). Defines the kind of the iteration.cmMin2Max_Min2Max (0): iterate from min to max e.g.: 1,2,3,4, 1,2,3,4, cmMin2Max2Min (1): iterate from min up max, down to min, up to max, … e.g. 1,2,3,4,3,2,1,2,3,4,3,2,1,… |
Range | FromValue…ToValue |
Samples | IteratorValue* iterator = new IteratorValue(0, 100); IteratorValue* iterator = new IteratorValue(0, 100, 5); IteratorValue* iterator = new IteratorValue(0, 100, 5, 1000); IteratorValue* iterator = new IteratorValue(0, 100, 10, 1000, cmMin2Max2Min); |
Examples | Test 31, Test 50, … |