Skip to content

Commit

Permalink
fixed Some Bugs in the Debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
AIIrondev committed Jul 30, 2024
1 parent 9e22468 commit 04a820d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions Code/compiler_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ def debug_function(function,value=False):
pass
case "ai.init":
pass
case "ai.init":
pass
case "module.init":
pass
case "motor.init":
Expand All @@ -234,13 +232,20 @@ def debug_function(function,value=False):
pass
case "main.run":
pass
case "switch":
pass
case "call":
pass
case "generate_ab":
pass
case _:
if function == "//":
pass
elif function == "#":
pass
else:
print(f"Error: The function {function} does not exist.")
messagebox.info("Debugger", f"Error: The function{function} does not exist!")
sys.exit(1)
last_function = function
print(f"Debugging {function} function...")
Expand Down Expand Up @@ -360,6 +365,11 @@ def check_for_format(requestet, value):
int(value)
except:
messagebox.askokcancel(f"Error: The value {value} is not a valid integer.")

class connect:
def main():
pass


class app:
"""
Expand Down Expand Up @@ -394,7 +404,7 @@ def main_frame(self):
tk.CTkLabel(self.root, text=f"Version {__version__}", text_color="Blue").pack(pady=10)

def licence(self):
messagebox.showinfo("License", f"Ekips System Programming License Agreement\nThis License Agreement (the 'Agreement') is entered into by and between Maximilian Gründinger ('Licensor') and the First Lego League Team known as PaRaMeRoS ('Licensee').\n1. License Grant.\nLicensor hereby grants Licensee a non-exclusive, non-transferable license to use and modify the software program known as Ekips System Programming (the 'Program') solely for educational and non-commercial purposes. This license is granted exclusively to the members of the First Lego League Team identified as PaRaMeRoS.\n2. Restrictions.\nLicensee shall not, and shall not permit others to:\na. Use the Program for any purpose other than educational and non-commercial activities within the First Lego League Team.\nb. Allow non-members of the First Lego League Team to use or access the Program.\nc. Commercialize or distribute the Program for financial gain.\nd. Remove or alter any copyright, trademark, or other proprietary notices contained in the Program.\n3. Security.\nLicensor makes no warranties regarding the security of the Program. Licensee acknowledges and agrees that any use of the Program is at their own risk. Licensor shall not be responsible for any security bugs or issues that may arise in connection with the Program.\n4. Term and Termination.\nThis Agreement shall remain in effect until terminated by either party. Licensor reserves the right to terminate this Agreement immediately if Licensee breaches any of its terms. Upon termination, Licensee shall cease all use of the Program and destroy all copies in their possession.\n5. Disclaimer of Warranty.\nTHE PROGRAM IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. LICENSOR DISCLAIMS ALL WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n6. Limitation of Liability.\nIN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n7. Governing Law.\nThis Agreement shall be governed by and construed in accordance with the laws of Germany, Bavaria, Munich.\n8. Entire Agreement.\nThis Agreement constitutes the entire agreement between the parties and supersedes all prior agreements, whether oral or written, with respect to the Program.\nIN WITNESS WHEREOF, the parties hereto have executed this License Agreement as of the effective date.\nLicensor:\nMaximilian Gründinger\nLicensee:\nPaRaMeRoS\nDate: 1.1.2024")
messagebox.showinfo("License", f"MIT License")

def on_closing(self):
if messagebox.askokcancel("Quit", "Do you want to quit?"):
Expand Down
2 changes: 1 addition & 1 deletion Code/conf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.2.3",
"version": "2.2.4",
"calibrate" : "\nasync def calibrate(speed=1000, acceleration=1000):\n if (distance_sensor.distance(port.C) < 110):\n print('Calibration not possible! | Distance to small!')\n elif (distance_sensor.distance(port.C) > 110):\n try:\n await drive(-1, 14, speed, acceleration)\n distance0 = distance_sensor.distance(port.C)\n await drive(10, 14, speed, acceleration)\n distance1 = distance_sensor.distance(port.C)\n calibration = distance0 - distance1\n #print('Calibration done!')\n print(calibration)\n wait(0.5)\n except:\n print('Calibration not possible! | Error!')",
"module": "\nasync def module(degrees=0, speed=1110, acceleration=10000):\n if (degrees > 0):\n await motor.run_for_degrees(motor_module, degrees, speed, acceleration=acceleration)\n elif (degrees < 0):\n await motor.run_for_degrees(motor_module, degrees, speed, acceleration=acceleration)\n elif (degrees == 0):\n print('Error')",
"motor": "\nasync def drive(distance=0, multiplier=14, speed=1000, acceleration=1000):\n if (distance > 0):\n degrees = (distance * calibration)\n await motor_pair.move_for_degrees(pair, degrees, 0, velocity=speed, acceleration=acceleration)\n elif (distance < 0):\n degrees = distance * calibration\n await motor_pair.move_for_degrees(pair, degrees, 0, velocity=speed, acceleration=acceleration)\n elif (distance == 0):\n print('Null Value Error')\nasync def tank(degrees=0, left_speed=1000, right_speed=1000, acceleration=1000):\n #180 degrees = 90 Grad\n if (degrees > 0):\n await motor_pair.move_tank_for_degrees(pair, -degrees, left_speed, -right_speed, acceleration=acceleration)\n elif (degrees < 0):\n await motor_pair.move_tank_for_degrees(pair, degrees, -left_speed, right_speed, acceleration=acceleration)\n elif (degrees == 0):\n print('Null Value Error')\nasync def obstacle(distance=0, speed=1000, acceleration=1000):\n if (distance > 0):\n while distance_sensor.distance(port.C) > distance:\n await drive(2, 14, speed, acceleration)\n print('Obstacle detected!')\n elif (distance <= 0):\n print('Null Value Error')",
Expand Down
Binary file modified Code/file_test.llsp3
Binary file not shown.

0 comments on commit 04a820d

Please sign in to comment.