ab2nkovs / RMRadar_pi

OpenCPN pluging for Raymarine digital radar
9 stars 11 forks source link

Code modification needed to compile under Windows #1

Open sv-pizzazz opened 6 years ago

sv-pizzazz commented 6 years ago

I made a couple of minor changes to your code to make it compile under Windows. It works great! I am new to the forking process, so I will just write them out here.

The changes are all to the RMControl.cpp, I have included line numbers:

Commented out the two files below since they do not exist under Windows. There is no need to include Winsock instead. 35 // #include <netinet/in.h> 36 // #include <arpa/inet.h>

1109 Sleep(10); // as usleep is Unix only

1160 sendto(m_dataSocket, (const char )rd_msg_1s, sizeof(rd_msg_1s), 0, (struct sockaddr)&m_radar_addr, sizeof(m_radar_addr));

I added the (const char *) in front of rd_msg_1s above. I believe under Windows the MC++ expects to be pointed to the contents of the variable. There were 25 instances of this, most of the sendto constructs.

That is it.

rgleason commented 6 years ago

Thanks very much, I'll give it a try.