Skip to content

Commit 1c59888

Browse files
author
Ritika Mishra
committed
improved code to print maxpoints
1 parent 570e40b commit 1c59888

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/serial-plotter/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const SerialPlotter = () => {
2424
const [showCombined, setShowCombined] = useState(true);
2525
const selectedChannelsRef = useRef<number[]>([]);
2626
const rawDataRef = useRef<HTMLDivElement | null>(null);
27-
const maxPoints = 100;
27+
const maxPoints = 1000;
2828
const canvasRef = useRef<HTMLCanvasElement | null>(null);
2929
const wglpRef = useRef<WebglPlot | null>(null);
3030
const linesRef = useRef<WebglLine[]>([]);
@@ -329,7 +329,9 @@ const SerialPlotter = () => {
329329
<div ref={rawDataRef} className={`w-full border rounded-xl shadow-lg bg-[#1a1a2e] text-white overflow-auto flex flex-col flex-grow ${viewMode === "both" ? "min-h-[55vh]" : "min-h-[50vh]"}`}>
330330
{/* Sticky Top Controls */}
331331
{/* Title */}
332-
<h2 className="text-sm font-semibold text-center mb-2">Raw Data Output</h2>
332+
<h2 className="text-sm font-semibold text-center mb-2">
333+
{boardName ? `Connected to: ${boardName}` : "Raw Data Output"}
334+
</h2>
333335
<div className="sticky top-0 right-0 flex items-center justify-end space-x-2 bg-[#1a1a2e] p-2 z-10">
334336
<div className="flex items-center space-x-1 p-1">
335337
<input

0 commit comments

Comments
 (0)