[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82

Jan Luebbe jluebbe at debian.org
Mon Feb 2 18:52:03 UTC 2009


The following commit has been merged in the master branch:
commit c38059ea32a8ef32c1a1d7b05f1bde709b6c83c3
Author: Jan Luebbe <jluebbe at debian.org>
Date:   Fri Jan 23 12:35:11 2009 +0100

    ogpsd: handle old and new power control paths

diff --git a/framework/subsystems/ogpsd/om.py b/framework/subsystems/ogpsd/om.py
index eab95de..b0d3a4a 100644
--- a/framework/subsystems/ogpsd/om.py
+++ b/framework/subsystems/ogpsd/om.py
@@ -12,7 +12,8 @@ GPLv2 or later
 __version__ = "0.9.9.3"
 MODULE_NAME = "ogpsd"
 
-DEVICE_POWER_PATH = "/sys/bus/platform/devices/neo1973-pm-gps.0/pwron"
+DEVICE_POWER_PATH_OLD = "/sys/bus/platform/devices/neo1973-pm-gps.0/pwron"
+DEVICE_POWER_PATH_NEW = "/sys/bus/platform/devices/neo1973-pm-gps.0/power_on"
 
 from ubx import UBXDevice
 from ubx import CLIDPAIR
@@ -33,9 +34,8 @@ class GTA02Device( UBXDevice ):
     def __init__( self, bus, channel ):
 
         # Make sure the GPS is off
-        helpers.writeToFile( DEVICE_POWER_PATH, "1" )
-        time.sleep( 0.5 )
-        helpers.writeToFile( DEVICE_POWER_PATH, "0" )
+        helpers.writeToFile( DEVICE_POWER_PATH_OLD, "0" )
+        helpers.writeToFile( DEVICE_POWER_PATH_NEW, "0" )
 
         self.aidingData = persist.get( "ogpsd", "aidingdata" )
         if self.aidingData is None:
@@ -46,7 +46,8 @@ class GTA02Device( UBXDevice ):
         super( GTA02Device, self ).__init__( bus, channel )
 
     def initializeDevice( self ):
-        helpers.writeToFile( DEVICE_POWER_PATH, "1" )
+        helpers.writeToFile( DEVICE_POWER_PATH_OLD, "1" )
+        helpers.writeToFile( DEVICE_POWER_PATH_NEW, "1" )
 
         # Wait for the device to be powered up
         time.sleep(0.5)
@@ -78,7 +79,8 @@ class GTA02Device( UBXDevice ):
 
         super( GTA02Device, self ).shutdownDevice()
 
-        helpers.writeToFile( DEVICE_POWER_PATH, "0" )
+        helpers.writeToFile( DEVICE_POWER_PATH_OLD, "0" )
+        helpers.writeToFile( DEVICE_POWER_PATH_NEW, "0" )
 
         # Save collected aiding data
         persist.set( "ogpsd", "aidingdata", self.aidingData )

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list