Fun with PWM  0.32
PreFlight.PreFlight Class Reference

Pre flight checks - ensures the pi will work with servo features. More...

Static Public Member Functions

def status ()
 
def loadCache ()
 
def updateCache ()
 
def report ()
 
def configure ()
 
def getPiI2CBusNumber ()
 
def getPiRevision ()
 

Static Public Attributes

dictionary interfaces = { 'i2c': { 'interface': 'i2c_arm', 'enabled': False } }
 
dictionary i2cModules = { 'i2c-bcm2708': False, 'i2c-dev': False}
 
dictionary blacklist = { 'i2c-bcm2708': False }
 
list prep
 
list dependencies
 
dictionary cache = {}
 
 cachepath = os.path.join(AmsEnvironment.FilePath(), 'PreFlight')
 
 cachefile = os.path.join(cachepath, 'cache.json')
 

Detailed Description

Pre flight checks - ensures the pi will work with servo features.

Member Function Documentation

§ configure()

def PreFlight.PreFlight.configure ( )
static
performs configuration changes

§ getPiI2CBusNumber()

def PreFlight.PreFlight.getPiI2CBusNumber ( )
static
Gets the I2C bus number /dev/i2c#

@return int

§ getPiRevision()

def PreFlight.PreFlight.getPiRevision ( )
static
Gets the version number of the Raspberry Pi board
Courtesy quick2wire-python-api
https://github.com/quick2wire/quick2wire-python-api

@return int

§ loadCache()

def PreFlight.PreFlight.loadCache ( )
static
load cached data if available

§ report()

def PreFlight.PreFlight.report ( )
static
gets a full report of pre flight checks

@return dict

§ status()

def PreFlight.PreFlight.status ( )
static
gets the status of pre flight checks

@return bool

§ updateCache()

def PreFlight.PreFlight.updateCache ( )
static
update cache data

@return bool

Member Data Documentation

§ dependencies

list PreFlight.PreFlight.dependencies
static
Initial value:
= [
{'package': 'python-dev', 'installer': 'apt-get', 'installed': False },
{'package': 'python-pip', 'installer': 'apt-get', 'installed': False },
{'package': 'python-smbus', 'installer': 'apt-get', 'installed': False },
{'package': 'i2c-tools', 'installer': 'apt-get', 'installed': False}
]

§ prep

list PreFlight.PreFlight.prep
static
Initial value:
= [
{'command': ['sudo', 'apt-get', '-q', '-y', 'update'], 'done': False },
{'command': ['sudo', 'apt-get', '-q', '-y', 'upgrade'], 'done': False }
]

The documentation for this class was generated from the following file: