<?php require_once "atp.header.php"; ?>
	
<section class="content-wrapper" data-heading="other-data" id="environment">
	<!--Heading-->
	<div class="page-title">
		<h1>Environment Variables</h1>
		<p>
			Configure offsets and data distribution for environmental sensors.<br>
			Air temperature sensors can be interfaced through analogue inputs on the main interface board, connected analogue boards or directly via NMEA0183/CANbus.
			Sea temperature sensors can additionally be interfaced through the dedicated temperature input on a connected speed or speed/depth board.
		</p>
	</div>

	<!--Air Temperature-->
	<div id="air-temperature-container">
		<div class="box top-wrapper">
			<fieldset>
				<legend><h2>Air Temperature</h2></legend>
				<div class="sensor-grid">
					
				</div>
				<div class="no-source-row">
					<h2>No Source Detected</h2>
				</div>
			</fieldset>
		</div>
	</div>

	<!--Sea Temperature-->
	<div id="sea-temperature-container">
		<div class="box top-wrapper">
			<fieldset>
				<legend><h2>Sea Temperature</h2></legend>
				<div class="sensor-grid">
				
				</div>
				<div class="no-source-row">
					<h2>No Source Detected</h2>
				</div>
			</fieldset>
		</div>
	</div>

	<!--Barometer-->
	<div id="barometer-container">
		<div class="box top-wrapper">
			<div class="flex-row barometer">
				<div class="flex-half">
					<h2>Barometric Pressure</h2>
					<div class="field-container" id="pressure" title="Barometric pressure."
						data-field="<?php echo fieldEnum::Calc_Barometer;?>"
						data-sender="<?php echo PROCESSOR_ID;?>"
						data-instance="<?php echo PROCESSOR_INSTANCE;?>">
						&nbsp;
					</div>
				</div>
				<div>See <a href="/barometer.php">Barometer page</a> for pressure trends.</div>
			</div>
		</div>
	</div>
	
	<!--Buttons-->
	<div class="button-box" id="button-container">
		<div class="box">
			<a id="ok-button" class="button button-gray button-medium">OK</a>
			<a id="cancel-button" class="button button-gray button-medium">Cancel</a>
			<a id="apply-button" class="button button-gray button-medium">Apply</a>
		</div>
	</div>
</section>

<script type="text/javascript" src="/js/atp.environment.js" defer></script>
<script>
$(document).ready(function() {
	var model = new EnvironmentSensorModel();
	var controller = new EnvironmentSensorController(model);
	var view = new EnvironmentSensorView(controller);
});
</script>

<?php require_once "footer.php"; ?>
