<commit_before>#include <msp430g2553.h>
#include <stdio.h>


// Two pieces of hardware
// The heating and cooling unit
// Window limit switch.
/*
	Window sensor open or closed (reed switch)
	window turns on/off the temperature control unit. 

	Send rain flag to bluetooth unit
		Triggers alarm

	Temperature controller turns a fan on or off

	Feed in temperature data to system from the internet

	Heating/Cooling unit

	Tasks - Weather Controller
		Temp, simple weather
	Bluetooth,
	State machine for temperature. 


	
	

*/


// State variables
volatile unsigned char state = 'I'; // Fan on or off. I is off, O is on. 
volatile unsigned char mode = 'C'; // States for heating and cooling. C is cool, H is heat
volatile unsigned char weather = 'S'; // Weather which is sent to the MSP


// Definitions
#define ROOM_TEMPERATURE 70


// Initialization function
void init_button(void);
void init_WDT(void);

// control handlers
void temperature_controller(unsigned int temperature);

int main(void){

	// 1 Mhz calibration for SMCLK clock
	BCSCTL1 = CALBC1_1MHZ;
    DCOCTL  = CALDCO_1MHZ;<commit_msg>defined temp<commit_after>#include <msp430g2553.h>
#include <stdio.h>


// Two pieces of hardware
// The heating and cooling unit
// Window limit switch.
/*
	Window sensor open or closed (reed switch)
	window turns on/off the temperature control unit. 

	Send rain flag to bluetooth unit
		Triggers alarm

	Temperature controller turns a fan on or off

	Feed in temperature data to system from the internet

	Heating/Cooling unit

	Tasks - Weather Controller
		Temp, simple weather
	Bluetooth,
	State machine for temperature. 


	
	

*/


// State variables
volatile unsigned char state = 'I'; // Fan on or off. I is off, O is on. 
volatile unsigned char mode = 'C'; // States for heating and cooling. C is cool, H is heat
volatile unsigned char weather = 'S'; // Weather which is sent to the MSP
volatile unsigned char temperature = 0x46;


// Definitions
#define ROOM_TEMPERATURE 70


// Initialization function
void init_button(void);
void init_WDT(void);

// control handlers
void temperature_controller(unsigned int temperature);

int main(void){

	// 1 Mhz calibration for SMCLK clock
	BCSCTL1 = CALBC1_1MHZ;
    DCOCTL  = CALDCO_1MHZ;
{'fraction_non_alphanumeric': 0.07321428571428572, 'fraction_numerical': 0.013839285714285714, 'mean_word_length': 3.5922131147540983, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5955449', 'n_tokens_mistral': 729, 'n_tokens_neox': 648, 'n_words': 287}