<commit_before>#include <TimerOne.h>
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"

#include "glowworm_core.h"
#include "glowworm.h"

void setup() {
#ifdef DEBUG
  Serial.begin(SERIAL_BAUD);
  printf_begin();
  
  printf("TIMER1_INTERVAL: %u us\r\n", TIMER1_INTERVAL);
  printf("FADE_STEPS: %u\r\n", FADE_STEPS);
  printf("FADE_INTERVAL: %u ms\r\n", FADE_INTERVAL);
  printf("TIMER1_FADE_STEP: %u\r\n", TIMER1_FADE_STEP);
  
  printf("Size of glowworm is %u bytes\r\n", sizeof(glowworm_config));
#endif
  
  // Clear the current lights
  lights->last = 0;
  lights->next = 0x808080;
  lights->step = 0;
  lights->antenna = ANTENNA_NONE;
  
  setupLEDs();

  // Initialise the timer
  Timer1.initialize(TIMER1_INTERVAL);
  Timer1.attachInterrupt(timer1Tick);
  
  // Configure the radio using the specified SPI pins
  setupRadio();
}

void loop() {
  glowworm_config * config = NULL;
  
  if (radio->available()) {
    config = new glowworm_config();

    // Read the data from the radio - we're dealing with constant length data
    // for the time being
    while (radio->available()) {
      radio->read(config, sizeof(*config));<commit_msg>Default to lights off<commit_after>#include <TimerOne.h>
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"

#include "glowworm_core.h"
#include "glowworm.h"

void setup() {
#ifdef DEBUG
  Serial.begin(SERIAL_BAUD);
  printf_begin();
  
  printf("TIMER1_INTERVAL: %u us\r\n", TIMER1_INTERVAL);
  printf("FADE_STEPS: %u\r\n", FADE_STEPS);
  printf("FADE_INTERVAL: %u ms\r\n", FADE_INTERVAL);
  printf("TIMER1_FADE_STEP: %u\r\n", TIMER1_FADE_STEP);
  
  printf("Size of glowworm is %u bytes\r\n", sizeof(glowworm_config));
#endif
  
  // Clear the current lights
  lights->last = 0;
  lights->next = 0;
  lights->step = 0;
  lights->antenna = ANTENNA_NONE;
  
  setupLEDs();

  // Initialise the timer
  Timer1.initialize(TIMER1_INTERVAL);
  Timer1.attachInterrupt(timer1Tick);
  
  // Configure the radio using the specified SPI pins
  setupRadio();
}

void loop() {
  glowworm_config * config = NULL;
  
  if (radio->available()) {
    config = new glowworm_config();

    // Read the data from the radio - we're dealing with constant length data
    // for the time being
    while (radio->available()) {
      radio->read(config, sizeof(*config));
{'fraction_non_alphanumeric': 0.1447424435930183, 'fraction_numerical': 0.017028522775649212, 'mean_word_length': 3.87551867219917, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '3474896', 'n_tokens_mistral': 921, 'n_tokens_neox': 874, 'n_words': 200}