<commit_before>// standard
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>

// for hubo
#include "hubo.h"
#include "hubo-jointparams.h"

// for ach
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <unistd.h>
#include <pthread.h>
#include <ctype.h>
#include <stdbool.h>
#include <math.h>
#include <inttypes.h>
#include "ach.h"

//set number of parameters per joint in the parameters file
#define	NUM_OF_PARAMETERS 13

//set file location
char *fileLocation = "/etc/hubo-daemon/joint.table";

// ach channels
ach_channel_t chan_hubo_state;    // hubo-ach-state


int setJointParams(struct hubo_param *H) {
//	char *envVar = getenv("HUBO_JOINT_TABLE");
//	printf("%s\n", envVar);
//	if(strcmp(envVar, fileLocation) != 0) exit(EXIT_FAILURE);

        FILE *ptr_file;

        // open file and if fails, return 1
        if (!(ptr_file=fopen(fileLocation, "r")))
                return 1;

        struct hubo_joint_param tp;                     //instantiate hubo_jubo_param struct
	struct jmcDriver tp2;<commit_msg>Fixed mistake<commit_after>// standard
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>

// for hubo
#include "hubo.h"
#include "hubo-jointparams.h"

// for ach
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <unistd.h>
#include <pthread.h>
#include <ctype.h>
#include <stdbool.h>
#include <math.h>
#include <inttypes.h>
#include "ach.h"

//set number of parameters per joint in the parameters file
#define	NUM_OF_PARAMETERS 13

//set file location
char *fileLocation = "/etc/hubo-daemon/joint.table";

// ach channels
ach_channel_t chan_hubo_ref;
ach_channel_t chan_hubo_init_cmd;
ach_channel_t chan_hubo_state;    // hubo-ach-state


int setJointParams(struct hubo_param *H) {
//	char *envVar = getenv("HUBO_JOINT_TABLE");
//	printf("%s\n", envVar);
//	if(strcmp(envVar, fileLocation) != 0) exit(EXIT_FAILURE);

        FILE *ptr_file;

        // open file and if fails, return 1
        if (!(ptr_file=fopen(fileLocation, "r")))
                return 1;

        struct hubo_joint_param tp;                     //instantiate hubo_jubo_param struct
	struct jmcDriver tp2;
{'fraction_non_alphanumeric': 0.14164051994621246, 'fraction_numerical': 0.005378753922008068, 'mean_word_length': 3.5182186234817814, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '2606057', 'n_tokens_mistral': 856, 'n_tokens_neox': 828, 'n_words': 204}