wled_json_api_library/structures/cfg/
cfg_ota.rs

1use serde;
2use serde::{Serialize, Deserialize};
3use crate::structures::none_function;
4
5
6
7#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Ota {
10    /// prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks
11    #[serde(skip_serializing_if = "Option::is_none")]
12    #[serde(default = "none_function")]
13    pub lock: Option<bool>,
14
15    /// prevents access to WiFi settings when OTA lock is enabled
16    #[serde(skip_serializing_if = "Option::is_none")]
17    #[serde(default = "none_function")]
18    #[serde(rename = "lock-wifi")]
19    pub lock_wifi: Option<bool>,
20
21    /// length of OTA password
22    #[serde(skip_serializing_if = "Option::is_none")]
23    #[serde(default = "none_function")]
24    pub pskl: Option<u8>,
25
26    /// ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on
27    #[serde(skip_serializing_if = "Option::is_none")]
28    #[serde(default = "none_function")]
29    pub aota: Option<bool>,
30}