aboutsummaryrefslogtreecommitdiffstats
path: root/System/test_System.py
diff options
context:
space:
mode:
authordamic014 <damic014@umn.edu>2019-11-26 19:31:51 -0600
committerdamic014 <damic014@umn.edu>2019-11-26 19:31:51 -0600
commitc71b351c164a1fb86b5efe0501d4ca40f1e33949 (patch)
tree5de439098f7287d7e9c3f466dd33385abcf137cd /System/test_System.py
parentMerge remote-tracking branch 'origin/library_interrupt_flags' (diff)
parentGot threading and SW limits working really well. Still might be some shakines... (diff)
downloadee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar.gz
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar.bz2
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar.lz
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar.xz
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.tar.zst
ee4511w-c71b351c164a1fb86b5efe0501d4ca40f1e33949.zip
Merge remote-tracking branch 'origin/library_encoder_thread'
Diffstat (limited to '')
-rw-r--r--System/test_System.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/System/test_System.py b/System/test_System.py
index 21ed336..c05affc 100644
--- a/System/test_System.py
+++ b/System/test_System.py
@@ -2,20 +2,12 @@
# DO NOT TEST ON ASSEMBLED PHYSICAL SYSTEM! It will probably break it.
import time
-from system import System
-
-# Return a speed based on current encoder angle.
-# Convert an angle to speed (180 degrees = max speed)
-def control_function(angle):
- return (abs(angle) / 180.0) * 100.0
+from System.system import System
# Main program
sys = System(angular_units = 'Radians')
while 1:
angle, linear = sys.measure()
- print(angle)
- """speed = control_function(angle)
- print(speed)
- sys.adjust(speed)"""
- time.sleep(0.05)
+ print("Angle: " + str(angle) + ", Linear: " + str(linear))
+ time.sleep(0.2)