Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus authored Apr 3, 2019
1 parent c0aa175 commit b1725ad
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,14 @@ while(true){
public class ExampleClient extends UDPSimplePacketComs {
private FloatPacketType IMU = new FloatPacketType(1871, 64);
double[] data = new double[15];
private ExampleClient(InetAddress add) throws Exception {
super(add);
public ExampleClient(String name) throws Exception {
super(name);
addPollingPacket(IMU);
addEvent(1871,()->{
readFloats(1871, data);
});
}
// Search for devices instead of just construction them
public static ExampleClient get(String name) throws Exception {
return new ExampleClient(UDPSimplePacketComs.getAllAddresses(name).iterator().next());
}
public void send(double d){
double [] data = new double [1];
data[0]=d;
Expand Down

0 comments on commit b1725ad

Please sign in to comment.