ESC Ref design issue

Hi,

We are trying to make a ref design from Orel ESC and have to use a different device (INA240) current sensing.

This has a different gain (20V/V) and the sense resister is also different (0.0002ohm).
Where is the firmware i have the option of tuning these values?

regards
Arun

The shunt resistance is deduced from the state of the hardware ID pins. You need to use a different HW ID configuration and add an appropriate support here: sapog/board.cpp at b1354f4e169930515701f0d162df08f3027bef87 · PX4/sapog · GitHub

The current sensing gain is hard-coded at 10x: sapog/motor_adc.c at b1354f4e169930515701f0d162df08f3027bef87 · PX4/sapog · GitHub

Perhaps you should modify the first function to return the overall current/voltage gain including the amplification factor rather than just the resistance of the shunt. A pull request with that change would be welcome.