Skip to content

Commit

Permalink
Added knob to allow connecting to already programmed FX3 when there i…
Browse files Browse the repository at this point in the history
…s a debugger attached to the app process
  • Loading branch information
ajn96 committed Jan 23, 2025
1 parent cb526fb commit 58d4fb0
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/TopGUI.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1392,17 +1392,22 @@ Public Class TopGUI
subGUI.ShowDialog()
selectedFX3SN = FX3.ActiveFX3SerialNumber
ElseIf FX3.BusyFX3s.Count > 0 Then
'FX3s are already running the application firmware
If ResetAllFX3s() Then
btn_Connect.Enabled = False
'Restart connect recursively
FX3.WaitForBoard(10)
ConnectWork()
Exit Sub
'Allow sharing FX3 board if debugging
If Diagnostics.Debugger.IsAttached Then
selectedFX3SN = FX3.BusyFX3s(0)
Else
label_FX3Status.BackColor = ERROR_COLOR
label_FX3Status.Text = "ERROR: All FX3s in Use"
btn_Connect.Text = "Connect to FX3"
'FX3s are already running the application firmware
If ResetAllFX3s() Then
btn_Connect.Enabled = False
'Restart connect recursively
FX3.WaitForBoard(10)
ConnectWork()
Exit Sub
Else
label_FX3Status.BackColor = ERROR_COLOR
label_FX3Status.Text = "ERROR: All FX3s in Use"
btn_Connect.Text = "Connect to FX3"
End If
End If
Else
label_FX3Status.BackColor = ERROR_COLOR
Expand Down

0 comments on commit 58d4fb0

Please sign in to comment.