Merge branch 'bugfix/remap_inverse' into 'main'

bugfix: Fix remap inverse when the value is zero

See merge request app-frameworks/esp-matter!284
This commit is contained in:
Hrishikesh Dhayagude
2023-02-02 18:17:51 +08:00
@@ -33,7 +33,7 @@
* Example: To convert the temperature mireds into temperature kelvin and vice-versa where the relation between them
* is: Mireds = 1,000,000/Kelvin.
*/
#define REMAP_TO_RANGE_INVERSE(value, factor) (factor / value)
#define REMAP_TO_RANGE_INVERSE(value, factor) (factor / (value ? value : 1))
/* Nullable base for nullable attribute */
#define ESP_MATTER_VAL_NULLANLE_BASE 0x80