omit redundant code.

This commit is contained in:
Gatsby Van
2023-12-27 14:54:46 +08:00
parent 83e43f791c
commit cb109ad581
@@ -764,16 +764,7 @@ int32_t Phy_SetHopPattern(void* patternBuff, uint32_t patternLen){
if(patternLen > L1_FRAME_MAX_HOPS){ if(patternLen > L1_FRAME_MAX_HOPS){
return FAILURE; return FAILURE;
} }
memcpy(hopRxPattern_Config, patternBuff, patternLen*sizeof(uint16_t)); memcpy(hopPattern_Config, patternBuff, patternLen*sizeof(uint16_t));
memcpy(hopTxPattern_Config, patternBuff, patternLen*sizeof(uint16_t));
// FIXME: A physical layer glitch, ignore hop 2 3 4 in rx mode
// should be fixed in next version
if(patternLen > 4){
for(int32_t i = 0; i< patternLen-3; i++){
hopRxPattern_Config[i+1] = hopRxPattern_Config[i+4];
}
}
return SUCCESS; return SUCCESS;
} }