wled_json_api_library/structures/cfg/
cfg_ol.rs

1use serde;
2use serde::{Serialize, Deserialize};
3use crate::structures::none_function;
4
5
6/// anolog clock stuff?
7#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Ol {
10    /// 0: no overlay 1: analog clock 2: was single-digit clock 3: was cronixie
11    #[serde(skip_serializing_if = "Option::is_none")]
12    #[serde(default = "none_function")]
13    pub clock: Option<u8>,
14
15    /// Countdown mode; Clock will count down towards date
16    #[serde(skip_serializing_if = "Option::is_none")]
17    #[serde(default = "none_function")]
18    pub cntdwn: Option<bool>,
19
20    /// Overlay min; boundaries of overlay mode
21    #[serde(skip_serializing_if = "Option::is_none")]
22    #[serde(default = "none_function")]
23    pub min: Option<u8>,
24
25    /// Overlay max; boundaries of overlay mode
26    #[serde(skip_serializing_if = "Option::is_none")]
27    #[serde(default = "none_function")]
28    pub max: Option<u8>,
29
30    /// The pixel in your strip where "midnight" would be
31    #[serde(skip_serializing_if = "Option::is_none")]
32    #[serde(default = "none_function")]
33    pub o12pix: Option<u8>,
34
35    /// analog Clock 5 Minute Marks; Light pixels at every 5-minute position
36    #[serde(skip_serializing_if = "Option::is_none")]
37    #[serde(default = "none_function")]
38    pub o5m: Option<bool>,
39
40    /// Display seconds as trail of LEDs instead of a single pixel
41    #[serde(skip_serializing_if = "Option::is_none")]
42    #[serde(default = "none_function")]
43    pub osec: Option<bool>,
44}