wled_json_api_library/structures/cfg/
cfg_dmx.rs

1use serde;
2use serde::{Serialize, Deserialize};
3use crate::structures::none_function;
4
5
6/// only included in some WLED builds
7#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Dmx {
10    /// number of channels per fixture
11    #[serde(skip_serializing_if = "Option::is_none")]
12    #[serde(default = "none_function")]
13    pub chan: Option<u8>,
14
15    /// assigns the different channels to different functions. See wled21_dmx.ino for more information.
16    /// gap between the fixtures. makes addressing easier because you don't have to memorize odd numbers when climbing up onto a rig.
17    #[serde(skip_serializing_if = "Option::is_none")]
18    #[serde(default = "none_function")]
19    pub gap: Option<u16>,
20
21    /// start address of the first fixture
22    #[serde(skip_serializing_if = "Option::is_none")]
23    #[serde(default = "none_function")]
24    pub start: Option<u16>,
25
26    /// LED from which DMX fixtures start
27    #[serde(skip_serializing_if = "Option::is_none")]
28    #[serde(default = "none_function")]
29    #[serde(rename = "start-led")]
30    pub start_led: Option<u16>,
31
32    /// fixture map
33    #[serde(skip_serializing_if = "Option::is_none")]
34    #[serde(default = "none_function")]
35    pub fixmap: Option<[u8; 16]>,
36
37    /// output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled)
38    #[serde(skip_serializing_if = "Option::is_none")]
39    #[serde(default = "none_function")]
40    pub e131proxy: Option<u16>,
41}