<commit_before>#include <Wire.h>

#include <ros.h>
#include <std_msgs/Int8.h>

ros::NodeHandle nh;

std_msgs::Int8 state;

ros::Publisher state_pub("state", &state);

void callback(const std_msgs::Int8 &cmd)
{
  state.data = 0;
  state_pub.publish(&state);

  Wire.beginTransmission(3);
  Wire.write(0x10);
  Wire.write(0x10);
  Wire.write(0x10);
  Wire.endTransmission();

  delay(5);

  Wire.beginTransmission(3);
  Wire.write(0x20);
  Wire.write(0x20);
  Wire.write(0x20);
  Wire.endTransmission();

  delay(5);

  Wire.requestFrom(0x10, 4);

  while(Wire.available())
  {
    char c = Wire.read();
    state.data = c;
    state_pub.publish(&state);
  }
}

ros::Subscriber<std_msgs::Int8> cmd_sub("command", &callback);

void setup()
{
  Wire.begin();

  nh.initNode();
  nh.advertise(state_pub);

}

void loop()
{ 
  nh.spinOnce();

  delay(33);
}<commit_msg>Thruster sketch data updates instead of sending test 0's.<commit_after>#include <Wire.h>

#include <ros.h>
#include <std_msgs/Int8.h>

ros::NodeHandle nh;

std_msgs::Int8 state;

ros::Publisher state_pub("state", &state);

void callback(const std_msgs::Int8 &cmd)
{
  state.data = cmd.data;
  state_pub.publish(&state);

  Wire.beginTransmission(3);
  Wire.write(0x10);
  Wire.write(0x10);
  Wire.write(0x10);
  Wire.endTransmission();

  delay(5);

  Wire.beginTransmission(3);
  Wire.write(0x20);
  Wire.write(0x20);
  Wire.write(0x20);
  Wire.endTransmission();

  delay(5);

  Wire.requestFrom(0x10, 4);

  while(Wire.available())
  {
    char c = Wire.read();
    state.data = c;
    state_pub.publish(&state);
  }
}

ros::Subscriber<std_msgs::Int8> cmd_sub("command", &callback);

void setup()
{
  Wire.begin();

  nh.initNode();
  nh.advertise(state_pub);
  nh.subscribe(cmd_sub);
}

void loop()
{ 
  nh.spinOnce();

  delay(33);
}
{'fraction_non_alphanumeric': 0.1782343142698501, 'fraction_numerical': 0.036646307606885066, 'mean_word_length': 4.269005847953216, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2372863', 'n_tokens_mistral': 783, 'n_tokens_neox': 725, 'n_words': 115}