Regarding casainho's Master Project and marcoq "fork" I performed a side by side comparison between their codes (just a file compare, unfortunately my knowledge on chip programming is limited
).
I understood that there are 2 main topic covered by marcoq's work:
1) Walk assist
2) Implemented compatibility with stock displays (plus the ongoing interface tool for programming variables)
From my personal point of view both the two are interesting and worth to be considered for merging into the Master project, but let's focus on 1 piece at time.
Walk assist
The new main code for the walk assist should be in the
ebike_app.c file from marcoq (please correct me if I'm wrong)
https://github.com/qmarco/TSDZ2-Smart-EBike-compatible-with-original-VlCD6-display
Since it was reported that the funcion actually works, is it possible from any of the experts (possibly marcoq who knows the logic behind) to generate a pull request and get it merged into the main project?
After this, i guess the only major bug left to solve is the backwards resistance. :thumb:
Stock display compatibility
Considering the improved flexibility due to the visual interface to program the motor/bike settings (ongoing from marcoq) I think we should consider the option to implement the flag to include also the stock displays and let the user chose what to do.
What do you think?
In case, for easier reference I found that the modified files are the following.
brake.c
config.h
ebike_app.c //should contain also the main code for walk assist
ebike_app.h
eeprom.c
eeprom.h
main.c
main.h
motor.c - in this file @row #726 i guess there is a mistake on marcoq code (see below)
____marcoq : ui8_temp = ui8_svm_table [(uint8_t) (ui8_svm_table_index + 85 /*
120º */)];
____casainho: ui8_temp = ui8_svm_table [(uint8_t) (ui8_svm_table_index + 85 /*
120º */)];
motor.h
pins.h
uart.c
At the moment I have 2 bikes with the TSDZ2 and I purchased one LCD3 display to try the new firmware.
Now I received all the hardware needed (display, programmer, brake sensors) and I will update the controller + display on the first bike as soon as v.0.17 is out (buba's modifications are really cool).
As I'm sure the firmware is great I would like to implement it also on the 2nd bike, for which I did not buy any additional display, therefore marcoq solution plus his java tool for configuration should be perfect for my VLCD5 display.
Please share your thoughts on the possible integration of marcoq walk assist and stock display compatibility in the main project.
Thanks