OpenSourceEBike / TSDZ2-Smart-EBike

Flexible OpenSource firmware for TongSheng TSDZ2 mid drive ebike motor
GNU General Public License v3.0
251 stars 130 forks source link

Update main.h #120

Closed stempelo closed 4 years ago

stempelo commented 4 years ago

If BATTERY_CURRENT_PER_10_BIT_ADC_STEP_X100 = 17

I think that X512 = 87 --> (17/100) * 512

leon927 commented 4 years ago

You are totally right, @stempelo! But this changes the FOC calculation so we would have to verify that we do not lose efficiency. I think it is better to change this in the future motor optimization firmware.

stempelo commented 4 years ago

I agree, the value must be changed by looking at the consequences on the calculations made in the algorithm.

leon927 commented 4 years ago

This PR can be closed for now.