lumini_p30_control/firmware/config.h

44 lines
2.3 KiB
C
Raw Normal View History

2023-04-24 20:26:49 +02:00
#define VERSION_STR "2.0.0"
2023-04-24 20:26:49 +02:00
#define USE_STATIC_IP //! uncomment to enable Static IP Adress
#define SERIAL_BAUD_RATE 115200
#define LOCAL_TIMEZONE_STRING "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00" // Berlin, Germany - https://sites.google.com/a/usapiens.com/opnode/time-zones
2023-04-24 20:26:49 +02:00
#define DEVELOPMENT
#define LIGHT_NAME "Lumini/Lominie Pixie30/P30 light control" // default light name
#define LIGHT_NAME_DEV_POSTFIX " (DEV)"
2023-04-24 20:26:49 +02:00
2023-04-25 14:32:42 +02:00
#define LIGHTS_COUNT 4 // do not modify because luminie p30 only has 4 channel, never set above 80
2023-04-24 20:26:49 +02:00
2023-04-25 14:32:42 +02:00
#define EEPROM_LAST_STATE_STARTUP_ADDRESS 0 // startup behavior is used for all lights
#define EEPROM_SCENE_ADDRESS 1 // scene is used for all of the lights
#define EEPROM_TIMING_CONTROL_ENABLED_ADDRESS 2
#define EEPROM_DYNAMIC_IP_ADDRESS 3
#define EEPROM_LAST_STATE_ADDRESS 4 // the first "last state" information for the first light
#define EEPROM_TIMING_DATA_ADDRESS (EEPROM_LAST_STATE_ADDRESS + LIGHTS_COUNT) // Stored data date per light ELE_USED; HH; MM; CH1; CH2; CH3; CH4;
#define EEPROM_IP_ADDRESS (EEPROM_TIMING_DATA_ADDRESS + 60) // 10 blocks of 6 byte per timing control data block = 60 byte EEPROM space
#define EEPROM_GW_ADDRESS (EEPROM_IP_ADDRESS + 4) // step 4 byte further IP
#define EEPROM_NM_ADDRESS (EEPROM_GW_ADDRESS + 4) // step 4 byte further GW
#define EEPROM_DNS_ADDRESS (EEPROM_NM_ADDRESS + 4) // step 4 byte further NM
2023-04-24 20:26:49 +02:00
#define BRI_MOD_STEPS_PER_SEC 5 // 1000ms / 40ms delay in loop / 4 functions called separately by FSM => 6.25 calls of the tc update function per second maximum => 5 step should be ok
#define TIME_CHECK_INTERVAL_MS (60000UL) // 60 second interval
#define TIME_LIGHTENGINE_INTERVAL_MS (1000UL / BRI_MOD_STEPS_PER_SEC) // BRI_MOD_STEPS_PER_SEC steps per second to in-/decrease the brightness
2023-04-25 14:32:42 +02:00
#define MY_NTP_SERVER "de.pool.ntp.org"
2023-05-11 16:48:59 +02:00
// 10 bit PWM
#define PWM_FREQ (500UL)
2023-05-11 16:48:59 +02:00
#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
#define PWM_TEST_INTERVA_MS 1000
#define TEST_PWM_CHG_CNT 1