Change default PowerDelta from 80% to 0% on new installations

Change default PowerDelta from 80% to 0% on new installations (#5858, #5028, #4813, #4130, #4145, #3795, #3778, #3660, #3648)
This commit is contained in:
Theo Arends 2019-05-24 15:04:48 +02:00
parent 56615dce4e
commit 4d070bfb15
4 changed files with 4 additions and 4 deletions

View File

@ -6,6 +6,7 @@
* Fix core 2.5.x ISR not in IRAM exception (#5837)
* Add support for VL53L0x time of flight sensor. Might interfere with TSL2561 using same I2C address (#5845)
* Add command AdcParam to control ADC0 Temperature and Light formula parameters
* Change default PowerDelta from 80% to 0% on new installations (#5858, #5028, #4813, #4130, #4145, #3795, #3778, #3660, #3648)
*
* 6.5.0.11 20190517
* Add command SetOption64 0/1 to switch between "-" or "_" as sensor index separator impacting DS18X20, DHT, BMP and SHT3X sensor names (#5689)

View File

@ -789,7 +789,7 @@ void SettingsDefaultSet2(void)
// Settings.flag2.wattage_resolution = 0;
Settings.flag2.energy_resolution = ENERGY_RESOLUTION;
Settings.param[P_MAX_POWER_RETRY] = MAX_POWER_RETRY;
Settings.energy_power_delta = DEFAULT_POWER_DELTA;
// Settings.energy_power_delta = 0;
Settings.energy_power_calibration = HLW_PREF_PULSE;
Settings.energy_voltage_calibration = HLW_UREF_PULSE;
Settings.energy_current_calibration = HLW_IREF_PULSE;
@ -1047,7 +1047,7 @@ void SettingsDelta(void)
}
if (Settings.version < 0x050C0005) {
Settings.light_rotation = 0;
Settings.energy_power_delta = DEFAULT_POWER_DELTA;
Settings.energy_power_delta = 0;
char fingerprint[60];
memcpy(fingerprint, Settings.mqtt_fingerprint, sizeof(fingerprint));
char *p = fingerprint;

View File

@ -99,7 +99,6 @@ const uint16_t PWM_MIN = 100; // [PWM_MIN] Minimum frequency - Def
// For Controlling Servos use 50 and also set PWM_FREQ as 50 (DO NOT USE THESE VALUES FOR DIMMERS)
//#define PWM_LIGHTSCHEME0_IGNORE_SLEEP // Do not change sleep value for LightAnimate() scheme 0
const uint8_t DEFAULT_POWER_DELTA = 80; // Power change percentage
const uint16_t MAX_POWER_HOLD = 10; // Time in SECONDS to allow max agreed power
const uint16_t MAX_POWER_WINDOW = 30; // Time in SECONDS to disable allow max agreed power
const uint16_t SAFE_POWER_HOLD = 10; // Time in SECONDS to allow max unit safe power

View File

@ -349,7 +349,7 @@ bool EnergyCommand(void)
}
else if (CMND_POWERDELTA == command_code) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 101)) {
Settings.energy_power_delta = (1 == XdrvMailbox.payload) ? DEFAULT_POWER_DELTA : XdrvMailbox.payload;
Settings.energy_power_delta = XdrvMailbox.payload;
}
nvalue = Settings.energy_power_delta;
unit = UNIT_PERCENTAGE;