dmroeder / pylogix

Read/Write data from Allen Bradley Compact/Control Logix PLC's
Apache License 2.0
598 stars 182 forks source link

.GetDeviceProperties always returns DeviceType of "None" #216

Closed CLau72 closed 1 year ago

CLau72 commented 1 year ago

When using the GetDeviceProperties method, the DeviceType is always showing as "None" despite the hex of the DeviceID value matching one of the values in the devices dictionary.

Issue looks like it's here: https://github.com/dmroeder/pylogix/blob/20d5792f59ed9fdd7238e38b930a6a66eb8ef38e/pylogix/lgx_device.py#L113

The value is being written to resp.Device instead of resp.DeviceType

dmroeder commented 1 year ago

Oof, you are correct, that should have been DeviceType not Device.

dmroeder commented 1 year ago

You're more than welcome to submit a pull request if you want credit. Otherwise I'll fix it.

CLau72 commented 1 year ago

I'll go ahead and get it submitted in the next few minutes here. Haven't done a PR before so wanted to be sure I dropped this here first 👍

TheFern2 commented 1 year ago

I'll go ahead and get it submitted in the next few minutes here. Haven't done a PR before so wanted to be sure I dropped this here first 👍

The simplest way is to fork it, and do the edit on the browser. When you do a change a pull request should appear on this repo or your fork. Then you can submit from there.

dmroeder commented 1 year ago

Fixed in PR #217