@@ -396,10 +396,10 @@ func runProgramAction(pme *packagemanager.Explorer,
396396		}
397397
398398		cb  :=  & serialutils.ResetProgressCallbacks {
399- 			TouchingPort : func (port  string ) {
400- 				logrus .WithField ("phase" , "board reset" ).Infof ("Performing 1200-bps touch reset on serial port %s" , port )
399+ 			TouchingPort : func (portAddress  string ) {
400+ 				logrus .WithField ("phase" , "board reset" ).Infof ("Performing 1200-bps touch reset on serial port %s" , portAddress )
401401				if  verbose  {
402- 					outStream .Write ([]byte (fmt .Sprintln (tr ("Performing 1200-bps touch reset on serial port %s" , port ))))
402+ 					outStream .Write ([]byte (fmt .Sprintln (tr ("Performing 1200-bps touch reset on serial port %s" , portAddress ))))
403403				}
404404			},
405405			WaitingForNewSerial : func () {
@@ -408,17 +408,17 @@ func runProgramAction(pme *packagemanager.Explorer,
408408					outStream .Write ([]byte (fmt .Sprintln (tr ("Waiting for upload port..." ))))
409409				}
410410			},
411- 			BootloaderPortFound : func (port  string ) {
412- 				if  port  !=  ""  {
413- 					logrus .WithField ("phase" , "board reset" ).Infof ("Upload port found on %s" , port )
411+ 			BootloaderPortFound : func (portAddress  string ) {
412+ 				if  portAddress  !=  ""  {
413+ 					logrus .WithField ("phase" , "board reset" ).Infof ("Upload port found on %s" , portAddress )
414414				} else  {
415- 					logrus .WithField ("phase" , "board reset" ).Infof ("No upload port found, using %s as fallback" , actualPort )
415+ 					logrus .WithField ("phase" , "board reset" ).Infof ("No upload port found, using %s as fallback" , actualPort . Address )
416416				}
417417				if  verbose  {
418- 					if  port  !=  ""  {
419- 						outStream .Write ([]byte (fmt .Sprintln (tr ("Upload port found on %s" , port ))))
418+ 					if  portAddress  !=  ""  {
419+ 						outStream .Write ([]byte (fmt .Sprintln (tr ("Upload port found on %s" , portAddress ))))
420420					} else  {
421- 						outStream .Write ([]byte (fmt .Sprintln (tr ("No upload port found, using %s as fallback" , actualPort ))))
421+ 						outStream .Write ([]byte (fmt .Sprintln (tr ("No upload port found, using %s as fallback" , actualPort . Address ))))
422422					}
423423				}
424424			},
@@ -427,11 +427,11 @@ func runProgramAction(pme *packagemanager.Explorer,
427427			},
428428		}
429429
430- 		if  newPort , err  :=  serialutils .Reset (portToTouch , wait , cb , dryRun ); err  !=  nil  {
430+ 		if  newPortAddress , err  :=  serialutils .Reset (portToTouch , wait , cb , dryRun ); err  !=  nil  {
431431			outStream .Write ([]byte (fmt .Sprintln (tr ("Cannot perform port reset: %s" , err ))))
432432		} else  {
433- 			if  newPort  !=  ""  {
434- 				actualPort .Address  =  newPort 
433+ 			if  newPortAddress  !=  ""  {
434+ 				actualPort .Address  =  newPortAddress 
435435			}
436436		}
437437	}
0 commit comments