diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 915f0d3..3fbc4db 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/uart/uart.cpp b/uart/uart.cpp
index 8739ba6..f349a96 100644
--- a/uart/uart.cpp
+++ b/uart/uart.cpp
@@ -226,7 +226,7 @@ int Uart::ZigbeeTest() {
}
void Uart::WriteToUart(const char *strSend, int pLen) {
- if (bUpdate)
+ if (!bUpdate)
{
printf( "Write To Uart Start:\n");
for (int i = 0; i < pLen; i++) {
@@ -622,7 +622,8 @@ void Uart::DealDataNodeName(const char *pData) {
sprintf(whereCon, "zigbeeShortAddr='%s'", szShortAdd);
std::string strNodeName(NodeName);
zlog_info(zct, "strNodeName = %s", strNodeName.c_str());
- solve(gbkNodeName, NodeName);
+ //solve(gbkNodeName, NodeName);
+ hexToAscii(strNodeName.c_str(), gbkNodeName);
zlog_info(zct, "gbkNodeName = %s", gbkNodeName);
zlog_info(zct, "NodeName = %s", NodeName);
zlog_info(zct, "whereCon = %s", whereCon);
diff --git a/uart/uart_parameter_config.cpp b/uart/uart_parameter_config.cpp
index 1c2a155..a2fb6f1 100644
--- a/uart/uart_parameter_config.cpp
+++ b/uart/uart_parameter_config.cpp
@@ -168,9 +168,7 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) {
}
Data[99] = tmp;
sleep(1);
- zlog_info(zct, "thisSize1 = %d", (int)thisSize);
WriteToUart((const char*)Data, 100);
- zlog_info(zct, "thisSize2 = %d", (int)thisSize);
int iRet = CheckZigbeeACK();
if (iRet == 0) {
zlog_info(zct, "Packge ACK send success,shortAddr = %02x%02x", UINT16_HIGH(shortAdd), UINT16_LOW(shortAdd));
@@ -250,10 +248,11 @@ void Uart::UpdateWirelessNode(uint16_t shortAdd) {
if(value == 49){
gpio_set(GlobalConfig::GPIO_G.zigAckreset,0);
mssleep(10000);
- if(gpio_read(GlobalConfig::GPIO_G.zigAckrep) == 48)
+ if(gpio_read(GlobalConfig::GPIO_G.zigAckrep) == 48){
gpio_set(GlobalConfig::GPIO_G.zigAckreset,1);
break;
}
+ }
mssleep(10000);
time += 1;
}while(time < 150);
@@ -476,7 +475,6 @@ int Uart::UpdateConfig(uint16_t ushortAdd) {
UpdateData[4] = UINT16_LOW(ushortAdd);
UpdateData[5] = 0x0A;
UpdateData[6] = 0x01;
- UpdateData[7] = 0x00;
char hex[200] = {0x00};
stringToHex(strName.c_str(), hex);
bytesSize = strlen(hex) / 2;
@@ -486,7 +484,7 @@ int Uart::UpdateConfig(uint16_t ushortAdd) {
free(bytes);
} else {
for (size_t i = 0; i < bytesSize; i++) {
- UpdateData[8 + i] = bytes[i];
+ UpdateData[7 + i] = bytes[i];
}
free(bytes);
unsigned char tmp1 = 0x00;