Satish.n
Satish.n

Reputation: 9

passing value from javascript to switch box in choregraphe : Pepper Robot

I have created a app in Choregraphe and called the tablet view from choregraphe and then I have to pass a value from javascript to the switch box. How should I do it. I am new to choregraphe.

Upvotes: 0

Views: 340

Answers (1)

Emile
Emile

Reputation: 2981

Basically, raise an ALMemory value from your page with qimessaging.js, and then subscribe to that event in memory.

In your javascript, for example using robotutils.js, you could do something like this inside a click callback:

RobotUtils.onService(function(ALMemory) {
  ALMemory.raiseEvent("MyApplication/MyTabletEvent", 42);
});

(you can also directly use qimessaging js, robotutils just adds some syntactic sugar and maeks it easier to test in your browser without installing to the robot)

... and then in Choregraphe, link this ALMemory event to your boxes, as shown for example in step 3 of this tutorial

Upvotes: 1

Related Questions