<commit_before>#include "teensy3/WProgram.h"
#include "teensy3/core_pins.h"
#include "teensy3/usb_serial.h"

#define BUFLEN 16

#define PIN_TURNTABLE_SERVO 3
#define PIN_KCUP_LOADER 2
#define PIN_KCUP_EJECTOR 11
#define PIN_TRAY_PISTON 12

const int ERR_UNKNOWN = -1;
const int ERR_NYI = -2;

const int ERR_KCUP_UNKNOWN = -100;
const int ERR_KCUP_EMPTY = -101;
const int ERR_KCUP_TRAY_FULL = -102;
const int ERR_KCUP_TRAY_EMPTY = -103;

const int ERR_COFFEE_DRY = -201;
const int ERR_KETTLE_DRY = -202;

const int ERR_ALREADY_BREWING = -301;

const int ERR_MUG_INVALID = -401;

enum Addin {
  SUGAR,
  MILK,
  HONEY,
}

char serial_buffer[BUFLEN] = {};
long serial_index = 0;

#define CMD_HEADER_A 0xCA
#define CMD_HEADER_B 0xFE

#define CMD_mug_seek 'a'
#define CMD_mug_get 'b'
#define CMD_kcup_tray_open 'c'
#define CMD_kcup_tray_close 'd'
#define CMD_kcup_load 'e'
#define CMD_kcup_eject 'f'
#define CMD_kcup_count 'g'
#define CMD_brew 'h'
#define CMD_addin_insert 'i'

int arglen[256] = {};
arglen[CMD_mug_seek] = 1;
arglen[CMD_mug_get] = 0;
arglen[CMD_kcup_tray_open] = 0;
arglen[CMD_kcup_tray_close] = 0;
arglen[CMD_kcup_load] = 0;<commit_msg>Fix teensy error codes<commit_after>#include "teensy3/WProgram.h"
#include "teensy3/core_pins.h"
#include "teensy3/usb_serial.h"

#define BUFLEN 16

#define PIN_TURNTABLE_SERVO 3
#define PIN_KCUP_LOADER 2
#define PIN_KCUP_EJECTOR 11
#define PIN_TRAY_PISTON 12

const int ERR_UNKNOWN = -1;
const int ERR_NYI = -2;

const int ERR_KCUP_UNKNOWN = -10;
const int ERR_KCUP_EMPTY = -11;
const int ERR_KCUP_TRAY_FULL = -12;
const int ERR_KCUP_TRAY_EMPTY = -13;

const int ERR_COFFEE_DRY = -21;
const int ERR_KETTLE_DRY = -22;

const int ERR_ALREADY_BREWING = -31;

const int ERR_MUG_INVALID = -41;

enum Addin {
  SUGAR,
  MILK,
  HONEY,
}

char serial_buffer[BUFLEN] = {};
long serial_index = 0;

#define CMD_HEADER_A 0xCA
#define CMD_HEADER_B 0xFE

#define CMD_mug_seek 'a'
#define CMD_mug_get 'b'
#define CMD_kcup_tray_open 'c'
#define CMD_kcup_tray_close 'd'
#define CMD_kcup_load 'e'
#define CMD_kcup_eject 'f'
#define CMD_kcup_count 'g'
#define CMD_brew 'h'
#define CMD_addin_insert 'i'

int arglen[256] = {};
arglen[CMD_mug_seek] = 1;
arglen[CMD_mug_get] = 0;
arglen[CMD_kcup_tray_open] = 0;
arglen[CMD_kcup_tray_close] = 0;
arglen[CMD_kcup_load] = 0;
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.03827751196172249, 'mean_word_length': 5.6473988439306355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1145567', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1053, 'n_words': 234}