eric7/MicroPython/EspDevices.py

branch
eric7
changeset 8366
2a9f5153c438
parent 8358
144a6b854f70
child 8881
54e42bc2437a
equal deleted inserted replaced
8365:cde9bde830ea 8366:2a9f5153c438
183 "-m", "esptool", 183 "-m", "esptool",
184 "--port", self.microPython.getCurrentPort(), 184 "--port", self.microPython.getCurrentPort(),
185 "erase_flash", 185 "erase_flash",
186 ] 186 ]
187 dlg = EricProcessDialog(self.tr("'esptool erase_flash' Output"), 187 dlg = EricProcessDialog(self.tr("'esptool erase_flash' Output"),
188 self.tr("Erase Flash"), 188 self.tr("Erase Flash"),
189 showProgress=True) 189 showProgress=True)
190 res = dlg.startProcess(sys.executable, flashArgs) 190 res = dlg.startProcess(sys.executable, flashArgs)
191 if res: 191 if res:
192 dlg.exec() 192 dlg.exec()
193 193
194 @pyqtSlot() 194 @pyqtSlot()
229 flashArgs += [ 229 flashArgs += [
230 flashAddress, 230 flashAddress,
231 firmware, 231 firmware,
232 ] 232 ]
233 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"), 233 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"),
234 self.tr("Flash MicroPython Firmware"), 234 self.tr("Flash MicroPython Firmware"),
235 showProgress=True) 235 showProgress=True)
236 res = dlg.startProcess(sys.executable, flashArgs) 236 res = dlg.startProcess(sys.executable, flashArgs)
237 if res: 237 if res:
238 dlg.exec() 238 dlg.exec()
239 239
240 @pyqtSlot() 240 @pyqtSlot()
264 flashArgs += [ 264 flashArgs += [
265 flashAddress.lower(), 265 flashAddress.lower(),
266 firmware, 266 firmware,
267 ] 267 ]
268 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"), 268 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"),
269 self.tr("Flash Additional Firmware"), 269 self.tr("Flash Additional Firmware"),
270 showProgress=True) 270 showProgress=True)
271 res = dlg.startProcess(sys.executable, flashArgs) 271 res = dlg.startProcess(sys.executable, flashArgs)
272 if res: 272 if res:
273 dlg.exec() 273 dlg.exec()
274 274
275 @pyqtSlot() 275 @pyqtSlot()
291 "read_flash", 291 "read_flash",
292 "0x0", flashSize, 292 "0x0", flashSize,
293 firmware, 293 firmware,
294 ] 294 ]
295 dlg = EricProcessDialog(self.tr("'esptool read_flash' Output"), 295 dlg = EricProcessDialog(self.tr("'esptool read_flash' Output"),
296 self.tr("Backup Firmware"), 296 self.tr("Backup Firmware"),
297 showProgress=True) 297 showProgress=True)
298 res = dlg.startProcess(sys.executable, flashArgs) 298 res = dlg.startProcess(sys.executable, flashArgs)
299 if res: 299 if res:
300 dlg.exec() 300 dlg.exec()
301 301
302 @pyqtSlot() 302 @pyqtSlot()
325 flashArgs.extend([ 325 flashArgs.extend([
326 "0x0", 326 "0x0",
327 firmware, 327 firmware,
328 ]) 328 ])
329 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"), 329 dlg = EricProcessDialog(self.tr("'esptool write_flash' Output"),
330 self.tr("Restore Firmware"), 330 self.tr("Restore Firmware"),
331 showProgress=True) 331 showProgress=True)
332 res = dlg.startProcess(sys.executable, flashArgs) 332 res = dlg.startProcess(sys.executable, flashArgs)
333 if res: 333 if res:
334 dlg.exec() 334 dlg.exec()
335 335
336 @pyqtSlot() 336 @pyqtSlot()
343 "-m", "esptool", 343 "-m", "esptool",
344 "--port", self.microPython.getCurrentPort(), 344 "--port", self.microPython.getCurrentPort(),
345 "chip_id" 345 "chip_id"
346 ] 346 ]
347 dlg = EricProcessDialog(self.tr("'esptool chip_id' Output"), 347 dlg = EricProcessDialog(self.tr("'esptool chip_id' Output"),
348 self.tr("Show Chip ID")) 348 self.tr("Show Chip ID"))
349 res = dlg.startProcess(sys.executable, args) 349 res = dlg.startProcess(sys.executable, args)
350 if res: 350 if res:
351 dlg.exec() 351 dlg.exec()
352 352
353 @pyqtSlot() 353 @pyqtSlot()
360 "-m", "esptool", 360 "-m", "esptool",
361 "--port", self.microPython.getCurrentPort(), 361 "--port", self.microPython.getCurrentPort(),
362 "flash_id" 362 "flash_id"
363 ] 363 ]
364 dlg = EricProcessDialog(self.tr("'esptool flash_id' Output"), 364 dlg = EricProcessDialog(self.tr("'esptool flash_id' Output"),
365 self.tr("Show Flash ID")) 365 self.tr("Show Flash ID"))
366 res = dlg.startProcess(sys.executable, args) 366 res = dlg.startProcess(sys.executable, args)
367 if res: 367 if res:
368 dlg.exec() 368 dlg.exec()
369 369
370 @pyqtSlot() 370 @pyqtSlot()
377 "-m", "esptool", 377 "-m", "esptool",
378 "--port", self.microPython.getCurrentPort(), 378 "--port", self.microPython.getCurrentPort(),
379 "read_mac" 379 "read_mac"
380 ] 380 ]
381 dlg = EricProcessDialog(self.tr("'esptool read_mac' Output"), 381 dlg = EricProcessDialog(self.tr("'esptool read_mac' Output"),
382 self.tr("Show MAC Address")) 382 self.tr("Show MAC Address"))
383 res = dlg.startProcess(sys.executable, args) 383 res = dlg.startProcess(sys.executable, args)
384 if res: 384 if res:
385 dlg.exec() 385 dlg.exec()
386 386
387 @pyqtSlot() 387 @pyqtSlot()

eric ide

mercurial