diff --git a/project/Core/Src/modbus-tcp.c b/project/Core/Src/modbus-tcp.c index a5fd31b..b32bde2 100644 --- a/project/Core/Src/modbus-tcp.c +++ b/project/Core/Src/modbus-tcp.c @@ -7,100 +7,100 @@ char tcp_buffer[1024]; char registers[MAX_REG]; static err_t modbus_incomming_data(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err){ - int i; - int len; - char *pc; + int i; + int len; + char *pc; uint8_t bg_red = 0; uint8_t bg_green = 0; uint8_t bg_blue = 0; uint8_t txt_red = 0; - uint8_t txt_green = 0; - uint8_t txt_blue = 0; - uint8_t nr_img = 0; - uint32_t result_bg = 0; - uint32_t result_txt = 0; - uint32_t result = 0; + uint8_t txt_green = 0; + uint8_t txt_blue = 0; + uint8_t nr_img = 0; + uint32_t result_bg = 0; + uint32_t result_txt = 0; + uint32_t result = 0; - char text[200]; + char text[200]; - for(i = 0; i < 100;i++){ - text[i] = 95; // _ - } - text[199] = '\0'; + for(i = 0; i < 100;i++){ + text[i] = 95; // _ + } + text[199] = '\0'; - if (p != NULL){ - printf("data not null\n"); - //here im going to procces the modbusdata - tcp_recved( pcb, p->tot_len ); - pc = (char*)p->payload; - len =p->tot_len; + if (p != NULL){ + printf("data not null\n"); + //here im going to procces the modbusdata + tcp_recved( pcb, p->tot_len ); + pc = (char*)p->payload; + len =p->tot_len; - //putting the bufer in the register array - for( i=0; i