<commit_before>/**
 * @file battery_manager.h
 *
 * @brief Functions to start and stop the battery manager thread
 *
 */

#ifndef BATTERY_MANAGER_H
#define BATTERY_MANAGER_H

#include <fly_types.h>


/**
 * @brief      Starts a battery manager thread.
 *
 *             Used in battery_manager.c
 *
 * @param      core_state    the most recent attitude and controller values
 *                           reported by the fly_controller
 * @param      fly_settings  flight config settings from the json file
 *
 * @return     0 on success, -1 on failure
 */
int start_battery_manager(cstate_t* core_state, fly_settings_t* fly_settings);

/**
 * @brief      Waits for the battery 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 battery_manager.c
 *
 * @return     0 if thread exited cleanly, -1 if exit timed out.
 */
int join_battery_manager_thread();

#endif // BATTERY_MANAGER_H<commit_msg>Update battery_manager.h<commit_after>/**
 * @file battery_manager.h
 *
 * @brief Functions to start and stop the battery manager thread
 *
 */

#ifndef BATTERY_MANAGER_H
#define BATTERY_MANAGER_H

#include <fly_types.h>


/**
 * @brief      Starts a battery manager thread.
 *
 *             Used in battery_manager.c
 *
 * @param      core_state    pointer to the most recent attitude and controller values
 *                           reported by the fly_controller
 * @param      fly_settings  pointer to flight config settings from the json file
 *
 * @return     0 on success, -1 on failure
 */
int start_battery_manager(cstate_t* core_state, fly_settings_t* fly_settings);

/**
 * @brief      Waits for the battery 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 battery_manager.c
 *
 * @return     0 if thread exited cleanly, -1 if exit timed out.
 */
int join_battery_manager_thread();

#endif // BATTERY_MANAGER_H
{'fraction_non_alphanumeric': 0.0700870361887311, 'fraction_numerical': 0.0036646816307833257, 'mean_word_length': 2.633943427620632, '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': '4521105', 'n_tokens_mistral': 640, 'n_tokens_neox': 623, 'n_words': 242}