Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def powermanage::PowerManage::getBrightness (   self  ) 

Read brightness from HAL. 

Definition at line 312 of file powermanage.py.

00312                            :
        """ Read brightness from HAL. """
        if not self.hasBrightness:
            debug("Brightness setting not supported.")
            b = self.brightnessObject.GetBrightness(
        except dbus.DBusException, e:
            # Sometimes, right after resume, the HAL call 
            # fails, in that case, we return the last value
            # and hope that it goes well next time.
            print "Warning: in getBrightness(): ", e
            # try and return the old brightness setting, but don't die in any case:
                return self.old_b
            except AttributeError, errmsg:
        self.old_b = b
        return b

    def adjustBrightness(self, level):

Generated by  Doxygen 1.6.0   Back to index