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

Fix the case where the flight controller is connected to the battery (charge 100), QGC shows no battery #15306

Closed
wants to merge 2 commits into from

Conversation

CUAVcaijie
Copy link
Contributor

I use the CAN PMU to power the CUAVv5+. When the CAN PMU reaches 100, the QGC shows no battery .
It was found that MAVLINK SYS_STATUS selected the first group of unconnected battery status. Instead of the actual battery status behind

@dagar
Copy link
Member

dagar commented Jul 12, 2020

I'm not sure that I'm following the logic correctly. Why is this happening at 100? What does listener battery_status show?

@saengphet
Copy link

Hi, @CUAVcaijie I think this is the same (or similar) problem that I have faced. Furthermore, in my case, I tried to use 1 of regular PM and 1 of CANPMU at the same time for redundancy. I solved the problem by changing battery remaining of CANPMU to 1 ( in sensors/battery.cpp), then the system will choose the lowest one to make decisions about arm or disarm. It is temporarily fixed.

#15244

@CUAVcaijie CUAVcaijie closed this Jul 13, 2020
@CUAVcaijie CUAVcaijie reopened this Jul 13, 2020
@CUAVcaijie
Copy link
Contributor Author

I'm not sure that I'm following the logic correctly. Why is this happening at 100? What does listener battery_status show?

The data of battery_status_s is as follows:
The first group: connected=0, remaining=1.f
The third group: connected=1, remaining=1.f
image

@CUAVcaijie
Copy link
Contributor Author

Hi, @CUAVcaijie I think this is the same (or similar) problem that I have faced. Furthermore, in my case, I tried to use 1 of regular PM and 1 of CANPMU at the same time for redundancy. I solved the problem by changing battery remaining of CANPMU to 1 ( in sensors/battery.cpp), then the system will choose the lowest one to make decisions about arm or disarm. It is temporarily fixed.

#15244

Because CUAV CAN PMU is not a smart battery, it cannot provide accurate remaining power
#15314

@CUAVcaijie
Copy link
Contributor Author

@dagar Do you have any other questions?

@CUAVcaijie
Copy link
Contributor Author

@dagar @davids5
The problem I solved here is that when the power supply of the first group and the second group of ADC is not connected, the power of the latter is less than 100 before it is sent to the ground station. Now I have a battery up to 100 and the ground station shows no battery access.

@CUAVcaijie
Copy link
Contributor Author

@dagar How about this?

@davids5 davids5 requested a review from dagar August 22, 2020 10:30
@CUAVcaijie
Copy link
Contributor Author

@dagar How about this?

@CUAVcaijie
Copy link
Contributor Author

@dagar How about this?

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
@LorenzMeier LorenzMeier self-assigned this Jan 18, 2021
@stale stale bot removed the stale label Jan 18, 2021
@LorenzMeier LorenzMeier mentioned this pull request Jan 19, 2021
@LorenzMeier
Copy link
Member

I've rebased this: #16591

@CUAVcaijie
Copy link
Contributor Author

thank you

@CUAVcaijie CUAVcaijie deleted the mavlink_battery_status branch January 20, 2021 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants