Closed dbaldwin closed 7 years ago
@dbaldwin DULRemainingFlightTimeWidget renders itself after a product is connected. Is it not rendering even after you connect a product?
Unfortunately it doesn't render anything after the product is connected. We have a dashboard widget that displays just fine after the product is connected. Actually, to be clear about the dashboard widget it displays even with no product connected but obviously all the values are zero and compass points north. Should we not expect the flight time widget to render even with no product connected? Regardless, no matter what we do (connected or not) the widget doesn't display at all.
@dbaldwin: Thanks for reporting the issue. I tried to reproduce the issue by following these steps:
DULRemainingFlightTimeWidget
.Now as soon as I connect a product (tested with Mavic, P4, P4Pro) the remaining flight time widget shows up in the view in the middle of the screen. It does not render anything if a product is disconnected (that is expected behavior).
Could you please provide some more details about the steps that you took which would help me to reproduce the bug?
@aksh1t Thank you for taking the time to look into this. Any chance that Swift has a problem? That's what we're developing with. In the meantime we will try to connect without bridging. I'm pretty sure we have tested without bridge, but will double-check.
@aksh1t may I also ask if you see any UI elements populated (no data) with that widget in the iOS simulator? I know most of the other widgets render with no data. Am just curious as we try to trouble shoot this some more. Thank you.
Any chance that Swift has a problem?
I tried the same set of steps with the Swift Sample as well, and seemed to be working okay there too.
I know most of the other widgets render with no data.
This is correct. All the widgets (except DULRemainingFlightTimeWidget) render even when a product is not connected.
may I also ask if you see any UI elements populated (no data) with that widget in the iOS simulator?
No. If the product is not connected, the DULRemainingFlightTimeWidget shows nothing. There is no blank state like the other widgets, it just does not render anything in the disconnected state.
Okay thank you. We'll dig into this tomorrow and report our findings.
Hi @dbaldwin , the DULRemainingFlightTimeWidget will render itself and show time infos when the product is connected and flying. Please try to test it outdoors.
@oliverou Actually, the widget does not need the product to be flying in order to render itself, it just needs to be connected. The product needs to be flying to show the correct remaining flight time text, but the widget should render without any problem even if the drone is not flying, it will just show --:--
in the remaining flight time text when not flying.
Thank you @aksh1t for your responsiveness. It turns out I made an idiot move and the reason nothing was working on the actual hardware is that I didn't have the accessory protocols defined in Info.plist:
com.dji.video com.dji.protocol com.dji.common
This explains while I could see info while bridging and not directly connected. Now that I've added the protocols the remaining flight time widget renders nicely. My apologies for dragging you through this...and thanks for the support!
@dbaldwin No worries! Thank you for reporting the issue anyways, it will help us add more material to the tutorial so that others don't miss out on the not-so-obvious things when working with the UI Library.
We are trying to get DULRemainingFlightTimeWidget working in our app and it doesn't seem to render anything. We are currently using a UIView with a custom class of DULRemainingFlightTimeWidget but whenever testing either bridged or connected directly to the aircraft it doesn't render anything. We are using UILibrary 4.0.1.1.0.0 with Phantom 4 and Mavic Pro. iOS devices we've tested with are iPhone 6 and iPad Mini as well as simulated versions. Other widgets work just fine in our app. Any thoughts would be appreciated.
Thanks.