Skip to content

Commit 72880ab

Browse files
committed
fixes for tv
1 parent f48bc6a commit 72880ab

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/visualisation_tool/DataUpdater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from src.hiveboard.usb_stream import UsbStream
1212
from src.hiveboard.proto.ethernet_stream import EthernetStream
1313

14-
use_serial = True
14+
use_serial = False
1515
COM_PORT = "/dev/ttyACM0"
1616

1717

src/visualisation_tool/Graph2D.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ def create_2d_plot(self):
2424
#self.graphWidget.setBackground("w")
2525
self.graphWidget.hideAxis('bottom')
2626
self.graphWidget.hideAxis('left')
27-
self.graphWidget.setXRange(-7, 7)
28-
self.graphWidget.setYRange(-7, 7)
27+
self.graphWidget.setXRange(-5, 5)
28+
self.graphWidget.setYRange(-5, 5)
2929
self.graphWidget.setMouseEnabled(x=False, y=False)
30-
self.graphWidget.addLegend()
30+
self.graphWidget.addLegend(labelTextSize='24pt')
3131
self.layout.addWidget(self.graphWidget)
3232

3333
def create_grid(self):
3434
self.grid = GridItem(pen='white', textPen='white')
35+
self.grid.setTickSpacing([1.0], [1.0])
3536
self.graphWidget.addItem(self.grid)
3637

3738
def create_scatter_element(self):
@@ -40,7 +41,7 @@ def create_scatter_element(self):
4041
'pen': {'color': 'w', 'width': 1},
4142
'brush': pg.intColor(10, 100), # Orange
4243
'symbol': 'd',
43-
'size': 30}
44+
'size': 50}
4445
self.base.addPoints([base_symbol])
4546
self.graphWidget.addItem(self.base)
4647

@@ -57,7 +58,7 @@ def update_point(self, neighbor_id: int, x: float, y: float):
5758
# 100 is the number int values for the color spectrum,
5859
# COLOR_OFFSET is the offset to apply to have 6 different values for points
5960
'brush': pg.intColor(neighbor_id * COLOR_OFFSET, 100),
60-
'size': 20}
61+
'size': 50}
6162
self.scatters[neighbor_id]["scatter"].setData(spots=[self.scatters[neighbor_id]["spot"]],
6263
name=f"Agent {neighbor_id}")
6364

0 commit comments

Comments
 (0)