Skip to content

Commit

Permalink
log ethercat status
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer Kordmaa committed Nov 13, 2022
1 parent df84946 commit 76d3ba5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webserver/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ u_int8_t *byte_input_call_back(int a){ return byte_input[a]; }
u_int8_t *byte_output_call_back(int a){ return byte_output[a]; }
u_int16_t *int_input_call_back(int a){ return int_input[a]; }
u_int16_t *int_output_call_back(int a){ return int_output[a]; }

void logger_callback(unsigned char *msg){ log(msg);}

int main(int argc,char **argv)
{
Expand Down Expand Up @@ -219,7 +219,8 @@ int main(int argc,char **argv)
//======================================================
// HARDWARE INITIALIZATION
//======================================================
ethercat_configure("../utils/ethercat_src/conf/ethercatcfg.txt");
type_logger_callback logger = logger_callback;
ethercat_configure("../utils/ethercat_src/conf/ethercatcfg.txt", logger);
initializeHardware();
initializeMB();
initCustomLayer();
Expand Down

0 comments on commit 76d3ba5

Please sign in to comment.