setup

After initial setup, configure autopilot: create an autopilot directory and a prefs.json file

Classes:

Agent_Form([name, parentApp, framed, help, …])

Autopilot_Form(*args, **kwargs)

Autopilot_Setup(prefs)

Hardware_Form(*args, **kwargs)

Pilot_Config_Form_1(*args, **kwargs)

Pilot_Config_Form_2(*args, **kwargs)

Pilot_Env_Form(*args, **kwargs)

Terminal_Form(*args, **kwargs)

odict

alias of collections.OrderedDict

Data:

DIRECTORY_STRUCTURE

performance:

Functions:

call_series(commands[, series_name])

Call a series of commands, giving a single return code on completion or failure

list_scripts()

make_dir(adir)

Make a directory if it doesn’t exist and set its permissions to 0777

run_script(script_name)

unfold_values(v)

Unfold nested values from the SetupForm.

DIRECTORY_STRUCTURE = {'DATADIR': 'data', 'LOGDIR': 'logs', 'PROTOCOLDIR': 'protocols', 'SOUNDDIR': 'sounds', 'VIZDIR': 'viz'}
performance:
  • disable startup script that changes cpu governor,

  • change cpu governor to “performance” on boot

  • increase memlock and realtime priority limits for audio group

hifiberry:
  • turn onboard audio off

  • enable hifiberry stuff in /boot/config.txt

  • edit alsa config so hifiberry is default sound card

viz:

Todo

Need to find a more elegant way to do this, for now see lines 160-200 in the presetup_pilot.sh legacy script

class Autopilot_Form(*args, **kwargs)[source]

Bases: npyscreen.fmForm.Form

Methods:

populate_dependencies(params)

populate_form(params)

update_depends(param_name)

populate_dependencies(params)[source]
populate_form(params)[source]
update_depends(param_name)[source]
class Hardware_Form(*args, **kwargs)[source]

Bases: npyscreen.fmFormWithMenus.FormWithMenus

Methods:

add_hardware(module, class_name)

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

list_hardware()

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

list_hardware()[source]
add_hardware(module, class_name)[source]
afterEditing()[source]
class Agent_Form(name=None, parentApp=None, framed=None, help=None, color='FORMDEFAULT', widget_list=None, cycle_widgets=False, *args, **keywords)[source]

Bases: npyscreen.fmForm.Form

Methods:

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

afterEditing()[source]
class Pilot_Env_Form(*args, **kwargs)[source]

Bases: autopilot.setup.setup_autopilot.Autopilot_Form

Methods:

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

afterEditing()[source]
class Pilot_Config_Form_1(*args, **kwargs)[source]

Bases: autopilot.setup.setup_autopilot.Autopilot_Form

Methods:

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

afterEditing()[source]
class Pilot_Config_Form_2(*args, **kwargs)[source]

Bases: autopilot.setup.setup_autopilot.Autopilot_Form

Methods:

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

afterEditing()[source]
class Terminal_Form(*args, **kwargs)[source]

Bases: autopilot.setup.setup_autopilot.Autopilot_Form

Methods:

afterEditing()

create()

Programmers should over-ride this in derived classes, creating widgets here

create()[source]

Programmers should over-ride this in derived classes, creating widgets here

afterEditing()[source]
class Autopilot_Setup(prefs)[source]

Bases: npyscreen.apNPSApplicationManaged.NPSAppManaged

Methods:

onStart()

Override this method to perform any initialisation.

onStart()[source]

Override this method to perform any initialisation.

unfold_values(v)[source]

Unfold nested values from the SetupForm. Called recursively.

Parameters

v (dict) – unfolded values

make_dir(adir)[source]

Make a directory if it doesn’t exist and set its permissions to 0777

Parameters

adir (str) – Path to the directory