@@ -84,11 +84,14 @@ func (uploader *FwUploader) QueryAPIVersion() (int, error) {
8484}
8585
8686// GetFirmwareVersion runs the plugin to obtain the version of the installed firmware
87- func (uploader * FwUploader ) GetFirmwareVersion (portAddress string , stdout , stderr io.Writer ) (* GetFirmwareVersionResult , error ) {
87+ func (uploader * FwUploader ) GetFirmwareVersion (portAddress , fqbn string , stdout , stderr io.Writer ) (* GetFirmwareVersionResult , error ) {
8888 args := []string {"firmware" , "get-version" }
8989 if portAddress != "" {
9090 args = append (args , "-p" , portAddress )
9191 }
92+ if fqbn != "" {
93+ args = append (args , "-b" , fqbn )
94+ }
9295 execStdout , execStderr , execErr := uploader .exec (stdout , stderr , args ... )
9396
9497 res := & GetFirmwareVersionResult {
@@ -126,11 +129,14 @@ type GetFirmwareVersionResult struct {
126129}
127130
128131// FlashFirmware runs the plugin to flash the selected firmware
129- func (uploader * FwUploader ) FlashFirmware (portAddress string , firmwarePath * paths.Path , stdout , stderr io.Writer ) (* FlashFirmwareResult , error ) {
132+ func (uploader * FwUploader ) FlashFirmware (portAddress , fqbn string , firmwarePath * paths.Path , stdout , stderr io.Writer ) (* FlashFirmwareResult , error ) {
130133 args := []string {"firmware" , "flash" , firmwarePath .String ()}
131134 if portAddress != "" {
132135 args = append (args , "-p" , portAddress )
133136 }
137+ if fqbn != "" {
138+ args = append (args , "-b" , fqbn )
139+ }
134140 execStdout , execStderr , execErr := uploader .exec (stdout , stderr , args ... )
135141
136142 res := & FlashFirmwareResult {
0 commit comments