Page 1 of 1

How to tell via API if DutyCycle is supported?

Posted: Thu May 14, 2020 6:56 pm
by derammo
I am writing a general interface for Phidgets22 to Helios 1.6 (virtual cockpit software.) So I am trying to support device classes in general without knowing ahead of time what devices the user may have.

Things are going well, but I ran into a problem: An InterfaceKit 8/8/8 reports that it has DigitalOutput. It also return MinDutyCycle = 0 and MaxDutyCycle = 1. However, it doesn't actually support DutyCycle I think, as it throws an exception if I set it to 0.1.

How am I supposed to know from the API that this is not supported? Is it a bug that MaxDutyCycle is set to 1 for devices that actually should just use "State" instead? I realize it supports the values 0 and 1, but it doesn't support any value in between :)

Re: How to tell via API if DutyCycle is supported?

Posted: Fri May 15, 2020 3:01 pm
by Patrick
You can use the ChannelSubclass Property. This will be None for regular digital outputs, and DigitalOutputDutyCycle for outputs supporting Duty Cycle.

-Patrick

Re: How to tell via API if DutyCycle is supported?

Posted: Fri May 15, 2020 6:07 pm
by derammo
Thanks so much. I had actually structured my code to do something like that because your API is always logical. But then I screwed up my test case and thought it was always "None."

Thanks!

Re: How to tell via API if DutyCycle is supported?

Posted: Tue Jun 07, 2022 6:25 am
by ROP
Can someone help me? I have a physical Cockpit with 5 Phidget card, I really want my 6 phidget card to talk to the SW Helios 1.6Virtual Cockpit. For the moment my Helios 1.6 (Nor 1.4) can`t add my Phidget as Interface: I think this was one of "derammo" initial problem as well. I Hope you have solved this ?

Re: How to tell via API if DutyCycle is supported?

Posted: Wed Jun 08, 2022 8:14 am
by derammo
I have stopped development on the Phidget support for 1.6 due to me exiting the project.

I already replied to you on github, so I won't duplicate information here.