Skip to content

Commit

Permalink
Fix channel button behaviour for rpy pico
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanmahe committed Dec 12, 2024
1 parent b436393 commit 35110ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Connection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ const Connection: React.FC<ConnectionProps> = ({
setIsConnected(true);
onPauseChange(true);
setIsDisplay(true);
setCanvasCount(1);
isConnectedRef.current = true;
portRef.current = port;

Expand Down Expand Up @@ -1702,14 +1703,14 @@ const Connection: React.FC<ConnectionProps> = ({
<Button
className="rounded-xl rounded-l-none"
onClick={increaseCanvas}
disabled={canvasCount >= 6 || !isDisplay || recData}
disabled={canvasCount >= (detectedBitsRef.current=="twelve"?3:6) || !isDisplay || recData}
>
<Plus size={16} />
</Button>
</TooltipTrigger>
<TooltipContent>
<p>
{canvasCount >= 6
{canvasCount >= (detectedBitsRef.current=="twelve"?3:6)
? "Maximum Channels Reached"
: "Increase Channel"}
</p>
Expand Down

0 comments on commit 35110ca

Please sign in to comment.