Skip to content

Commit

Permalink
Improved comment style, commented out old ID query
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Sep 12, 2023
1 parent 0d985e0 commit fb2a45f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Events/dev_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ LOG_FILE= #setting it to empty so that check doesn't fail on account of set -eu
MAIN_BOARD=false
RT_BOARD=false

mpremote exec 'import machine; import ubinascii as ub; a = ub.hexlify(machine.unique_id()).decode("utf-8"); print(a)'


PREDEFINED_EVENTS=false
Expand All @@ -21,7 +20,7 @@ USAGE="Usage:\n\
<device_model>: which device model code to use.\n\
Acceptable values are: $DEVICE_MODELS"

# reads options:
# Read options:
while getopts "hdpl:" flag
do
case "$flag" in
Expand Down Expand Up @@ -49,7 +48,7 @@ do
esac
done

# shifts pointer to read mandatory device model specification
# Shift pointer to read mandatory device model specification.
shift $((OPTIND - 1))
DEVICE_MODEL=${1:-}

Expand All @@ -72,8 +71,11 @@ fi
pinstates_file="devices/${DEVICE_MODEL}/device_files/pinstates.py"
delay_test_file="devices/${DEVICE_MODEL}/device_files/main.py"


# Required to import from parent Python module:
export PYTHONPATH=$PWD/..


# Figure out which board is the main board and which is used for debugging
mpremote a0 cp "devices/${DEVICE_MODEL}/device_files/roundtripper.py" :roundtripper.py
A0_RTCHECK=$(python -c "from Events import launch; launch.check_roundtripper('/dev/ttyACM0')")
Expand All @@ -93,6 +95,7 @@ else
echo "You have connected only one device, meaning that the files for live roundtrip delay testing were not installed, and will not be usable."
fi


# Report detection results, and set debugging (i.e. roundtripping) to false if a roundtripping board cannot be located.
echo "Your main (pin state query) board is located at $MAIN_BOARD"
if [ "$RT_BOARD" = false ]; then
Expand All @@ -102,6 +105,9 @@ if [ "$RT_BOARD" = false ]; then
else
echo "Your debugging (roundtrip) board is located at $RT_BOARD"
fi
# In this section, we could also report the unique device ID (might have potential debugging relevance 🤔).
# This is queried via:
# mpremote exec 'import machine; import ubinascii as ub; a = ub.hexlify(machine.unique_id()).decode("utf-8"); print(a)'


# Execute Python signal conveyor code.
Expand Down

0 comments on commit fb2a45f

Please sign in to comment.