Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Add swallow balls action + button in telecommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fuhrmann committed May 25, 2017
1 parent be74218 commit db9710f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions clients/extension/sweeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class Sweeper extends Extension {
});
break;
case "swallow_balls":
//TODO
this.logger.warn("TODO: make swallow_balls work");
this.client.send("gr", "asserv.pwm", {left : -100, right : -100, ms : 1000});
this.fifo.orderFinished();
break;
case "send_message":
Expand Down
4 changes: 4 additions & 0 deletions webclient/pages/telecommande/grobotdisplay.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ class GrobotDisplay extends RobotDisplay {
seesaw() {
this.client.send(this.name, "climb_seesaw");
}

swallowBalls() {
this.client.send("sweeper", "swallow_balls");
}
}
1 change: 1 addition & 0 deletions webclient/pages/telecommande/telecommande.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ <h3>Extensions : </h3>
Sweeper :
<button type="button" class="btn" ng-click="grobot.turnOnSweeper()">Turn on</button>
<button type="button" class="btn" ng-click="grobot.turnOffSweeper()">Turn off</button>
<button type="button" class="btn" ng-click="grobot.swallowBalls()">Swallow balls</button>
</p>
<p>
Funny action :
Expand Down

0 comments on commit db9710f

Please sign in to comment.