コード例 #1
0
def dashboard():
    path = request.path
    title = get_page_title(path[1:])

    with open('ControlLaptop/templates/tables/HVSensors.json') as json_file:
        bms_sensors = order_sensors(json.load(json_file))
    with open('ControlLaptop/templates/tables/InverterSensors.json') as json_file:
        inverter_sensors = order_sensors(json.load(json_file))
    with open('ControlLaptop/templates/tables/DashboardSensors.json') as json_file:
        sensors = order_sensors(json.load(json_file))
    with open('ControlLaptop/templates/tables/LVSensors.json') as json_file:
        lv_sensors = order_sensors(json.load(json_file))

    arm_form = FlightProfileForm()
    overrides_form = OverridesForm()
    return render_template(
        path+".html",
        active_page=path,
        title=title,
        armForm=arm_form,
        overridesForm=overrides_form,
        sensors=sensors,
        bms_sensors=bms_sensors,
        lv_sensors = lv_sensors,
        inverter_sensors=inverter_sensors
    )
コード例 #2
0
def ui(path):
    title = get_page_title(path)
    return render_template(
        path+".html",
        active_page=path,
        title=title,
        sensors=[LocalStorage.get_sensors()],
    )
コード例 #3
0
def get_flight_profile_template():
    page = 'connect'
    title = get_page_title(page)
    return render_template(
        page+".html",
        active_page=page,
        title=title,
        configuration_form=PodConfigurationForm(),
        saved_configuration=FlightConfig.get_flight_config_instance().read_config()
    )
コード例 #4
0
def proofTest():
    page = 'proofTest'
    title = get_page_title(page)
    with open('ControlLaptop/templates/tables/DashboardSensors.json') as json_file:
        sensors = order_sensors(json.load(json_file))
    return render_template(
        page+".html",
        active_page=page,
        title=title,
        sensors=sensors
    )
コード例 #5
0
def dts():
    page = 'dts'
    title = get_page_title(page)
    with open('ControlLaptop/templates/tables/DtsSensors.json') as json_file:
        sensors = order_sensors(json.load(json_file))
    with open('ControlLaptop/templates/tables/HVSensors.json') as json_file:
        bms_sensors = order_sensors(json.load(json_file))
    with open('ControlLaptop/templates/tables/InverterSensors.json') as json_file:
        inverter_sensors = order_sensors(json.load(json_file))
    return render_template(
        page+".html",
        active_page=page,
        title=title,
        sensors=sensors,
        bms_senesors=bms_sensors,
        inverter_sensors=inverter_sensors
    )
コード例 #6
0
def batteries():
    page = 'battery'
    title = get_page_title(page)
    return render_template("battery.html")