Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Thanks for that, I found another option too. In linux (ubuntu 18.04 with SDCC 3.8 I have some related commands

sdasstm8 - -plosgffw main //manipulates symbols etc
sdldstm8 -nf main.lk //linker

I found it all worked by just running `sdldstm8 -nf main.lk` in the src/controller dir after the make process errored. Gave me a main.ihx file which flashed and worked.
 
rob42 said:
Thanks for that, I found another option too. In linux (ubuntu 18.04 with SDCC 3.8 I have some related commands

sdasstm8 - -plosgffw main //manipulates symbols etc
sdldstm8 -nf main.lk //linker

I found it all worked by just running `sdldstm8 -nf main.lk` in the src/controller dir after the make process errored. Gave me a main.ihx file which flashed and worked.

Sweet, glad to hear you have a working solution.
 
Mbrusa released his code for the 0.20 in the italian forum (sadly as zip-file in the forum, not as repo at github) now. Thank you mbrusa! The GUI is still missing, you have to edit the config.h manually at the moment. I wonder if all 111 (!!!) :shock: parameters need to be adjusted by the "standard user". I suggest to keep only parameters that have to be adjusted by most users in the config.h and move the "advanced settings" to the main.h (e.g.)
With about 20 parameters it would be much faster to build the adapted GUI!

regards
stancecoke
 
stancecoke said:
Mbrusa released his code for the 0.20........ The GUI is still missing, you have to edit the config.h manually at the moment. ...........
Thanks to mbrusa we have the possibility to try the v.020 beta1 for default displays.
Yes, it is without a Java Gui, so you must edit config.h
Most parameters are already useable, so edit the configurations you have to change (tyre-size, speed, battery capacity etc.)
For compiling and programming you can use the xxx_20.bat files. Hopefully Marcoq or someone else will make a Java gui later too.

For the ones that want to edit the parameters inside config.h
I have made an English Google translation of the Italian guides inside the "mb.20beta1.A" firmware file (manuals directory).

View attachment EN-Configuration-guides-TSDZ2-mb.20beta1.A.zip
 
How does it work with the vlcd6? It doesn't have a light button. To turn on the lights you have keep press up bottom.
 
Nfer said:
How does it work with the vlcd6? .....
The release is just published and only tested by two users (mbrusa and chr27.5)
So every feedback will be welcome if you want to try this release.
I presume that in that case you must "press up" for confirmation of different modes.
This was the same with mbrusa v0.19C data additions too.
I advice to read at the Italian jobike forum too.
 
Elinx said:
The release is just published

I've moved most parameters to the file advanced.h and started a GUI:
https://github.com/stancecoke/TSDZ2-Smart-EBike

The GUI is not working yet, it will take two more hours of work, I think...

regards
stancecoke

GUI.PNG
 
Elinx said:
Nfer said:
How does it work with the vlcd6? .....
The release is just published and only tested by two users (mbrusa and chr27.5)
So every feedback will be welcome if you want to try this release.
I presume that in that case you must "press up" for confirmation of different modes.
This was the same with mbrusa v0.19C data additions too.
I advice to read at the Italian jobike forum too.

Hi Nfer,
with vlcd6 the light button and the down button.
Attention to work well you have to hold for about two seconds.
if you need help I can make a video.
 
stancecoke said:
Elinx said:
The release is just published

I've moved most parameters to the file advanced.h and started a GUI:
https://github.com/stancecoke/TSDZ2-Smart-EBike

The GUI is not working yet, it will take two more hours of work, I think...

regards
stancecoke

GUI.PNG

Hi Stancecoke,
I agree with you that fewer parameters are put into the Gui, the simpler it is to use for less experienced users, but to do a good job all the parameters present in config.h should be put, exactly as mBrusa did.
Thanks in advance for your contribution.
 
Elinx said:
Nfer said:
How does it work with the vlcd6? .....
The release is just published and only tested by two users (mbrusa and chr27.5)
So every feedback will be welcome if you want to try this release.
I presume that in that case you must "press up" for confirmation of different modes.
This was the same with mbrusa v0.19C data additions too.
I advice to read at the Italian jobike forum too.


Hi Elinx,
we have been testing this new version since December, I can tell you that the work done by mBrusa is exceptional, for my part I can say that I struggle to choose which mode to use between:
Pawer assist
Torque assist
eMtb mode
because both are fine.
I can't wait to try this version and give your feedbak.
 
Veramente sono 111? Non li avevo contati…
La scelta di quali parametri mettere in main.h e quali in config.h l’ho fatta e il risultato è questo!
Una GUI è comoda ma la caratteristica più importante del firmware open source è mantenere la possibilità di personalizzazione, può essere anche ibrida come stai già facendo, una scheda per i parametri indispensabili e una scheda per i parametri delle modalità di guida (6x4=24), gli altri rimanenti possono essere modificati in un file. Buon lavoro e grazie.
Io in questo momento ho poco tempo, riprenderò lo sviluppo tra 2/3 settimane.

Google translator

Hi stanceckoke, are they really 111? I hadn't counted them ...
The choice of which parameters to put in main.h and which in config.h I made and the result is this!
A GUI is convenient but the most important feature of the open source firmware is to maintain the possibility of customization, it can also be hybrid as you are already doing, a tab for the indispensable parameters and a tab for the riding mode parameters (6x4 = 24) , the rest of them can be edited in a file. Good job and thank you.
I currently have little time, I will resume development in 2/3 weeks.
 
mbrusa said:
The choice of which parameters to put in main.h and which in config.h I made and the result is this!
You are right, mixing the advanced parameters in the main.h is not a good idea. Therefore I moved them to the advanced.h. I plan to use the second button in the GUI to open the advanced.h with notepad.
If someone gets bored, he can make the advanced parameters available in the GUI :wink:

mbrusa said:
Good job and thank you.
You are welcome!

regards
stancecoke
 
stancecoke said:
mbrusa said:
The choice of which parameters to put in main.h and which in config.h I made and the result is this!
..... Therefore I moved them to the advanced.h. I plan to use the second button in the GUI to open the advanced.h with notepad.
If it is always possible to edit all functions and seperate them in "basic" and "advanced" configurations, then there should be no problem for everyone.

Till there is a working Gui I have made configuration sections in the English Google translation and improve the layout a bit.
View attachment EN-Parameter-Config.h-guide-TSDZ2-mb.20beta1.A.pdf
 
Elinx said:
Till there is a working Gui

Here you are!

The configurator works now for the basic settings. I think it is mostly self explanatory.
https://github.com/stancecoke/TSDZ2-Smart-EBike


GUI_working.PNG


For people who want to bring the advanced settings into the GUI:
You'll need approximatly 5 minutes for each advanced parameter to port.
At the moment you can set 14 parameters of 111 with the GUI :wink:
Use the netbeans IDE for development, the sourcefiles are placed in the tools-folder.

If there are very important parameters that should be in the basic settings, please tell me.

regards
stancecoke
 
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!

NetbeansGUI.PNG

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
 
Does anyone know if it's possible to add a brake sensor to a controller which has only the 6-pin display cable? Perhaps soldering a wire on the controller and connecting that to the sensor?
 
ilu said:
Does anyone know if it's possible to add a brake sensor to a controller which has only the 6-pin display cable? Perhaps soldering a wire on the controller and connecting that to the sensor?

You may want to move this over to the other main thread but its already wired, its only the throttle wires which are missing. look at https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Wire-SW102-to-TSDZ2 for the pinouts.
 
For some reason I'm really struggling to get the GUI to operate correctly on my PC, its probably me :) . Is there anyway we could just get one of you guys to just compile a file for the motor and make it public, sort of what Buba and Co did. It would save a lot of pain for the less computer literate who can program the motor but struggle with the GUI.
 
Waynemarlow said:
For some reason I'm really struggling to get the GUI to operate correctly on my PC
Make sure that every piece of software is installed in the correct path on your computer according to the manual.
For the use of the GUI the Java Runtime Environment has to be installed.

Waynemarlow said:
Is there anyway we could just get one of you guys to just compile a file for the motor and make it public.
As you can't set all the parameters with the stock displays, every user has to compile his own firmware with his personal settings.
So you can't work with a common hex file.

regards
stancecoke
 
ilu said:
Does anyone know if it's possible to add a brake sensor to a controller which has only the 6-pin display cable? Perhaps soldering a wire on the controller and connecting that to the sensor?

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/How-to-install-brake-sensors
 
Waynemarlow said:
For some reason I'm really struggling to get the GUI to operate correctly on my PC, its probably me :) . ...
You must be sure to have installed JRE, SDCC and STVP.
Check if SDCC and STVP are installed on C: and not C:/program files/

Without JRE you can install the FW by editing the basic settings inside config.h with notepad.
Compiling with compile_20.bat, flashing with program_20.bat.
All this is a lot easier with one button inside the Configurator Gui.
 
Back
Top