// Pin selections here are based on the original Adafruit Learning System
// guide for the Teensy 3.x project. Some of these pin numbers don't even
// exist on the smaller SAMD M0 & M4 boards, so you may need to make other
// selections:

// GRAPHICS SETTINGS (appearance of eye) -----------------------------------

// If using a SINGLE EYE, you might want this next line enabled, which
// uses a simpler "football-shaped" eye that's left/right symmetrical.
// Default shape includes the caruncle, creating distinct left/right eyes.
// #define SYMMETRICAL_EYELID

// Enable ALL eye styles you want to use:
#include "data/defaultEye.h" // Standard human-ish hazel eye (NORMAL mode)
//#include "data/dragonEye.h" // Slit pupil fiery dragon/demon eye
//#include "data/catEye.h" // Cartoonish cat (flat "2D" colors)
//#include "data/newtEye.h" // Eye of newt
//#include "data/owlEye.h" // Minerva the owl

// Calculate centering offsets for 240x240 displays
#define DISPLAY_WIDTH 240
#define DISPLAY_HEIGHT 240
#define EYE_SIZE 128
#define X_CENTER_OFFSET ((DISPLAY_WIDTH - EYE_SIZE) / 2) // = 56
#define Y_CENTER_OFFSET ((DISPLAY_HEIGHT - EYE_SIZE) / 2) // = 56

// DISPLAY HARDWARE SETTINGS (screen type & connections) -------------------

#define TFT_COUNT 2 // Number of screens (2 for dual displays)
#define TFT1_CS 15 // TFT 1 chip select pin
#define TFT2_CS 14 // TFT 2 chip select pin
#define TFT_1_ROT 0 // TFT 1 rotation
#define TFT_2_ROT 0 // TFT 2 rotation

#define EYE_1_XPOSITION X_CENTER_OFFSET // x shift for eye 1 (centered)
#define EYE_2_XPOSITION X_CENTER_OFFSET // x shift for eye 2 (centered)

#define DISPLAY_BACKLIGHT -1 // Pin for backlight control (-1 for none)
#define BACKLIGHT_MAX 255

// EYE LIST ----------------------------------------------------------------

#define NUM_EYES 2 // Number of eyes to display (2 eyes)

#define BLINK_PIN -1 // Pin for manual blink button (BOTH eyes)
#define LH_WINK_PIN -1 // Left wink pin (set to -1 for no pin)
#define RH_WINK_PIN -1 // Right wink pin (set to -1 for no pin)

// This table contains ONE LINE PER EYE. The table MUST be present with
// this name and contain ONE OR MORE lines. Each line contains THREE items:
// a pin number for the corresponding TFT/OLED display's SELECT line, a pin
// pin number for that eye's "wink" button (or -1 if not used), a screen
// rotation value (0-3) and x position offset for that eye.

#if (NUM_EYES == 2)
eyeInfo_t eyeInfo[] = {
  { TFT1_CS, LH_WINK_PIN, TFT_1_ROT, EYE_1_XPOSITION }, // LEFT EYE
  { TFT2_CS, RH_WINK_PIN, TFT_2_ROT, EYE_2_XPOSITION }, // RIGHT EYE
};
#else
eyeInfo_t eyeInfo[] = {
  { TFT1_CS, LH_WINK_PIN, TFT_1_ROT, EYE_1_XPOSITION }, // Single eye
};
#endif

// INPUT SETTINGS (for controlling eye motion) -----------------------------

#define TRACKING // If defined, eyelid tracks pupil
#define AUTOBLINK // If defined, eyes also blink autonomously

#define LIGHT_PIN 34
#define LIGHT_CURVE 0.33 // Light sensor adjustment curve
#define LIGHT_MIN 800// Minimum useful reading from light sensor
#define LIGHT_MAX 3200 // Maximum useful reading from sensor

#define IRIS_SMOOTH // If enabled, filter input from IRIS_PIN

#if !defined(IRIS_MIN) // Each eye might have its own MIN/MAX
#define IRIS_MIN 60 // Iris size (0-1023) in brightest light
#endif

#if !defined(IRIS_MAX)
#define IRIS_MAX 300 // Iris size (0-1023) in darkest light
#endif
