gijzelaerr / python-snap7

A Python wrapper for the snap7 PLC communication library
http://python-snap7.readthedocs.org/
MIT License
661 stars 246 forks source link

add get_time and set_time in util #308

Closed Yingliangzhe closed 3 years ago

Yingliangzhe commented 3 years ago

Hello, I have added the new functions in util. Could someone take a look at it?

gijzelaerr commented 3 years ago

first impression is that it looks good, thanks. there is only an issue with code style, as you can see in the github actions build:

snap7/util.py:617:18: E261 at least two spaces before inline comment
snap7/util.py:627:12: E127 continuation line over-indented for visual indent
snap7/util.py:657:109: W504 line break after binary operator
snap7/util.py:667:1: E302 expected 2 blank lines, found 1
Yingliangzhe commented 3 years ago

Hello @gijzelaerr, I have modified the code style and pushed it again, github is checking the code. But one check (build-and-test-wheels / testing wheels (windows-latest, 3.7) (pull_request) ) is still pending after 30 mins. Could you please have a look at it? Thank you.

gijzelaerr commented 3 years ago

regarding the pending CI build, you can ignore that, it just hangs sometimes.

Yingliangzhe commented 3 years ago

This version has one more problem. If the time_string is '-0:0:0:0.1', the result bytearray is not 0xffffffff, but 0x00000001.