Skip to content

Commit

Permalink
Never provide configurable description or sort order in arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mairas committed Mar 8, 2024
1 parent 279de71 commit bdbf7b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/sensesp/net/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ class HTTPRequestHandler {
class HTTPServer : public Configurable {
public:
HTTPServer(int port = HTTP_DEFAULT_PORT,
String config_path = "/system/httpserver", String description = "",
int sort_order = 0)
String config_path = "/system/httpserver")
: config_(HTTPD_DEFAULT_CONFIG()),
Configurable(config_path, description, sort_order) {
Configurable(config_path) {
config_.server_port = port;
config_.stack_size = 4096;
config_.max_uri_handlers = 20;
Expand Down
5 changes: 2 additions & 3 deletions src/sensesp/system/observablevalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ class PersistingObservableValue : public ObservableValue<T>,
public:
PersistingObservableValue() : Configurable() {}

PersistingObservableValue(const T& value, String config_path = "",
String description = "", int sort_order = 0)
PersistingObservableValue(const T& value, String config_path = "")
: ObservableValue<T>(value),
Configurable(config_path, description, sort_order) {
Configurable(config_path) {
load_configuration();
}

Expand Down
6 changes: 4 additions & 2 deletions src/sensesp_base_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ SensESPBaseApp::SensESPBaseApp() {
filesystem_ = new Filesystem();
// create the hostname_ observable - this needs to be done before
// the builder methods are called
hostname_ = new PersistingObservableValue<String>(
kDefaultHostname, "/system/hostname", "Hostname", 0);
hostname_ = new PersistingObservableValue<String>(kDefaultHostname,
"/system/hostname");
hostname_->set_description("Device hostname");
hostname_->set_sort_order(0);
// create a remote debugger object
debug_output_ = new DebugOutput();
}
Expand Down

0 comments on commit bdbf7b6

Please sign in to comment.