Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always "Stabilised Flightmode" #6

Closed
Seeelefant opened this issue Aug 19, 2018 · 14 comments
Closed

Always "Stabilised Flightmode" #6

Seeelefant opened this issue Aug 19, 2018 · 14 comments
Labels
enhancement New feature or request

Comments

@Seeelefant
Copy link

Hi Alex,
I am running a PixRacer/MavlinkToPassthru/QuadCopter Combination. So far almost everything works fine, however I am always getting independent from the Mode I choose.
I discussed that issue already with Eric (zs6buj/mav2pt#8 (comment)), and he proposed that you might help.
Best
--Seeelefant
LOG.txt

@yaapu
Copy link
Owner

yaapu commented Aug 19, 2018

Hi what flight stack are you running, ardupilot or px4?
From the mavlink log I see that flightmode is always 1 so it appears that mavlink is not transmitting the info, how's the cabling?

@Seeelefant
Copy link
Author

Hi Alex,
I am running PX4. I was following Eric´s cabling instructions, so every other info is transmitted, only the Flight Mode is missing.

Eric pointed out that:

``Yes, flight mode is derived from ap_custom_mode on the mavlink heartbeat record, and also depends on the type of frame - ap-type. Obviously a quadcopter does not have the same flight modes as a fixed wing aircraft, an so on.

The LUA script determines the correct flight mode name and enunciation.

If there are other "sensors" on the bus, the Taranis and the LUA script need to decide which one to use for flight-mode. Alex (yaapu) can probably help with that.

Good luck
Eric´´

Best
--Seeelefant

@yaapu
Copy link
Owner

yaapu commented Aug 19, 2018

Do you have any other mean to check if flight modes are correctly sent over mavlink, like an OSD?
My script can only decode what the teensy is sending and from the log the teensy is not getting the flightmodes from the mavlink stream the way ardupilot sends them.
The frame type is correct, ap_type=2 means copter, but the flight mode is not decoded the correct way, from this mavlink/mavlink#774 it appears that ap_custom_mode decoding is flight stack dependent, so the values received have to be decoded the PX4 way following this https://github.com/PX4/Firmware/blob/master/src/modules/commander/px4_custom_mode.h#L45

@Seeelefant
Copy link
Author

Hi Alex,
I can see the Flightmodes in QGroundcontrol, but´s that´s not ideal....I would like to have one place with all the relevant infos..... Is there an option that I modify Eric´s script? What message/format do you need for the right Flight Modes?

Best
--Seeelefant

@yaapu
Copy link
Owner

yaapu commented Aug 19, 2018

Mavlink ap_custom_mode has to be decoded according to https://github.com/PX4/Firmware/blob/master/src/modules/commander/px4_custom_mode.h#L45

@yaapu
Copy link
Owner

yaapu commented Aug 19, 2018

Eric and I are working on it :)

@Seeelefant
Copy link
Author

I´m happy to hear that, it´s highly appreciated :-) .
Best
--Seeelefant

@yaapu
Copy link
Owner

yaapu commented Aug 26, 2018

Hi Seeelefant, could you post a telemetry log file .tlog of a flight or of a simple bench flight where you switch some flight modes, I need it to bench test the script against PX4 flight modes

Alex

@Seeelefant
Copy link
Author

Hi Alex,
currently I only have this log
LOG.txt
, is this sufficient?
--Seeelefant

@yaapu
Copy link
Owner

yaapu commented Aug 26, 2018

Hi, do you have the telemetry log files produced by mission planner, qgroundcontrol or tower? They are binary files with the tlog extension, they are the kind of files that you can load in GCS software to replay a flight

@Seeelefant
Copy link
Author

Sorry,
currently not...my Quad is currently broken. May I drop you a line once it is running again ... with fresh logs?
--Seeelefant

@Seeelefant
Copy link
Author

Hi Alex,
my Quad is working again, however currently PX4 has quite some problems with CAN buses. Therefore I switched to ArduCopter and things are working there 🥇 .
May I ask another question:
Here https://github.com/Clooney82/MavLink_FrSkySPort/wiki/1.-Setup there is a section on "Combining Teensy with FrSky Sensors". Is this still possible with your solution, can your script grab these values?
Here https://github.com/Clooney82/MavLink_FrSkySPort/wiki/2.1.-Lipo-Singe-Cell-Monitor there are some remarks how to (mis-) use the Teensy for voltage measurement of the single cells. Could that be implemented within your environment? Which solution would you recommend?

Best
--Seelefant

@yaapu
Copy link
Owner

yaapu commented Oct 15, 2018

Hi,
Passthrough telemetry can share the s.port bus with regular frsky sensors so all frsky sensors can be used with my script, they will be discovered just fine and won't interfere.
If you use 1 or 2 FLVSS sensors and you name them "Cels" and "Cel2" my script will use them for single and dual battery monitoring.

To use the teensy to measure custom voltages would require both code changes on eric side and code changes on my side to expose the values unless eric's code sends the voltage as custom frsky sensors

Your options would be:

  • regular FLVSS or VFAS frsky sensors (no code changes)
  • custom teensy + custom yaapu script
  • custom teensy

Alex

@yaapu yaapu added the enhancement New feature or request label Nov 9, 2018
@yaapu
Copy link
Owner

yaapu commented Apr 26, 2019

If you check my latest beta here you'll find a version that

  • supports PX4 flight modes
  • supports custom frsky sensors

@yaapu yaapu closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants