Active updater

This commit is contained in:
aarav18
2022-03-07 20:56:06 -07:00
parent 75a114d0de
commit 2d68776157
3 changed files with 5 additions and 3 deletions
+1 -2
View File
@@ -37,9 +37,8 @@ public class Robot extends TimedRobot {
desmosServer = new DesmosServer(8000);
desmosServer.start();
DesmosServer.putInteger("Active", 1);
DesmosServer.putTable("test", "x1", new double[] {1, 2}, "y1", new double[] {1, 2});
DesmosServer.putTable("table", "x1", new double[] {1, 2, 3.1, 3.9}, "y1", new double[] {1, 2, 2.9, 4.1});
}
/**
@@ -18,6 +18,6 @@ public class TestMotor extends SubsystemBase {
public void testDesmos() {
DesmosServer.putDouble("Position", m_testEncoder.getPosition());
// m_testMotor.set(DesmosServer.readDouble("Speed"));
m_testMotor.set(DesmosServer.readDouble("Speed"));
}
}
@@ -71,6 +71,9 @@ public class DesmosServer extends Thread {
while(true) {
Socket client = serverSocket.accept();
// Indicate Active to desmos client
DesmosServer.putInteger("Active", 1);
handleClient(client);
}
}