From 07318f32608e9dd4a6cfa0c47b0b03c18cc3c50e Mon Sep 17 00:00:00 2001 From: travisutk Date: Sat, 23 Apr 2011 16:45:19 +0000 Subject: [PATCH] SmartRF7 is now located on Win32 at its default location. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1006 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETCC.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index c1892c4..622dae0 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -11,13 +11,24 @@ import binascii; from GoodFET import GoodFET; from intelhex import IntelHex; -import xml.dom.minidom, time; +import xml.dom.minidom, time, os; class GoodFETCC(GoodFET): """A GoodFET variant for use with Chipcon 8051 Zigbee SoC.""" APP=0x30; - smartrfpath="/opt/smartrf7"; + smartrfpath=None; + def __init__(self,filename=None): + """GoodFETCC constructor. + Mostly concerned with finding SmartRF7.""" + if self.smartrfpath==None: + self.smartrfpath=os.environ.get("SMARTRF"); + if self.smartrfpath==None and os.name=='nt': + self.smartrfpath="c:/Program Files/Texas Instruments/SmartRF Tools/SmartRF Studio 7"; + if self.smartrfpath==None: + self.smartrfpath="/opt/smartrf7"; + + def loadsymbols(self): try: self.SRF_loadsymbols(); except: -- 2.20.1