binaries in, std=gnu99, for loop variable declaration inside for loop

This commit is contained in:
2020-06-10 17:27:02 +02:00
parent 7388bb4aa7
commit 200186ddde
35 changed files with 410 additions and 615 deletions

View File

@ -5,7 +5,7 @@ support_lib = ../../slsSupportLib/include/
CROSS = nios2-buildroot-linux-gnu-
CC = $(CROSS)gcc
CFLAGS += -Wall -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
CFLAGS += -Wall -std=gnu99 -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm
PROGS = gotthard2DetectorServer
DESTDIR ?= bin

View File

@ -1848,8 +1848,7 @@ int setVetoPhoton(int chipIndex, int gainIndex, int *values) {
int offset = padding; // bit offset for commandbytes
for (int ich = 0; ich < NCHAN; ++ich) {
// loop through all bits in a value
int iBit = 0;
for (iBit = 0; iBit < lenDataBitsPerchannel; ++iBit) {
for (int iBit = 0; iBit < lenDataBitsPerchannel; ++iBit) {
commandBytes[offset++] =
((values[ich] >> (lenDataBitsPerchannel - 1 - iBit)) & 0x1);
}