Continuous Telemetry

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
User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Continuous Telemetry

Post by city_kid »

Does anyone know if there is a setting / patch to make MultiWii 2.2 constantly send telemetry data out over serial?

It would be good if it could output the different MSP packets cyclically, with a gap / pause between each one...

Cheers!

city_kid

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Continuous Telemetry

Post by copterrichie »

It would be nice and beneficial to have a telemetry heartbeat toggle but it is not something wanted by the decision makers. :(

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: Continuous Telemetry

Post by shikra »

Personally don't need it, but don't see why couldn't be included as an optional #define

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Continuous Telemetry

Post by Hamburger »

While iit spoils the. concept of mwii as sole replier to msp requests you can get conitinuous telemetry data over serial. Just configure an lcd serial device of your choice (human readable text or vt100 or...) and set lcd.telemetry.auto to your desired sequence of telemetry data pages.
You could alter the update frequency and the hopping frequency via defines to suit your needs.
If none of the existing lcd types fits your needs it would be easy to create yet another type and format for machine processing.
.

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Continuous Telemetry

Post by Sebbi »

I assume this would be needed if only uni-directional (from copter to ground) serial communication is possible?

A function like this would write simulated MSP request into the input buffer:

Code: Select all

void requestMSP(uint8_t msp, uint8_t port) {
        //header
        store_uart_in_buf('$', port);
        store_uart_in_buf('M', port);
        store_uart_in_buf('<', port);
        //len
        uint8_t checksum = 0;
        store_uart_in_buf(0, port);
        checksum ^= 0;
        store_uart_in_buf(msp, port);
        checksum ^= msp;
        store_uart_in_buf(checksum, port);
}


use it like this somewhere in the MultiWii code:

Code: Select all

if(millis() > mytimeinterval) {
        mytimeinterval = millis() + 1000;
        requestMSP(MSP_RAW_IMU, 1); // simulates MSP_RAW_IMU request on port 1
}


The GUI regularly requests the following MSPs:
40 Hz: MSP_ATTITUDE
25 Hz: MSP_STATUS, MSP_RAW_IMU, MSP_SERVO, MSP_MOTOR, MSP_RC, MSP_DEBUG
10 Hz: MSP_ALTITUDE
5 Hz: MSP_RAW_GPS, MSP_COMP_GPS, MSP_ANALOG

Frequency & amount of telemetry could be set via said #defines ;-)

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Continuous Telemetry

Post by copterrichie »

One application for this would be an onboard data recorder using the Sparkfun Openlog. https://www.sparkfun.com/products/9530

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Continuous Telemetry

Post by city_kid »

@Sebbi

Woah! Thanks for this!

This chunk of code is awesome! It's exactly what I need. When I get home tonight I'll try it in my dev MW...

Thanks again!

city_kid

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Continuous Telemetry

Post by city_kid »

@Sebbi

Another thought, is it possible to stop the MSP Serial.ino module from sending out acknowledgements to the MSP_SET_RAW_RC message?

This would reduce the extra traffic from the Copter to the Ground....

Please advise....

Thanks!

city_kid

Post Reply