Skip to content

Commit

Permalink
Merge pull request #4 from ubcbraincircuits/dev
Browse files Browse the repository at this point in the history
Feat: update to version 2.4
  • Loading branch information
BriHan-Tech authored Dec 6, 2023
2 parents 22ddd02 + e2948d1 commit 7ae2404
Show file tree
Hide file tree
Showing 18 changed files with 1,459 additions and 1,234 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
103 changes: 0 additions & 103 deletions classReadEncoder.py

This file was deleted.

35 changes: 0 additions & 35 deletions encoder_test.py

This file was deleted.

43 changes: 43 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import os
import sys
import subprocess

TESTS = {
'solenoid': 'solenoid_test',
'rfid': 'RFID_buffer_testing',
'infrared': 'infrared_test',
'encoder': 'encoder_test',
'camera': 'camera_test',
'motor': 'motor_test'
}


def run_test(part):
module = f"src.tests.{TESTS[part]}"
command = ["python3", "-m", module]
try:
subprocess.run(command, check=True)
except subprocess.CalledProcessError as e:
print(f"Error running {module}: {e}")


def run():
module = "src.piPaw_pert"
command = ["python3", "-m", module]
try:
subprocess.run(command, check=True)
except subprocess.CalledProcessError as e:
print(f"Error running {module}: {e}")


def main():
if sys.argv[1] == "test":
arg = sys.argv[2]
run_test(arg)

if sys.argv[1] == "run":
run()


if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions monitor.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

cd /home/pi/piPaw/
until python3 -u piPaw_amplitude.py &>>log.txt; do
cd /home/pi/PiPaw/
until python3 -u src/piPaw_amplitude.py &>>log.txt; do
echo "'piPaw program' crashed with exit code $?. Restarting..." >&2
sleep 1
done
Loading

0 comments on commit 7ae2404

Please sign in to comment.