<commit_before>#include "../sys/tasks.h"
#include "state.h"
#include "motor.h"

static struct task_t _response_task;

void responseUpdate(struct task_t *task)
{
	struct state_controller_t *sc;
	sc = stateControllerGet();



	// D
	motorNdxThrustIncrease(MOTOR_LF, PID_D_TERM*sc->gyros.Y);
	motorNdxThrustIncrease(MOTOR_RR, -PID_D_TERM*sc->gyros.Y);
	motorNdxThrustIncrease(MOTOR_LR, PID_D_TERM*sc->gyros.X);
	motorNdxThrustIncrease(MOTOR_RF, -PID_D_TERM*sc->gyros.X);

	motorsSyncDutyCycle();

}

void responseStart(void)
{
	_response_task.handler = responseUpdate;
	_response_task.msecs = CFG_RESPONSE_UPDATE_MSECS;

	tasks_add_task(&_response_task);
}<commit_msg>awesome opussum<commit_after>#include "../sys/tasks.h"
#include "state.h"
#include "motor.h"

static struct task_t _response_task;

void responseUpdate(struct task_t *task)
{
	struct state_controller_t *sc;
	sc = stateControllerGet();

    roll = sc->gyros.Y;
    pitch = sc->gyros.X;

	// D
    if !(roll + 30 <= 60){
        motorNdxThrustIncrease(MOTOR_LF, PID_D_TERM*sc->gyros.Y);
        motorNdxThrustIncrease(MOTOR_RR, -PID_D_TERM*sc->gyros.Y);
    }
    if !(pitch + 30 <= 60){
        motorNdxThrustIncrease(MOTOR_LR, PID_D_TERM*sc->gyros.X);
        motorNdxThrustIncrease(MOTOR_RF, -PID_D_TERM*sc->gyros.X);
    }

	motorsSyncDutyCycle();

}

void responseStart(void)
{
	_response_task.handler = responseUpdate;
	_response_task.msecs = CFG_RESPONSE_UPDATE_MSECS;

	tasks_add_task(&_response_task);
}
{'fraction_non_alphanumeric': 0.13152542372881357, 'fraction_numerical': 0.005423728813559322, 'mean_word_length': 5.024489795918368, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1731330', 'n_tokens_mistral': 657, 'n_tokens_neox': 617, 'n_words': 85}