def select_file(self):
     if platform == 'win':
         ok_cb = self.prompt_manual_bootloader_mode
     else:
         ok_cb = self._start_update_fw
     user_path= self.get_firmware_file_path()
     print("the user path " + str(user_path))
     content = LoadDialog(ok=ok_cb, 
                          cancel=self.dismiss_popup,
                          filters=['*' + '.ihex'],
                          user_path=user_path)
     self._popup = Popup(title="Load file", content=content, size_hint=(0.9, 0.9))
     self._popup.open()
    def _select_file(self):
        def _on_answer(instance):
            popup.dismiss()
            self._start_update_fw(instance)

        def dismiss_popup(self, *args):
            popup.dismiss()

        user_path = self.get_firmware_file_path()
        content = LoadDialog(ok=_on_answer,
                             cancel=dismiss_popup,
                             filters=['*' + '.ihex'],
                             user_path=user_path)
        popup = Popup(title="Load file", content=content, size_hint=(0.9, 0.9))
        popup.open()
    def _select_file(self):
        def _on_answer(instance):
            popup.dismiss()
            if platform == 'win':
                self._prompt_manual_bootloader_mode(instance)
            else:
                self._start_update_fw(instance)

        def dismiss_popup(self, *args):
            popup.dismiss()

        user_path = self.get_firmware_file_path()
        content = LoadDialog(ok=_on_answer,
                             cancel=dismiss_popup,
                             filters=['*' + '.ihex'],
                             user_path=user_path)
        popup = Popup(title="Load file", content=content, size_hint=(0.9, 0.9))
        popup.open()
Example #4
0
 def doOpenConfig(self):
     content = LoadDialog(ok=self.load, cancel=self.dismiss_popup, filters=['*' + RCP_CONFIG_FILE_EXTENSION], user_path=self.get_config_file_path())
     self._popup = Popup(title="Load file", content=content, size_hint=(0.9, 0.9))
     self._popup.open()