Mercurial > ~darius > hgwebdir.cgi > epro
changeset 20:8d48ca5294d3
Use add_mandatory_paths rather than rolling our own.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Thu, 09 Dec 2021 11:48:48 +1030 |
parents | 3a3dba401b4a |
children | 625064987b7c |
files | eprodbus.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/eprodbus.py Mon Dec 06 22:32:32 2021 +1030 +++ b/eprodbus.py Thu Dec 09 11:48:48 2021 +1030 @@ -167,11 +167,7 @@ DBusGMainLoop(set_as_default = True) dbusservice = VeDbusService(servicename) - dbusservice.add_path('/Connected', value = True) - dbusservice.add_path('/ProductName', value = 'Enerdrive ePro') - dbusservice.add_path('/Mgmt/Connection', value = '/dev/' + port) - dbusservice.add_path('/DeviceInstance', value = instance) - dbusservice.add_path('/ProductId', value = 'unknown') + dbusservice.add_mandatory_paths(__file__, '1.0', 'Serial ' + port, instance, 0, 'Enerdrive ePro', '1.0', '1.0', 1) dbusservice.add_path('/Dc/0/Voltage', value = None) dbusservice.add_path('/Dc/0/Temperature', value = None) dbusservice.add_path('/Dc/0/Current', value = None)