-
Notifications
You must be signed in to change notification settings - Fork 0
Graficas Telemetria
David Mendez edited this page Jul 18, 2026
·
1 revision
Archivo:
ui/widgets/telemetry_graphs.pyยท Clase:TelemetryGraphsWidgetยท 78 lรญneas
Tres grรกficas apiladas verticalmente que muestran un historial de 10 segundos de las mรฉtricas principales de conducciรณn.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Velocidad (km/h) โ
โ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 287 โ โ Lรญnea azul
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Acelerador / Freno (%) โ
โ โโโโโโโโโโโโโโโโโโโ 78% โ โ Verde = Acelerador (relleno)
โ โโโโโโ 23% โ โ Rojo = Freno (relleno)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ R.P.M. โ
โ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7,200 โ โ Lรญnea naranja oscuro
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-10s ahora
| Canal | Color | Hex | Relleno | Puntos |
|---|---|---|---|---|
| Velocidad | Azul | #0000FF |
No | 600 |
| Acelerador | Verde | #008000 |
Sรญ (semi-transparente) | 600 |
| Freno | Rojo | #FF0000 |
Sรญ (semi-transparente) | 600 |
| RPM | Naranja Oscuro | #FF8C00 |
No | 600 |
| Propiedad | Valor |
|---|---|
| Historial | 600 puntos (~10 segundos a 60Hz) |
| Eje X | Pre-computado: np.linspace(-10, 0, 600)
|
| Fondo | #FAFAFA |
| Layout |
GraphicsLayoutWidget con 3 rows |
| Actualizaciรณn de datos |
np.roll() sobre arrays de numpy |
_cache_packet() @ 60Hz
โ
โโโ graphs_widget.add_data(speed, throttle, brake, rpm)
โ
โโโ np.roll() en 4 arrays de 600 elementos
update_dashboard_ui() @ 30Hz
โ
โโโ graphs_widget.update_plot()
โ
โโโ setData() en 4 curvas de pyqtgraph
widget = TelemetryGraphsWidget()
# Agregar un punto de datos (llamado a 60Hz)
widget.add_data(speed=287.5, throttle=200, brake=0, rpm=7200)
# Actualizar las grรกficas visualmente (llamado a 30Hz)
widget.update_plot()
# Limpiar todo
widget.clear()