@@ -86,7 +86,7 @@ public async Task DeployCode(string teamNumber, SettingsPageGrid page, bool debu
86
86
return ;
87
87
}
88
88
OutputWriter . Instance . WriteLine ( "Successfully Deployed Files. Starting Code." ) ;
89
- await UploadCode ( codeReturn . RobotExe , page , debug ) ;
89
+ await UploadCode ( codeReturn . RobotExe , page , debug , robotProject ) ;
90
90
OutputWriter . Instance . WriteLine ( "Successfully started robot code." ) ;
91
91
}
92
92
else
@@ -164,7 +164,7 @@ public async Task<CodeReturnStruct> BuildAndPrepareCode(bool debug, Project robo
164
164
string robotExe = Path . GetFileName ( path ) ;
165
165
string buildDir = Path . GetDirectoryName ( path ) ;
166
166
167
-
167
+
168
168
writer . WriteLine ( "Parsing Robot Files" ) ;
169
169
//While connecting, parse all of the output files.
170
170
List < string > files = new List < string > ( ) ;
@@ -209,6 +209,19 @@ await Task.Run(() =>
209
209
}
210
210
}
211
211
212
+ public string GetCommandLineArguments ( Project robotProject )
213
+ {
214
+ var settings = ( SettingsPageGrid ) Frc_ExtensionPackage . Instance . PublicGetDialogPage ( typeof ( SettingsPageGrid ) ) ;
215
+ if ( ! settings . ConsoleArgs )
216
+ {
217
+ return "" ;
218
+ }
219
+
220
+ Configuration configuration = robotProject . ConfigurationManager . ActiveConfiguration ;
221
+
222
+ return ( string ) configuration . Properties . Item ( "StartArguments" ) . Value ;
223
+ }
224
+
212
225
public async Task < bool > DeployRobotFiles ( List < string > files )
213
226
{
214
227
OutputWriter . Instance . WriteLine ( "Deploying robot files" ) ;
@@ -270,7 +283,7 @@ internal string GetAssemblyPath(Project vsProject)
270
283
return assemblyPath ;
271
284
}
272
285
273
- public async Task UploadCode ( string robotName , SettingsPageGrid page , bool debug )
286
+ public async Task UploadCode ( string robotName , SettingsPageGrid page , bool debug , Project robotProject )
274
287
{
275
288
if ( page . Netconsole )
276
289
{
@@ -289,12 +302,14 @@ public async Task UploadCode(string robotName, SettingsPageGrid page, bool debug
289
302
deployedCmdFrame = DeployProperties . RobotCommandFileName ;
290
303
}
291
304
305
+ string args = GetCommandLineArguments ( robotProject ) ;
306
+
292
307
//Must be run as admin, so is seperate
293
308
await RoboRIOConnection . RunCommand ( "killall -q netconsole-host || :" , ConnectionUser . Admin ) ;
294
309
295
310
//Combining all other commands, since they should be safe running together.
296
311
List < string > commands = new List < string > ( ) ;
297
- commands . Add ( $ "echo { deployedCmd } > { DeployProperties . CommandDir } /{ deployedCmdFrame } ") ;
312
+ commands . Add ( $ "echo { deployedCmd } { args } > { DeployProperties . CommandDir } /{ deployedCmdFrame } ") ;
298
313
if ( debug )
299
314
{
300
315
commands . AddRange ( DeployProperties . DebugFlagCommand ) ;
0 commit comments