emmebrusa / TSDZ2-Smart-EBike-1

TSDZ2 Open Source Firmware adapted to VLCD5-VLCD6-XH18 displays
GNU General Public License v3.0
131 stars 35 forks source link

java configurator doesnt save settings in .ini file #80

Closed aston89 closed 9 months ago

aston89 commented 9 months ago

the java configurator when you press "compile & flash" save a new setting.ini file, usually it does something like this : "date-timeCEST.ini"

now it writes something like : "date-timeGMT+0" the file doesnt have any extension and is blank, if you open the configurator again it goes crazy, it tryes to read the blank file and some of the cells where you put the data became corrupted with symbols (the first ones for sure)

i tryed using different version of java (liberica 20 jdk full / java8update-something / temurin17jdk and so on) but all the same with exact result

this problem happened all of a sudden, same win10 same sdcc 4.1, nothing updated (only java) and i dont know why, know for sure that CEST and GMT are time format but i wasnt able to figure why it changed, last month was cest, this month is gmt !? (pretty sure is a configuration inside windows but a java bug too)

but wait there's more : i am also thinking that this problem is causing the "flash & compile" function to use previous settings due to the fact it cant store them in a file (but i was unable to prove it correctly and is only a half baked theory)

POSSIBLE SOLUTION :

after digging around win10 time/zone settings, i was able to solve the issue : disabled auto time update with servers changed time/date formatting to a different region/language (win10 is still english) changed timezone to coordinated universal time

dont know why but win10 "new setting panel" is giving a message when you change the timezone and other settings "buffer overflow detected bla bla now we close it so you can sleep weel and tigh" so i didnt used the new fashioned panel but the old style like win7

now the java configurator save correctly the ini file and the modified settings are confirmed working

(since i changed most of the time the torque settings i didnt feel much difference, now there's a lot of difference)