nodesign / weio

weio
http://we-io.net
128 stars 35 forks source link

weioRunner.py prints traces on program STOP (UPER reset) #168

Closed drasko closed 9 years ago

drasko commented 9 years ago

WeIO user server launched 2015-04-16 21:55:47 WeIO user program stoped. It was runnig since : 2015-04-16 21:55:47 weioRunner.py: UPER API: Unrecoverable serial port writing error, dying. weioRunner.py: UPER API: Unrecoverable serial port writing error, dying. weioRunner.py: UPER API: Unrecoverable serial port writing error, dying.

ks156 commented 9 years ago

Drasko, this problem occurs with all examples ?

ks156 commented 9 years ago

This message is generated here : https://github.com/nodesign/weio/blob/master/IoTPy/pyuper/ioboard.py#L212 It's here that the data is sent to the LPC. What I suspect is:

That's the reason why it's interesting to know if it occurs with all examples, or only with those that send many commands (like this one for example https://github.com/nodesign/weio/blob/master/examples/digital/pwmWrite_PY/main.py).

In any case, I think this bug can be fixed by stopping completely all the process before sending the reset command.

drasko commented 9 years ago

More or less all I tried last night... I do not remember.

Take care that there not only the user processes sending data to UPER, but user Tornado also, through user agent for JS frontend. Point I s that user Tornado starts/stops execution threads, but itself acts as the server for HTML GUI and intercepts and executes JS genericMessage(). Even if you stop all the user processes, if you keep browser open and bombard user Tornado with for example pwmWrite(), it will keep sending these messages to UPER until STOP button is presses (after which user Tornado will ignore these messages from browser).

ks156 commented 9 years ago

If ok, can be closed