Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project
dynacfg.py File Reference

Package: Hekateros. More...

Go to the source code of this file.

Classes

class  dynacfg.window
 Window class supporting application. More...
 
class  dynacfg.application
 Configure Hekateros servo. More...
 

Functions

def dynacfg.loadIcon (filename)
 Load icon image from file name. More...
 
def dynacfg.round100th (x)
 Round to nearest 100th.
 
def dynacfg.round10th (x)
 Round to nearest 10th.
 
def dynacfg.degToRad (deg)
 Degrees to radians.
 
def dynacfg.radToDeg (rad)
 Radians to degrees.
 

Variables

string dynacfg.appVersion = '1.0.0'
 Application version. More...
 
list dynacfg.imagePath
 Image search paths. More...
 
string dynacfg.hekScriptPath = "/prj/pkg/Hekateros/docs/factory/dynamixel"
 
list dynacfg.hekProducts = ['4S', '4L', '5S', '5L']
 
dictionary dynacfg.hekDynaScripts
 
list dynacfg.hekBaudRates = [9600, 19200, 57600, 115200, 200000, 400000, 500000, 1000000]
 
dictionary dynacfg.fgColors
 Common foreground colors. More...
 
 dynacfg.app = application();
 

Detailed Description

Package: Hekateros.

File: dynacfg.py

LastChangedDate
2014-09-18 16:53:49 -0600 (Thu, 18 Sep 2014)
Rev
3748

Configure Hekateros servo.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
EULA@

Unless otherwise stated explicitly, all materials contained are copyrighted and may not be used without RoadNarrows LLC's written consent, except as provided in these terms and conditions or in the copyright notice (documents and software) or other proprietary notice provided with the relevant materials.

IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY MEMBERS/EMPLOYEES/CONTRACTORS OF ROADNARROWS OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

—@

Definition in file dynacfg.py.

Function Documentation

def dynacfg.loadIcon (   filename)

Load icon image from file name.

Parameters
filenameIcon file name.
Returns
Returns icon widget on success, None on failure.

Definition at line 141 of file dynacfg.py.

141 def loadIcon(filename):
142  # no file name
143  if filename is None or len(filename) == 0:
144  return None;
145  # absolute file name
146  if filename[0] == os.path.sep:
147  try:
148  return ImageTk.PhotoImage(Image.open(filename))
149  except IOError:
150  return None
151  # relative file name - search path for file
152  for path in imagePath:
153  fqname = path + os.path.sep + filename
154  try:
155  return ImageTk.PhotoImage(Image.open(fqname))
156  except IOError:
157  continue
158  return None
159 
160 #

Variable Documentation

string dynacfg.appVersion = '1.0.0'

Application version.

Update as needed.

Definition at line 65 of file dynacfg.py.

dictionary dynacfg.fgColors
Initial value:
1 = {
2  'normal': 'black',
3  'ok': '#008800',
4  'focus': '#0000aa',
5  'warning': '#aa6600',
6  'error': '#cc0000'
7 }

Common foreground colors.

Definition at line 122 of file dynacfg.py.

list dynacfg.imagePath
Initial value:
1 = [
2  "/prj/pkg/Hekateros/share/images",
3  "/usr/local/share/Hekateros/images",
4  "/prj/pkg/appkit/share/images",
5  "/usr/local/share/appkit/images"
6 ]

Image search paths.

Definition at line 68 of file dynacfg.py.