{% extends "layout.html" %} {% set active_page = "calibration" %} {% block title %} - {{_('Calibration & Setup')}}: Atlas Scientific pH{% if input_device_name %}: {{input_device_name}}{% endif %}{% endblock %} {% block head %} {% endblock %} {% block body %}
{% include 'flash_messages.html' %}

Atlas Scientific pH Sensor{% if selected_point_calibration %} (Calibrating {{selected_point_calibration}}){% endif %}

{% if ui_stage == 'start' %}

{{_('This guide will walk you through the calibration procedure for the Atlas Scientific pH Sensor. To complete this procedure, you will need at least one of the standard pH solutions (pH 4.0, pH 7.0, and pH 10.0). Instructions will be provided at each step.')}}

{{_('To begin calibration, have your probe properly connected to Mycodo, select the probe from the dropdown list, and click Begin Calibration.')}}

{{_('To clear any currently-stored calibration from memory, click Clear Calibration.')}}

{{_('NOTE: It is recommended to deactivate the pH Sensor Input prior to performing a calibration.')}}

{{form_ph_calibrate.hidden_current_stage(value='start')}}
{{form_ph_calibrate.start_calibration(class_='form-control btn-default')}}
{{form_ph_calibrate.clear_calibration(class_='form-control btn-default')}}
{% elif ui_stage == 'temperature' %} {% if complete_with_error %}

{{dict_translation['error']['title']}}: {{_('Calibration Failed')}}

{{_('Refer to the logs for details')}}

{% else %}

1. {{dict_translation['calibration']['title']}}{% if input_device_name %}: {{input_device_name}}{% endif %} {{selected_input.id}} ({{selected_input.name}})

{{_('Ensure all pH calibration solutions are the same temperature. Enter the temperature (in Celsius) of your solutions, then click Continue.')}}

{{form_ph_calibrate.hidden_current_stage(value='temperature')}}
{{form_ph_calibrate.hidden_input_id(value=selected_input.unique_id)}} {{form_ph_calibrate.hidden_selected_point_calibration(value=selected_point_calibration)}}
{{form_ph_calibrate.temperature(class_='form-control')}}
{{form_ph_calibrate.go_to_next_stage(class_='form-control btn btn-primary btn-sm')}}
{% endif %} {% elif ui_stage == 'mid' %} {% if complete_with_error %}

{{dict_translation['error']['title']}}: {{_('Calibration Failed')}}

{{_('Refer to the logs for details')}}

{% else %}

2. {{dict_translation['calibration']['title']}}{% if input_device_name %}: {{input_device_name}}{% endif %} {{selected_input.id}} ({{selected_input.name}})

{{_('Rinse the pH probe with distilled water, place it into the pH %(ph)s solution, then click Ready', ph='7.0')}}

{{form_ph_calibrate.hidden_current_stage(value='mid')}} {{form_ph_calibrate.hidden_selected_point_calibration(value=selected_point_calibration)}}
{{form_ph_calibrate.hidden_input_id(value=selected_input.unique_id)}}
{% endif %} {% elif ui_stage == 'low' %} {% if complete_with_error %}

{{dict_translation['error']['title']}}: {{_('Calibration Failed')}}

{{_('Refer to the logs for details')}}

{% else %}

3. {{dict_translation['calibration']['title']}}{% if input_device_name %}: {{input_device_name}}{% endif %} {{selected_input.id}} ({{selected_input.name}})

{{_('Rinse the pH probe with distilled water, place it into the pH %(ph)s solution, then click Ready', ph='4.0')}}

{{form_ph_calibrate.hidden_current_stage(value='low')}} {{form_ph_calibrate.hidden_selected_point_calibration(value=selected_point_calibration)}}
{{form_ph_calibrate.hidden_input_id(value=selected_input.unique_id)}}
{% endif %} {% elif ui_stage == 'high' %} {% if complete_with_error %}

{{dict_translation['error']['title']}}: {{_('Calibration Failed')}}

{{_('Refer to the logs for details')}}

{% else %}

4. {{dict_translation['calibration']['title']}}{% if input_device_name %}: {{input_device_name}}{% endif %} {{selected_input.id}} ({{selected_input.name}})

{{_('Rinse the pH probe with distilled water, place it into the pH %(ph)s solution, then click Ready', ph='10.0')}}

{{form_ph_calibrate.hidden_current_stage(value='high')}} {{form_ph_calibrate.hidden_selected_point_calibration(value=selected_point_calibration)}}
{{form_ph_calibrate.hidden_input_id(value=selected_input.unique_id)}}
{% endif %} {% elif ui_stage == 'complete' %}

5. {{dict_translation['calibration']['title']}}{% if input_device_name %}: {{input_device_name}}{% endif %} {{selected_input.id}} ({{selected_input.name}}): {% if complete_with_error %}{{_('Calibration Failed')}}{% else %}{{_('Calibration Succeeded')}}{% endif %}

{% if complete_with_error %}

{{dict_translation['error']['title']}}:
{{complete_with_error}}

{{_('Refer to the logs for details')}}

{% else %}

{{_('Calibration Complete')}}

{% endif %} {% endif %}
{% endblock %}