File size: 2,265 Bytes
1a7b22d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Sequential Operations Test - LeRobot.js</title>
    <style>
      body {
        font-family: system-ui, sans-serif;
        max-width: 800px;
        margin: 2rem auto;
        padding: 2rem;
        background: #f5f5f5;
      }

      .container {
        background: white;
        padding: 2rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      }

      button {
        background: #2563eb;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
        margin: 8px;
      }

      button:hover {
        background: #1d4ed8;
      }

      button:disabled {
        background: #9ca3af;
        cursor: not-allowed;
      }

      .log {
        background: #1f2937;
        color: #f9fafb;
        padding: 1rem;
        border-radius: 6px;
        font-family: "Courier New", monospace;
        font-size: 14px;
        max-height: 400px;
        overflow-y: auto;
        white-space: pre-wrap;
        margin-top: 1rem;
      }

      .warning {
        background: #fef3c7;
        border: 1px solid #f59e0b;
        color: #92400e;
        padding: 1rem;
        border-radius: 6px;
        margin: 1rem 0;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <h1>πŸ§ͺ Sequential Operations Test</h1>
      <p>
        This test checks if calling <code>findPort</code> β†’
        <code>calibrate</code> β†’ <code>releaseMotors</code> β†’
        <code>teleoperate</code> works without connection conflicts.
      </p>

      <div class="warning">
        <strong>⚠️ Note:</strong> This test requires a robot to be connected.
        Make sure your SO-100 robot is plugged in via USB.
      </div>

      <button id="runTest" onclick="runSequentialTest()">
        πŸš€ Run Sequential Operations Test
      </button>

      <button id="clearLog" onclick="clearLog()">πŸ—‘οΈ Clear Log</button>

      <div id="log" class="log"></div>
    </div>

    <script type="module" src="./test-sequential-operations.ts"></script>
  </body>
</html>