mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Changed the scaling factor of the curent sensor to be in the form of y=mx+b. Altered the scaling to be in mV/10A, this means that for you average 50mOhm shunt resistor you will have a scale factor of 500, plenty of integre adjustability and the default 400 used will be fine as a first guess in most cases. Offset is adjusted to mA to give greater adjustability as an integer value. Builds successfully to OMNIBUSF4SD.
This commit is contained in:
parent
625f083a3f
commit
bcd5752a12
2 changed files with 5 additions and 4 deletions
|
@ -65,8 +65,8 @@ typedef struct currentMeterADCState_s {
|
|||
} currentMeterADCState_t;
|
||||
|
||||
typedef struct currentSensorADCConfig_s {
|
||||
int16_t scale; // scale the current sensor output voltage to milliamps. Value in 1/10th mV/A
|
||||
int16_t offset; // offset of the current sensor in millivolt steps
|
||||
int16_t scale; // scale the current sensor output voltage to milliamps. Value in mV/10A
|
||||
int16_t offset; // offset of the current sensor in mA
|
||||
} currentSensorADCConfig_t;
|
||||
|
||||
PG_DECLARE(currentSensorADCConfig_t, currentSensorADCConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue