|
|
@@ -104,7 +104,7 @@ void Device_Info_Init_Fun() {
|
|
|
deviceInfo.BlDataFlag = BL_IDLE;
|
|
|
// deviceInfo.newLoraDataFlag = 0;
|
|
|
// deviceInfo.isReady = 0;
|
|
|
- deviceInfo.loraSendSuccessFlag = 0;
|
|
|
+ // deviceInfo.loraSendSuccessFlag = 0;
|
|
|
deviceInfo.BlDataFlag = BL_START;
|
|
|
deviceInfo.commandFromCloud = COMBINE_CMD_STEP(IDLE, STEP_INIT); //初始化
|
|
|
//TODO: 大循环,获取设备地址信息,否则重新发送。发送上线信息,等待反馈,否则重新发送上线信息。一切准备就绪后,开启isready为1,进入工作模式。
|
|
|
@@ -372,7 +372,7 @@ int main(void)
|
|
|
|
|
|
case REQUEST_BLUETOOTH_DATA_SEND:
|
|
|
uint8_t sentData_Temp[25] = {0};
|
|
|
- if (deviceInfo.loraSendSuccessFlag == 0) { // 5 5
|
|
|
+ if (TRUE) { // 5 5
|
|
|
if (RingBuffer_Dequeue(&deviceInfo.queueBLData, sentData_Temp) == 0 && deviceInfo.forwardBLAndLoraDataCount < deviceInfo.forwardBLAndLoraDataCountMax) {
|
|
|
//不为空的情况下
|
|
|
E52_Send_Bl_Data_Fun(sentData_Temp,0x00);
|
|
|
@@ -409,7 +409,7 @@ int main(void)
|
|
|
if (GET_CMD( deviceInfo.commandFromCloud) == E52_HEARTBEAT && deviceInfo.isOnline) {
|
|
|
switch (GET_STEP(deviceInfo.commandFromCloud)) {
|
|
|
case HEARTBEAT_SEND:
|
|
|
- if (deviceInfo.loraSendSuccessFlag == 0) {
|
|
|
+ if (TRUE) {
|
|
|
E52_Heartbeat_Fun();
|
|
|
deviceInfo.commandFromCloud = COMBINE_CMD_STEP(REQUEST_BLUETOOTH_DATA, STEP_COMPLETE);
|
|
|
}
|
|
|
@@ -445,11 +445,8 @@ int main(void)
|
|
|
break; //如果是单波,多播,配置目标地址
|
|
|
|
|
|
case STEP_COMPLETE:
|
|
|
- if (deviceInfo.loraSendSuccessFlag == 0) {
|
|
|
+ if (TRUE) {
|
|
|
E52_Heartbeat_Fun();
|
|
|
-
|
|
|
- }else {
|
|
|
- continue;
|
|
|
}
|
|
|
deviceInfo.commandFromCloud = COMBINE_CMD_STEP(IDLE, STEP_INIT);
|
|
|
break;
|