In [1]:
import IPython
import ipywidgets
import context
import gopro_helper as gopro
In [2]:
%load_ext autoreload
%autoreload 2
In [3]:
# State information
state = gopro.Struct()
state._raw_status = None
state._raw_settings = None
state._mode = None
In [4]:
# Fetch new information from camera
raw_status, raw_settings = gopro.commands.get_raw_status_settings()
state._raw_status = raw_status
state._raw_settings = raw_settings
info_status = gopro.api.parse_status_names(raw_status)
name_mode, name_sub_mode = gopro.api.parse_mode_sub_mode(info_status)
state._mode = name_mode
In [5]:
state._mode
Out[5]:
In [6]:
gopro.commands.set_mode_photo()
In [7]:
# List features for current mode (copied from API notebook)
features = gopro.api.mode_features(state._mode)
for F in features:
print('{:2d} - {:22s} [{}]'.format(F['id'], F['path_segment'], F['display_name']))
In [8]:
# List features for current mode (copied from API notebook)
features = gopro.api.mode_features(state._mode)
for F in features:
print(F['path_segment'])
In [9]:
# Feature options (copied from API notebook)
f_name_or_id = 'protune_color'
f_name, fid, options = gopro.api.feature_options(state._mode, f_name_or_id)
d_name = gopro.api.feature_display_name(state._mode, f_name)
print('Option IDs and values for feature "{}" [mode "{}"]:'.format(d_name, state._mode))
for item in options:
print('[{:2d}] - {} '.format(item['value'], item['display_name']))
In [10]:
wid_drop = gopro.feature_dropdown_widget(state._mode, f_name, callback=None)
In [11]:
wid_drop
In [10]:
wid = gopro.Settings()
In [18]:
wid.start()
In [19]:
wid.stop()
In [ ]:
gopro.commands.set_mode_photo()
In [11]:
gopro.commands.set_mode_video()
In [ ]:
wid.up