mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 00:38:05 -06:00
Active updater
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user