c60ef2ccde
- Added support for RGBW and RGBCW color modes in the DALI Gateway. - Updated JSON color mode parsing to handle new color types. - Extended the StoreDt8SceneSnapshot function to include white, amber, and free color parameters. - Introduced new methods in DaliGatewayBridge for setting RGBW, RGBCW, and RGBWAF colors. - Modified KnxDaliChannel to send RGBW and RGBCW colors based on the color type. - Updated parameter types and definitions in the KNX product XML files to accommodate new color modes. - Enhanced README with migration details and validation instructions. Signed-off-by: Tony <tonylu@tony-cloud.com>
92 lines
2.8 KiB
C
92 lines
2.8 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#if __has_include("sdkconfig.h")
|
|
#include "sdkconfig.h"
|
|
#endif
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID
|
|
#define CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID 0x00A4
|
|
#endif
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER
|
|
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER 0x0001
|
|
#endif
|
|
|
|
#ifndef CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION
|
|
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION 0x09
|
|
#endif
|
|
|
|
// Minimal stub for knxprod.h — generated KNX product definitions.
|
|
// The full file (1796 bytes of parameters, 1439 group objects) will be
|
|
// replaced by the OpenKNXproducer-generated header.
|
|
|
|
// Product identity
|
|
#define MAIN_OpenKnxId (CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID & 0xff)
|
|
#define MAIN_ApplicationNumber CONFIG_GATEWAY_KNX_OEM_APPLICATION_NUMBER
|
|
#define MAIN_ApplicationVersion CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION
|
|
#define MAIN_OrderNumber "REG1-Dali"
|
|
#define MAIN_ParameterSize 1796
|
|
#define MAIN_MaxKoNumber 1439
|
|
|
|
// Parameter type enums (subset)
|
|
enum PT_DeviceType : uint8_t {
|
|
PT_deviceType_Deaktiviert = 0,
|
|
PT_deviceType_DT0 = 1,
|
|
PT_deviceType_DT1 = 2,
|
|
PT_deviceType_DT2 = 3,
|
|
PT_deviceType_DT3 = 4,
|
|
PT_deviceType_DT4 = 5,
|
|
PT_deviceType_DT5 = 6,
|
|
PT_deviceType_DT6 = 7,
|
|
PT_deviceType_DT7 = 8,
|
|
PT_deviceType_DT8 = 9,
|
|
};
|
|
|
|
enum PT_ColorType : uint8_t {
|
|
PT_colorType_HSV = 0,
|
|
PT_colorType_RGB = 1,
|
|
PT_colorType_TW = 2,
|
|
PT_colorType_XYY = 3,
|
|
PT_colorType_RGBW = 4,
|
|
PT_colorType_RGBCW = 5,
|
|
};
|
|
|
|
enum PT_ColorSpace : uint8_t {
|
|
PT_colorSpace_rgb = 1,
|
|
PT_colorSpace_xy = 0,
|
|
};
|
|
|
|
// Placeholder macros — will be replaced with direct Bau07B0 access in Phase 3.
|
|
#define ParamAPP_daynight(channelIndex) (0)
|
|
#define ParamAPP_funcBtn(channelIndex) (0)
|
|
#define ParamAPP_funcBtnLong(channelIndex) (0)
|
|
#define ParamAPP_funcBtnDbl(channelIndex) (0)
|
|
|
|
#define ParamADR_deviceType(channelIndex) (PT_DeviceType::PT_deviceType_Deaktiviert)
|
|
#define ParamADR_type(channelIndex) (0)
|
|
#define ParamADR_min(channelIndex) (0)
|
|
#define ParamADR_max(channelIndex) (254)
|
|
#define ParamADR_stairtime(channelIndex) (0)
|
|
#define ParamADR_onDay(channelIndex) (0)
|
|
#define ParamADR_onNight(channelIndex) (0)
|
|
#define ParamADR_error(channelIndex) (0)
|
|
#define ParamADR_queryTime(channelIndex) (0)
|
|
#define ParamADR_colorType(channelIndex) (PT_ColorType::PT_colorType_TW)
|
|
#define ParamADR_colorSpace(channelIndex) (PT_ColorSpace::PT_colorSpace_rgb)
|
|
|
|
#define ParamGRP_deviceType(channelIndex) (PT_DeviceType::PT_deviceType_Deaktiviert)
|
|
#define ParamGRP_type(channelIndex) (0)
|
|
#define ParamGRP_colorType(channelIndex) (PT_ColorType::PT_colorType_TW)
|
|
|
|
#define ParamHCL_type(channelIndex) (0)
|
|
|
|
// Generated group object layout constants
|
|
#define ADR_KoOffset 12
|
|
#define GRP_KoOffset 1164
|
|
#define HCL_KoOffset 1436
|
|
#define ADR_KoBlockSize 18
|
|
#define GRP_KoBlockSize 17
|
|
#define HCL_KoBlockSize 1
|