Commit ccec20ad authored by Joshua Supra's avatar Joshua Supra
Browse files

.

parent 82e4b2ed
...@@ -13,13 +13,11 @@ ...@@ -13,13 +13,11 @@
#include "pilc2_functions/pilc2_IO_Leds.h" #include "pilc2_functions/pilc2_IO_Leds.h"
#include "pilc2_functions/pilc2_IO_GPIOs.h" #include "pilc2_functions/pilc2_IO_GPIOs.h"
#include "pilc2_functions/pilc2_network.h" #include "pilc2_functions/pilc2_network.h"
#include "pilc2_functions/pilc2_axi_gpio.h"
#include "pilc2_functions/pilc2_continous_counter.h" #include "pilc2_functions/pilc2_continous_counter.h"
#include "pilc2_functions/pilc2_counter_module.h" #include "pilc2_functions/pilc2_counter_module.h"
#include "pilc2_functions/pilc2_adc.h" #include "pilc2_functions/pilc2_adc.h"
#include "pilc2_functions/pilc2_IO_mux.h" #include "pilc2_functions/pilc2_IO_mux.h"
//#include "pilc2_functions/pilc2_encoder.h"
#include "pilc2_functions/pilc2_logic.h" #include "pilc2_functions/pilc2_logic.h"
#include "pilc2_functions/pilc2_fifoser.h" #include "pilc2_functions/pilc2_fifoser.h"
...@@ -32,7 +30,6 @@ int thread_nr; ...@@ -32,7 +30,6 @@ int thread_nr;
int main (int argc, char *argv[]){ int main (int argc, char *argv[]){
// sleep(10);
WorkLEDcounter = 0; WorkLEDcounter = 0;
unsigned int front_LED_update_ctr = 0; unsigned int front_LED_update_ctr = 0;
...@@ -40,7 +37,6 @@ int main (int argc, char *argv[]){ ...@@ -40,7 +37,6 @@ int main (int argc, char *argv[]){
zmq_data *zmq_recive_data[2]; zmq_data *zmq_recive_data[2];
int NrOfBytesReceived[2]; int NrOfBytesReceived[2];
//NrOfBytesReceived[0] = -1;
STOP = false; STOP = false;
signal(SIGINT, sigint_handler); signal(SIGINT, sigint_handler);
...@@ -114,7 +110,6 @@ int main (int argc, char *argv[]){ ...@@ -114,7 +110,6 @@ int main (int argc, char *argv[]){
zmq_recive_data[1]->socket = gui_responder; zmq_recive_data[1]->socket = gui_responder;
if (NrOfBytesReceived[1] != -1) { if (NrOfBytesReceived[1] != -1) {
//printf("2\n");
zmq_recive_data[1]->NrOfBytes = NrOfBytesReceived[1]; zmq_recive_data[1]->NrOfBytes = NrOfBytesReceived[1];
pthread_mutex_lock(&lock); pthread_mutex_lock(&lock);
pthread_create(&thread_network[1], NULL, network, (void *)zmq_recive_data[1]); pthread_create(&thread_network[1], NULL, network, (void *)zmq_recive_data[1]);
...@@ -170,15 +165,15 @@ int main (int argc, char *argv[]){ ...@@ -170,15 +165,15 @@ int main (int argc, char *argv[]){
void *network(void *args){ void *network(void *args){
zmq_data *zmq_rec_data = (zmq_data *)args; zmq_data *zmq_rec_data = (zmq_data *)args;
//printf("%i\n", zmq_rec_data->NrOfBytes);
unsigned int command; unsigned int command;
unsigned int nbytes; unsigned int nbytes;
int status; int status;
command = zmq_rec_data->data[0]; command = zmq_rec_data->data[0];
//printf("command: %.8x\n", command);
nbytes = zmq_rec_data->NrOfBytes; nbytes = zmq_rec_data->NrOfBytes;
//printf("%i\n", &zmq_rec_data->NrOfBytes);
switch (command){ switch (command){
case 0x0: status = RegtoNetwork(zmq_rec_data);break; case 0x0: status = RegtoNetwork(zmq_rec_data);break;
case 0x1: status = NetworktoReg(zmq_rec_data);break; case 0x1: status = NetworktoReg(zmq_rec_data);break;
...@@ -186,7 +181,7 @@ void *network(void *args){ ...@@ -186,7 +181,7 @@ void *network(void *args){
case 0x3: status = BurstNetworktoReg(zmq_rec_data);break; case 0x3: status = BurstNetworktoReg(zmq_rec_data);break;
case 0x4: status = FunctionCall(zmq_rec_data);break; case 0x4: status = FunctionCall(zmq_rec_data);break;
} }
//printf("status: %d\n", status);
if (status != 0){ if (status != 0){
SendBuffer = (char *)malloc(2*sizeof(char)); SendBuffer = (char *)malloc(2*sizeof(char));
SendBuffer[0] = status ; SendBuffer[0] = status ;
...@@ -200,8 +195,6 @@ void *network(void *args){ ...@@ -200,8 +195,6 @@ void *network(void *args){
} }
void sigint_handler(int sig) { void sigint_handler(int sig) {
printf("\nProgram terminated...\n"); printf("\nProgram terminated...\n");
STOP = true; STOP = true;
......
Supports Markdown
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