diff --git a/slsDetectorServers/compileAllServers_noAPIUpdate.sh b/slsDetectorServers/compileAllServers_noAPIUpdate.sh new file mode 100644 index 000000000..2d16347b1 --- /dev/null +++ b/slsDetectorServers/compileAllServers_noAPIUpdate.sh @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: LGPL-3.0-or-other +# Copyright (C) 2021 Contributors to the SLS Detector Package + +# empty branch = developer branch in updateAPIVersion.sh +branch="" +det_list=("ctbDetectorServer" + "gotthardDetectorServer" + "gotthard2DetectorServer" + "jungfrauDetectorServer" + "mythen3DetectorServer" + "moenchDetectorServer" + ) +usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'" + +# arguments +if [ $# -eq 0 ]; then + # no argument, all servers + declare -a det=${det_list[@]} + echo "Compiling all servers" +elif [ $# -eq 1 ] || [ $# -eq 2 ]; then + # 'all' servers + if [[ $1 == "all" ]]; then + declare -a det=${det_list[@]} + echo "Compiling all servers" + else + # only one server + # arg not in list + if [[ $det_list != *$1* ]]; then + echo -e "Invalid argument 1: $1. $usage" + return -1 + fi + declare -a det=("${1}") + #echo "Compiling only $1" + fi + # branch + if [ $# -eq 2 ]; then + # arg in list + if [[ $det_list == *$2* ]]; then + echo -e "Invalid argument 2: $2. $usage" + return -1 + fi + branch+=$2 + #echo "with branch $branch" + fi +else + echo -e "Too many arguments.$usage" + return -1 +fi + +declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK") + +echo -e "list is ${det[@]}" + +# compile each server +idet=0 +for i in ${det[@]} +do + dir=$i + file="${i}_developer" + echo -e "Compiling $dir [$file]" + cd $dir + make clean + if make API_BRANCH=$branch; then + deterror[$idet]="OK" + else + deterror[$idet]="FAIL" + fi + mv bin/$dir bin/$file + git add -f bin/$file + cp bin/$file /tftpboot/ + cd .. + echo -e "\n\n" + ((++idet)) +done + +echo -e "Results:" +idet=0 +for i in ${det[@]} +do + printf "%s\t\t= %s\n" "$i" "${deterror[$idet]}" + ((++idet)) +done + + + + diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer index f41604498..94a4ca46d 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index c07767962..375cb1ae5 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer index 170df1ca8..6d9bd6cc4 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer index 655355a0b..c23c71b6b 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index f111afb6d..08f813da6 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index 68e9b18cc..8205a9fb3 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c index 2d03c673c..50fbaf540 100644 --- a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c +++ b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL.c @@ -274,7 +274,7 @@ int ALTERA_PLL_SetOuputFrequency(int clkIndex, int pllVCOFreqMhz, int value) { clkIndex, value, pllVCOFreqMhz)); // calculate output frequency - float total_div = (float)pllVCOFreqMhz / (float)value; + int total_div = (float)pllVCOFreqMhz / (float)value; // assume 50% duty cycle uint32_t low_count = total_div / 2; @@ -282,7 +282,7 @@ int ALTERA_PLL_SetOuputFrequency(int clkIndex, int pllVCOFreqMhz, int value) { uint32_t odd_division = 0; // odd division - if (total_div > (float)(2 * low_count)) { + if (total_div > (2 * low_count)) { ++high_count; odd_division = 1; } diff --git a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c index fcf60e68b..fe2bdc610 100644 --- a/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c +++ b/slsDetectorServers/slsDetectorServer/src/ALTERA_PLL_CYCLONE10.c @@ -172,7 +172,7 @@ void ALTERA_PLL_C10_SetOuputClockDivider(int pllIndex, int clkIndex, uint32_t odd_division = 0; // odd division - if (value > (int)(2 * low_count)) { + if (value > (2 * low_count)) { ++high_count; odd_division = 1; }