Compare commits

..

2 Commits

Author SHA1 Message Date
57c1c3e282 fix adding two cams with same ip 2025-05-31 23:44:27 +02:00
4a5e7f291f allow detection of all cameras 2025-05-31 23:44:15 +02:00
2 changed files with 7 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ namespace robospot_camera_finder
// UDP discovery constants // UDP discovery constants
private const int SEND_PORT = 7701; private const int SEND_PORT = 7701;
private const int RECEIVE_PORT = 7711; private const int RECEIVE_PORT = 7711;
private const string BROADCAST_ADDRESS = "10.255.255.255"; private const string BROADCAST_ADDRESS = "255.255.255.255";
private const byte DEF_REQ_SCAN = 1; private const byte DEF_REQ_SCAN = 1;
private const byte RES_REQ_SCAN = 11; private const byte RES_REQ_SCAN = 11;
@@ -235,7 +235,7 @@ namespace robospot_camera_finder
{ {
string ipAddress = manualForm.ipAddress; string ipAddress = manualForm.ipAddress;
Camera camera_to_add = new Camera("Camera " + ipAddress, ipAddress, "", ""); Camera camera_to_add = new Camera("Camera " + ipAddress, ipAddress, "", "CAM_FINDER_" + DateTime.Now.Ticks.ToString());
add_camera(camera_to_add); add_camera(camera_to_add);
} }
} }

View File

@@ -25,6 +25,11 @@ namespace robospot_camera_finder
cam_ip = ip; cam_ip = ip;
this.Text = name; this.Text = name;
if (!cam_ip.StartsWith("10."))
{
MessageBox.Show("Camera is not on the 10.0.0.0/8 network, the RoboSpot might not find it.", "Wrong IP", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
string rtsp_link = "rtsp://" + ip + "/profile2/media.smp"; string rtsp_link = "rtsp://" + ip + "/profile2/media.smp";
updateZoomSlider(); updateZoomSlider();