I don’t know if it’s the best place to post this, but, if not let me know, what could be the best place.
I would like to apologize in advance for 4 things:
- 1st time for me to post on a forum (I don’t master way to post and rules),
- 1st time to program in C, so quality of my program might be significantly improvable,
- Spelling mistakes, grammar errors (I’m French),
- I will not be able to support (reply to questions) and to bring updates and improvements. It took me a lot of time to reach this (intermediate) result, and I will not be able to spend more time.
In fact, as I really enjoyed to use the program from Casainho (thanks to him) for Bafang 850c, I also would like to share what I did during COVID lockdown to make some changes to Bafang 850c HMI.
This is not a proofed and perfect code, and you could see often display glitches, but up to you to improve.
I started from 860C_850C_SW102_v0.9.0-beta.2 version.
By the way there are some mistakes between files stored for version beta2 and beta1. For example, the communication settings between TSDZ2 and 850c are not correct ones.
I could not carry over my modifications to current version 1.0 because I ran out of RAM. I got an error during compilation/linking.
o Still 3 screens available
- 2 as designed by Casainho, with the same features than in the original version
- 1 with new HMI
o No change on battery bar and time in the upper part
o Speed display
- big centred instant value
- circular bargraph, green below 30 km/h
- mean value during trip
o Indicators. Use of a logo for state display of:
- Brakes pressed
- Lights on
- Walk assist on
- Human power with associated bargraph, red above 250W, max=400w
- Human power with associated bargraph, red above 500W, max = 750w
o Other information, in bottom of the screen with smaller size
- Total human energy burnt, in Wh to be easily compared with battery energy
- Trip distance
- Trip time
- Energy ratio during trip: the higher it is the better it is for your health
, it means you used more your legs than the battery energy. Ratio = human energy during trip over electrical energy during trip.
- Range: estimated remaining range in km. Remaining battery energy multiplied by average consumption in km/Wh. This average consumption is a moving average over the last 2 km, updated every 100m.
- Battery voltage
o Simulation mode
- More based on physics based on sinusoidal human power signal on a road with a constant slope
As a summary, please find below what it looks like.
I posted also a video on YouTube®.