Esempio n. 1
0
 def setupCard(self):
     if ioctl.get_intvar('mpc'):
         ioctl.set_intvar('mpc', 0)
Esempio n. 2
0
    channel = None
    if len(sys.argv) == 3:
        channel = int(sys.argv[2])
        if channel < 1 or channel > 14:
            # TODO: Set country to JP to be
            #       able to set up to channel 14.
            print "Error: channel must be between 1 and 11."
            sys.exit(-1)

    if not test_ioctl():
        print "Error: Unable to ioctrl."
        sys.exit(-1)

    mpc_state = get_intvar("mpc")

    if action == "start":
        print "Disabling MPC."
        print "Remember to enable MPC or your batery will",
        print "consume preatty quick."
        print "To enable MPC use these tool with the stop parameter."
        set_intvar("mpc", 0)
    else:
        set_intvar("mpc", 1)
        print "Enabling MPC."

    if channel:
        print "Setting channel to %d" % channel
        set_channel(channel)

Esempio n. 3
0
 def setupCard(self):
     if ioctl.get_intvar('mpc'):
         ioctl.set_intvar('mpc', 0)