feat: make renewable energy more affordable

This commit is contained in:
zhangsz
2025-03-05 14:40:19 +08:00
parent e9f1d06b36
commit 2617147be4
27 changed files with 66 additions and 22 deletions

View File

@@ -93,5 +93,5 @@ COVER_REPORT_PATH = ./output
## include makefile.rules (Do not change)
##
##--------------------------------------
MAKE_INCLUDE = ../../include
MAKE_INCLUDE = ../../inc
include $(MAKE_INCLUDE)/Makefile.rules

View File

@@ -1779,10 +1779,16 @@ int wxc2_read_sysparam(void)
return 0;
}
temp_ptr = strchr(hostname,'-');
if (memcmp(ch_ptr,hostname,strlen(hostname)-strlen(temp_ptr)) != 0)
{
printf("The host name is unexpect!\n");
return 0;
if (temp_ptr != NULL) {
if (strncmp(ch_ptr, hostname, strlen(hostname) - strlen(temp_ptr)) != 0) {
printf("The host name is unexpected!\n");
return 0;
}
} else {
if (strncmp(ch_ptr, hostname, strlen(hostname)) != 0) {
printf("The host name is unexpected!\n");
return 0;
}
}
strcpy(temp_info,ch_ptr);
}