johncclayton / charger

USB based interface to iCharger (and others in the future)
8 stars 5 forks source link

Spike: "unable to fetch the status of channel 1" #1

Open pilyx opened 8 years ago

pilyx commented 8 years ago

Dear John,

First of all thank you for sharing your code. I am trying to develop a computer interface for the icharger and your code is very helpful.

I am currently having issues with the "spike" part of your code, I do not manage to read the battery channels. You will find the output of read_test in the link below. pastebin.com/ku3zyFvU

"unable to fetch the status of channel 1" As I looked a little further, it seems that the condition in line 195 of utils.cpp is not verified. Have you had similar issues?

Thank you for your time.

Best regards,

Pierre

johncclayton commented 8 years ago

Yo! Did you run that as sudo?

Thanks,

John Clayton

On 29 Mar 2016, at 5:03 PM, pilyx notifications@github.com wrote:

Dear John,

First of all thank you for sharing your code. I am trying to develop a computer interface for the icharger and your code is very helpful.

I am currently having issues with the "spike" part of your code, I do not manage to read the battery channels. You will find the output of read_test in the link below. http://pastebin.com/ku3zyFvU x-msg://79/url "unable to fetch the status of channel 1" As I looked a little further, it seems that the condition in line 195 of utils.cpp is not verified. Have you had similar issues?

Thank you for your time.

Best regards,

Pierre

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/johncclayton/charger/issues/1

pilyx commented 8 years ago

Hi John, Yes I did (1rst line of the link)

I receive the status of the charger (ID, SW_version, ... ) I manage to send charge/discharge orders. But cannot read the channels' information.

Thank you

johncclayton commented 8 years ago

Oh, damn - I was hoping that would solve it. Right now I don’t have the time to debug it or work out what the problem is. I have written C++ code that receives the channel information so I know it works. Look at the differences between icharger_usb.cpp in service/usb and the utils.cpp code - the one in the server/usb directory is more authorative, and maybe I messed up something in utils.cpp?

Thanks,

John Clayton

On 30 Mar 2016, at 9:45 AM, pilyx notifications@github.com wrote:

Hi John, Yes I did (1rst line of the link)

I receive the status of the charger (ID, SW_version, ... ) I manage to send charge/discharge orders. But cannot read the channels' information.

Thank you

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/johncclayton/charger/issues/1#issuecomment-203297811

pilyx commented 8 years ago

Thank you for your time. I'll go and have a look at icharger_usb.

johncclayton commented 8 years ago

no worries :-) I’m just sorry I can’t help more - I’m super busy at work right now.

On 30 Mar 2016, at 10:28 AM, pilyx notifications@github.com wrote:

Thank you for your time. I'll go and have a look at icharger_usb.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/johncclayton/charger/issues/1#issuecomment-203320199

johncclayton commented 8 years ago

by the way, what are you making? I’m curious…

On 30 Mar 2016, at 10:28 AM, pilyx notifications@github.com wrote:

Thank you for your time. I'll go and have a look at icharger_usb.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/johncclayton/charger/issues/1#issuecomment-203320199

pilyx commented 8 years ago

Thanks again We have commited a partial solution to the problem (libusb was closing to early because, I think, of a wrong manipulation of reference counting of pointer)

We are currently evaluating if the icharger is suitable for our drone ground base. You will find more information here :) http://uavia.eu/en/

johncclayton commented 8 years ago

ok, will you PR that back into the github repo or otherwise let me see the change? I suspect you refer to when the USB devices are iterated over in order to discover if the icharger is present in the system?

John Clayton

CTO

FileWave (Europe) GmbH St. Gallerstrasse 1 CH - 9500 Wil

Phone: +41 71 914 30 80 Fax: +41 71 914 30 81 Web: www.filewave.com http://www.filewave.com/ Skype: johncclayton

On 30 Mar 2016, at 12:52 PM, pilyx notifications@github.com wrote:

Thanks again We have commited a partial solution to the problem (libusb was closing to early because, I think, of a wrong manipulation of reference counting of pointer)

We are currently evaluating if the icharger is suitable for our drone ground base. You will find more information here :) http://uavia.eu/en/ http://uavia.eu/en/ — You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/johncclayton/charger/issues/1#issuecomment-203377184

pilyx commented 8 years ago

https://github.com/UpsilonAudio/charger Here is the fork we committed with changes.