cleanup, typos, formatting

This commit is contained in:
MichaelDvP
2024-07-25 14:30:43 +02:00
parent a8307bddbe
commit bdfd40d230
4 changed files with 5 additions and 5 deletions

View File

@@ -67,13 +67,14 @@ const dnsServers = ({ dns_ip_1, dns_ip_2 }: NetworkStatusType) => {
if (!dns_ip_1) {
return 'none';
}
return dns_ip_1 + (!dns_ip_2 || dns_ip_2 === '0.0.0.0' ? '' : ',' + dns_ip_2);
return dns_ip_1 + (!dns_ip_2 || dns_ip_2 === '0.0.0.0' ? '' : ', ' + dns_ip_2);
};
const IPs = (status: NetworkStatusType) => {
if (
!status.local_ipv6 ||
status.local_ipv6 === '0000:0000:0000:0000:0000:0000:0000:0000'
status.local_ipv6 === '0000:0000:0000:0000:0000:0000:0000:0000' ||
status.local_ipv6 === '::'
) {
return status.local_ip;
}

View File

@@ -8,7 +8,6 @@
#include "IPUtils.h"
#include "SecurityManager.h"
#define MAX_NETWORK_STATUS_SIZE 1024
#define NETWORK_STATUS_SERVICE_PATH "/rest/networkStatus"
class NetworkStatus {

View File

@@ -2030,7 +2030,7 @@ int EMSdevice::get_modbus_value(uint8_t tag, const std::string & shortname, std:
return 0;
}
bool EMSdevice::modbus_value_to_json(uint8_t tag, const std::string & shortname, const std::vector<uint8_t> & modbus_data, JsonObject & jsonValue) {
bool EMSdevice::modbus_value_to_json(uint8_t tag, const std::string & shortname, const std::vector<uint8_t> & modbus_data, JsonObject jsonValue) {
//Serial.printf("modbus_value_to_json(%d,%s,[%d bytes])\n", tag, shortname.c_str(), modbus_data.size());
// find device value by shortname

View File

@@ -203,7 +203,7 @@ class EMSdevice {
}
int get_modbus_value(uint8_t tag, const std::string & shortname, std::vector<uint16_t> & result);
bool modbus_value_to_json(uint8_t tag, const std::string & shortname, const std::vector<uint8_t> & modbus_data, JsonObject & jsonValue);
bool modbus_value_to_json(uint8_t tag, const std::string & shortname, const std::vector<uint8_t> & modbus_data, JsonObject jsonValue);
const char * brand_to_char();
const std::string to_string();