Add changing ampl
This commit is contained in:
@@ -33,6 +33,15 @@ int main(int /*argc*/, const char* /*argv*/[])
|
||||
// Set the noise amplitude to 0.75
|
||||
channel.setPropertyValue("NoiseAmplitude", 0.75);
|
||||
|
||||
double amplStep = 0.1;
|
||||
for (int i = 0; i < 200; ++i)
|
||||
{
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(25));
|
||||
const double ampl = channel.getPropertyValue("Amplitude");
|
||||
if (9.95 < ampl || ampl < 1.05)
|
||||
amplStep *= -1;
|
||||
channel.setPropertyValue("Amplitude", ampl + amplStep);
|
||||
}
|
||||
std::this_thread::sleep_for(5s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user