Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Constants from a text file (http://www.chiefdelphi.com/forums/showthread.php?t=125655)

orangelight 01-02-2014 20:51

Constants from a text file
 
What are the advantages of getting constants from a text file?

joelg236 01-02-2014 21:09

Re: Constants from a text file
 
Off the top of my head
  1. No redeploying every change
  2. Easy to change settings from non-programming computer
  3. Less buggy than Smartdashboard or Preferences
  4. Easy to delete, reset, change

orangelight 01-02-2014 21:35

Re: Constants from a text file
 
Quote:

Originally Posted by joelg236 (Post 1336056)
Off the top of my head
  1. No redeploying every change
  2. Easy to change settings from non-programming computer
  3. Less buggy than Smartdashboard or Preferences
  4. Easy to delete, reset, change

How do you move your changes to the cRIO without redeploying?

Domenic Rodriguez 01-02-2014 23:09

Re: Constants from a text file
 
Quote:

Originally Posted by orangelight (Post 1336073)
How do you move your changes to the cRIO without redeploying?

If you use an FTP client like FileZilla, you can easily edit the constants file from the driver station and upload it to the cRIO. Then you have a method in your code that reads the new values from the file and updates your program accordingly. No recompiling necessary.

eddie12390 03-02-2014 11:15

Re: Constants from a text file
 
Also, if you're interested, I made a tool in C# for managing a Constants file fairly easily. It has the ability to parse a Constants file using the Cheesy Poofs format (each key and value on a new line delimited by an =) and can upload to the robot via FTP.

JohnGilb 03-02-2014 16:46

Re: Constants from a text file
 
Also, Windows has built-in support for FTP network locations.

You can add a ftp location (like ftp://10.xx.yy.2, your team's cRio) to the Computer (the location that comes up when you press WinKey+E, then just right click in empty space and select "Add a network location") so you can just browse and edit files through the standard explorer interface, no special client needed.

joelg236 03-02-2014 17:07

Re: Constants from a text file
 
Quote:

Originally Posted by JohnGilb (Post 1337043)
Also, Windows has built-in support for FTP network locations.

You can add a ftp location (like ftp://10.xx.yy.2, your team's cRio) to the Computer (the location that comes up when you press WinKey+E, then just right click in empty space and select "Add a network location") so you can just browse and edit files through the standard explorer interface, no special client needed.

Was not aware of this. Thanks for the tip!


All times are GMT -5. The time now is 11:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi