Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Feb 4, 2023
1 parent efa9875 commit 50e73e2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions interface/src/project/SettingsCustomization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ const SettingsCustomization: FC = () => {
value={getMaskString(de.m)}
onChange={(event, mask) => {
de.m = getMaskNumber(mask);
if (de.n === '' && (de.m & DeviceEntityMask.DV_READONLY)) {
if (de.n === '' && de.m & DeviceEntityMask.DV_READONLY) {
de.m = de.m | DeviceEntityMask.DV_WEB_EXCLUDE;
}
if (de.m & DeviceEntityMask.DV_WEB_EXCLUDE) {
Expand Down Expand Up @@ -534,7 +534,7 @@ const SettingsCustomization: FC = () => {
isSet={(de.m & DeviceEntityMask.DV_WEB_EXCLUDE) === DeviceEntityMask.DV_WEB_EXCLUDE}
/>
</ToggleButton>
<ToggleButton value="128" >
<ToggleButton value="128">
<OptionIcon
type="deleted"
isSet={(de.m & DeviceEntityMask.DV_DELETED) === DeviceEntityMask.DV_DELETED}
Expand All @@ -543,10 +543,10 @@ const SettingsCustomization: FC = () => {
</ToggleButtonGroup>
)}
</Cell>
<Cell>{!deviceEntity && (formatName(de))}</Cell>
<Cell>{!deviceEntity && formatName(de)}</Cell>
<Cell>{!deviceEntity && !(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)}</Cell>
<Cell>{!deviceEntity && !(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.ma)}</Cell>
<Cell>{!deviceEntity && (formatValue(de.v))}</Cell>
<Cell>{!deviceEntity && formatValue(de.v)}</Cell>
</Row>
))}
</Body>
Expand Down
10 changes: 5 additions & 5 deletions src/emsdevicevalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ class DeviceValue {
bool hasValue() const;
bool get_min_max(int16_t & dv_set_min, uint16_t & dv_set_max);

void set_custom_minmax();
bool get_custom_min(int16_t & val);
bool get_custom_max(uint16_t & val);
std::string get_custom_fullname() const;
std::string get_fullname() const;
void set_custom_minmax();
bool get_custom_min(int16_t & val);
bool get_custom_max(uint16_t & val);
std::string get_custom_fullname() const;
std::string get_fullname() const;
static std::string get_name(std::string & entity);

// dv state flags
Expand Down
2 changes: 1 addition & 1 deletion src/emsesp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
name = "Modem";
device_type = DeviceType::CONNECT;
} else if (device_id == EMSdevice::EMS_DEVICE_ID_CONVERTER) {
name = "Converter"; // generic
name = "Converter"; // generic
} else if (device_id == EMSdevice::EMS_DEVICE_ID_CLOCK) {
name = "Clock"; // generic
device_type = DeviceType::CONTROLLER;
Expand Down
8 changes: 4 additions & 4 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ void Mqtt::ha_status() {
dev["sw"] = "v" + std::string(EMSESP_APP_VERSION);
dev["mf"] = "proddy";
dev["mdl"] = "EMS-ESP";
if (EMSESP::system_.ethernet_connected())
dev["cu"] = "http://" + ETH.localIP().toString();
else
dev["cu"] = "http://" + WiFi.localIP().toString();
#ifndef EMSESP_STANDALONE
dev["cu"] = "http://" + (EMSESP::system_.ethernet_connected() ? ETH.localIP().toString() : WiFi.localIP().toString());
#endif

JsonArray ids = dev.createNestedArray("ids");
ids.add("ems-esp");

Expand Down

0 comments on commit 50e73e2

Please sign in to comment.