raphaelthurnherr / algobot_onionOmega

1 stars 0 forks source link

Create an initialize command #22

Closed YannCaron closed 6 years ago

YannCaron commented 6 years ago

A command that reset all states (to be sent at the beginning of program, just after connection).

e.g. Set all leds, motors, pwms to off, reset all captors, distance and so on.

raphaelthurnherr commented 6 years ago

Use the restart command.

.. "MsgData":{ "MsgType":"command", "MsgParam":"system", "MsgValue":[ { "application":"restart" } ] } ..

YannCaron commented 6 years ago

Well, I want to use reset at the beginning of the program (everytime I connect to the robot). Then program will begin with initial states.

raphaelthurnherr commented 6 years ago

Also possible to use this config message see http://algobot.electool.ch/doku.php?id=communication:mqttmessage#configuration_algobot for more infos ... "MsgValue":[ { "config":{ "reset":"true" }, "stream":{ "state":"off", "time":1000, "onEvent":"off" } } ] ...