Closed ralphwetzel closed 1 year ago
@ralphwetzel, thank you for the test case and analysis! The tests I created work, so something must be different. I'll take look.
There seems to be another issue related to the LinkCall topic:
The timeout
value is - by reference to the UI - defined in seconds
:
I'm yet pretty sure, Timer.set()
takes the timeout value in ms
.
This currently creates numerous link error missingReturn
warnings - as the timeout fired before the function call returns...
Could you be using an out-of-date nodered2mcu
? The preprocessing does the conversion from seconds to milliseconds.
Interesting example. I never thought about putting a Link In node in the same flow as the Link Call node. I just tried this with the last MCU Edition (including the current nodered2mcu
from the Moddable SDK) and it outputs a debug message with "done" as expected. I'm hoping that after you update, it will work for you as well.
Could you be using an out-of-date
nodered2mcu
?
Indeed. I'm pretty sure though that GitHub showed me (for the last several days) this commit as the current one - and now magically jumped forward. 😕 Anyway. I'll test with the latest version...
👍 Both observations are resolved w/ the current commits. Thank you!
Glad it was that easy. Sorry for the headache. I did learn that Link nodes can link into their own flow from this.
@phoddie -- As the title says: A LinkOut node doesn't return to its LinkCall Node.
Test case
https://github.com/phoddie/node-red-mcu/blob/6427d0e16c32c9d32d29d117ff5c59a79d6da51c/nodered.js#L951-L980
This is due to the fact, that
if (links) {
istrue
in line 961 forlinks === []
andnodered2mcu.js
emitslinks: [],
for this node.I propose to switch the sequence of the
if
clauses - as the existence ofmsg._linkSource
should be the trigger to return to the calling node.