README updates, some documentation

This commit is contained in:
Paul Warren 2024-10-11 14:58:36 +11:00
parent d0a3decf1b
commit 25c1297a53
3 changed files with 7 additions and 4 deletions

View file

@ -13,6 +13,11 @@ def build_and_check_dists(session):
session.run("python", "-m", "build")
session.run("python", "-m", "twine", "check", "dist/*")
@nox.session
def build(session):
lint(session)
build_and_check_dists(session)
@nox.session
def tests(session):
session.install('pytest')

View file

@ -1,8 +1,7 @@
#!/usr/bin/env python3
#from PyFroniusReg import froniusreg
#import src.froniusreg
import src.pyfroniusreg.froniusreg as froniusreg
from pyfroniusreg import gen24_registers as froniusreg
from pymodbus.client.tcp import ModbusTcpClient
fronius1 = ModbusTcpClient("172.19.107.211", port=502, timeout=10)

View file

@ -73,7 +73,6 @@ class FroniusReg:
def __setRegisterValue(self, modbusClient, value):
modbusValue = modbusClient.write_registers(self.address-1,
self.datatype.encode_to_buffer(value),
count=self.datatype.width,
slave=self.unit,
skip_encode=True)
return modbusValue