milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 1 | // Provides a plot for debugging robot state-related issues. |
| 2 | import {AosPlotter} from 'org_frc971/aos/network/www/aos_plotter'; |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 3 | import {BLUE, BROWN, CYAN, GREEN, PINK, RED, WHITE} from 'org_frc971/aos/network/www/colors'; |
Henry Speiser | 55aa3ba | 2022-02-21 23:21:12 -0800 | [diff] [blame^] | 4 | import * as proxy from 'org_frc971/aos/network/www/proxy'; |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 5 | |
| 6 | import Connection = proxy.Connection; |
| 7 | |
| 8 | const TIME = AosPlotter.TIME; |
| 9 | const DEFAULT_WIDTH = AosPlotter.DEFAULT_WIDTH; |
| 10 | const DEFAULT_HEIGHT = AosPlotter.DEFAULT_HEIGHT * 3; |
| 11 | |
Henry Speiser | 55aa3ba | 2022-02-21 23:21:12 -0800 | [diff] [blame^] | 12 | export function plotSuperstructure(conn: Connection, element: Element): void { |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 13 | const aosPlotter = new AosPlotter(conn); |
Henry Speiser | 55aa3ba | 2022-02-21 23:21:12 -0800 | [diff] [blame^] | 14 | const goal = aosPlotter.addMessageSource( |
| 15 | '/superstructure', 'y2022.control_loops.superstructure.Goal'); |
| 16 | const output = aosPlotter.addMessageSource( |
| 17 | '/superstructure', 'y2022.control_loops.superstructure.Output'); |
| 18 | const status = aosPlotter.addMessageSource( |
| 19 | '/superstructure', 'y2022.control_loops.superstructure.Status'); |
| 20 | const position = aosPlotter.addMessageSource( |
| 21 | '/superstructure', 'y2022.control_loops.superstructure.Position'); |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 22 | const robotState = aosPlotter.addMessageSource('/aos', 'aos.RobotState'); |
| 23 | } |