@@ -93,18 +93,20 @@ func (p *projectRaw) getProfiles() ([]*Profile, error) {
9393// Profile is a sketch profile, it contains a reference to all the resources
9494// needed to build and upload a sketch
9595type Profile struct {
96- Name string
97- Notes string `yaml:"notes"`
98- FQBN string `yaml:"fqbn"`
99- Platforms ProfileRequiredPlatforms `yaml:"platforms"`
100- Libraries ProfileRequiredLibraries `yaml:"libraries"`
96+ Name string
97+ Notes string `yaml:"notes"`
98+ FQBN string `yaml:"fqbn"`
99+ Programmer string `yaml:"programmer"`
100+ Platforms ProfileRequiredPlatforms `yaml:"platforms"`
101+ Libraries ProfileRequiredLibraries `yaml:"libraries"`
101102}
102103
103104// ToRpc converts this Profile to an rpc.SketchProfile
104105func (p * Profile ) ToRpc () * rpc.SketchProfile {
105106 return & rpc.SketchProfile {
106- Name : p .Name ,
107- Fqbn : p .FQBN ,
107+ Name : p .Name ,
108+ Fqbn : p .FQBN ,
109+ Programmer : p .Programmer ,
108110 }
109111}
110112
@@ -115,6 +117,9 @@ func (p *Profile) AsYaml() string {
115117 res += fmt .Sprintf (" notes: %s\n " , p .Notes )
116118 }
117119 res += fmt .Sprintf (" fqbn: %s\n " , p .FQBN )
120+ if p .Programmer != "" {
121+ res += fmt .Sprintf (" programmer: %s\n " , p .Programmer )
122+ }
118123 res += p .Platforms .AsYaml ()
119124 res += p .Libraries .AsYaml ()
120125 return res
0 commit comments