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