mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
servo: Modified output of JavaScript example
Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
This commit is contained in:
parent
2fce7369f4
commit
de70ed8694
@ -43,11 +43,11 @@ function startServo(timeOffset, timeInterval, angle)
|
||||
// Start running this instance after timeOffset milliseconds
|
||||
setTimeout(function()
|
||||
{
|
||||
console.log("Starting angle is " + angle);
|
||||
// run this instance every timeInterval milliseconds
|
||||
setInterval(function()
|
||||
{
|
||||
servo.setAngle(angle);
|
||||
console.log("Set angle to " + angle);
|
||||
}, timeInterval);
|
||||
}, timeOffset);
|
||||
// timeOffset tells setTimeout when
|
||||
|
Loading…
x
Reference in New Issue
Block a user