<commit_before>/**
 * @file input_manager.h
 *
 * @brief      Functions to start and stop the input manager thread which is the
 *             translation beween control inputs from mavlink and DSM to the
 *             user_input struct which is read by the setpoint manager.
 */

#ifndef INPUT_MANAGER_H
#define INPUT_MANAGER_H

#include <fly_types.h>

/**
 * @brief      Starts an input manager thread.
 *
 *             Watch for new DSM data and translate into local user mode. Used
 *             in input_manager.c
 *
 * @param      user_input  The user input
 * @param      settings    The settings
 *
 * @return     0 on success, -1 on failure
 */
int start_input_manager(user_input_t* user_input, fly_settings_t* settings);

/**
 * @brief      Waits for the input manager thread to exit
 *
 *             This should only be called after the program flow state is set to
 *             EXITING as that's the only thing that will cause the thread to
 *             exit on its own safely. Used in input_manager.c
 *
 * @return     0 on clean exit, -1 if exit timed out.
 */
int join_input_manager_thread();

#endif // INPUT_MANAGER_H<commit_msg>Update input_manager.h<commit_after>/**
 * @file input_manager.h
 *
 * @brief      Functions to start and stop the input manager thread which is the
 *             translation beween control inputs from mavlink and DSM to the
 *             user_input struct which is read by the setpoint manager.
 */

#ifndef INPUT_MANAGER_H
#define INPUT_MANAGER_H

#include <fly_types.h>

/**
 * @brief      Starts an input manager thread.
 *
 *             Watch for new DSM data and translate into local user mode. Used
 *             in input_manager.c
 *
 * @param      user_input  pointer to user_intput_t struct, command input
 * @param      settings    pointer to fly_settings_t sruct, json file config settings
 *
 * @return     0 on success, -1 on failure
 */
int start_input_manager(user_input_t* user_input, fly_settings_t* settings);

/**
 * @brief      Waits for the input manager thread to exit
 *
 *             This should only be called after the program flow state is set to
 *             EXITING as that's the only thing that will cause the thread to
 *             exit on its own safely. Used in input_manager.c
 *
 * @return     0 on clean exit, -1 if exit timed out.
 */
int join_input_manager_thread();

#endif // INPUT_MANAGER_H

{'fraction_non_alphanumeric': 0.06636060100166945, 'fraction_numerical': 0.00333889816360601, 'mean_word_length': 2.5301914580265095, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6308510', 'n_tokens_mistral': 690, 'n_tokens_neox': 679, 'n_words': 285}