<commit_before>function waitForMsg(){
	if (window.disableUpdates) {
		return false;
	}
	jQuery.ajax({
		type: 'GET',
		url: '/getstatus',
		dataType: 'json',
		async: true,
		cache: false,
		timeout:5000,
		success: function(data){
			if(data == null) 
				return;
		
			$.each(data, function(key, val) {
				vessel = key;
				
				if (vessel == "brewday") {
					checkTimer(val, "mash");
					checkTimer(val, "sparge");
					checkTimer(val, "boil");
					checkTimer(val, "chill");
				}
				
				if(vessel == "pumps") {
					$.each(val, function (pumpName, pumpStatus) {
						//enable or disable the pump as required
						if (pumpStatus) {
							jQuery('button[id^="' + pumpName + '"]')[0].style.background="red";
							jQuery('button[id^="' + pumpName + '"]')[0].innerHTML= pumpName +" ON";
						} else {
							jQuery('button[id^="' + pumpName + '"]')[0].style.background="#666666";
							jQuery('button[id^="' + pumpName + '"]')[0].innerHTML= pumpName +" OFF";
						}
					})
					return true;
				}

				if(window.disableUpdates) {
					return false;
				}
				temp = parseFloat(val.temp).toFixed(2);
				
				// check to see if we have a valid vessel
				if (isNaN(temp)) {
					return true;
				}

				scale = val.scale;

				// set the current temp scale
				Temp = parseFloat(temp).toFixed(2);
				int = Math.floor(Temp);
				dec = Temp % 1;
				dec = dec.toString().substr(1,3);
				GaugeDisplay[vessel].setValue(pad(int, 3, 0) + "" + dec);
				jQuery("#"+vessel+"-tempStatus").text(temp);
				// cleanup
				dec = null;
				temp = null;
				Temp = null;
				
				// Check for an error message
				if ("errorMessage" in val) {
					jQuery("#" + vessel + "-error").text(val.errorMessage);
					jQuery("#" + vessel + "-error").show();
				} else {
					jQuery("#" + vessel + "-error").hide();
				}
				
				// Check for the volume
				if ("volume" in val) {
					jQuery("#" + vessel + "-volume").text(parseFloat(val.volume).toFixed(2) + " " + val.volumeUnits);
				}
				
				if(!("gpio" in val )) {
					return; // nothing else to do
				}

				// setup the values
				var mode = val.mode.charAt(0).toUpperCase() + val.mode.slice(1);
				if (Window.mode != mode ) {
				
					if(mode== "Off") {
						selectOff(vessel);
					}
					if(mode == "Auto") {
						selectAuto(vessel);
					}
					if(mode == "Manual") {
						selectManual(vessel);
					}
				}
				mode = null;
				if(val.actualduty != null) {
					Gauges[vessel].refresh(val.actualduty); 				
				} else {
					Gauges[vessel].refresh(val.duty); 
				}

			
				jQuery('div[id="tempUnit"]').text(val.scale);
				jQuery('input[name="'+vessel+'-dutycycle"]').val(val.duty);
				jQuery('input[name="'+vessel+'-cycletime"]').val(val.cycle);
				jQuery('input[name="'+vessel+'-setpoint"]').val(val.setpoint);
				jQuery('input[name="'+vessel+'-p"]').val(val.p);
				jQuery('input[name="'+vessel+'-i"]').val(val.i);
				jQuery('input[name="'+vessel+'-d"]').val(val.k);
				
				// Aux Mode check
				if ("auxStatus" in val) {
					if (val.auxStatus == "on") {
						jQuery("button[id='" + vessel + "Aux'")[0].style.background = "red";
						jQuery("button[id='" + vessel + "Aux'")[0].innerHTML = "Aux ON"
					} else {<commit_msg>Fix Reading the Aux Value<commit_after>function waitForMsg(){
	if (window.disableUpdates) {
		return false;
	}
	jQuery.ajax({
		type: 'GET',
		url: '/getstatus',
		dataType: 'json',
		async: true,
		cache: false,
		timeout:5000,
		success: function(data){
			if(data == null) 
				return;
		
			$.each(data, function(key, val) {
				vessel = key;
				
				if (vessel == "brewday") {
					checkTimer(val, "mash");
					checkTimer(val, "sparge");
					checkTimer(val, "boil");
					checkTimer(val, "chill");
				}
				
				if(vessel == "pumps") {
					$.each(val, function (pumpName, pumpStatus) {
						//enable or disable the pump as required
						if (pumpStatus) {
							jQuery('button[id^="' + pumpName + '"]')[0].style.background="red";
							jQuery('button[id^="' + pumpName + '"]')[0].innerHTML= pumpName +" ON";
						} else {
							jQuery('button[id^="' + pumpName + '"]')[0].style.background="#666666";
							jQuery('button[id^="' + pumpName + '"]')[0].innerHTML= pumpName +" OFF";
						}
					})
					return true;
				}

				if(window.disableUpdates) {
					return false;
				}
				temp = parseFloat(val.temp).toFixed(2);
				
				// check to see if we have a valid vessel
				if (isNaN(temp)) {
					return true;
				}

				scale = val.scale;

				// set the current temp scale
				Temp = parseFloat(temp).toFixed(2);
				int = Math.floor(Temp);
				dec = Temp % 1;
				dec = dec.toString().substr(1,3);
				GaugeDisplay[vessel].setValue(pad(int, 3, 0) + "" + dec);
				jQuery("#"+vessel+"-tempStatus").text(temp);
				// cleanup
				dec = null;
				temp = null;
				Temp = null;
				
				// Check for an error message
				if ("errorMessage" in val) {
					jQuery("#" + vessel + "-error").text(val.errorMessage);
					jQuery("#" + vessel + "-error").show();
				} else {
					jQuery("#" + vessel + "-error").hide();
				}
				
				// Check for the volume
				if ("volume" in val) {
					jQuery("#" + vessel + "-volume").text(parseFloat(val.volume).toFixed(2) + " " + val.volumeUnits);
				}
				
				if(!("gpio" in val )) {
					return; // nothing else to do
				}

				// setup the values
				var mode = val.mode.charAt(0).toUpperCase() + val.mode.slice(1);
				if (Window.mode != mode ) {
				
					if(mode== "Off") {
						selectOff(vessel);
					}
					if(mode == "Auto") {
						selectAuto(vessel);
					}
					if(mode == "Manual") {
						selectManual(vessel);
					}
				}
				mode = null;
				if(val.actualduty != null) {
					Gauges[vessel].refresh(val.actualduty); 				
				} else {
					Gauges[vessel].refresh(val.duty); 
				}

			
				jQuery('div[id="tempUnit"]').text(val.scale);
				jQuery('input[name="'+vessel+'-dutycycle"]').val(val.duty);
				jQuery('input[name="'+vessel+'-cycletime"]').val(val.cycle);
				jQuery('input[name="'+vessel+'-setpoint"]').val(val.setpoint);
				jQuery('input[name="'+vessel+'-p"]').val(val.p);
				jQuery('input[name="'+vessel+'-i"]').val(val.i);
				jQuery('input[name="'+vessel+'-d"]').val(val.k);
				
				// Aux Mode check
				if ("auxStatus" in val) {
					if (val.auxStatus == "on" || val.auxStatus == "1") {
						jQuery("button[id='" + vessel + "Aux'")[0].style.background = "red";
						jQuery("button[id='" + vessel + "Aux'")[0].innerHTML = "Aux ON"
					} else {
{'fraction_non_alphanumeric': 0.20326086956521738, 'fraction_numerical': 0.008229813664596273, 'mean_word_length': 2.6104260089686098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7567514', 'n_tokens_mistral': 3063, 'n_tokens_neox': 2254, 'n_words': 428}