<commit_before>
#include "jrk_hardware/jrk_serial.h"

#define WRITE7BITDATA(byte) ((byte)&0x7F)

// #define DEBUG 1

#ifdef DEBUG
#include <cstdio>
#endif

using jrk::Jrk;

Jrk::Jrk(const std::string port/*=""*/, uint32_t baudrate/*=9600*/, uint32_t timeout/*=0*/)
  : _serial(new serial::Serial(port, baudrate, serial::Timeout::simpleTimeout(timeout))) {};

Jrk::Jrk(serial::Serial* serial) : _serial(serial){};

Jrk::~Jrk(){};

void Jrk::reset(serial::Serial* serial)
{
  _serial.reset(serial);
}<commit_msg>Send baud rate indication on instantiation<commit_after>
#include "jrk_hardware/jrk_serial.h"

#define WRITE7BITDATA(byte) ((byte)&0x7F)

// #define DEBUG 1

#ifdef DEBUG
#include <cstdio>
#endif

using jrk::Jrk;

Jrk::Jrk(const std::string port/*=""*/, uint32_t baudrate/*=9600*/, uint32_t timeout/*=0*/)
  : _serial(new serial::Serial(port, baudrate, serial::Timeout::simpleTimeout(timeout)))
{
  start();
};

Jrk::Jrk(serial::Serial* serial) : _serial(serial)
{
  start();
};

Jrk::~Jrk(){};

Jrk::start()
{
  sendBaudRateIndication();
}

void Jrk::reset(serial::Serial* serial)
{
  _serial.reset(serial);
  start();
}
{'fraction_non_alphanumeric': 0.19982316534040673, 'fraction_numerical': 0.022988505747126436, 'mean_word_length': 6.496688741721854, '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': '3261644', 'n_tokens_mistral': 479, 'n_tokens_neox': 446, 'n_words': 80}