README updates, some documentation
This commit is contained in:
parent
d0a3decf1b
commit
25c1297a53
3 changed files with 7 additions and 4 deletions
|
@ -13,6 +13,11 @@ def build_and_check_dists(session):
|
||||||
session.run("python", "-m", "build")
|
session.run("python", "-m", "build")
|
||||||
session.run("python", "-m", "twine", "check", "dist/*")
|
session.run("python", "-m", "twine", "check", "dist/*")
|
||||||
|
|
||||||
|
@nox.session
|
||||||
|
def build(session):
|
||||||
|
lint(session)
|
||||||
|
build_and_check_dists(session)
|
||||||
|
|
||||||
@nox.session
|
@nox.session
|
||||||
def tests(session):
|
def tests(session):
|
||||||
session.install('pytest')
|
session.install('pytest')
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
#from PyFroniusReg import froniusreg
|
from pyfroniusreg import gen24_registers as froniusreg
|
||||||
#import src.froniusreg
|
|
||||||
import src.pyfroniusreg.froniusreg as froniusreg
|
|
||||||
from pymodbus.client.tcp import ModbusTcpClient
|
from pymodbus.client.tcp import ModbusTcpClient
|
||||||
|
|
||||||
fronius1 = ModbusTcpClient("172.19.107.211", port=502, timeout=10)
|
fronius1 = ModbusTcpClient("172.19.107.211", port=502, timeout=10)
|
||||||
|
|
|
@ -73,7 +73,6 @@ class FroniusReg:
|
||||||
def __setRegisterValue(self, modbusClient, value):
|
def __setRegisterValue(self, modbusClient, value):
|
||||||
modbusValue = modbusClient.write_registers(self.address-1,
|
modbusValue = modbusClient.write_registers(self.address-1,
|
||||||
self.datatype.encode_to_buffer(value),
|
self.datatype.encode_to_buffer(value),
|
||||||
count=self.datatype.width,
|
|
||||||
slave=self.unit,
|
slave=self.unit,
|
||||||
skip_encode=True)
|
skip_encode=True)
|
||||||
return modbusValue
|
return modbusValue
|
||||||
|
|
Loading…
Reference in a new issue