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

mAhdrawn using [Ah] resolution, so reporting 0 in most of the flights #277

Open
ciafe opened this issue Jun 10, 2015 · 4 comments
Open

mAhdrawn using [Ah] resolution, so reporting 0 in most of the flights #277

ciafe opened this issue Jun 10, 2015 · 4 comments

Comments

@ciafe
Copy link

ciafe commented Jun 10, 2015

Hello,

I'm using a NAZE32_REV5 with FEATURE_VBAT ON and power_adc_channel = 5 with a ACS756 sensor connecte to it.

The VBat and amperage are correcly measured and transmitted, but the mAhdrawn remains always 0 because the resolution is 1Ah, so it will take time, or never in one filght, to get a value different than 0. Based on this code:

            mAhdrawnRaw += (amperage * vbatCycleTime) / 1000;
            mAhdrawn = mAhdrawnRaw / (3600 * 100);

Is my understanding corrent?
If yes, does it make sense to work with [mAh] resolution instead of [Ah]?

Thanks a lot!

@luggi
Copy link
Contributor

luggi commented Jun 10, 2015

You must be doing something else wrong, for me it's working perfectly at mAh resolution.
Next time please post a link to the code in the git repository.

@readerror67
Copy link
Contributor

Well they are integers so using Ah doesn't make much sense, I've been using current sensing for a while with MWOSD and not had any issues.

@luggi
Copy link
Contributor

luggi commented Jun 10, 2015

btw:

extern int32_t amperage; // amperage read by current sensor in 0.01A steps
;)

@ciafe
Copy link
Author

ciafe commented Jun 11, 2015

OK, thanks for you feedback, I'll check my setup again!

And sorry for bothering you, there is a clear comment in the variable definition for the resolution used!

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

No branches or pull requests

3 participants