From b2a2f41b780bc7157020d5ceb79fb2f167260fe6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20Thelander=20Andr=C3=A9n?=
 <marcus.thelander_andren@control.lth.se>
Date: Mon, 15 Apr 2019 17:40:09 +0200
Subject: [PATCH] Updated development instructions

---
 docs/build/man/development.md | 28 +++++++++++++++++++++++++---
 docs/src/man/development.md   | 14 ++++++++++++--
 util/copy_BB.sh               | 33 ---------------------------------
 3 files changed, 37 insertions(+), 38 deletions(-)
 delete mode 100755 util/copy_BB.sh

diff --git a/docs/build/man/development.md b/docs/build/man/development.md
index 5670c25..0d02f32 100644
--- a/docs/build/man/development.md
+++ b/docs/build/man/development.md
@@ -29,10 +29,32 @@ git pull
 to ensure that you are working on the correct development branch for Julia v1.0.X. You can now edit the code in `.julia/dev/LabConnections` and run it using a Julia REPL. When you are satisfied with your changes, simply commit and push the changes in the `.julia/dev/LabConnections` directory to the GitLab server.
 
 
-<a id='Development-with-the-BeagleBone-in-the-loop-1'></a>
+<a id='Development-with-the-BeagleBone-1'></a>
 
-## Development with the BeagleBone in the loop
+## Development with the BeagleBone
 
 
-The pin map of the BeagleBone (BB) is shown below. <img src="../fig/beaglebone*black*pinmap.png" height="400" width="700"> When running examples and tests with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1 kOhm in parallel.
+<a id='Transferring-development-code-from-host-to-the-BeagleBone-1'></a>
+
+### Transferring development code from host to the BeagleBone
+
+
+Because of the limited performance of the BeagleBone (BB), it is often preferable to do most code development on the host computer. However, you will also do testing of the code locally on the BB, and will thus need to transfer the latest code from the host computer to the BB. To do this, there is a handy utility shell script found in `/util` that handles this. Open a terminal on the host computer and type
+
+
+```
+cd ~/.julia/dev/LabConnections/util
+./copyfoldertobb.sh
+```
+
+
+This will transfer the current development version of `LabConnections.jl` found in the `/dev` directory to the BB.
+
+
+<a id='Development-with-hardware-in-the-loop-1'></a>
+
+### Development with hardware in the loop
+
+
+When testing `LabConnections.jl` with hardware in the loop, the external hardware will be connected to the pin headers on the BB. For reference, the pin map of the BeagleBone (BB) is shown below. <img src="../fig/beaglebone*black*pinmap.png" height="400" width="700"> When running examples and tests with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1 kOhm in parallel.
 
diff --git a/docs/src/man/development.md b/docs/src/man/development.md
index 5a7f001..61428e6 100644
--- a/docs/src/man/development.md
+++ b/docs/src/man/development.md
@@ -13,7 +13,17 @@ git pull
 to ensure that you are working on the correct development branch for Julia v1.0.X. You can now edit the code in `.julia/dev/LabConnections`
 and run it using a Julia REPL. When you are satisfied with your changes, simply commit and push the changes in the `.julia/dev/LabConnections` directory to the GitLab server.
 
-## Development with the BeagleBone in the loop
-The pin map of the BeagleBone (BB) is shown below.
+## Development with the BeagleBone
+
+### Transferring development code from host to the BeagleBone
+Because of the limited performance of the BeagleBone (BB), it is often preferable to do most code development on the host computer. However, you will also do testing of the code locally on the BB, and will thus need to transfer the latest code from the host computer to the BB. To do this, there is a handy utility shell script found in `/util` that handles this. Open a terminal on the host computer and type
+```
+cd ~/.julia/dev/LabConnections/util
+./copyfoldertobb.sh
+```
+This will transfer the current development version of `LabConnections.jl` found in the `/dev` directory to the BB.
+
+### Development with hardware in the loop
+When testing `LabConnections.jl` with hardware in the loop, the external hardware will be connected to the pin headers on the BB. For reference, the pin map of the BeagleBone (BB) is shown below.
 <img src="../fig/beaglebone_black_pinmap.png" height="400" width="700">
 When running examples and tests with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1 kOhm in parallel.
diff --git a/util/copy_BB.sh b/util/copy_BB.sh
deleted file mode 100755
index 7e6de24..0000000
--- a/util/copy_BB.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-#Run in this file un util folder, copies to BB
-BLUE='\033[0;34m'
-GREEN='\033[0;32m'
-RED='\033[0;31m'
-NC='\033[0m'
-BASEDIR=../$(dirname "$0")
-
-# store arguments in a special array
-args=("$@")
-# get number of elements
-numberOfArguments=${#args[@]}
-echo $ELEMENTS
-# echo each element in array
-# for loop
-#for (( i=0;i<$ELEMENTS;i++)); do
-#   echo ${args[${i}]}
-#done
-
-if [ ${#args[@]} == 0 ]
-then
-  printf "${RED}ABORTING.${NC} No directory provided\n"
-else
-  for (( i=0;i<$numberOfArguments;i++)); do
-    if [ -d $BASEDIR/${args[${i}]} ]
-    then
-      printf "${GREEN}Copying $BASEDIR/${args[${i}]} to BB${NC}\n"
-      scp -r $BASEDIR/${args[${i}]} debian@192.168.7.2:/home/debian/juliapackages/LabConnections/${args[${i}]}
-    else
-      printf "${RED}ABORTING.${NC} The provided directory $BASEDIR/${args[${i}]} does not exist\n"
-    fi
-  done
-fi
-- 
GitLab