diff --git a/app.py b/app.py index 5219258..deb21af 100644 --- a/app.py +++ b/app.py @@ -1,13 +1,13 @@ from telemetrix_rpi_pico import telemetrix_rpi_pico -import kuukar_leds -import kuukar_collision -import kuukar_motion -import kuukar_lcd -import kuukar_sensors -import kuukar_environment +import kuukar.kuukar_leds as kuukar_leds +import kuukar.kuukar_collision as kuukar_collision +import kuukar.kuukar_motion as kuukar_motion +import kuukar.kuukar_lcd as kuukar_lcd +import kuukar.kuukar_sensors as kuukar_sensors +import kuukar.kuukar_environment as kuukar_environment from flask import Flask, request -from kuukar_config import SERIAL_AUX_BOARD, SERIAL_DRIVER_BOARD +from kuukar.kuukar_config import SERIAL_AUX_BOARD, SERIAL_DRIVER_BOARD app = Flask(__name__) diff --git a/classes.dot b/classes.dot new file mode 100644 index 0000000..62c482d --- /dev/null +++ b/classes.dot @@ -0,0 +1,13 @@ +digraph "classes" { +rankdir=BT +charset="utf-8" +"kuukar.kuukar_collision.collision" [color="aliceblue", fontcolor="black", label="{collision|aux : TelemetrixRpiPico\llcd\lleds\l|collision_handle(data)\l}", shape="record", style="filled"]; +"kuukar.kuukar_cv.cv" [color="aliceblue", fontcolor="black", label="{cv|lcd\lleds\l|capture_image()\ldetect_face(image)\lhandle_face_detected()\l}", shape="record", style="filled"]; +"kuukar.kuukar_environment.environment" [color="aliceblue", fontcolor="black", label="{environment|h_alerted : bool\lh_alerted : bool\llcd\lleds\lsensors\lt_alerted : bool\lt_alerted : bool\l|}", shape="record", style="filled"]; +"kuukar.kuukar_lcd.lcd" [color="aliceblue", fontcolor="black", label="{lcd|nextion\l|pause_video(): None\lplay_video(filename: str): None\lresume_video(): None\lstop_video(): None\l}", shape="record", style="filled"]; +"kuukar.kuukar_leds.leds" [color="aliceblue", fontcolor="black", label="{leds|ambient_light : list\lambient_light : list\laux_board : TelemetrixRpiPico\lflashing : bool\lflashing : bool\lheadlight : bool\lleft_signal : bool\lleft_signal : bool\lreverse_signal : bool\lreverse_signal : bool\lright_signal : bool\lright_signal : bool\lstart_time\lstart_time\l|flash(r: int, g: int, b: int, duration: int)\lset_ambient_led(r: int, g: int, b: int)\lset_headlights(state: bool)\lset_left_signal_led(state: bool)\lset_reverse_led(state: bool)\lset_right_signal_led(state: bool)\l}", shape="record", style="filled"]; +"kuukar.kuukar_motion.motion" [color="aliceblue", fontcolor="black", label="{motion|driver : TelemetrixRpiPico\lleds\lroam_thread : Thread\lroaming : bool\lroaming : bool\lsensors\l|drive(speed: int)\lmotor_write(forward_pin: int, reverse_pin: int, speed: int)\lroam_start()\lroam_stop()\lstop()\lturn(speed: int, duration: float)\l}", shape="record", style="filled"]; +"kuukar.kuukar_nextion.nextion" [color="aliceblue", fontcolor="black", label="{nextion|allow_serial_read : bool\ldevice : Serial\l|get_attribute(attribute: str)\lhandle_serial(data: list)\lhandle_touch_event(data: list)\lhex_string_list_to_bytes(hexstring_list: list): bytes\llittle_endian_to_int(data: list): int\lread_serial(): list\lreset_device()\lsend_command(command: str)\l}", shape="record", style="filled"]; +"kuukar.kuukar_sensors.sensors" [color="aliceblue", fontcolor="black", label="{sensors|aux : TelemetrixRpiPico\ldriver : TelemetrixRpiPico\l|get_brightness_pct(): float\lget_humidity_pct(): float\lget_temperature(): float\lsonar_get_distance(id: int): float\l}", shape="record", style="filled"]; +"kuukar.kuukar_voice.voice" [color="aliceblue", fontcolor="black", label="{voice|lcd\lleds\l|handle_voice_prompt(command)\l}", shape="record", style="filled"]; +} diff --git a/classes.png b/classes.png new file mode 100644 index 0000000..66018b3 Binary files /dev/null and b/classes.png differ diff --git a/kuukar/__init__.py b/kuukar/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/kuukar_collision.py b/kuukar/kuukar_collision.py similarity index 100% rename from kuukar_collision.py rename to kuukar/kuukar_collision.py diff --git a/kuukar_config.py b/kuukar/kuukar_config.py similarity index 100% rename from kuukar_config.py rename to kuukar/kuukar_config.py diff --git a/kuukar_cv.py b/kuukar/kuukar_cv.py similarity index 100% rename from kuukar_cv.py rename to kuukar/kuukar_cv.py diff --git a/kuukar_environment.py b/kuukar/kuukar_environment.py similarity index 100% rename from kuukar_environment.py rename to kuukar/kuukar_environment.py diff --git a/kuukar_lcd.py b/kuukar/kuukar_lcd.py similarity index 100% rename from kuukar_lcd.py rename to kuukar/kuukar_lcd.py diff --git a/kuukar_leds.py b/kuukar/kuukar_leds.py similarity index 100% rename from kuukar_leds.py rename to kuukar/kuukar_leds.py diff --git a/kuukar_motion.py b/kuukar/kuukar_motion.py similarity index 100% rename from kuukar_motion.py rename to kuukar/kuukar_motion.py diff --git a/kuukar_nextion.py b/kuukar/kuukar_nextion.py similarity index 100% rename from kuukar_nextion.py rename to kuukar/kuukar_nextion.py diff --git a/kuukar_sensors.py b/kuukar/kuukar_sensors.py similarity index 100% rename from kuukar_sensors.py rename to kuukar/kuukar_sensors.py diff --git a/kuukar_voice.py b/kuukar/kuukar_voice.py similarity index 100% rename from kuukar_voice.py rename to kuukar/kuukar_voice.py diff --git a/packages.dot b/packages.dot new file mode 100644 index 0000000..ac6477b --- /dev/null +++ b/packages.dot @@ -0,0 +1,32 @@ +digraph "packages" { +rankdir=BT +charset="utf-8" +"kuukar" [color="aliceblue", label="kuukar", shape="box", style="filled"]; +"kuukar.kuukar_collision" [color="aliceblue", label="kuukar.kuukar_collision", shape="box", style="filled"]; +"kuukar.kuukar_config" [color="aliceblue", label="kuukar.kuukar_config", shape="box", style="filled"]; +"kuukar.kuukar_cv" [color="aliceblue", label="kuukar.kuukar_cv", shape="box", style="filled"]; +"kuukar.kuukar_environment" [color="aliceblue", label="kuukar.kuukar_environment", shape="box", style="filled"]; +"kuukar.kuukar_lcd" [color="aliceblue", label="kuukar.kuukar_lcd", shape="box", style="filled"]; +"kuukar.kuukar_leds" [color="aliceblue", label="kuukar.kuukar_leds", shape="box", style="filled"]; +"kuukar.kuukar_motion" [color="aliceblue", label="kuukar.kuukar_motion", shape="box", style="filled"]; +"kuukar.kuukar_nextion" [color="aliceblue", label="kuukar.kuukar_nextion", shape="box", style="filled"]; +"kuukar.kuukar_sensors" [color="aliceblue", label="kuukar.kuukar_sensors", shape="box", style="filled"]; +"kuukar.kuukar_voice" [color="aliceblue", label="kuukar.kuukar_voice", shape="box", style="filled"]; +"kuukar.kuukar_collision" -> "kuukar.kuukar_config" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_collision" -> "kuukar.kuukar_lcd" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_collision" -> "kuukar.kuukar_leds" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_cv" -> "kuukar.kuukar_lcd" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_cv" -> "kuukar.kuukar_leds" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_environment" -> "kuukar.kuukar_lcd" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_environment" -> "kuukar.kuukar_leds" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_environment" -> "kuukar.kuukar_sensors" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_lcd" -> "kuukar.kuukar_nextion" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_leds" -> "kuukar.kuukar_config" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_motion" -> "kuukar.kuukar_config" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_motion" -> "kuukar.kuukar_leds" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_motion" -> "kuukar.kuukar_sensors" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_nextion" -> "kuukar.kuukar_config" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_sensors" -> "kuukar.kuukar_config" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_voice" -> "kuukar.kuukar_lcd" [arrowhead="open", arrowtail="none"]; +"kuukar.kuukar_voice" -> "kuukar.kuukar_leds" [arrowhead="open", arrowtail="none"]; +} diff --git a/packages.png b/packages.png new file mode 100644 index 0000000..c0033ff Binary files /dev/null and b/packages.png differ