Beispiel #1
0
        public async Task <bool> ChangeFocus(ChangeDirection focusDirection)
        {
            ReportAction(focusDirection);
            return(await Try(async() =>
            {
                var focus = await http.GetString("?mode=camctrl&type=focus&value=" + focusDirection.GetString());

                var fp = Parser.ParseFocus(focus);
                if (fp == null)
                {
                    return false;
                }

                if (fp.Maximum != LumixState.MaximumFocus)
                {
                    LumixState.MaximumFocus = fp.Maximum;
                }

                if (fp.Value != LumixState.CurrentFocus)
                {
                    LumixState.CurrentFocus = fp.Value;
                }

                return true;
            }));
        }
Beispiel #2
0
 public async Task <bool> ChangeZoom(ChangeDirection zoomDirection)
 {
     ReportAction(zoomDirection);
     return(await Try(async() => await http.Get <BaseRequestResult>("?mode=camcmd&value=" + zoomDirection.GetString())));
 }