Please select Into the mobile phone version | Continue to access the computer ver.
I managed to completely remove QT from the OnBoard SDK
Uploading and Loding Picture ...(0/1)
o(^-^)o
SChalice
lvl.2

Offline

So now my Windows SDK has far greater functionality than DJI's current version.

I first converted the QT files to .vcproj and then created my own classes to replace those in qt_serial_device.cpp and qt_thread.cpp.

I replaced the serial code using something on the web that I have used for other projects: CSerial

The threading "class" is only used to launch a serial read thread and a callback thread which is easily accomplished using beginthreadex (instead of QT)

Thread*
PlatformManager::addThread(Vehicle* vehicle_ptr, uint8_t thread_type)
{

#ifdef REPLACE_QT

        if (thread_type == UART_SERIAL_READ_THREAD)
        {
                readThreadPtr = new (std::nothrow) OSDKTThread(vehicle_ptr, UART_SERIAL_READ_THREAD);
                if (readThreadPtr == NULL)
                {
                        AfxMessageBox("Failed to initialize read thread!\n");
                }
                else
                {
                        TThread* qReadThread = new TThread;
                        beginthreadex(NULL, 0, &readThread, NULL, 0, NULL);
                        return readThreadPtr;
                }
        }

10-7 13:59
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules