IBM-Cloud / parrot-sample

Sample code which uses MQTT to control a Parrot AR Drone
Apache License 2.0
18 stars 12 forks source link

Don't define `latestPng` to the return from `getPngStream()` #2

Closed kauffecup closed 9 years ago

kauffecup commented 9 years ago

latestPng was being redefined to the return from getPngStream() which is the stream itself. if we didn't receive new data between when this happens and when we receive the next #takepicture command, the code attempted to send the stream object via form data which resulted in the app crashing.

i also removed redefining the stream every time we receive the #takepicture command - only need to open it in the beginning of the app.