@@ -21,8 +21,8 @@ const IPAddress receive_ip(192, 168, 1, 31); // receiver
2121const IPAddress default_dns (192 , 168 , 1 , 1 );
2222const IPAddress default_gateway (192 , 168 , 1 , 1 );
2323const IPAddress car_subnet (255 , 255 , 255 , 0 );
24- uint16_t port1 = 4444 ;
25- uint16_t port2 = 5555 ;
24+ const uint16_t PORT1 = 4444 ;
25+ const uint16_t PORT2 = 5555 ;
2626// hytech_msgs_VCRData_s msg = hytech_msgs_VCRData_s_init_zero;
2727VCRData_s vcr_state;
2828// hytech_msgs_VCRData_s msg = {};
@@ -33,14 +33,14 @@ VCRData_s vcr_state;
3333void init_ethernet_device ()
3434{
3535 Ethernet.begin (default_VCR_ip, default_dns, default_gateway, car_subnet);
36- socket.begin (4444 );
36+ socket.begin (PORT1 );
3737 // recv_socket.begin(5555);
3838}
3939
4040void test_send ()
4141{
4242 hytech_msgs_VCRData_s msg = VCREthernetInterface::make_vcr_data_msg (vcr_state);
43- if (handle_ethernet_socket_send_pb<hytech_msgs_VCRData_s, hytech_msgs_VCRData_s_size>(receive_ip, port1 , &socket, msg, &hytech_msgs_VCRData_s_msg)) {
43+ if (handle_ethernet_socket_send_pb<hytech_msgs_VCRData_s, hytech_msgs_VCRData_s_size>(receive_ip, PORT1 , &socket, msg, &hytech_msgs_VCRData_s_msg)) {
4444 Serial.println (" Sent" );
4545 } else {
4646 Serial.println (" Failed" );
0 commit comments