PWM modified to 8bit

This commit is contained in:
Kai Lauterbach 2023-04-29 14:31:49 +02:00
parent 2d635ba0c4
commit c176603240

View file

@ -36,10 +36,10 @@ IPAddress dns(192, 168, 0, 1);
#define SCENE_NIGHTLY 2
// 10 bit PWM
#define PWM_OFF 0 // 0V
#define PWM_MIN 0 // 0V - minimum light amount (~1%)
#define PWM_MAX 1023 // 24V - maximum light amount (100%)
#define BRI_TO_PWM_FACTOR 4.012 // 24V-15V = 24V range
#define PWM_OFF 0 // 0V
#define PWM_MIN 0 // 0V - minimum light amount (~1%)
#define PWM_MAX 255 // 24V - maximum light amount (100%)
#define BRI_TO_PWM_FACTOR 1.0 // 24V-0V = 24V range
//********************************//
@ -570,6 +570,11 @@ void init_webserver()
}
EEPROM.commit();
if (tc_enabled == TIMING_CONTROL_DISABLED)
{
process_lightdata(light, default_transitiontime);
}
} else {
// light is off
if (tc_enabled == TIMING_CONTROL_DISABLED)