maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Annouce] HealthCheck - Hardware/System checker for the N900 (https://talk.maemo.org/showthread.php?t=45453)

noobmonkey 2010-06-07 11:21

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Quote:

Originally Posted by dharder (Post 703315)
I am having the same problem. The error is:

python: can't open file '/opt/healthcheck/python.py': [Errno 2] No such file or directory

Strange because it is in the directory and all.

Sorry looks like i made an obvious typo in that one!!

python /opt/healthcheck/healthcheck.py

noobmonkey 2010-06-07 11:31

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Ok, new version is in extras -devel NOW! wohooo

removed pyside dependencies, and confirming GPS fix!

qwerty12 2010-06-07 13:01

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Get FM Transmitter state & frequency

I don't know how Qt works (hell, I'm having trouble with python-dbus -- Vala and DBus-GLib in C FTW! :)) so I can't add any interface elements myself; nor do I know how its signal implementation works so I can't add checking for the "Error" signal sent by FMTxd.

Regardless,

Code:

# -*- coding: utf-8 -*-
import dbus

def FMTxPropertiesInterfaceConnect():

        bus = dbus.SystemBus()

        dbus_object = bus.get_object('com.nokia.FMTx', '/com/nokia/fmtx/default', False)

        dbus_interface = dbus.Interface(dbus_object, dbus_interface='org.freedesktop.DBus.Properties')

        return dbus_interface

def GetProp(dbus_interface, prop):
        return dbus_interface.Get('org.freedesktop.DBus.Properties', prop)

def FMTxState():
        return GetProp(FMTxPropertiesInterfaceConnect(), 'state')

def FMTxFrequency():
        return GetProp(FMTxPropertiesInterfaceConnect(), 'frequency')

def FMTxStartable():
        return GetProp(FMTxPropertiesInterfaceConnect(), 'startable')

#print "%s" % FMTxState()

More properties are available than what is there - check out http://maemo.org/api_refs/5.0/5.0-fi...html#id2989565 and many are also setable - http://talk.maemo.org/showpost.php?p...3&postcount=12 is an example of how the Set method of the 'org.freedesktop.DBus.Properties' interface can be used in Python

noobmonkey 2010-06-07 13:33

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Oooo wooohoooooooo!
Will see if i can get it in there, thanks Qwerty! Very much appreciate your input :)

noobmonkey 2010-06-07 14:10

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Tadaaaaaaaaaaaaa
New version - 1.2.1-2 is in extras-devel and should finally have the following:
Fixed pyside dependencies (Attempt No 3)
Fixed GPS Bug - confirmed by Frals
Added Qwerty12's great examples, and tested + added touch updates - like the rest of the info in the system tab.

chubbyisacat 2010-06-07 16:04

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Since the last 3 updates, I can't get Healthcheck to load - just reverts blankly to the desktop every time. It was working fine last night before I updated. I've tried uninstalling and reinstalling to no avail. Thanks for any help - really like the application.

noobmonkey 2010-06-07 16:10

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
Quote:

Originally Posted by chubbyisacat (Post 703674)
Since the last 3 updates, I can't get Healthcheck to load - just reverts blankly to the desktop every time. It was working fine last night before I updated. I've tried uninstalling and reinstalling to no avail. Thanks for any help - really like the application.



eeeeeeeek!
can you please try running it from terminal, and let me know where it falls over?

in terminal type:
python /opt/healthcheck/healthcheck.py

when it fails, you will see something appear in x-terminal, the last few lines should let me identify what and where the problem is.

chubbyisacat 2010-06-07 16:22

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
~ $ python /opt/healthcheck/healthcheck.py
***** Start Imports *****
** Importing qtcore & gui **
** Importing ui.touchstub - accuracy tool **
** Importing sys **
** Importing commands **
** Importing os **
** Importing os.path **
** Importing subprocess **
** Importing dbus.glib **
** Importing Start location**
** Importing Cellinfo **
** Importing Hildon **
** Importing Functions **
** Importing Time **
** Importing GTK **
** Initialize Threads(GTK) **
** Importing Gobject **
***** Finish Imports *****
** Seting global variables **
** Starting Main **
** app = QtGui App** - Running app = QtGui.QApplication(sys.argv) **
/opt/healthcheck/healthcheck.py:1053: GtkWarning: gtk_widget_set_sensitive: assertion `GTK_IS_WIDGET (widget)' failed
app = QtGui.QApplication(sys.argv)
** Setting Main Window**
** Setting tool window #1**
Traceback (most recent call last):
File "/opt/healthcheck/healthcheck.py", line 1057, in <module>
win = healthcheckWindow(MainWindow)
File "/opt/healthcheck/healthcheck.py", line 185, in __init__
self.setAttribute(QtCore.Qt.WA_Maemo5StackedWindow )
AttributeError: type object 'Qt' has no attribute 'WA_Maemo5StackedWindow'
~ $

I hope the above is done right - this is new territory for me.

noobmonkey 2010-06-07 16:31

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
what is your firmware version? :)

chubbyisacat 2010-06-07 16:35

Re: [Annouce] HealthCheck - Hardware/System checker for the N900
 
I have the PR1.2 update installed since it was released. I have had Healtcheck since before that - has worked fine before and since, except after the last 3 updates.


All times are GMT. The time now is 03:55.

vBulletin® Version 3.8.8