chore: merge tag 'v1.10' into refine

This commit is contained in:
Gatsby
2024-11-07 14:22:55 +08:00
5 changed files with 60 additions and 9 deletions
+8 -7
View File
@@ -1,4 +1,4 @@
#include <cstdint>
#include <cstdint>
#include "cx9261adriver.h"
#include "utils.h"
@@ -1058,15 +1058,15 @@ void rxCalib(const CX9261AConfiguration& config, const RxChannel chan)
{
LOGGING(toString(chan) + "校准");
if (config.calib.rxMethod == CalibMethod::TST) {
if (chan == RxChannel::Rx1 && config.pllSource.rx1Source == LoSource::Off) {
if (chan == RxChannel::Rx1 && config.pllSource.rx1Source == LoSource::Off && !config.pllSource.rxUseExt) {
LOGGING(toString(chan) + " OFF")
return;
}
if (chan == RxChannel::Rx2 && config.pllSource.rx2Source == LoSource::Off) {
if (chan == RxChannel::Rx2 && config.pllSource.rx2Source == LoSource::Off && !config.pllSource.rxUseExt) {
LOGGING(toString(chan) + " OFF")
return;
}
if (chan == RxChannel::Rx3 && config.pllSource.rx3Source == LoSource::Off) {
if (chan == RxChannel::Rx3 && config.pllSource.rx3Source == LoSource::Off && !config.pllSource.rxUseExt) {
LOGGING(toString(chan) + " OFF")
return;
}
@@ -1440,7 +1440,7 @@ void configQecCalib(const CX9261AConfiguration& config)
configCalibMethod(config.calib);
// Rx校准只在有任意Rx通道不是Off时发生
const bool calibRx = config.pllSource.rx1Source != LoSource::Off || config.pllSource.rx2Source != LoSource::Off
|| config.pllSource.rx3Source != LoSource::Off;
|| config.pllSource.rx3Source != LoSource::Off || config.pllSource.rxUseExt;
if (calibRx) {
rxCalib(config, RxChannel::Rx1);
rxCalib(config, RxChannel::Rx2);
@@ -1495,7 +1495,8 @@ void configQecCalib(const CX9261AConfiguration& config)
}
}
// Tx校准只在任意Tx通道不是Off时发生
const bool calibTx = config.pllSource.tx1Source != LoSource::Off || config.pllSource.tx2Source != LoSource::Off;
const bool calibTx = config.pllSource.tx1Source != LoSource::Off || config.pllSource.tx2Source != LoSource::Off
|| config.pllSource.txUseExt;
if (calibTx) {
txCalib(config);
restoreQecState(regsState);
@@ -1641,7 +1642,7 @@ void configInterface(const Interface& interface)
if (interface.workMode == WorkMode::FDD)
writeSpi(0x201, 0x00);
else if (interface.portMode == PortMode::Single && interface.trMode == TrMode::R2T2)
writeSpi(0x201, 0x3F);
writeSpi(0x201, 0x3D);
else
writeSpi(0x201, 0x15);
// 0x202