EasternEdgeRobotics / Software_2017

The control software for 2017
MIT License
3 stars 0 forks source link

Have Topside discover it's own IP address. #293

Closed cal-pratt closed 7 years ago

cal-pratt commented 7 years ago

To avoid having to override the config whenever we want to launch topside video on our dev devices, the Topside Java software should be able to determine it's own IP address before sending the VideoValue object.

There are many network interfaces present when searching for an IP address using built in Java libs (localhost, eth0, wlan0, etc), however, only one output will be in the same subnet as launch.broadcast, ie 192.168.88.X.

Determine this address and modify VideoDecoder to use this address instead of the value from the VideoDecoderConfig. During testing you can run locally (through eclipse or intellij) and update the launch.broadcast config value to broadcast on your eth or wlan address (can find by running ipconfig/ ifconfig in a terminal)

k-sutherland commented 7 years ago

So I looked at VideoDecoder and VideoDecoderConfig and I am confused about a couple things. I noticed that VideoDecoder has an object of VideoDecoderConfig. VideoDecoderConfig is an interface so how can the object be created? Also I cannot find a VideoValue object, or the location where the IP addresses are set. I thought there was something that had the IP addresses defined in.

k-sutherland commented 7 years ago

wlan0, eth0 Will these commands work even though my computer is windows, or is this entirely meant to be used through captain?

k-sutherland commented 7 years ago

I have a solution, but I'm not sure on how to submit it to github for review. The wiki only says TBA on this.

cal-pratt commented 7 years ago

Go to the top of the github page. Go to code -> branches -> open pull request (on your branch name).

cal-pratt commented 7 years ago

code -> branches image

branches -> new pull request image

Create the PR image

k-sutherland commented 7 years ago

Solved by #315