Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beautify/main win 0 #6

Merged
merged 5 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
Tools/X.txt
Tools/Y.txt
Tools/Z.txt
test.py
5 changes: 3 additions & 2 deletions Tools/Dynamikcy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ from math import tan, atan


cpdef tuple vNeu(WegX, WegY, WegZ, vmax):
#TODO:FIX add real velocity capabilities
#TODO:BEAUTY clean code
vX = 0
vY = 0
vZ = 0
Expand Down Expand Up @@ -88,8 +90,7 @@ cpdef tuple vNeu(WegX, WegY, WegZ, vmax):
return round(vX,6), round(vY,6), round(vZ,6), MotorX, MotorY, MotorZ

cpdef double motor(double ist, double v, int soll, int ziel, bint ZyklStop, int Dir):


#TODO:BEAUTY clean code
if not ZyklStop:
if Dir == 0 and not ZyklStop:
ist = ist + v
Expand Down
10 changes: 5 additions & 5 deletions Tools/Steuerungsklasse.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ from threading import RLock
lck = threading.Lock()





class PosError(Exception):
"""Wird aufgerufen wenn ein Positionierungsfehler vorliegt"""
pass
Expand All @@ -27,7 +24,9 @@ class StopProcess(Exception):
pass

class MotorSteuerung:

""""""
#TODO:FEATURE add limitswitch capabilities
#TODO:BEAUTY clean code
def __init__(self, list pinList = [17, 5, 16, 27, 6, 20, 22, 13, 21]):
cdef list achsList = [0, 1, 2] # die Zahlen sollen die Achse repräsentieren 0 = X / 1 = Y / 2 = Z
self.pinList = pinList
Expand Down Expand Up @@ -96,6 +95,7 @@ class MotorSteuerung:

@staticmethod
def Checkpos(int achse, int direction, int pulse, int endMax, int endMin):
#TODO:FIX rework endpose handling
cdef int achsPos = MotorSteuerung.GetPosition(achse)

try:
Expand Down Expand Up @@ -149,7 +149,7 @@ class MotorSteuerung:
cdef double j
cdef int slowdownCounter = 0


#TODO:FEATURE implement parameterizable acceleration control
try:
const = 0.0008 #getestet durch geogebra nur bei 0.0007
if vmax < 0.0007:
Expand Down
1 change: 0 additions & 1 deletion Tools/X.txt

This file was deleted.

1 change: 0 additions & 1 deletion Tools/Y.txt

This file was deleted.

1 change: 0 additions & 1 deletion Tools/Z.txt

This file was deleted.

Binary file removed Tools/__pycache__/Widgets.cpython-310.pyc
Binary file not shown.
Binary file removed Tools/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file removed Tools/__pycache__/numpad.cpython-310.pyc
Binary file not shown.
Binary file removed __pycache__/vis_fun.cpython-310.pyc
Binary file not shown.
Loading