intrepidcs / python_ics

Library for interfacing with Intrepid devices in Python
MIT License
61 stars 29 forks source link

NeoDevice Serial number range check #156

Closed pierreluctg closed 1 year ago

pierreluctg commented 1 year ago

Recent commit, https://github.com/intrepidcs/python_ics/commit/0ebf147526275f4af46c33c8821b655e0b013d70#diff-31465b92e05bd43db3ca2ff1c3debf55f46d1d055b86d6dc6b1f58d125fb3262 changed the NeoDevice Serial number range check.

However, the code comment do not match the code (int value). On https://github.com/intrepidcs/python_ics/commit/0ebf147526275f4af46c33c8821b655e0b013d70#diff-31465b92e05bd43db3ca2ff1c3debf55f46d1d055b86d6dc6b1f58d125fb3262R146, AA0000 was changed to A00000

and on https://github.com/intrepidcs/python_ics/commit/0ebf147526275f4af46c33c8821b655e0b013d70#diff-31465b92e05bd43db3ca2ff1c3debf55f46d1d055b86d6dc6b1f58d125fb3262R149, 621457920 was changed to 16796160.

If 16796160 is the right int value, the comment on line 146 should be A0000 and not A00000 or else the comment is correct and the int value should be 604661760.

Based on https://github.com/intrepidcs/libicsneo/blob/018f1fac8e42ca6789235d4991e41bb3083b929f/device/device.cpp#L36, the int value (16796160) is correct and there a typo in the comment.

drebbe-intrepid commented 1 year ago

@pierreluctg thank you. A00000 is correct, I typo'd this. Thanks for catching this so fast.

drebbe-intrepid commented 1 year ago

fixed in 853ed23e5cf11322f8a04c9efb20773703c8ef79

pierreluctg commented 1 year ago

@drebbe-intrepid this means that https://github.com/intrepidcs/libicsneo/blob/018f1fac8e42ca6789235d4991e41bb3083b929f/device/device.cpp#L36 is incorrect?

drebbe-intrepid commented 1 year ago

@pierreluctg no, I suck. I went back and looked into all our source code and documentation. 0A0000 is our lower limit. Guess I've been working here too long and mixed up things in my head...