Compare commits

...
3 Commits
Author SHA1 Message Date
Gatsby Van c5730a7fd5 omit redundant code. 2023-12-22 10:15:33 +08:00
Gatsby Van 96181a0734 better debug print. 2023-12-22 10:15:18 +08:00
Gatsby Van 8a94ffacac adapt to new node list api. 2023-12-22 01:36:13 +08:00
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -20,8 +20,6 @@
#define __COMMON_H_
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include "util/util.h"
#include "error.h"
@@ -44,7 +42,7 @@
#endif
#if _814_DEBUG_LEVEL >= 1
#define DBG_ERROR(...) __PRINT_BLOCK( \
printf("in"__FILE__" #%4d [error]\t",__LINE__); \
printf("[error]\tin"__FILE__":%4d ",__LINE__); \
printf(__VA_ARGS__); \
)
#endif
+2 -2
View File
@@ -341,7 +341,7 @@ int MPC_StateUpload(MPC_INST* instPtr , uint8_t* mgmtBuffer , uint32_t mgmtMsgC
dataChunk = (L2_GetNextFrameNum(linkInstPtr) - linkInstPtr->netStartTime) * 1000 + L2_GetNextSlotNum(linkInstPtr) * 5 ;
MPC_InsertChunk(mpcTxMsgBuff, STATE_SETUP_TIME_OFFSET, STATE_SETUP_TIME_LEN, dataChunk);
// number of nodes
dataChunk = GetNodeNum(linkInstPtr->nodeList);
dataChunk = L2_GetNodeListLen(linkInstPtr->nodeList);
MPC_InsertChunk(mpcTxMsgBuff, STATE_NUM_NODE_OFFSET, STATE_NUM_NODE_LEN, dataChunk);
// frame 1 counter
@@ -432,7 +432,7 @@ int MPC_StateUpload(MPC_INST* instPtr , uint8_t* mgmtBuffer , uint32_t mgmtMsgC
// TODO : Currently DJ is node 1 , only Byte 1 is activate , others is useless
// Topo node 1
dataChunk = BIT(L2_GetNodeId(linkInstPtr) - 1);
if (GetNodeNum(linkInstPtr->nodeList) > 1 ) {
if (L2_GetNodeListLen(linkInstPtr->nodeList) > 1 ) {
for(int i = 1; i <= linkInstPtr->config.netScale; i++){
if (L2_isNodeInList(linkInstPtr->nodeList, i)) {
dataChunk |= BIT(i-1);