koenkooi / multiwii-firmware

Firmware - GitHub mirror of the official SVN multiwii project
https://github.com/multiwii/multiwii-firmware/wiki
13 stars 1 forks source link

Remove useless serial response to rc command #19

Closed Arne-W closed 10 years ago

Arne-W commented 10 years ago

Hi all,

every time the copter receives a rc-command through the serial Port it creates an answer and transmits it to the app. Normally the app does not handle this response - it discards it. So why not eliminate it. The answer is created at 2 places in the code. The header ist generated here https://github.com/koenkooi/multiwii-firmware/blob/pruts/Protocol.cpp#L248 and the tail of the message here https://github.com/koenkooi/multiwii-firmware/blob/pruts/Protocol.cpp#L710

We just need to remove this line and no header will be generated headSerialReply(siz +1);

and for removing the tail we add some code like this

  }
#if defined(RC_TINY)
  if (cmdMSP[CURRENTPORT] != MSP_SET_RAW_RC_TINY)
#endif
    tailSerialReply();
}
#endif // SUPPRESS_ALL_SERIAL_MSP

I have already tested the changes and there were no side effects. In fact it does not change anything ;-) but if you want to use Maltes telemetry logger its better to remove this useless overhead.

koenkooi commented 10 years ago

Can you check if that commit does what you want it to do?

Arne-W commented 10 years ago

Looks good - I will do a test this evening.

Arne-W commented 10 years ago

Hups - I forgot to tell you - Yes it works like expected.