diff options
author | lake0112 <lake0112@umn.edu> | 2022-02-24 16:36:07 -0600 |
---|---|---|
committer | lake0112 <lake0112@umn.edu> | 2022-02-24 16:36:07 -0600 |
commit | d6f8b2ff03e372f40d61a20a75eece48816b4480 (patch) | |
tree | b5f72cf4584bfc996e4405eca2911d2a9eb261a4 /System | |
parent | add soft limit (diff) | |
download | ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar.gz ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar.bz2 ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar.lz ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar.xz ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.tar.zst ee4511w-d6f8b2ff03e372f40d61a20a75eece48816b4480.zip |
try again
Diffstat (limited to '')
-rw-r--r-- | System/pendulum/system.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/System/pendulum/system.py b/System/pendulum/system.py index 7dd038a..e1cef2f 100644 --- a/System/pendulum/system.py +++ b/System/pendulum/system.py @@ -76,8 +76,6 @@ class System: # By default, the soft limits will not be used (when set NaN), and the whole extent of the system is available (to the HW limits). #self.negative_soft_limit = negative_limit #self.positive_soft_limit = positive_limit - self.negative_soft_limit = -15 - self.positive_soft_limit = 15 # If both limits have been defined, verify that they are valid (i.e. positive limit must be greater than the negative limit) if not math.isnan(negative_limit) and not math.isnan(positive_limit) and not negative_limit < positive_limit: print("ERROR: Invalid software limits provided. Must be valid floating-point numbers and positive limit must be greater than negative limit. Software limits will be disabled.") @@ -158,6 +156,8 @@ class System: # Re-enable the limit switch interrupts GPIO.add_event_detect(limit_negative_pin, GPIO.FALLING, callback=self.negative_limit_callback, bouncetime=300) GPIO.add_event_detect(limit_positive_pin, GPIO.FALLING, callback=self.positive_limit_callback, bouncetime=300) + self.negative_soft_limit = -15 + self.positive_soft_limit = 15 print("Finished the initialize func") # END initialize |