1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-23 21:38:16 +00:00
dubit0 002861f13b
Float output: Fix min_power and max_power adjusting when output is inverted (#1250)
This patch fixes faulty behaviour when both, invert and min_power/max_power
are set for a float output (e.g. PWM). The current code scales the output
level to the range [min_power, max_power] and subsequently inverts the value.
This leads to values that are outside the range [min_power, max_power].

This patch fixes the problem by inverting the requested level first and then
scaling it to the interval [min_power, max_power].

Co-authored-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
2020-10-01 19:55:42 -03:00
..
2019-04-22 21:56:30 +02:00
2020-07-25 22:19:13 +02:00
2020-06-12 20:34:38 -03:00
2020-07-25 15:57:18 +02:00
2019-12-07 18:28:55 +01:00
2020-03-21 15:31:07 -03:00
2019-04-22 21:56:30 +02:00
2020-06-10 17:03:11 -03:00
2020-05-28 23:10:34 -03:00
2020-05-19 21:13:50 -03:00
2019-05-15 20:57:29 +02:00
2019-04-22 21:56:30 +02:00
2019-04-22 21:56:30 +02:00
2020-07-28 15:17:24 -03:00
2020-07-25 15:57:18 +02:00
2020-07-25 22:19:13 +02:00
2020-06-21 22:29:43 -03:00
2020-07-25 22:19:13 +02:00
2020-07-25 15:57:18 +02:00
2020-07-25 15:57:18 +02:00
2019-12-07 18:28:55 +01:00
2020-07-25 22:19:13 +02:00
2020-07-25 15:57:18 +02:00
2019-04-22 21:56:30 +02:00
2019-05-08 10:17:08 +02:00
2020-07-24 22:37:19 +02:00
2020-07-25 14:20:51 +02:00
2019-05-08 10:17:08 +02:00
2019-12-07 18:28:55 +01:00
2020-07-25 12:57:11 -03:00
2020-07-15 11:45:54 +02:00
2019-04-22 21:56:30 +02:00
2020-07-25 15:57:18 +02:00
2020-07-25 15:57:18 +02:00
2019-10-19 16:16:49 +02:00
2020-01-12 16:38:40 +01:00
2020-10-01 19:47:29 -03:00
2019-12-07 18:28:55 +01:00
2019-04-22 21:56:30 +02:00
2019-12-04 19:30:10 +01:00
2020-07-25 15:57:18 +02:00
2020-08-11 15:28:30 +02:00
2020-06-28 18:59:22 -03:00
2019-12-07 18:28:55 +01:00
2020-07-01 22:36:36 -03:00
2020-07-25 15:57:18 +02:00
2020-07-25 15:57:18 +02:00
2020-07-25 12:57:11 -03:00
2020-07-25 15:57:18 +02:00
2020-06-10 17:03:11 -03:00
2020-06-10 17:03:11 -03:00
2020-09-16 12:41:29 +02:00
2020-06-10 17:03:11 -03:00
2020-06-10 17:03:11 -03:00
2019-10-17 16:18:41 +02:00
2020-07-28 15:17:24 -03:00
2019-12-30 22:02:55 -03:00
2019-10-27 12:30:36 +01:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2020-07-14 18:45:42 +02:00
2019-05-27 13:06:45 +02:00
2020-07-25 15:57:18 +02:00
2019-12-07 18:28:55 +01:00
2020-07-25 15:57:18 +02:00
2019-12-07 18:28:55 +01:00
2019-05-11 11:40:29 +02:00
2020-07-25 15:57:18 +02:00
2019-12-07 18:28:55 +01:00
2019-05-26 10:31:29 +02:00
2020-03-12 13:37:57 -07:00
2019-10-23 14:43:41 +02:00
2019-12-07 18:28:55 +01:00
2020-07-25 15:57:18 +02:00
2020-07-25 22:19:13 +02:00
2020-07-28 15:17:24 -03:00
2020-08-06 17:08:48 +02:00
2020-07-25 15:57:18 +02:00
2020-07-28 15:17:24 -03:00
2020-07-25 15:57:18 +02:00
2020-07-25 22:19:13 +02:00
2020-09-01 19:15:26 -03:00
2020-07-25 15:57:18 +02:00
2019-04-22 21:56:30 +02:00
2020-06-10 17:03:11 -03:00
2019-04-22 21:56:30 +02:00
2020-07-25 15:57:18 +02:00
2020-07-25 15:57:18 +02:00
2020-07-25 22:19:13 +02:00
2019-12-07 18:28:55 +01:00
2020-07-25 14:20:51 +02:00
2020-07-25 14:20:51 +02:00
2020-08-13 23:21:19 -03:00
2020-03-12 14:25:00 -07:00
2019-05-13 20:45:22 +02:00
2019-05-13 13:05:30 +02:00
2019-11-12 19:04:39 +01:00
2020-07-25 15:57:18 +02:00
2019-04-22 21:56:30 +02:00
2019-10-23 14:43:41 +02:00
2020-07-25 15:57:18 +02:00
2020-06-28 18:47:43 -03:00
2019-05-08 09:58:03 +02:00
2019-05-08 10:17:08 +02:00
2020-07-24 22:37:19 +02:00
2020-07-28 15:17:24 -03:00