Skip to content

Conversation

henrikekblad
Copy link
Member

E.g.
"1;2;1;0;2;1\n1;11;1;0;2;1\n1;1;1;0;2;0\n1;2;1;0;2;0\n"

E.g. 
"1;2;1;0;2;1\n1;11;1;0;2;1\n1;1;1;0;2;0\n1;2;1;0;2;0\n"
@maratkh
Copy link

maratkh commented Feb 17, 2016

Where i can see release for this feature? I need to reсive multiple command in one message. What possible max lengt for one message (multiple command message)&

@mysensors-jenkins
Copy link

Core tests successful.
A member of the MySensors core team can ask me to verify this pull request more extensively by telling me "jenkins, build examples please".
But remember that I will only listen if you name me with a capital 'J'.

@roboprint
Copy link
Contributor

Is it correct that this code will not be executed if you returning true after finding first '\n'?

    if (available) {
        // Parse message and return parse result
        available = protocolParse(_serialMsg, _serialInputString);
        _serialInputPos = 0;
    }

It seems that it would be more correct to call protocolParse() before returning true or gatewayTransportReceive() call in gateway code will return previous parsed message.

@henrikekblad
Copy link
Member Author

Very true! Good catch. I'll update.

TEAM: NO MERGING OF THIS YET.

@mysensors-jenkins
Copy link

Core tests successful.
A member of the MySensors core team can ask me to verify this pull request more extensively by telling me "jenkins, build examples please".
But remember that I will only listen if you name me with a capital 'J'.

@maratkh
Copy link

maratkh commented Feb 18, 2016

Great! We have already encountered this opportunity yesterday. Packets sent to the node "cut". We will try this fix tomorrow

@roboprint
Copy link
Contributor

@henrikekblad sorry, but seems like your fixed version contains logic error. Protocol will hang up on first invalid message (for example, if message parameters count is < 5).

In this case protocolParse() will return false and _serialInputPos variable will not be set to 0, so next received '\n' will cause to return false from protocolParse() again until buffer is not overflowed (MY_GATEWAY_MAX_RECEIVE_LENGTH).

@henrikekblad
Copy link
Member Author

Thanks, just can't seem to get things right today ;)

@mysensors-jenkins
Copy link

Core tests successful.
A member of the MySensors core team can ask me to verify this pull request more extensively by telling me "jenkins, build examples please".
But remember that I will only listen if you name me with a capital 'J'.

@tekka007 tekka007 merged commit 4e9e3f5 into development May 7, 2016
@tekka007 tekka007 deleted the fix-send-multiple-commands-serial branch May 7, 2016 14:17
tbowmo pushed a commit to tbowmo/MySensors that referenced this pull request Jul 9, 2016
…mands-serial

Allow sending multiple commands in one serial transmission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants