Skip to content

Commit

Permalink
Provide default null ConfigSchema for classes with hardcoded UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mairas committed Oct 15, 2024
1 parent a67abfd commit c7147e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sensesp/net/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ class HTTPServer : public FileSystemSaveable {
friend esp_err_t call_request_dispatcher(httpd_req_t* req);
};

inline const String ConfigSchema(const HTTPServer& obj) {
return "null";
}

inline bool ConfigRequiresRestart(const HTTPServer& obj) { return true; }

} // namespace sensesp
Expand Down
4 changes: 4 additions & 0 deletions src/sensesp/net/networking.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ class Networking : public FileSystemSaveable,
std::shared_ptr<LambdaConsumer<WiFiState>> wifi_state_emitter_;
};

inline const String ConfigSchema(const Networking& obj) {
return "null";
}

inline bool ConfigRequiresRestart(const Networking& obj) { return true; }

} // namespace sensesp
Expand Down
4 changes: 4 additions & 0 deletions src/sensesp/signalk/signalk_ws_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ class SKWSClient : public FileSystemSaveable,
SKWSConnectionState get_connection_state() { return task_connection_state_; }
};

inline const String ConfigSchema(const SKWSClient& obj) {
return "null";
}

inline bool ConfigRequiresRestart(const SKWSClient& obj) { return true; }

} // namespace sensesp
Expand Down

0 comments on commit c7147e7

Please sign in to comment.