Class LookupPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

class LookupPanel extends JPanel
Finds units over LoRa through the transmitter. Lookup lights one unit (by board label and/or ID) white until stopped; the sweep steps through every board ID one at a time so a person can spot duplicate or missing IDs. Only one unit is lit at a time: sending a new ID turns the previous one off.
  • Field Details

    • OWNER

      private static final String OWNER
      See Also:
    • host

      private final DevModeHost host
    • sender

      private final ExecutorService sender
    • transmitterBox

      private final JComboBox<String> transmitterBox
    • transmitterPill

      private final DevUI.Pill transmitterPill
    • projectSummary

      private final JTextArea projectSummary
    • projectPill

      private final DevUI.Pill projectPill
    • openProjectButton

      private final JButton openProjectButton
    • labelField

      private final JTextField labelField
    • idField

      private final JTextField idField
    • litId

      private final JLabel litId
    • litLabel

      private final JLabel litLabel
    • litPill

      private final DevUI.Pill litPill
    • lookupMessage

      private final JLabel lookupMessage
    • startSpinner

      private final JSpinner startSpinner
    • endSpinner

      private final JSpinner endSpinner
    • startButton

      private final JButton startButton
    • stopButton

      private final JButton stopButton
    • sweepId

      private final JLabel sweepId
    • sweepExpected

      private final JLabel sweepExpected
    • sweepProgress

      private final JProgressBar sweepProgress
    • prevButton

      private final JButton prevButton
    • resendButton

      private final JButton resendButton
    • nextButton

      private final JButton nextButton
    • autoBox

      private final JCheckBox autoBox
    • autoSeconds

      private final JSpinner autoSeconds
    • autoTimer

      private final Timer autoTimer
    • sweepCard

      private final DevUI.Card sweepCard
    • currentSweepId

      private Integer currentSweepId
    • unitLit

      private boolean unitLit
    • detectedOnce

      private boolean detectedOnce
  • Constructor Details

  • Method Details

    • buildConnectionStrip

      private JComponent buildConnectionStrip()
    • buildFindCard

      private JComponent buildFindCard()
    • buildSweepCard

      private JComponent buildSweepCard()
    • bigText

      private static void bigText(JLabel label, String value, String placeholder, float grow)
      Shows a value in a large bold font, or a muted placeholder at a readable size when there is no value.
    • keyHint

      private static JComponent keyHint(String text)
    • centerVertically

      private static JComponent centerVertically(JComponent c)
    • styleBigField

      private static void styleBigField(JTextField f)
    • bindKey

      private void bindKey(int key, String name, Runnable action)
    • onShown

      void onShown()
      Called when the Lookup tab is opened.
    • reloadProject

      void reloadProject()
      Updates the project summary and sweep range from the open project.
    • refreshPorts

      private void refreshPorts(boolean detect)
      Parameters:
      detect - find which port is the transmitter (may probe units)
    • updateTransmitterPill

      private void updateTransmitterPill()
    • sendIdentify

      private void sendIdentify(int id, Runnable onFailure)
      Sends an identify for this board ID (-1 = all off). Runs in order on a background thread.
    • showLit

      private void showLit(Integer id)
    • lookUp

      private void lookUp()
    • allOff

      private void allOff()
    • startSweep

      private void startSweep()
    • step

      private void step(int direction)
      Parameters:
      direction - -1 previous, 0 resend current, 1 next
    • showAndSend

      private void showAndSend()
    • stopSweep

      private void stopSweep()
    • updateAutoTimer

      private void updateAutoTimer()
    • updateSweepControls

      private void updateSweepControls()
    • shutdown

      void shutdown()