2026年6月25日 暂存

This commit is contained in:
2026-06-25 11:04:34 +08:00
parent 0fb69c2897
commit 864b60020e
32 changed files with 6806 additions and 5974 deletions
+23 -1
View File
@@ -3606,7 +3606,29 @@ void DevOp::resendFPGADate(int cmd, int addr, unsigned char *dat, int len, int t
emit sendSerialDataToFPGA(cmd,addr,dat,len,type);
}
void DevOp::resendSTM32Date(int cmd, int addr, unsigned char *dat, int len, int type){
extern "C" {
#pragma pack(1)
typedef struct FlightComCtrl_t_ {
uint8_t flags; // bit0: 启用飞行补偿控制, bit1: 启用加减速预测
uint32_t flightCompWindow;
}FlightComCtrl_t;
#pragma pack()
}
void DevOp::writeFlightCompCtrl(bool enb, bool enbAccelDecelPredict, quint32 flightCompWindow)
{
static FlightComCtrl_t flightComCtrl;
memset(&flightComCtrl, 0, sizeof(FlightComCtrl_t));
flightComCtrl.flags |= (enb ? 1 : 0);
flightComCtrl.flags |= (enbAccelDecelPredict ? 0x2 : 0x0);
flightComCtrl.flightCompWindow = flightCompWindow;
fpgaWr(FLIGHT_COMP_CTRL_BASE, (unsigned char*)(&flightComCtrl), sizeof(FlightComCtrl_t));
}
void DevOp::resendSTM32Date(int cmd, int addr, unsigned char *dat, int len, int type)
{
emit sendSerialDataToSTM32(cmd,addr,dat,len,type);
}