Commit 12129528 authored by Marcus Thelander Andrén's avatar Marcus Thelander Andrén

Merge branch 'master' of gitlab.control.lth.se:labdev/LabConnection.jl

parents 1a358bbf caf25e14
const GPIO_AVAILABLE = [
("P8.11","GPIO_30"),
("P8.12","GPIO_60"),
("P8.13","GPIO_31"),
("P8.14","GPIO_40"),
("P8.15","GPIO_48"),
("P8.16","GPIO_51"),
("P8.17","GPIO_4"),
("P8.18","GPIO_5"),
("P8.19","GPIO_13"),
("P8.20","GPIO_12"),
("P8.21","GPIO_3"),
("P8.22","GPIO_2"),
("P8.23","GPIO_49"),
("P8.24","GPIO_15"),
("P8.25","GPIO_117"),
("P8.26","GPIO_14"),
("P8.27","GPIO_125"),
("P8.28","GPIO_123"),
("P8.29","GPIO_111"),
("P8.30","GPIO_112"),
("P8.31","GPIO_110"),
("P8.41","GPIO_20"),
("P8.42","GPIO_7"),
("P9.3", "GPIO_38"),
("P9.4", "GPIO_39"),
("P9.5", "GPIO_34"),
("P9.6", "GPIO_35"),
("P9.7", "GPIO_66"),
("P9.8", "GPIO_67"),
("P9.9", "GPIO_69"),
("P9.10","GPIO_68"),
("P9.11","GPIO_45"),
("P9.12","GPIO_44"),
("P9.13","GPIO_23"),
("P9.14","GPIO_26"),
("P9.15","GPIO_47"),
("P9.16","GPIO_46"),
("P9.17","GPIO_27"),
("P9.18","GPIO_65"),
("P9.19","GPIO_22"),
("P9.20","GPIO_63"),
("P9.21","GPIO_62"),
("P9.22","GPIO_37"),
("P9.23","GPIO_36"),
("P9.24","GPIO_33"),
("P9.25","GPIO_32"),
("P9.26","GPIO_61"),
("P9.27","GPIO_86"),
("P9.28","GPIO_88"),
("P9.29","GPIO_87"),
("P9.30","GPIO_89"),
("P9.31","GPIO_10"),
("P9.32","GPIO_11"),
("P9.33","GPIO_9"),
("P9.34","GPIO_81"),
("P9.35","GPIO_8"),
("P9.36","GPIO_80"),
("P9.37","GPIO_78"),
("P9.38","GPIO_79"),
("P9.39","GPIO_76"),
("P9.40","GPIO_77"),
("P9.41","GPIO_74"),
("P9.42","GPIO_75"),
("P9.43","GPIO_72"),
("P9.44","GPIO_73"),
("P9.45","GPIO_70"),
("P9.46","GPIO_71")]
const PWM_AVAILABLE = [
("P8.14","PWM1A"),
("P8.16","PWM1B"),
("P8.21","PWM0B"),
("P8.22","PWM0A"),
("P8.28","ECAPPWM2"),
("P8.29","PWM0B"),
("P8.31","PWM0A"),
("P8.42","ECAPPWM0"),
("P9.13","PWM2B"),
("P9.19","PWM2A"),
("P9.34","PWM1B"),
("P9.36","PWM1A"),
("P9.45","PWM2A"),
("P9.46","PWM2B")]
const SPI_AVAILABLE = [
("P8.17","SPI0_CS0"),
("P8.18","SPI0_D1"),
("P8.21","SPI0_D0"),
("P8.22","SPI0_SCLK"),
("P8.28","SPI1_CS0"),
("P8.29","SPI1_D0"),
("P8.30","SPI1_D1"),
("P8.31","SPI1_SCLK")]
const UART_AVAILABLE = [
("P8.11","UART4_RX"),
("P8.13","UART4_TX"),
("P8.21","UART2_TX"),
("P8.22","UART2_RX"),
("P8.24","UART1_TX"),
("P8.26","UART1_RX"),
("P9.37","UART5_TX"),
("P9.38","UART5_RX")]
const I2C_AVAILABLE = [
("P8.17", "I2C1_SCL"),
("P8.18", "I2C1_SDA"),
("P8.19", "I2C2_SCL"),
("P8.20", "I2C2_SDA")]
const EQEP_AVAILABLE = [
("P8.25", "eQEP0_strobe"),
("P8.27", "eQEP0B_in"),
("P8.41", "eQEP0_index"),
("P8.42", "eQEP0A_in"),
("P9.11", "eQEP2B_in"),
("P9.12", "eQEP2A_in"),
("P9.15", "eQEP2_strobe"),
("P9.16", "eQEP2_index"),
("P9.31", "eQEP1_index"),
("P9.32", "eQEP1_strobe"),
("P9.33", "eQEP1B_in"),
("P9.34", "eQEP1A_in"),
]
const TIMER_AVAILABLE = [
("P9.7", "TIMER4"),
("P9.8", "TIMER7"),
("P9.9", "TIMER2"),
("P9.10", "TIMER1")]
#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'
printf "${BLUE}Updating project${NC}\n..."
codeHost=gitlab.control.lth.se
codeUser=labdev
projects=(LabConnection)
flag=false
printf "${BLUE}Initializing Transferring files to BBB${NC}\n"
if [ "{flag}"=true ]; then
for project in "${projects[@]}"; do
{
printf "${GREEN}Transferring /${project}...${NC}\n"
printf "scp -r ../../${project} debian@192.168.7.2:/home/debian"
scp -r ../../${project} debian@192.168.7.2:/home/debian
} || { # catch
# save log for exception
flag=false
printf "${RED}Could not send folder /${project} to the BBB, aborting!${NC}\n"
}
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment