mirror of
https://github.com/eclipse/upm.git
synced 2025-03-28 19:30:05 +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
|
// Start running this instance after timeOffset milliseconds
|
||||||
setTimeout(function()
|
setTimeout(function()
|
||||||
{
|
{
|
||||||
console.log("Starting angle is " + angle);
|
|
||||||
// run this instance every timeInterval milliseconds
|
// run this instance every timeInterval milliseconds
|
||||||
setInterval(function()
|
setInterval(function()
|
||||||
{
|
{
|
||||||
servo.setAngle(angle);
|
servo.setAngle(angle);
|
||||||
|
console.log("Set angle to " + angle);
|
||||||
}, timeInterval);
|
}, timeInterval);
|
||||||
}, timeOffset);
|
}, timeOffset);
|
||||||
// timeOffset tells setTimeout when
|
// timeOffset tells setTimeout when
|
||||||
|
Loading…
x
Reference in New Issue
Block a user