|
| | Cube.h |
| |
| | Sphere.h |
| |
| | Teleplot.h |
| |
| | Teleplot_client.h |
| |
La librairie Teleplot sert à envoyer des messages interprétables par le (programme éponyme)[https://github.com/clubrobot/teleplot].
Utilisation
Dans votre code, importez la librairie :
...
...
Definition Teleplot_client.h:18
Ensuite vous devez initialiser la librairie :
Vous pouvez ensuite envoyer directement des messages :
teleplot.send_string("Hello world");
teleplot.envoie_tampon()
teleplot.ajout_ou_envoie_tampon("Hello world");
teleplot.add_variable_float_2decimal("temperature", 25.5);
teleplot.add_variable_int("compteur", 42);
teleplot.add_variable_string("led jaune", "off");
teleplot.add_log("Hello world");
Pour utiliser les objets 3d, vous devez d'abord les créer :
Sphere sphere(
"ballon", 0.5, 0, 0, 10, 0, 0, 0, 0, 15,
"#ff0000", 0.8);
sphere.sendSphereToTeleplot(teleplot);
sphere.setColor("#00ff00");
sphere.sendSphereToTeleplot(teleplot);
Cube cube(
"robot", 0.5, 0.2, 0, 10, 100, 20, 10, 0, 0, 1,
"#00ff00", 0.5);
cube.sendCubeToTeleplot(teleplot);
cube.setZPosition(0.5);
cube.sendCubeToTeleplot(teleplot);