YITechnology / YIOpenAPI

YI Open API provides mobile SDKs and reference designs for software developers and hardware makers to build cool apps and products with YI 4K Action Cameras
Other
346 stars 77 forks source link

Viewfinder problem when switching between modes #2

Closed tqu-dev closed 7 years ago

tqu-dev commented 7 years ago

Hi,

This problem happens only on the Xiaomi Yi 4k (not on the old normal model):

1.) Viewfinder is off. 2.) Now switch between modes (video, photo, timelapse, etc.). 3.) Now try to turn on the viewfinder. Sometimes it works, but often the viewfinder does not start but instead an error -21 is returned.

After this procedure also the original Xiaomi Yi app for Android shows only a black viewfinder until the camera is manually rebooted.

Regards,

x-projs commented 7 years ago

-21 means camera is busy. Please try it later.

tqu-dev commented 7 years ago

Ok thanks. But it seems as if the camera hangs, e.g. it does not allow to enable the viewfinder anymore. Changing of other settings work thus.

x-projs commented 7 years ago

Yes, some settings can only be set when camera is idle. Some settings don't have this limitation.

tqu-dev commented 7 years ago

This means that the only solution is to restart the camera when it gets into this "non-idle" state?

x-projs commented 7 years ago

No, wait for 1 or 2 seconds after taking action, camera can be in idle state. In most cases, busy means the previous action is not finished on camera side.