最新更改

This commit is contained in:
2022-08-30 16:14:46 +08:00
parent 8c6be81f94
commit 1cee2339ce
26 changed files with 440 additions and 874 deletions

View File

@ -28,6 +28,7 @@ BD357Controller::~BD357Controller()
int BD357Controller::SetContext(CMainGrabber& pMainGrabber)
{
m_pMainGrabber = &pMainGrabber;
return 0;
}
int BD357Controller::SetupMessagePipeline()
@ -42,7 +43,7 @@ int BD357Controller::SyncDateOnce()
bool bFlagFinish = false;
size_t uiCount = 0;
ZZ_U8 u8Rx,u8Tx;
//ZZ_U8 u8Rx,u8Tx;
while (!bFlagFinish)
@ -87,7 +88,12 @@ int BD357Controller::SyncDateOnce()
time_t stdtime = m_qdtDateTime.toTime_t();
time_t stdtimeUTC = m_qdtDateTimeUTC.toTime_t();
#ifdef WIN32
#else
stime(&stdtimeUTC);
#endif
system("gpio write 4 1");
qDebug() << "system(gpio write 4 1)";
@ -137,6 +143,8 @@ int BD357Controller::Initialize(GPSInfo &struGPSI)
{
m_struGPSInfo = struGPSI;
emit Signal_InitSelf();
return 0;
}
@ -207,7 +215,8 @@ int BD357Controller::Slot_InitSelf()
bool bRes = m_pSerialPort->setBaudRate(m_struGPSInfo.iBaud);
if (!bRes)
{
qDebug() << "Err:setBaudRate Failed.Exit Code:1";
//qDebug() << "Err:setBaudRate Failed.Exit Code:1";
printf("Err:setBaudRate Failed.Exit Code:1");
//std::cout << "Err.setBaudRate Failed" << std::endl;
return 1;
}
@ -215,7 +224,8 @@ int BD357Controller::Slot_InitSelf()
bRes = m_pSerialPort->open(QIODevice::ReadWrite);
if (!bRes)
{
qDebug() << "Err:open Failed.Exit Code:2";
//qDebug() << "Err:open Failed.Exit Code:2";
printf("Err:open Failed.Exit Code:2");
//std::cout << "Err.open Failed" << std::endl;
return 2;
}
@ -224,6 +234,8 @@ int BD357Controller::Slot_InitSelf()
lwgps_init(&m_hLWGPS);
lwrb_init(&m_hlwrbBuffer, m_u8GPSDataBuffer, sizeof(m_u8GPSDataBuffer));
return 0;
}
int BD357Controller::Slot_SyncDateOnce()