<commit_before>#include "temp_tortuga.h"

TempTortugaNode::TempTortugaNode(int argc, char **argv, int rate) : TortugaNode() {
    ros::Rate loop_rate(rate);

    ROS_DEBUG("Opening sensorboard");
    sensor_file = "/dev/sensor";
    fd = openSensorBoard(sensor_file.c_str());
    ROS_DEBUG("Opened sensorboard with fd %d.", fd);
    checkError(syncBoard(fd));
    ROS_DEBUG("Synced with the Board");

    for(int i = 0; i < NUM_TEMP_SENSORS; i++) {
        publishers[i] = n.advertise<ram_msgs::Temp>("qubo/temp" + i, 1000);             
    }

} 

TempTortugaNode::TempTortugaNode(int argc, char **argv, int rate, int board_fd, std::string board_file) : TortugaNode() {
    fd = board_fd;
    sensor_file = board_file;

}

TempTortugaNode::~TempTortugaNode() {}

void TempTortugaNode::update() {
	unsigned char temps[NUM_TEMP_SENSORS];
	readTemp(fd, temps);
    for(int i = 0; i < NUM_TEMP_SENSORS; i++) {
    	msg.temp = temps[i];
    }

    publisher.publish(msg);

	ros::spinOnce(); //magic method always included in update
}
<commit_msg>Modified temp sensor to allow for multiple publishers to publish messages<commit_after>#include "temp_tortuga.h"

TempTortugaNode::TempTortugaNode(int argc, char **argv, int rate) : TortugaNode() {
    ros::Rate loop_rate(rate);

    ROS_DEBUG("Opening sensorboard");
    sensor_file = "/dev/sensor";
    fd = openSensorBoard(sensor_file.c_str());
    ROS_DEBUG("Opened sensorboard with fd %d.", fd);
    checkError(syncBoard(fd));
    ROS_DEBUG("Synced with the Board");

    for(int i = 0; i < NUM_TEMP_SENSORS; i++) {
        publishers[i] = n.advertise<ram_msgs::Temp>("qubo/temp" + i, 1000);             
    }

} 

TempTortugaNode::TempTortugaNode(int argc, char **argv, int rate, int board_fd, std::string board_file) : TortugaNode() {
    fd = board_fd;
    sensor_file = board_file;

}

TempTortugaNode::~TempTortugaNode() {}

void TempTortugaNode::update() {
	unsigned char temps[NUM_TEMP_SENSORS];
	readTemp(fd, temps);
    for(int i = 0; i < NUM_TEMP_SENSORS; i++) {
    	msg.temp = temps[i];
        publishers[i].publish(msg);
    }

	ros::spinOnce(); //magic method always included in update
}

{'fraction_non_alphanumeric': 0.14411901441190145, 'fraction_numerical': 0.005578800557880056, 'mean_word_length': 4.004651162790697, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '6267153', 'n_tokens_mistral': 798, 'n_tokens_neox': 768, 'n_words': 164}