Skip to content

Commit

Permalink
Handle default name via default property value
Browse files Browse the repository at this point in the history
  • Loading branch information
lptr committed Oct 27, 2024
1 parent ba64db0 commit e296398
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main/peripherals/Peripheral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ class PeripheralManager
}

String name = deviceConfig.name.get();
if (name.isEmpty()) {
name = "default";
}
String type = deviceConfig.type.get();
try {
Lock lock(stateMutex);
Expand Down Expand Up @@ -249,7 +246,7 @@ class PeripheralManager
private:
class PeripheralDeviceConfiguration : public ConfigurationSection {
public:
Property<String> name { this, "name" };
Property<String> name { this, "name", "default" };
Property<String> type { this, "type" };
Property<JsonAsString> params { this, "params" };
};
Expand Down

0 comments on commit e296398

Please sign in to comment.