Lines Matching refs:segmentIdx
858 static void constructActiveDefaults(std::ostringstream &pwleBuilder, const int &segmentIdx) { in constructActiveDefaults() argument
859 HAPTICS_TRACE("constructActiveDefaults(pwleBuilder, segmentIdx:%d)", segmentIdx); in constructActiveDefaults()
860 pwleBuilder << ",C" << segmentIdx << ":1"; in constructActiveDefaults()
861 pwleBuilder << ",B" << segmentIdx << ":0"; in constructActiveDefaults()
862 pwleBuilder << ",AR" << segmentIdx << ":0"; in constructActiveDefaults()
863 pwleBuilder << ",V" << segmentIdx << ":0"; in constructActiveDefaults()
866 static void constructActiveSegment(std::ostringstream &pwleBuilder, const int &segmentIdx, in constructActiveSegment() argument
871 segmentIdx, duration, amplitude, frequency); in constructActiveSegment()
872 pwleBuilder << ",T" << segmentIdx << ":" << duration; in constructActiveSegment()
873 pwleBuilder << ",L" << segmentIdx << ":" << std::setprecision(1) << amplitude; in constructActiveSegment()
874 pwleBuilder << ",F" << segmentIdx << ":" << std::lroundf(frequency); in constructActiveSegment()
875 constructActiveDefaults(pwleBuilder, segmentIdx); in constructActiveSegment()
878 static void constructBrakingSegment(std::ostringstream &pwleBuilder, const int &segmentIdx, in constructBrakingSegment() argument
883 segmentIdx, duration, toString(brakingType).c_str(), frequency); in constructBrakingSegment()
884 pwleBuilder << ",T" << segmentIdx << ":" << duration; in constructBrakingSegment()
885 pwleBuilder << ",L" << segmentIdx << ":" << 0; in constructBrakingSegment()
886 pwleBuilder << ",F" << segmentIdx << ":" << std::lroundf(frequency); in constructBrakingSegment()
887 pwleBuilder << ",C" << segmentIdx << ":0"; in constructBrakingSegment()
888 pwleBuilder << ",B" << segmentIdx << ":" in constructBrakingSegment()
890 pwleBuilder << ",AR" << segmentIdx << ":0"; in constructBrakingSegment()
891 pwleBuilder << ",V" << segmentIdx << ":0"; in constructBrakingSegment()
916 int segmentIdx = 0; in composePwle() local
965 constructActiveSegment(pwleBuilder, segmentIdx, 0, active.startAmplitude, in composePwle()
967 incrementIndex(&segmentIdx); in composePwle()
970 constructActiveSegment(pwleBuilder, segmentIdx, active.duration, in composePwle()
972 incrementIndex(&segmentIdx); in composePwle()
990 constructBrakingSegment(pwleBuilder, segmentIdx, braking.duration, braking.braking, in composePwle()
992 incrementIndex(&segmentIdx); in composePwle()