<commit_before>// Yes, this is actually -*-c++-*-

/*!
  This sketch is responsible for the Disk game

  Example commands:

DISK-RESET
DISK-STATE success
DISK 0 POS 10 DIR 1 USER 1
DISK 1 POS 50 DIR 1 USER 1
DISK 2 POS 60 DIR 1 USER 2
DISK 0 DIR 0 USER 1
DISK 0 DIR 1 USER 1
DISK 0 DIR -1 USER 1
DISK 0 DIR 1 USER 1
DISK 1 DIR -1 USER 1
DISK 2 DIR 1 USER 1
DISK-EXIT

PANEL-SET 4 0 100 user0 easein
PANEL-SET 4 1 100 user1 easein
PANEL-SET 4 2 100 user2 easein
PANEL-SET 4 0 100 white pulse
PANEL-SET 4 0 100 white pop
PANEL-SET 3 0 100 error easein
PANEL-SET 3 1 100 white pulse
PANEL-SET 3 2 100 user0 easein
PANEL-SET 3 3 100 user1 easein
PANEL-SET 3 4 100 user2 easein
PANEL-SET 3 5 100 user2 easein


PANEL-SET 3 0 100 error
PANEL-SET 3 1 100 white
PANEL-SET 3 2 100 user0
PANEL-SET 3 3 100 user1
PANEL-SET 3 4 100 user2
PANEL-SET 3 5 100 user2

*/

#if !defined(__MK20DX256__)
#error Oops!  Make sure you have 'Teensy 3.1' selected from the 'Tools -> Board' menu.
#endif

#include "./Timer.h"
#include "./Bounce2.h"
#include "DiskInterface.h"
#include "anyware_colors.h"
#include "anyware_serial.h"
#include "LEDStrip.h"

// Set to 1 to start in debug mode
#define DEBUG_MODE 1

// Top disk
const int DISK0_HOME_SENSOR = A0;
const int DISK0_ENC_A = 5;
const int DISK0_ENC_B = 6;
const int DISK0_MOTOR_A = 4;
const int DISK0_MOTOR_B = 3;
const int DISK0_TICKS_PER_REVOLUTION = 30513;

// Middle disk
const int DISK1_HOME_SENSOR = A1;
const int DISK1_ENC_A = 9;
const int DISK1_ENC_B = 10;
const int DISK1_MOTOR_A = 8;
const int DISK1_MOTOR_B = 7;
const int DISK1_TICKS_PER_REVOLUTION = 29689;

// Bottom disk
const int DISK2_HOME_SENSOR = A2;
const int DISK2_ENC_A = 20;
const int DISK2_ENC_B = 19;
const int DISK2_MOTOR_A = 17;
const int DISK2_MOTOR_B = 18;
const int DISK2_TICKS_PER_REVOLUTION = 30252;

// Globals

const uint8_t MAGNET_SENSITIVITY = 160;

#define USER0_STR "0"<commit_msg>Default to non-debug mode to reduce verbose output<commit_after>// Yes, this is actually -*-c++-*-

/*!
  This sketch is responsible for the Disk game

  Example commands:

DISK-RESET
DISK-STATE success
DISK 0 POS 10 DIR 1 USER 1
DISK 1 POS 50 DIR 1 USER 1
DISK 2 POS 60 DIR 1 USER 2
DISK 0 DIR 0 USER 1
DISK 0 DIR 1 USER 1
DISK 0 DIR -1 USER 1
DISK 0 DIR 1 USER 1
DISK 1 DIR -1 USER 1
DISK 2 DIR 1 USER 1
DISK-EXIT

PANEL-SET 4 0 100 user0 easein
PANEL-SET 4 1 100 user1 easein
PANEL-SET 4 2 100 user2 easein
PANEL-SET 4 0 100 white pulse
PANEL-SET 4 0 100 white pop
PANEL-SET 3 0 100 error easein
PANEL-SET 3 1 100 white pulse
PANEL-SET 3 2 100 user0 easein
PANEL-SET 3 3 100 user1 easein
PANEL-SET 3 4 100 user2 easein
PANEL-SET 3 5 100 user2 easein


PANEL-SET 3 0 100 error
PANEL-SET 3 1 100 white
PANEL-SET 3 2 100 user0
PANEL-SET 3 3 100 user1
PANEL-SET 3 4 100 user2
PANEL-SET 3 5 100 user2

*/

#if !defined(__MK20DX256__)
#error Oops!  Make sure you have 'Teensy 3.1' selected from the 'Tools -> Board' menu.
#endif

#include "./Timer.h"
#include "./Bounce2.h"
#include "DiskInterface.h"
#include "anyware_colors.h"
#include "anyware_serial.h"
#include "LEDStrip.h"

// Set to 1 to start in debug mode
#define DEBUG_MODE 0

// Top disk
const int DISK0_HOME_SENSOR = A0;
const int DISK0_ENC_A = 5;
const int DISK0_ENC_B = 6;
const int DISK0_MOTOR_A = 4;
const int DISK0_MOTOR_B = 3;
const int DISK0_TICKS_PER_REVOLUTION = 30513;

// Middle disk
const int DISK1_HOME_SENSOR = A1;
const int DISK1_ENC_A = 9;
const int DISK1_ENC_B = 10;
const int DISK1_MOTOR_A = 8;
const int DISK1_MOTOR_B = 7;
const int DISK1_TICKS_PER_REVOLUTION = 29689;

// Bottom disk
const int DISK2_HOME_SENSOR = A2;
const int DISK2_ENC_A = 20;
const int DISK2_ENC_B = 19;
const int DISK2_MOTOR_A = 17;
const int DISK2_MOTOR_B = 18;
const int DISK2_TICKS_PER_REVOLUTION = 30252;

// Globals

const uint8_t MAGNET_SENSITIVITY = 160;

#define USER0_STR "0"
{'fraction_non_alphanumeric': 0.07178282432785174, 'fraction_numerical': 0.1033672670321065, 'mean_word_length': 3.713407134071341, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1674787', 'n_tokens_mistral': 1955, 'n_tokens_neox': 1623, 'n_words': 610}