From 0b96882ad58e0c7000b776f00629644172e0bd5b Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Tue, 19 Sep 2017 10:15:15 +0200 Subject: [PATCH 1/2] current_meter_offset allowed to go negative --- src/main/fc/settings.yaml | 2 +- src/main/sensors/battery.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml index af5a7d261d..1fbdeb18a2 100644 --- a/src/main/fc/settings.yaml +++ b/src/main/fc/settings.yaml @@ -450,7 +450,7 @@ groups: max: 10000 - name: current_meter_offset field: currentMeterOffset - min: 0 + min: -3300 max: 3300 - name: multiwii_current_meter_output field: multiwiiCurrentMeterOutput diff --git a/src/main/sensors/battery.h b/src/main/sensors/battery.h index fd72ded7a8..ea416920b2 100644 --- a/src/main/sensors/battery.h +++ b/src/main/sensors/battery.h @@ -47,7 +47,7 @@ typedef struct batteryConfig_s { uint8_t vbatwarningcellvoltage; // warning voltage per cell, this triggers battery warning alarm, in 0.1V units, default is 35 (3.5V) int16_t currentMeterScale; // scale the current sensor output voltage to milliamps. Value in 1/10th mV/A - uint16_t currentMeterOffset; // offset of the current sensor in millivolt steps + int16_t currentMeterOffset; // offset of the current sensor in millivolt steps currentSensor_e currentMeterType; // type of current meter used, either ADC or virtual // FIXME this doesn't belong in here since it's a concern of MSP, not of the battery code. From a937c9524c49cfc078897e987c73fae3fae55e57 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Tue, 19 Sep 2017 11:54:13 +0200 Subject: [PATCH 2/2] MSP version bump --- src/main/msp/msp_protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index b693eb3080..0b073ffcae 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -60,7 +60,7 @@ #define MSP_PROTOCOL_VERSION 0 // Same version over MSPv1 & MSPv2 - message format didn't change and it backward compatible #define API_VERSION_MAJOR 2 // increment when major changes are made -#define API_VERSION_MINOR 0 // increment when any change is made, reset to zero when major changes are released after changing API_VERSION_MAJOR +#define API_VERSION_MINOR 1 // increment when any change is made, reset to zero when major changes are released after changing API_VERSION_MAJOR #define API_VERSION_LENGTH 2