bipropellant / bipropellant-hoverboard-firmware

OpenSource Hoverboard firmware based on Niklas Fauth's one https://github.com/NiklasFauth/hoverboard-firmware-hack
GNU General Public License v3.0
174 stars 74 forks source link

Motor Current type in BLDC.c #45

Closed atc1441 closed 5 years ago

atc1441 commented 5 years ago

Hi, in line 259 in file BLDC.c is a type, the accerage current will always be for the Left motor even when you try to read motor[1]

electrical_measurements.motors[0].dcAmpsAvgAcc += ABS(adc_buffer.dcl - offsetdcl); electrical_measurements.motors[1].dcAmpsAvgAcc += ABS(adc_buffer.dcl - offsetdcl);

see here: https://github.com/bipropellant/bipropellant-hoverboard-firmware/blob/9b913c315debcded13eda893997dcdcc1ef07425/src/bldc.c#L258

btsimonh commented 5 years ago

yep, noticed that and fixed in the sinsquash PR.

atc1441 commented 5 years ago

Ok than you know it :) i will close the issue. Have a great week.