Skip to content

Commit

Permalink
pass function argments as quoted string and explicitly evaluate them …
Browse files Browse the repository at this point in the history
…on each loop
  • Loading branch information
johnny-lighthouse committed Oct 16, 2012
1 parent c9a0b6d commit 8effe9c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions dum.py
Expand Up @@ -93,12 +93,12 @@ def Major_Payload():

if Delta > Max_Delta:
Max_Delta = Delta
print "Max difference at rest is %1.3f Volts" % Max_Delta
print "Max difference from average is %1.3f Volts" % Max_Delta

Close_Device()

def Minor_Payload():
Tweedle_Dee = 0
pass

def Loop(x,y):

Expand All @@ -125,26 +125,26 @@ def Loop(x,y):
Target = Target + MajorPeriod

#major period
#preform actions
x
print "bang! at: ", time.time()
#preform actions passed as string in argument x

eval(x)

else:
Remainder = Target - Start

if Remainder < NapTime:
time.sleep(Remainder)
print "Target = ", Target
print "Start = ", Start
else:

#Minor Period
#preforms actions?
y
print "really?"
#preform actions passed as string in argument y

eval(y)

time.sleep(NapTime)


###############
# main loop

Loop(Major_Payload(), Minor_Payload())
Loop("Major_Payload()", "Minor_Payload()")

0 comments on commit 8effe9c

Please sign in to comment.