<root>
<document scada='0' schema='102' license='1,mnfisher,5YZWG2' title='' description='' fcversion='524802' target='ARD.ATMEGA.Arduino Nano 328' >
	<config data='' clkspd='16000000' simspd='1' usewdt='0' constif='0' commport='3' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='7dbd43e9-1458-4378-8bd3-58c7600b37b9' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties >
				<property name='bme680' target='bme_i2c' typeid='21' hidden='0' locked='0' hexview='1' info='' />
			</properties>
			<values >
				<value target='bme_i2c' data='119' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Ctrl_hum' type='s16' description='Oversampling for humiditty' isconst='1' isinit='1' usrinit='114' setinit='0x72' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sensor' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='13' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Config' type='s16' description='' isconst='1' isinit='1' usrinit='117' setinit='0x75' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Gas_wait' type='s16' description='' isconst='1' isinit='1' usrinit='100' setinit='0x64' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Ctrl_meas' type='s16' description='' isconst='1' isinit='1' usrinit='116' setinit='0x74' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='t_fine' type='s32' description='Temperature data for compensation' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Res_heat' type='s16' description='' isconst='1' isinit='1' usrinit='90' setinit='0x5a' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='coefficients' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='42' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Reset' description='Force a soft reset of BME680' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='0xE0' />
							<argument exp='0xB6' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='12632064' exp='10' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTempInt' description='' >
						<return name='Return' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp_adc' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='par_t1' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='par_t2' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='par_t3' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='Read buffer for data' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</local>
						<local name='var_1' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='var_2' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='var_3' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t_fine' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.par_t1 = GetUINT (33,34)' />
							<exp exp='.par_t2 = GetINT (1,2)' />
							<exp exp='.par_t3 = GetINT8 (3)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.par_t1 = GetUINT (0xE9,0xEA)' />
							<exp exp='.par_t2 = GetINT (0x8A,0x8B)' />
							<exp exp='.par_t3 = GetINT8 (0x8C)' />
						</command>
						<command class_type='calculation' title='Get temp adc - different byte order to LSB' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.temp_adc = sensor[3]' />
							<exp exp='.temp_adc = (.temp_adc &lt;&lt; 8) + sensor[4]' />
							<exp exp='.temp_adc = (.temp_adc &lt;&lt; 4) + (sensor[5] &gt;&gt; 4)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.var_1 = (.temp_adc &gt;&gt; 3) - (.par_t1 &lt;&lt; 1)' />
							<exp exp='.var_2 = (.var_1 * .par_t2) &gt;&gt; 11' />
							<exp exp='.var_3 = (((.var_1 &gt;&gt; 1) * (.var_1 &gt;&gt; 1)) &gt;&gt; 12) * (.par_t3 &lt;&lt; 4) &gt;&gt; 14' />
							<exp exp='.t_fine = .var_2 + .var_3' />
							<exp exp='' />
							<exp exp='t_fine = .t_fine' />
							<exp exp='.Return = ((.t_fine * 5) + 128) &gt;&gt; 8' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='CoeffAddr' description='Returns the address of a calibration coefficient in the buffer,' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='16734039' cmdcolor_sec='16734039' exp='.addr &gt;= 0xE1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
									<exp exp='.Return = (.addr - 0xE1) + 25' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
									<exp exp='.Return = .addr - 0x89' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='pf' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='desc' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='x' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='tstr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
							<argument exp='.desc' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.tstr = FloatToString$ (.x)' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
							<argument exp='.tstr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
							<argument exp='&quot;\r\n&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialisation' description='' >
						<return name='Return' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='12632064' exp='1' type='2' />
						<command class_type='call' title='Initiialise i2c bus' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Init' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetCalibrationData' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Get12bit' description='Read a 12 bit &lt;7:4&gt; coefficient' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='lsb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='msb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.lsb' />
							<argument exp='.lsb' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.msb' />
							<argument exp='.msb' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = coefficients[.msb]' />
							<exp exp='.Return = (.Return &lt;&lt; 4) + (coefficients[.lsb] &gt;&gt; 4)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadSensor' description='Force the sensor to to TPHG reading
Gas is only run if SetGasProfile(n, true) has been used to enable' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='status' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='Ctrl_meas' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Ctrl_meas' />
							<argument exp='.d | 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='16734039' cmdcolor_sec='16734039' type='1' exp='.status = 128' start='0' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
									<return exp='.status' />
									<argument exp='0x1D' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendNumber' >
									<argument exp='.status' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendChar' >
									<argument exp='&apos; &apos;' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='12632064' exp='1' type='1' />
							</flowline>
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadBytes' >
							<argument exp='0x1F' />
							<argument exp='13' />
							<argument exp='sensor' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetINT8' description='Get a 8 bit int from calibration coefficients - need to sign extend (FC byte is unsigned)' >
						<return name='Return' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='offset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='f' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.offset' />
							<argument exp='.offset' />
						</command>
						<command class_type='native' title='C Code' ccode='MX_SINT8 val;
val = FCV_COEFFICIENTS[FCL_OFFSET];
FCR_RETVAL = val;  // Sign extend' cmdcolor='16760832' cmdcolor_sec='16760832' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Altitude' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='sea_level' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='pressure' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetPressure' >
							<return exp='.pressure' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.pressure = .pressure / 100.0' />
							<exp exp='.Return = 44330 * (1.0 - pow (.pressure / .sea_level,0.1903))' />
							<exp exp='// return 44330.0 * (1.0 - pow(atmospheric / seaLevel, 0.1903));' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SendByte' description='Send a single byte to RTC chip' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='Address to control register' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='data to send' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='bme_i2c &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.data' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GetGasResistance' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='gadc' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='r_err' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='err' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='range' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='l1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='l2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.gadc = (sensor[11] &lt;&lt; 2) + (sensor[12] &gt;&gt; 6)' />
							<exp exp='.range = sensor[12] &amp; 0b1111' />
							<exp exp='.adc = .gadc' />
						</command>
						<command class_type='call' title='Range error (4 bit signed)' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.r_err' />
							<argument exp='0x04' />
						</command>
						<command class_type='native' title='C Code' ccode='MX_SINT8 x = FCL_R_ERR;
x = x &gt;&gt; 4;
FCL_ERR = x;
MX_FLOAT L1[16] = {1.0,1.0,1.0,1.0,1.0,0.99,1.0,0.992,1.0,1.0,0.998,0.995,1.0,0.99,1.0,1.0};
MX_FLOAT L2[16] = {8000000.0,4000000.0,2000000.0,499500.4995,248262.1648,125000.0,63004.03226,31281.28128,15625.0,7812.5,3906.25,1953.125,976.5625,488.28125,244.140625};
FCL_L1 = L1[FCL_RANGE];
FCL_L2 = L2[FCL_RANGE];' cmdcolor='16760832' cmdcolor_sec='16760832' language='C' />
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = (1340.0 + (5.0 * .err)) * .l1' />
							<exp exp='.v2 = (.v1 * .l2) / (.adc - 512.0 + .v1)' />
							<exp exp='.Return = .v2' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='16734039' cmdcolor_sec='16734039' exp='.Return &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
									<exp exp='.Return = .Return + (1 &lt;&lt; 32)' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetCalibrationData' description='Read the calibration data frm the BME68 atstartup..' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadBytes' >
							<argument exp='0x89' />
							<argument exp='25' />
							<argument exp='coefficients' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadBytes' >
							<argument exp='0xE1' />
							<argument exp='16' />
							<argument exp='coefficients' />
							<argument exp='25' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetGasResInt' description='Integer only version of gas sensor resistance routine' >
						<return name='Return' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='gas_range' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='gas_adc' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='lu1' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='lu2' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='range_switching_error' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v1' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v2' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v3' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='res' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.gas_adc = (sensor[11] &lt;&lt; 2) + (sensor[12] &gt;&gt; 6)' />
							<exp exp='.gas_range = sensor[12] &amp; 0b1111' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='0x04' />
						</command>
						<command class_type='native' title='C Code' ccode='MX_UINT32 lu2[] = {4096000000, 2048000000, 1024000000, 512000000, 255744255, 127110228, 64000000, 32258064,16016016, 8000000, 4000000, 2000000, 1000000, 500000, 250000, 125000};
MX_UINT32 lu1[] = {2147483647, 2147483647, 2147483647, 2147483647,2147483647, 2126008810, 2147483647, 2130303777, 2147483647,2147483647, 
2143188679, 2136746228, 2147483647, 2126008810, 2147483647, 2147483647};
FCL_LU1 = lu1[FCL_GAS_RANGE];
FCL_LU2 = lu2[FCL_GAS_RANGE];

MX_SINT8 x = FCL_D &gt;&gt; 4;    // Use an arithmetic (signed) right shift
FCL_RANGE_SWITCHING_ERROR = x;   // Extend to 16 bits signed' cmdcolor='16760832' cmdcolor_sec='16760832' language='C' />
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;LU1 = &quot;' />
							<argument exp='.lu1' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;LU2 = &quot;' />
							<argument exp='.lu2' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;Gas ADC &quot;' />
							<argument exp='.gas_adc' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = ((1340 + (5 * .range_switching_error)) * (.lu1)) &gt;&gt; 16' />
							<exp exp='.v2 = (((.gas_adc &lt;&lt; 15) - 16777216) + .v1)' />
							<exp exp='.v3 = ((.lu2 * .v1) &gt;&gt; 9)' />
							<exp exp='.res = ((.v3 + (.v2 &gt;&gt; 1)) / .v2)' />
							<exp exp='.Return = .res' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;V1 &quot;' />
							<argument exp='.v1' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;V2 = &quot;' />
							<argument exp='.v2' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;v3  &quot;' />
							<argument exp='.v3' />
						</command>
						<command class_type='call' title='Call Macro' disable='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
							<argument exp='&quot;Res  &quot;' />
							<argument exp='.res' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetHumidity' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='temp_comp' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h4' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h5' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h6' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='h7' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='hadc' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='8' />
						</local>
						<local name='v1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v4' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.h1 = Get12bit (26,27)' />
							<exp exp='.h2 = Get12bit (26,25)' />
							<exp exp='.h3 = GetINT8 (28)' />
							<exp exp='.h4 = GetINT8 (29)' />
							<exp exp='.h5 = GetINT8 (30)' />
							<exp exp='.h6 = GetUINT8 (31)' />
							<exp exp='.h7 = GetINT8 (32)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.h1 = Get12bit (0xE2,0xE3)' />
							<exp exp='.h2 = Get12bit (0xE2,0xE1)' />
							<exp exp='.h3 = GetINT8 (0xE4)' />
							<exp exp='.h4 = GetINT8 (0xE5)' />
							<exp exp='.h5 = GetINT8 (0xE6)' />
							<exp exp='.h6 = GetUINT8 (0xE7)' />
							<exp exp='.h7 = GetINT8 (0xE8)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.adc = (sensor[6] &lt;&lt; 8) + sensor[7]' />
							<exp exp='.hadc = .adc' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = .hadc - ((.h1 * 16.0) + ((.h3 / 2.0) * .temp_comp))' />
							<exp exp='.v2 = .v1 * ((.h2 / 262144.0) * (1.0 + ((.h4 / 16384.0) * .temp_comp) + (((.h5 / 1048576.0) * .temp_comp * .temp_comp))))' />
							<exp exp='.v3 = .h6 / 16384.0' />
							<exp exp='.v4 = .h7 / 2097152.0' />
							<exp exp='.Return = .v2 + ((.v3 + (.v4 * .temp_comp)) * .v2 * .v2)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetGasProfile' description='Select gas sensor profile to use (0..9)' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='n' type='u8' description='Profile (0..9)' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='run_gas' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Ctrl_gas_0' type='s16' description='' isconst='1' isinit='1' usrinit='112' setinit='0x70' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='gas' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='.Ctrl_gas_0 + 1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.d = .d | (.run_gas &lt;&lt; 4)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='.Ctrl_gas_0 + 1' />
							<argument exp='.d' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='.Ctrl_gas_0' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetIIRFilter' description='Set the temperature sensore IIR filter coefficient' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='coeff' type='u8' description='0=0, 1=1, 2=3, 3=7, 4=15, 5=31, 6=63, 7=127' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='Config' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.d = .d &amp; 0b11100011' />
							<exp exp='.d = .d | ((.coeff &amp; 0b111) &lt;&lt; 2)' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Config' />
							<argument exp='.d' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetOversampling' description='Set the over sampling rates
0 = skip, 1 = 1x, 2 = 2x, 3 = 4x, 4=8x, 5=16x' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='humidity' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='temperature' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='pressure' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='c_hum' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='c_meas' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.c_hum' />
							<argument exp='Ctrl_hum' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.c_meas' />
							<argument exp='Ctrl_meas' />
						</command>
						<command class_type='calculation' title='Get a 3 bit value for each oversampling rate' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.humidity = .humidity &amp; 0b111' />
							<exp exp='.temperature = (.temperature &amp; 0b111) &lt;&lt; 5' />
							<exp exp='.pressure = (.pressure &amp; 0b111) &lt;&lt; 2' />
							<exp exp='.c_hum = .c_hum | .humidity' />
							<exp exp='.c_meas = (.c_meas &amp; 0b11) | .temperature | .pressure' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Ctrl_hum' />
							<argument exp='.c_hum' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Ctrl_meas' />
							<argument exp='.c_meas' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ResHeat' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='target_temp' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='ambient_temp' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='rh_val' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='g3' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v1' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v2' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v3' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v4' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='v5' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='rhx100' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='rhx' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='g2' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='g1' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='rh_range' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='0' />
						</command>
						<command class_type='native' title='C Code' ccode='MX_SINT8 x;
x = FCL_D;
FCL_RH_VAL = x;' cmdcolor='16760832' cmdcolor_sec='16760832' language='C' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.d' />
							<argument exp='0x02' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.rh_range = (.d &gt;&gt; 4) &amp; 0b11' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.g1 = GetINT8 (37)' />
							<exp exp='.g2 = GetINT (35,36)' />
							<exp exp='.g3 = GetINT8 (38)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = ((.ambient_temp * .g3) / 1000) &lt;&lt; 8' />
							<exp exp='.v2 = (.g1 + 784) * (((((.g2 + 154009) * .target_temp * 5) / 100) + 3276800) / 10)' />
							<exp exp='.v3 = .v1 + (.v2 &gt;&gt; 1)' />
							<exp exp='.v4 = (.v3 / (.rh_range + 4))' />
							<exp exp='.v5 = (131 * .rh_val) + 65536' />
							<exp exp='.rhx100 = (((.v4 / .v5) - 250) * 34)' />
							<exp exp='.rhx = ((.rhx100 + 50) / 100)' />
							<exp exp='.Return = .rhx' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetUINT' description='' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='lsb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='msb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.lsb' />
							<argument exp='.lsb' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.msb' />
							<argument exp='.msb' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = coefficients[.msb]' />
							<exp exp='.Return = (.Return &lt;&lt; 8) + coefficients[.lsb]' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='HeaterDuration' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='ms' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='f' type='u8' description='Multiplication factor' isconst='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='loop' title='Loop' cmdcolor='16734039' cmdcolor_sec='16734039' type='0' exp='.ms &gt; 0x3f' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
									<exp exp='.ms = .ms / 4' />
									<exp exp='.f = .f + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = (.f &lt;&lt; 6) | .ms' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetPressure' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p_comp' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p4' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p5' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p6' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p7' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p8' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p9' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p10' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='p_adc' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='temp' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Get calibration coefficients' disable='1' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.p1 = GetUINT (5,6)' />
							<exp exp='.p2 = GetINT (7,8)' />
							<exp exp='.p3 = GetINT8 (9)' />
							<exp exp='.p4 = GetINT (11,12)' />
							<exp exp='.p5 = GetINT (13,14)' />
							<exp exp='.p6 = GetINT8 (16)' />
							<exp exp='.p7 = GetINT8 (15)' />
							<exp exp='.p8 = GetINT (19,20)' />
							<exp exp='.p9 = GetINT (21,22)' />
							<exp exp='.p10 = GetUINT8 (23)' />
						</command>
						<command class_type='calculation' title='Get calibration coefficients' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.p1 = GetUINT (0x8E,0x8F)' />
							<exp exp='.p2 = GetINT (0x90,0x91)' />
							<exp exp='.p3 = GetINT8 (0x92)' />
							<exp exp='.p4 = GetINT (0x94,0x95)' />
							<exp exp='.p5 = GetINT (0x96,0x97)' />
							<exp exp='.p6 = GetINT8 (0x99)' />
							<exp exp='.p7 = GetINT8 (0x98)' />
							<exp exp='.p8 = GetINT (0x9C,0x9D)' />
							<exp exp='.p9 = GetINT (0x9E,0x9F)' />
							<exp exp='.p10 = GetUINT8 (0xA0)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.temp = sensor[0]' />
							<exp exp='.temp = (.temp &lt;&lt; 8) + sensor[1]' />
							<exp exp='.temp = (.temp &lt;&lt; 4) + (sensor[2] &gt;&gt; 4)' />
							<exp exp='.p_adc = .temp' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = (t_fine / 2.0) - 64000.0' />
							<exp exp='.v2 = .v1 * .v1 * (.p6 / 131072.0)' />
							<exp exp='.v2 = .v2 + (.v1 * .p5 * 2.0)' />
							<exp exp='.v2 = (.v2 / 4.0) + (.p4 * 65536.0)' />
							<exp exp='.v1 = (((.p3 * .v1 * .v1) / 16384.0) + (.p2 * .v1)) / 524288.0' />
							<exp exp='.v1 = (1.0 + (.v1 / 32768.0)) * .p1' />
							<exp exp='.p_comp = 1048576.0 - .p_adc' />
							<exp exp='.p_comp = ((.p_comp - (.v2 / 4096.0)) * 6250.0) / .v1' />
							<exp exp='.v1 = (.p9 * .p_comp * .p_comp) / 2147483648.0' />
							<exp exp='.v2 = .p_comp * (.p8 / 32768.0)' />
							<exp exp='.v3 = (.p_comp / 256.0) * (.p_comp / 256.0) * (.p_comp / 256.0) * (.p10 / 131072.0)' />
							<exp exp='.p_comp = .p_comp + (.v1 + .v2 + .v3 + (.p7 * 128.0)) / 16.0' />
							<exp exp='.Return = .p_comp' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetINT' description='' >
						<return name='Return' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='lsb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='msb' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.msb' />
							<argument exp='.msb' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = coefficients[.msb]' />
							<exp exp='.Return = (.Return &lt;&lt; 8) + coefficients[.lsb]' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadByte' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u8' description='Address of control register to read' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='bme_i2c &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='(bme_i2c &lt;&lt; 1)| 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_RxByte' >
							<return exp='.Return' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='GetTempFloat' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='temp_adc' type='s32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='Read buffer for data' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='7' />
						</local>
						<local name='t_fine' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='t1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='t2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='t3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v1' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v2' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='v3' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='tfine' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='adc' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='vtemp' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' disable='1' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.t1 = GetUINT (33,34)' />
							<exp exp='.t2 = GetINT (1,2)' />
							<exp exp='.t3 = GetINT8 (3)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.t1 = GetUINT (0xE9,0xEA)' />
							<exp exp='.t2 = GetINT (0x8A,0x8B)' />
							<exp exp='.t3 = GetINT8 (0x8C)' />
						</command>
						<command class_type='calculation' title='Get temp adc - different byte order to LSB' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.temp_adc = sensor[3]' />
							<exp exp='.temp_adc = (.temp_adc &lt;&lt; 8) + sensor[4]' />
							<exp exp='.temp_adc = (.temp_adc &lt;&lt; 4) + (sensor[5] &gt;&gt; 4)' />
							<exp exp='.adc = .temp_adc' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.v1 = ((.adc / 16384.0) - (.t1 / 1024.0)) * .t2' />
							<exp exp='.vtemp = (.adc / 131072.0) - (.t1 / 8192.0)' />
							<exp exp='.v2 = .vtemp * .vtemp' />
							<exp exp='.v2 = .v2 * (.t3 * 16.0)' />
							<exp exp='' />
							<exp exp='.tfine = .v1 + .v2' />
							<exp exp='' />
							<exp exp='.Return = .tfine / 5120.0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetCalibInt' description='' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='d' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<local name='x' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadBytes' >
							<argument exp='.addr' />
							<argument exp='2' />
							<argument exp='.d' />
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = .d[1]' />
							<exp exp='.Return = (.Return &lt;&lt; 8) + .d[0]' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetGasSensor' description='Set a gas sensor (n = 0..9) to temp and duration
' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='n' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='temp' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='duration' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='ambient' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='h_res' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='h_time' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='HeaterDuration' >
							<return exp='.h_time' />
							<argument exp='.duration' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ResHeat' >
							<return exp='.h_res' />
							<argument exp='.temp' />
							<argument exp='.ambient' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Res_heat + .n' />
							<argument exp='.h_res' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Res_heat + .n' />
							<argument exp='119' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SendByte' >
							<argument exp='Gas_wait + .n' />
							<argument exp='.h_time' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadBytes' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='addr' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='n' type='u8' description='Number of bytes to read' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='data' type='u8' description='Bytes read from RTC' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='3' />
						</param>
						<param name='offset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='bme_i2c &lt;&lt; 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='.addr' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Restart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_TxByte' >
							<argument exp='(bme_i2c &lt;&lt; 1) | 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='16734039' cmdcolor_sec='16734039' type='2' forvar='.i' exp='.n' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_RxByte' >
									<return exp='.data[.i + .offset]' />
									<argument exp='.i == .n - 1' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='cal_i2c1' macro='Master_Stop' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='id' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='temperature' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='tfloat' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='tstr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='humidity' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='pressure' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='height' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='resistance' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='i' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='status' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='power' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='Initialise' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='Initialisation' />
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
							<argument exp='&quot;BME 680 id = &quot;' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadByte' >
							<return exp='.id' />
							<argument exp='0xD0' />
						</command>
						<command class_type='call' title='Display value 97 :-)' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendNumber' >
							<argument exp='.id' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
							<argument exp='&quot; - done\r\n&quot;' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='Reset' />
						<command class_type='call' title='1' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SetOversampling' >
							<argument exp='2' />
							<argument exp='4' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SetGasSensor' >
							<argument exp='0' />
							<argument exp='320' />
							<argument exp='150' />
							<argument exp='21' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SetIIRFilter' >
							<argument exp='3' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='SetGasProfile' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='16734039' cmdcolor_sec='16734039' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='ReadSensor' />
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetTempFloat' >
									<return exp='.tfloat' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='49280' cmdcolor_sec='49280' >
									<exp exp='.tstr = FloatToString$ (.tfloat)' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
									<argument exp='&quot;Temp = &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
									<argument exp='.tstr' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
									<argument exp='&quot; GetTempInt = &quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetTempInt' >
									<return exp='.temperature' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendNumber' >
									<argument exp='.temperature' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='16711808' cmdcolor_sec='16711808' component='UART1' macro='SendString' >
									<argument exp='&quot;C\r\n&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetHumidity' >
									<return exp='.humidity' />
									<argument exp='.tfloat' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
									<argument exp='&quot;Humidity (%) &quot;' />
									<argument exp='.humidity' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetPressure' >
									<return exp='.pressure' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
									<argument exp='&quot;Pressure &quot;' />
									<argument exp='.pressure' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='Altitude' >
									<return exp='.height' />
									<argument exp='1013.25' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
									<argument exp='&quot;Height &quot;' />
									<argument exp='.height' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='GetGasResistance' >
									<return exp='.resistance' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='pf' >
									<argument exp='&quot;Resistance (ohm)&quot;' />
									<argument exp='.resistance' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='12632064' exp='8' type='2' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetUINT8' description='Get a UINT8 calibration coefficient ' >
						<return name='Return' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='offset' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='16711808' cmdcolor_sec='16711808' macro='CoeffAddr' >
							<return exp='.offset' />
							<argument exp='.offset' />
						</command>
						<command class_type='calculation' title='Need to sign extend (unsigned byte)' cmdcolor='49280' cmdcolor_sec='49280' >
							<exp exp='.Return = coefficients[.offset]' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='ed3a5141-43bb-43e0-86b0-2243fd1147ca' vmin='1' vmaj='2' codename='cal_i2c1' x='0' y='0' z='0' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='ENABLED' data='1' />
					<value target='REF' data='1' />
					<value target='CHANNEL' data='001' />
					<value target='Mode' data='000' />
					<value target='SDA' data='$PORTC.4' />
					<value target='SDAPins' data='000' />
					<value target='SCL' data='$PORTC.5' />
					<value target='SCLPins' data='000' />
					<value target='StopDel' data='1' />
					<value target='BAUD_LIST' data='001' />
					<value target='BAUD' data='100000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='ClockStretching' data='1' />
					<value target='BMODE' data='0' />
					<value target='SDA_PORT' data='$PORTC.4' />
					<value target='SDA_TRIS' data='$PORTC.4' />
					<value target='SDA_PIN' data='4' />
					<value target='SCL_PORT' data='$PORTC.5' />
					<value target='SCL_TRIS' data='$PORTC.5' />
					<value target='SCL_PIN' data='5' />
					<value target='MASTER' data='1' />
					<value target='ScopeTraces' data='1' />
					<value target='ConsoleData' data='1' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
					<value target='REMAPPABLE' data='' />
					<value target='SDABank' data='b' />
					<value target='SDABank2' data='c' />
					<value target='SCLBank' data='b' />
					<value target='SCLBank2' data='c' />
					<value target='SDARPNUM' data='21' />
					<value target='SCLRPNUM' data='20' />
					<value target='SDARPREG' data='SSP1DATPPS' />
					<value target='SCLRPREG' data='SSP1CLKPPS' />
					<value target='SDAREG' data='000' />
					<value target='SCLREG' data='001' />
					<value target='Sim' data='1' />
					<value target='ParentName' data='' />
					<value target='BitDelay' data='10' />
					<value target='SDAAlts' data='000' />
					<value target='SCLAlts' data='000' />
					<value target='SDAAlt' data='4' />
					<value target='SCLAlt' data='4' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='2' codename='UART1' x='0' y='0' z='10.765' xsz='64' ysz='32' zsz='1.53' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='001' />
					<value target='cal_uart::BAUD_LIST' data='004' />
					<value target='cal_uart::BAUD' data='9600' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='000' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTD.1' />
					<value target='cal_uart::OutputPins' data='007' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='1' />
					<value target='cal_uart::RX' data='$PORTD.0' />
					<value target='cal_uart::InputPins' data='013' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='0' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='ReadSensor' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='202' flags='0' />
		<view type='0' name='CoeffAddr' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='1298' flags='0' />
		<view type='0' name='SetGasProfile' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetGasSensor' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ResHeat' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='32' flags='0' />
		<view type='0' name='SendByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadByte' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='30' flags='0' />
		<view type='0' name='GetGasResInt' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='5' flags='0' />
		<view type='0' name='GetGasResistance' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetPressure' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Reset' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialisation' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Altitude' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetHumidity' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetUINT8' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetUINT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetINT8' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetINT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Get12bit' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetCalibrationData' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTempInt' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetTempFloat' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetCalibInt' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetIIRFilter' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='HeaterDuration' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadBytes' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetOversampling' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetPressure' mode='2' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetINT8' mode='2' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='pf' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA6wUAAFICAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
