mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
WIP
This commit is contained in:
parent
e0b86799ae
commit
24af0ee578
@ -126,7 +126,7 @@ void Feb_Control_FebControl() {
|
||||
moduleSize = 0;
|
||||
}
|
||||
|
||||
int Feb_Control_Init(int master, int top, int normal, int module_num) {
|
||||
int Feb_Control_Init(int master, int normal, int module_num) {
|
||||
Feb_Control_module_number = 0;
|
||||
Feb_Control_current_index = 0;
|
||||
Feb_control_master = master;
|
||||
@ -135,28 +135,18 @@ int Feb_Control_Init(int master, int top, int normal, int module_num) {
|
||||
// global send
|
||||
Feb_Control_AddModule(0, 0xff);
|
||||
Feb_Control_PrintModuleList();
|
||||
Feb_Control_module_number = (module_num & 0xFF);
|
||||
|
||||
int serial = !top;
|
||||
LOG(logDEBUG1, ("serial: %d\n", serial));
|
||||
|
||||
Feb_Control_current_index = 1;
|
||||
|
||||
// Add the half module
|
||||
Feb_Control_AddModule(Feb_Control_module_number, serial);
|
||||
Feb_Control_module_number = (module_num & 0xFF);
|
||||
Feb_Control_current_index = 1;
|
||||
Feb_Control_AddModule(Feb_Control_module_number, 0);
|
||||
Feb_Control_PrintModuleList();
|
||||
|
||||
unsigned int nfebs = 0;
|
||||
unsigned int *feb_list = malloc(moduleSize * 4 * sizeof(unsigned int));
|
||||
for (unsigned int i = 1; i < moduleSize; i++) {
|
||||
if (Module_TopAddressIsValid(&modules[i])) {
|
||||
feb_list[nfebs++] = Module_GetTopRightAddress(&modules[i]);
|
||||
feb_list[nfebs++] = Module_GetTopLeftAddress(&modules[i]);
|
||||
}
|
||||
if (Module_BottomAddressIsValid(&modules[i])) {
|
||||
feb_list[nfebs++] = Module_GetBottomRightAddress(&modules[i]);
|
||||
feb_list[nfebs++] = Module_GetBottomLeftAddress(&modules[i]);
|
||||
}
|
||||
feb_list[nfebs++] = Module_GetTopRightAddress(&modules[i]);
|
||||
feb_list[nfebs++] = Module_GetTopLeftAddress(&modules[i]);
|
||||
}
|
||||
|
||||
Feb_Interface_SendCompleteList(nfebs, feb_list);
|
||||
|
@ -54,7 +54,7 @@ int Feb_Control_StartDAQOnlyNWaitForFinish(int sleep_time_us);
|
||||
int Feb_Control_ResetChipCompletely();
|
||||
int Feb_Control_ResetChipPartially();
|
||||
void Feb_Control_FebControl();
|
||||
int Feb_Control_Init(int master, int top, int normal, int module_num);
|
||||
int Feb_Control_Init(int master, int normal, int module_num);
|
||||
int Feb_Control_OpenSerialCommunication();
|
||||
void Feb_Control_CloseSerialCommunication();
|
||||
int Feb_Control_CheckSetup();
|
||||
|
@ -333,7 +333,7 @@ void initControlServer() {
|
||||
Feb_Interface_FebInterface();
|
||||
Feb_Control_FebControl();
|
||||
// same addresses for top and bottom
|
||||
Feb_Control_Init(master, 1, normal, getDetectorNumber());
|
||||
Feb_Control_Init(master, normal, getDetectorNumber());
|
||||
// master of 9M, check high voltage serial communication to blackfin
|
||||
if (master && !normal) {
|
||||
if (Feb_Control_OpenSerialCommunication())
|
||||
@ -372,7 +372,7 @@ void initStopServer() {
|
||||
Feb_Interface_FebInterface();
|
||||
Feb_Control_FebControl();
|
||||
// same addresses for top and bottom
|
||||
Feb_Control_Init(master, 1, normal, getDetectorNumber());
|
||||
Feb_Control_Init(master, normal, getDetectorNumber());
|
||||
LOG(logDEBUG1, ("Stop server: FEB Initialization done\n"));
|
||||
#endif
|
||||
// client first connect (from shm) will activate
|
||||
|
Loading…
x
Reference in New Issue
Block a user