setup

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

Data:

DIRECTORY_STRUCTURE

performance:

Classes:

Autopilot_Form(*args, **kwargs)

Hardware_Form(*args, **kwargs)

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

Pilot_Env_Form(*args, **kwargs)

Pilot_Config_Form_1(*args, **kwargs)

Pilot_Config_Form_2(*args, **kwargs)

Terminal_Form(*args, **kwargs)

Autopilot_Setup(prefs)

Functions:

unfold_values(v)

Unfold nested values from the SetupForm.

make_dir(adir)

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

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:

create()

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

list_hardware()

add_hardware(module, class_name)

afterEditing()

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:

create()

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

afterEditing()

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:

create()

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

afterEditing()

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:

create()

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

afterEditing()

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:

create()

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

afterEditing()

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:

create()

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

afterEditing()

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