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
Continuous Telemetry
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Continuous Telemetry
It would be nice and beneficial to have a telemetry heartbeat toggle but it is not something wanted by the decision makers.
Re: Continuous Telemetry
Personally don't need it, but don't see why couldn't be included as an optional #define
Re: Continuous Telemetry
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.
.
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.
.
Re: Continuous Telemetry
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:
use it like this somewhere in the MultiWii code:
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
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
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Continuous Telemetry
One application for this would be an onboard data recorder using the Sparkfun Openlog. https://www.sparkfun.com/products/9530
Re: Continuous Telemetry
@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
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
Re: Continuous Telemetry
@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
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