Skip to content

Wrong return type for ASCOM.ICameraV3.Gains property #33

@rwg0

Description

@rwg0

Hi,

the ASCOM standard specifies that the list of gains should be an arraylist containing strings, but the code returns an arraylist of shorts.
The ASCOM.DriverAccess class forgave this error, but newer ASCOM library code currently does not.

See https://ascom-standards.org/Help/Developer/html/P_ASCOM_DeviceInterface_ICameraV3_Gains.htm

return new ArrayList(ApiContainer.DslrCamera.IsoValues);

which proxies to

List<short> IsoValues { get; }

The code in the Camera class could simply become

return new ArrayList(ApiContainer.DslrCamera.IsoValues.Select(x => x.ToString());

I have raised an issue with the new ASCOMLibrary code to request that it forgive this error to allow existing binary versions of the ASCOM.DSLR to work.

ASCOMInitiative/ASCOMLibrary#28

cheers,

Robin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions