Skip to content

Commit

Permalink
Merge pull request #6 from suly520/beautify/main_win_0
Browse files Browse the repository at this point in the history
Beautify/main win 0
  • Loading branch information
suly520 authored Jun 27, 2023
2 parents c4e9987 + 1b3c442 commit 4c31186
Show file tree
Hide file tree
Showing 13 changed files with 388 additions and 371 deletions.
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

0 comments on commit 4c31186

Please sign in to comment.