mbrusa said:
there is a problem in the config.h file
I just fixed the bugs , see the last
commit
Please report, if it works now!
famichiki said:
When are the .ini files saved, upon compiling & flashing? Are they saved in JSON format or something proprietary?
The
.ini files are just simple text files. They content the values of the textfields and true/false for the radio buttons in the same order as in the config.h. They are written at the same time as the config.h
With the start of the GUI, the newest .ini file in the
proven settings folder is loaded. So if you are satisfied with a setup, just rename the .ini file in the
experimental settings folder and copy it into
proven settings.
To add a new parameter to the GUI you have to
1. Install NetBeans
2. fork my repo at github, then open Netbeans and import the project from github with -->team-->git-->clone
3. double-click on TSDZ2_Configurator.java in the project explorer
4. go to the
Design Tab (2)
5. Place a text field via drag and drop in the GUI (3). With right click on the new text field you can edit the default text and the variable name. Add a label for the text field by drag and drop (4).
6. switch to the
source tab (2)
7. add the new parameter to the
load settings function (line 101...) in the same syntax as the existing parameters
Code:
TF_MAX_SPEED.setText(in.readLine());
8. add the new parameter to the
action performed function (line 241...) in the same syntax as the existing parameters
Code:
text_to_save = "#define WHEEL_MAX_SPEED " + TF_MAX_SPEED.getText();
iWriter.println(TF_MAX_SPEED.getText()); //writes .ini file
pWriter.println(text_to_save); // writes config.h
TF_MAX_SPEED is the variable name in this example.
Make sure, that the parameters are in the same order in both functions!
To build the .jar file, right click on the project name in the project explorer and click
Build. The .jar file is saved in the
/dist folder
regards
stancecoke