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'; |
| 3 | import * as proxy from 'org_frc971/aos/network/www/proxy'; |
| 4 | import {BLUE, BROWN, CYAN, GREEN, PINK, RED, WHITE} from 'org_frc971/aos/network/www/colors'; |
| 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 | |
| 12 | export 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 | } |