Skip to content

Commit

Permalink
ui: Report the detected model during clone
Browse files Browse the repository at this point in the history
  • Loading branch information
kk7ds committed May 3, 2024
1 parent a8e26d9 commit 5b9077c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chirp/wxui/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ def _add_grid(label, control):
vbox.Add(grid, proportion=1,
flag=wx.TOP | wx.BOTTOM | wx.EXPAND,
border=20)
self.model_msg = wx.StaticText(
self,
label='',
style=(wx.ALIGN_CENTER_HORIZONTAL | wx.ST_NO_AUTORESIZE |
wx.ELLIPSIZE_END))
self.status_msg = wx.StaticText(
self, label='',
style=(wx.ALIGN_CENTER_HORIZONTAL | wx.ST_NO_AUTORESIZE |
Expand All @@ -300,6 +305,9 @@ def _add_grid(label, control):
flag=wx.EXPAND | wx.BOTTOM)
vbox.Add(self.gauge, flag=wx.EXPAND | wx.RIGHT | wx.LEFT, border=10,
proportion=0)
vbox.Add(self.model_msg,
border=5, proportion=0,
flag=wx.EXPAND | wx.BOTTOM)
vbox.Add(wx.StaticLine(self), flag=wx.EXPAND | wx.ALL, border=5)
vbox.Add(bs, flag=wx.ALL, border=10)
self.SetSizer(vbox)
Expand Down Expand Up @@ -525,6 +533,7 @@ def _selected_model(self, event):
super(ChirpDownloadDialog, self)._selected_model(event)
rclass = self.get_selected_rclass()
prompts = rclass.get_prompts()
self.model_msg.SetLabel('')
if prompts.experimental:
d = ChirpRadioPromptDialog(
self,
Expand Down Expand Up @@ -595,6 +604,9 @@ def _action(self, event):
self.fail(_('Internal driver error'))
return

self.model_msg.SetLabel('%s %s %s' % (
rclass.VENDOR, rclass.MODEL, rclass.VARIANT))

try:
self._radio = rclass(serial)
except Exception as e:
Expand Down

0 comments on commit 5b9077c

Please sign in to comment.