예제 #1
0
파일: app.py 프로젝트: micro-nova/AmpliPi
def reset(ctrl: Api = Depends(get_ctrl)) -> models.Status:
  """ Reload the current configuration, resetting the firmware in the process. """
  ctrl.reinit(settings=ctrl._settings, change_notifier=notify_on_change)
  return ctrl.get_state()
예제 #2
0
파일: app.py 프로젝트: micro-nova/AmpliPi
def load_config(config: models.Status, ctrl: Api = Depends(get_ctrl)) -> models.Status:
  """ Load a new configuration (and return the configuration loaded). This will overwrite the current configuration so it is advised to save the previous config from. """
  ctrl.reinit(settings=ctrl._settings, change_notifier=notify_on_change, config=config)
  return ctrl.get_state()