Skip to content

Commit

Permalink
Merge pull request #51 from cacao-org/vd/aorts
Browse files Browse the repository at this point in the history
quick if refactor
  • Loading branch information
DasVinch authored Dec 11, 2024
2 parents ff521c4 + 04a2e92 commit 475d1ed
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions AOloopControl_IOtools/ao188_preprocessor.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,29 +98,12 @@ static errno_t apd_safety_execute(int lowfs_howfs)
printf("Oh no APD emergency shutdown crapped!!!; can't create socket\n");
return RETURN_FAILURE;
}
/*
int t = 1;
if(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &t, sizeof(int)) < 0)
{
printf("setsockopt(SO_REUSEADDR) failed");
return RETURN_FAILURE;
}
*/

struct sockaddr_in server_addr;
// Expecting elsewhere to manage SSH tunnels from localhost:18816/8 -> OBCP:10.0.0.6:18818
if(lowfs_howfs)
{
server_addr.sin_family = AF_INET;
server_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
server_addr.sin_port = htons(18816);
}
else
{
server_addr.sin_family = AF_INET;
server_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
server_addr.sin_port = htons(18818);
}
server_addr.sin_family = AF_INET;
server_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
server_addr.sin_port = lowfs_howfs ? htons(18816) : htons(18818);

if(connect(sockfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0)
{
Expand Down Expand Up @@ -263,7 +246,10 @@ static errno_t compute_function()
{
DEBUG_TRACE_FSTART();

IMGID apd_mat_in = stream_connect(apd_mat_name);
// Since it's a fps PARAM_IMG, it's expected to be already loaded.
IMGID apd_mat_in = mkIMGID_from_name(apd_mat_name);
resolveIMGID(&apd_mat_in, ERRMODE_ABORT);

float apd_integrator[NUM_APD_HOWFS];
memset(apd_integrator, 0, NUM_APD_HOWFS * sizeof(float));

Expand Down

0 comments on commit 475d1ed

Please sign in to comment.