Can't use the Virtual Stick even though isVirtualStickControlModeAvailable returns true - swift3

I am having a problem with the virtual sticks, the following is the problem.
The Virtual sticks fire the notification, the listener sends the proper values to the roll, pitch, yaw and throttle, the isVirtualStickControlModeAvailable method from the sdk returns true, when it returns true I use the command from the flight controller send which returns the completion error nil, which means I can not do anything else from there, actually I do not need to do anything else. The virtual Sticks are working in a timer as the sample simulator from DJI.
What can I do in my app?
- Take off
- Land
- Give control back and forward to the RC
None of the list above brings me errors, including the process of the virtualStick.
What else did I try?
- Run the sample simulator app from DJI, linked above.
- Run the sample app on Android
- Run using the Bridge APP (Thats how i know the values are being passed correctly, even though i added labels on screen to debug without the Bridge APP)
- Update firmware from the aircraft and RC to the latest
- Sample simulator IOS
- Went back to previous working commits and branches on git
None of the things I have tried above worked.
Curious Stuf:
- The virtual Sticks worked fine till Yesterday, and before yesterday, in many diferent branches and commits in multiple branches.
- Reseting the Remote control, Executing Manual Linking and Linking through the DJI Official APP, and clearing the cache, memory sdcard made it work on Simulator Assistent DJI (Latest version) with a lot of interference, in the Sample apps on Android and IOS, and on my Swift 3 application. Then it had some interference, I tested outside on the real Aircraft, it was working beautifully.
- Today, the same thing happens. Already did the whole testing above mentioned, the Android sample apps, IOS Sample Apps, the Simulator, Bridge, My application, Reset remote etc. And it does not work.
I would be really glad if someone could point me out the problem.
On this thread I explain partially the problem and what I have tried. http://forum.dev.dji.com/forum.php?mod=viewthread&tid=32729
Already sent an email to DJI support, still no answer.
Aircraft: Phanton 4.

I have found the problem, it was the aircraft, I could get hands in a new aircraft, just pluged to the new RC linked to the new Aircraft, it worked with no problem.
Then I tested the new RC linking to the old aircraft, It did not work, then the Old RC with linked to the new Aircraft, it worked.

Glad you found the fix.
It might be worth it to update the firmware of the old aircraft.
You can do so using the DJIGo app or DJI Assistant software for desktop.

Related

Plugin build with C++/Juce - Crashed validation in LogicProX

I'm completely new to this but I'm taking a course in Audio Plugin Development as a way to try and improve my understanding of C++. I've hit a wall quite early where the plugin caused Logic to crash. I'm using Xcode and Juce and when I got to this point in Xcode and built the plugin, it said 'build succeeded' and opened Logic, which then crashed, directing me back to this line of code
thread 1: breakpoint1.1
If I open Logic independently without Xcode, it's not crashing, but when I reset and rescan plugins, I get a crashed validation for that plugin
Logic: crashed validation
I don't fully understand where it's directing me to or where the problem is, I retraced my steps in following the directions in the course and I think I've done everything correctly. In the previous step I did the initial build of the plugin and that worked fine, without any crashes.
I've tried deleting breakpoints and running again but it's still the same problem. As I say, I'm very new to this so could be something very simple but any help would be great. Thanks a lot

WebRTC Never Stream Video

I have a website that recieves WEBRTC from my mobileApp very well.
A new C++ module that I develop that should send video using WEBRTC to the same website is not working and I failed to know why.
NOT WORKING FILES:
https://drive.google.com/open?id=1-6ZsfcQztexAspYWB4Nzvgf2e0-0C8vC
WORKING FILE:
https://drive.google.com/open?id=1bL_WOW6L1mGCXQC6HT6a14Sa58hOIcAh
kindly advise. I am stuck.
SOLVED AT LAST:
the issue mainly was due mDNS that is activated on chrome but gives "network unreachable" from my code.
the main problem was due to mDNS that chrome activates by default while webrtc need a lib called libnice v>0.1.14 which is the current stable release to resolve local addresses.
second peerConnectionFactory init:
I had to pass threads parameter. not this but also I had to init the network thread differently.
g_worker_thread = rtc::Thread::Create();
g_worker_thread->Start();
g_signaling_thread = rtc::Thread::Create();
g_signaling_thread->Start();
g_networking_thread = **rtc::Thread::CreateWithSocketServer();**
g_networking_thread->Start();
I am not sure what is the reason of the second point but maybe because I initiate webrtc from my main function in c and not through a thread.
Anyway I hope this helps someone... I was stuck for two weeks to solve it.

DroneKit mission not sent to drone

I'm trying to create simple mission using Drone-Kit android.
Mission myMission = new Mission();
myMission.clear();
Takeoff to = new Takeoff();
ReturnToLaunch rtl = new ReturnToLaunch();
//set Altitude in meters
rtl.setReturnAltitude(2);
to.setTakeoffAltitude(2);
myMission.addMissionItem(to);
myMission.addMissionItem(rtl);
MissionApi.getApi(this.drone).setMission(myMission,true);
The problem is that sometimes it works, and sometimes it's doesn't...
I don't know why it not working... I'm not getting any errors in the code.
I'm listening to the
AttributeEvent.MISSION_UPDATED
AttributeEvent.MISSION_SENT
AttributeEvent.MISSION_RECEIVED
but only the AttributeEvent.MISSION_UPDATED is fired when I run the code.
And even if its fired, this doesn't mean that the mission updated correctly.
I'm checking the mission with Mission Planer.
I just don't understand why it is working sometimes and sometimes not.
I did make sure that the drone connected to the app.
Also I made sure that the drone is OK and arm-able.
I really stuck here... and any help will be appreciated.
I have not tried dronekit-android before but I think it is better to open an issue here.
The source code for android project has not been updated for more than two years!
In general,there is a protocol to upload/download a mission. It is not easy to implement but you can implement it. I did that in c++. You should always check the acknowledgment from the drone before going in the next step. Check the protocol here.
I will answer my question, in case someone have the same problem.
I have contacted the developers, and it seems that I'm not the only one who have this BUG.
It seems that when you add ReturnToLaunch to Mission something happening in the API and the mission is not sent to the drone. As soon as I removed ReturnToLaunch object from the Mission all worked properly.
Work-Around: To overcome the issue, I am putting the drone in RTL mode, when the Mission is done.

GDK picture intent gets stuck on Tap to accept

Today the picture function on my Glass app stopped working. It was fine yesterday, but now it gets stuck on the Tap to Accept Picture. I think it may have something to do with the new (to me at least) way it handles pictures as well as the viewfinder. What I can find on the glass developers site is deprecated and doesn't work. My hope/belief is that the new idea is for the intent to go to the viewfinder and then take the picture. I'd prefer to still use the glass method, but I am aware of the android API camera method. Here's the code
startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), REQUEST_PIC);
and in onActivityResult
switch(requestCode)
{
case REQUEST_PIC:
String picturePath = data.getStringExtra(Intents.EXTRA_PICTURE_FILE_PATH);
processPictureWhenReady(picturePath);
break;
}
I have got the same problem since upgraded to XE18.3. Instead of spending time to look for a workaround, I've implemented the preview mode with SurfaceView. You could access the camera directly with Camera.Open(), the sample codes can be found at: (search for "camerasample.zip" in the page)
https://code.google.com/p/google-glass-api/issues/detail?id=351
Hope this helps.
This is a problem being experienced after the XE18.3 update. It has been logged in the google-glass-api issue tracker here.
You can try downgrading the firmware as mentioned in the comments, but be sure to note that doing that voids your warranty.
I have the same issue happening to me as well, however if you plug Glass into your computer that is running Eclipse and the adb is running the Intent will complete successfully. This is not a solution but hopefully it'll keep you from getting behind in work until there is an answer available.

Marmalade SDK Simulator error: Couldn't initialize Direct Draw

I have been working with marmalade for some weeks. But since today my simulator is not working anymore. I always get "error: Couldn't initialize Direct Draw" when i launch the simulator.
I tried uninstalling marmalade and restarting pc but nothing is helping.
Anyone has an idea what this can be, or things I can try?
Error message can be seen:
PC specs if this might help:
- Acer Aspire notebook
- Windows 7 Home Premium SP1 64bit
- Intel i5 2410M
- 6GB RAM
- AMD HD 6650M 1GB
For anyone who may come across this, the same thing happened to me just yesterday. I started getting the "Couldn't initialize Direct Draw" on startup after having made a few changes under Preferences -> Display.
I fixed it by going to C:\Users\{user}\AppData\Roaming\Marmalade\ and deleting (or renaming) the preferences.icf file. This isn't removed after an uninstall, so if you find yourself in this situation, this seems to be the only way to reset everything.
Good luck!
A couple of things to try.
First, try running your program from inside Visual C++ by pressing and holding F5. This will cause the simulator to start but won't start executing your program, which might then give you a chance to change the settings in the simulator.
Failing that, if you look in the data directory you should find a file called development.icf which is the current simulator settings. Try deleting this and running again which will cause the simulator to revert to its default settings.