Open esticle opened 10 years ago
This is actually pretty straight forward to do, I just haven't gotten around to it. When a new session is started, the first 2 POST requests have this information. So technically, a settings file won't be needed and all this can be handled without any required user input.
So it's on my list -- I'll get to it shortly.
Even better - thanks as always!
I've finished modifying the database structure to log all the profile/userUnit/defaultUnit fields. Now I just need to tweak the front end to make use of the new tables and carry out the appropriate conversion (in the case of userUnit/defaultUnit values) as well as do the grouping of sessions based on profiles. Hopefully can knock it out tonight yet, otherwise tomorrow.
Ok, I just pushed a lot of changes into a new branch beta. Since the DB structure has changed, you won't be able to use old data. I will address this the best I can shortly, but for now it would be great if you could test out the new dynamic unit conversions. From my tests, it seems to be working great.
As an FYI: Before building a new database using the new create_torque_log_table.sql script, you should back up your old/current raw_logs table as the script will drop that table and create an empty one.
For now I only did conversions for speed (mph/kph) and temperature (celsius/fahrenheit). If this method works properly for everyone, then I will add all the other conversions.
To recap, using the beta branch the web viewer should convert temps and speed to the appropriate unit used in your Torque settings.
Let me know!
I see within plot.php that there is a mention for userDefault fields in the TODO list, so just to add my +1 to that!
Currently temperature is plotted in F (converted from Celsius) whilst I would like it in C - just like I'm sure that some folk would like KMH and not MPH, etc.
As mentioned in the file, best is probably to have a profile for each username but that looks like quite a bit of work vs some settings.php effort to do it across all users at first?
Cheers, E