Reformat sensesp_app.h
@@ -33,20 +33,16 @@ enum StandardSensors {
ALL = 0x1F
};
-enum SKPermissions
-{
- READONLY,
- READWRITE,
- ADMIN
-};
+enum SKPermissions { READONLY, READWRITE, ADMIN };
void SetupSerialDebug(uint32_t baudrate);
class SensESPApp {
public:
SensESPApp(bool defer_setup);
- SensESPApp(String hostname = "SensESP", String ssid = "", String wifi_password = "",
- String sk_server_address = "", uint16_t sk_server_port = 0);
+ SensESPApp(String hostname = "SensESP", String ssid = "",
+ String wifi_password = "", String sk_server_address = "",
+ uint16_t sk_server_port = 0);
void setup();
void enable();
void reset();
@@ -86,14 +82,25 @@ class SensESPApp {
protected:
// setters for all constructor arguments
- const SensESPApp* set_preset_hostname(String preset_hostname) { this->preset_hostname = preset_hostname; }
+ const SensESPApp* set_preset_hostname(String preset_hostname) {
+ this->preset_hostname = preset_hostname;
+ }
const SensESPApp* set_ssid(String ssid) { this->ssid = ssid; }
- const SensESPApp* set_wifi_password(String wifi_password) { this->wifi_password = wifi_password; }
- const SensESPApp* set_sk_server_address(String sk_server_address) { this->sk_server_address = sk_server_address; }
- const SensESPApp* set_sk_server_port(uint16_t sk_server_port) { this->sk_server_port = sk_server_port; }
- const SensESPApp* set_sensors(StandardSensors sensors) { this->sensors = sensors; }
- const SensESPApp* set_led_pin(int led_pin) { this->led_pin = led_pin; }
- const SensESPApp* set_requested_permissions(SKPermissions permissions) { this->requested_permissions = permissions; }
+ const SensESPApp* set_wifi_password(String wifi_password) {
+ this->wifi_password = wifi_password;
+ }
+ const SensESPApp* set_sk_server_address(String sk_server_address) {
+ this->sk_server_address = sk_server_address;
+ }
+ const SensESPApp* set_sk_server_port(uint16_t sk_server_port) {
+ this->sk_server_port = sk_server_port;
+ }
+ const SensESPApp* set_sensors(StandardSensors sensors) {
+ this->sensors = sensors;
+ }
+ const SensESPApp* set_requested_permissions(SKPermissions permissions) {
+ this->requested_permissions = permissions;
+ }
private:
String preset_hostname = "SensESP";
@@ -102,7 +109,6 @@ class SensESPApp {
String sk_server_address = "";
uint16_t sk_server_port = 0;
StandardSensors sensors = ALL;
- int led_pin = LED_PIN;
SKPermissions requested_permissions = READWRITE;
void initialize();
