Skip to content

DCF Parsing: Lookup of baudrate incorrectly uses camel case (i.e, "BaudRate" instead of "Baudrate") which breaks loading of DCF #450

Closed

Description

@hepr-skylotec

Loading of DCF looks up 'BaudRate' (camel case) instead of 'Baudrate'. This causes loading to fail if only 'Baudrate' is given in the DCF file.

The CiA 306, version 1.3.0 "CANopen electronic datasheet (EDS)" specification shows 'Baudrate' (without camelcase).

image

Suggested fix:
Change line 94 in objectdictionary/eds.py from "BaudRate" to "Baudrate"

Activity

  1. acolomb commented on Jun 3, 2024

    @acolomb
    Member

    There was a previous attempt to fix this: #347

    It somehow got mixed up with #350 and then stalled. Ping @thesummer, will you be finishing either of those PRs?

  2. hepr-skylotec commented on Jun 4, 2024

    @hepr-skylotec
    ContributorAuthor

    @acolomb Thanks for the heads-up. I do not know why I did not find #347 .

    I tracked this down to 074cbbc and reverted it for this specific change. I created a PR for it as #452

  3. acolomb commented on Jun 4, 2024

    @acolomb
    Member

    Indeed, that change looks pretty wrong. @af-silva do you remember how you came to that conclusion? The reference to #304 and #305 in the commit message doesn't really help.

  4. linked a pull request that will close this issueRevert "change missing Baudrate to BaudRate" #452on Jun 4, 2024
  5. af-silva commented on Jun 4, 2024

    @af-silva
    Collaborator

    @acolomb to be honest I don't recall but indeed is my bad, you are right! Following the CiA 306 Documentation Section 5.3.3.3

    Device Commissioning >> Baudrate shall indicate the device’s baudrate (Unsigned16)

    For the DeviceCommissioning section the Baudrate is lower case while in the DeviceInfo section is camel case.

  6. acolomb commented on Jun 4, 2024

    @acolomb
    Member

    Also note that the spec contains a typo on "DeviceComissioning". It should be spelled with two "m", as in the headline. But that's how the format is specified, just need to be aware of the typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions