Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formerly included gobject is not available on Venus 3.xx but GLib is... #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/dummybattery.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

from dbus.mainloop.glib import DBusGMainLoop
import gobject
from gi.repository import GLib
import argparse
import sys
import os
Expand Down Expand Up @@ -37,6 +37,6 @@
'/Dc/0/Current': {'initial': -15, 'update': 0},
'/Soc': {'initial': 10, 'update': 0}})

print('Connected to dbus, and switching over to gobject.MainLoop() (= event based)')
mainloop = gobject.MainLoop()
print('Connected to dbus, and switching over to GLib.MainLoop() (= event based)')
mainloop = GLib.MainLoop()
mainloop.run()
7 changes: 4 additions & 3 deletions test/dummypvinverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# takes data from the dbus, does calculations with it, and puts it back on
from dbus.mainloop.glib import DBusGMainLoop
import gobject
from gi.repository import GLib
import argparse
import sys
import os
Expand Down Expand Up @@ -36,6 +36,7 @@

pvac_output = DbusDummyService(
servicename=args.name,
productname='PVInverter',
deviceinstance=args.position,
paths={
'/Ac/L1/Power': {'initial': 0, 'update': 0},
Expand All @@ -44,8 +45,8 @@
'/Ac/Energy/Forward': {'initial': 0, 'update': 1},
'/Position': {'initial': int(args.position), 'update': 0}})

logger.info('Connected to dbus, and switching over to gobject.MainLoop() (= event based)')
mainloop = gobject.MainLoop()
logger.info('Connected to dbus, and switching over to GLib.MainLoop() (= event based)')
mainloop = GLib.MainLoop()
mainloop.run()


Expand Down
6 changes: 3 additions & 3 deletions test/dummysolarcharger.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

from dbus.mainloop.glib import DBusGMainLoop
import gobject
from gi.repository import GLib
import argparse
import sys
import os
Expand Down Expand Up @@ -38,7 +38,7 @@
productname='Solarcharger',
connection='VE.Direct port 1')

logger.info('Connected to dbus, and switching over to gobject.MainLoop() (= event based)')
mainloop = gobject.MainLoop()
logger.info('Connected to dbus, and switching over to GLib.MainLoop() (= event based)')
mainloop = GLib.MainLoop()
mainloop.run()

6 changes: 3 additions & 3 deletions test/dummyvebus.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

from dbus.mainloop.glib import DBusGMainLoop
import gobject
from gi.repository import GLib
import argparse
import sys
import os
Expand Down Expand Up @@ -44,6 +44,6 @@
'/Ac/Out/L1/P': {'initial': 0, 'update': 0}}
)

logger.info('Connected to dbus, and switching over to gobject.MainLoop() (= event based)')
mainloop = gobject.MainLoop()
logger.info('Connected to dbus, and switching over to GLib.MainLoop() (= event based)')
mainloop = GLib.MainLoop()
mainloop.run()