Modify code for sending telemetry over MSP

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
jaumemiralles
Posts: 12
Joined: Tue Mar 22, 2016 5:41 pm

Modify code for sending telemetry over MSP

Post by jaumemiralles »

Hi

I would like to know if it's possible to modify the code for Multiwii so that Multiwii sends telemetry data without waiting the query command from master over UART-MSP

In "Protocol.cpp", we have the function "evaluateCommand()", where, for instance, for the command "MSP_ALTITUDE" we have the statement "s_struct((uint8_t*)&alt,6);" wich AFAIK puts the frame with altitude data over UART.

Then i tried to put "s_struct((uint8_t*)&alt,6);" or "s_struct((uint8_t*)&alt,6);tailSerialReply();" in the main loop in Multwii.cpp (with proper declaration in 'Protocol.h') or in Protocol.cpp itself, it compiles ok...but no result

I must confess I'm not familiar with cpp so i need some help. Maybe this is a crazy idea with no future. Any impressions will be apreciated

Thanks in advance

gregd72002
Posts: 103
Joined: Fri Dec 12, 2014 5:16 pm

Re: Modify code for sending telemetry over MSP

Post by gregd72002 »

you are looking in the right places... something around the lines should do. Though if you decide to send always telemetry this way you wont be able to use serial GPS obviously

jaumemiralles
Posts: 12
Joined: Tue Mar 22, 2016 5:41 pm

Re: Modify code for sending telemetry over MSP

Post by jaumemiralles »

Do you think so?

I'm planning to send repeatedly telemetry over UART, while interfacing GPS via I2C. I don't think i might have problems with it.

The purpose is keeping clear de TX channel on UART for RC commands

Post Reply