Correct various inconsequential typos
This commit is contained in:
1 parent
aa7bad45d3
commit
11b006e1d9
54 files changed
+127
-113
No files matched your search
@@ -1,7 +1,14 @@
|
||||
// An adaption of the "UncannyEyes" sketch (see eye_functions tab)
|
||||
// for the TFT_eSPI library. As written the sketch is for driving
|
||||
// one (240x320 minimum) TFT display, showing 2 eyes. See example
|
||||
// Animated_Eyes_2 for a dual 128x128 TFT display configued sketch.
|
||||
// Animated_Eyes_2 for a dual 128x128 TFT display configured sketch.
|
||||
|
||||
// The size of the displayed eye is determined by the screen size and
|
||||
// resolution. The eye image is 128 pixels wide. In humans the palpebral
|
||||
// fissure (open eye) width is about 30mm so a low resolution, large
|
||||
// pixel size display works best to show a scale eye image. Note that
|
||||
// display manufacturers usually quote the diagonal measurement, so a
|
||||
// 128 x 128 1.7" display or 128 x 160 2" display is about right.
|
||||
|
||||
// Configuration settings for the eye, eye style, display count,
|
||||
// chip selects and x offsets can be defined in the sketch "config.h" tab.
|
||||
@@ -9,7 +16,7 @@
|
||||
// Performance (frames per second = fps) can be improved by using
|
||||
// DMA (for SPI displays only) on ESP32 and STM32 processors. Use
|
||||
// as high a SPI clock rate as is supported by the display. 27MHz
|
||||
// minimum, some diplays can be operated at higher clock rates in
|
||||
// minimum, some displays can be operated at higher clock rates in
|
||||
// the range 40-80MHz.
|
||||
|
||||
// Single defaultEye performance for different processors
|
||||
@@ -22,7 +29,7 @@
|
||||
// STM32F446 55MHz SPI 83 fps 155 fps
|
||||
// STM32F767 55MHz SPI 136 fps 197 fps
|
||||
|
||||
// DMA can be used with STM32 and ESP32 processors when the interface
|
||||
// DMA can be used with RP2040, STM32 and ESP32 processors when the interface
|
||||
// is SPI, uncomment the next line:
|
||||
//#define USE_DMA
|
||||
|
||||
@@ -95,7 +102,7 @@ void setup(void) {
|
||||
// User call for additional features
|
||||
user_setup();
|
||||
|
||||
// Initialiase the eye(s), this will set all chip selects low for the tft.init()
|
||||
// Initialise the eye(s), this will set all chip selects low for the tft.init()
|
||||
initEyes();
|
||||
|
||||
// Initialise TFT
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
// for the TFT_eSPI library. As written the sketch is for driving
|
||||
// two TFT displays.
|
||||
|
||||
// The size of the displayed eye is determined by the screen size and
|
||||
// resolution. The eye image is 128 pixels wide. In humans the palpebral
|
||||
// fissure (open eye) width is about 30mm so a low resolution, large
|
||||
// pixel size display works best to show a scale eye image. Note that
|
||||
// display manufacturers usually quote the diagonal measurement, so a
|
||||
// 128 x 128 1.7" display or 128 x 160 2" display is about right.
|
||||
|
||||
// The number of displays and chip selects used are defined in the
|
||||
// config.h tab. The display count can be set to 1. If using one
|
||||
// TFT and the chip select for that display is already defined in
|
||||
@@ -17,7 +24,7 @@
|
||||
// Performance (frames per second = fps) can be improved by using
|
||||
// DMA (for SPI displays only) on ESP32 and STM32 processors. Use
|
||||
// as high a SPI clock rate as is supported by the display. 27MHz
|
||||
// minimum, some diplays can be operated at higher clock rates in
|
||||
// minimum, some displays can be operated at higher clock rates in
|
||||
// the range 40-80MHz.
|
||||
|
||||
// Single defaultEye performance for different processors
|
||||
@@ -30,7 +37,7 @@
|
||||
// STM32F446 55MHz SPI 83 fps 155 fps
|
||||
// STM32F767 55MHz SPI 136 fps 197 fps
|
||||
|
||||
// DMA can be used with STM32 and ESP32 processors when the interface
|
||||
// DMA can be used with RP2040, STM32 and ESP32 processors when the interface
|
||||
// is SPI, uncomment the next line:
|
||||
//#define USE_DMA
|
||||
|
||||
@@ -103,7 +110,7 @@ void setup(void) {
|
||||
// User call for additional features
|
||||
user_setup();
|
||||
|
||||
// Initialiase the eye(s), this will set all chip selects low for the tft.init()
|
||||
// Initialise the eye(s), this will set all chip selects low for the tft.init()
|
||||
initEyes();
|
||||
|
||||
// Initialise TFT
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
// To do, maybe, one day:
|
||||
// 1. Get the eye to blink
|
||||
// 2. Add another screen for another eye
|
||||
// 3. Add varaible to set how wide open the eye is
|
||||
// 3. Add variable to set how wide open the eye is
|
||||
// 4. Add a reflected highlight to the cornea
|
||||
// 5. Add top eyelid shaddow to eye surface
|
||||
// 5. Add top eyelid shadow to eye surface
|
||||
// 6. Add aliasing to blur mask edge
|
||||
//
|
||||
// With one lidded eye drawn the code runs at 28-33fps (at 27-40MHz SPI clock)
|
||||
@@ -58,8 +58,8 @@
|
||||
|
||||
// The ESP8266 is rather constrained here as it only has one analogue port.
|
||||
// An I2C ADC could be used for more analogue channels
|
||||
//#define JOYSTICK_X_PIN A0 // Analog pin for eye horiz pos (else auto)
|
||||
//#define JOYSTICK_Y_PIN A0 // Analog pin for eye vert position (")
|
||||
//#define JOYSTICK_X_PIN A0 // Analogue pin for eye horiz pos (else auto)
|
||||
//#define JOYSTICK_Y_PIN A0 // Analogue pin for eye vert position (")
|
||||
//#define JOYSTICK_X_FLIP // If set, reverse stick X axis
|
||||
//#define JOYSTICK_Y_FLIP // If set, reverse stick Y axis
|
||||
#define TRACKING // If enabled, eyelid tracks pupil
|
||||
@@ -107,7 +107,7 @@ void setup(void) {
|
||||
uint8_t e = 0;
|
||||
|
||||
Serial.begin(250000);
|
||||
randomSeed(analogRead(A0)); // Seed random() from floating analog input
|
||||
randomSeed(analogRead(A0)); // Seed random() from floating analogue input
|
||||
|
||||
eye[e].tft.init();
|
||||
eye[e].tft.fillScreen(TFT_BLACK);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
https://playground.arduino.cc/Code/UTF-8
|
||||
|
||||
To sumarise, UTF-8 characters are encoded as mor than 1 byte so care must
|
||||
To summarise, UTF-8 characters are encoded as more than 1 byte so care must
|
||||
be taken:
|
||||
|
||||
char c = 'µ'; // Wrong
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
|
||||
|
||||
// This is the file name used to store the touch coordinate
|
||||
// calibration data. Cahnge the name to start a new calibration.
|
||||
// calibration data. Change the name to start a new calibration.
|
||||
#define CALIBRATION_FILE "/TouchCalData3"
|
||||
|
||||
// Set REPEAT_CAL to true instead of false to run calibration
|
||||
@@ -115,7 +115,7 @@ void touch_calibrate()
|
||||
|
||||
// check file system exists
|
||||
if (!SPIFFS.begin()) {
|
||||
Serial.println("Formating file system");
|
||||
Serial.println("Formatting file system");
|
||||
SPIFFS.format();
|
||||
SPIFFS.begin();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void touch_calibrate()
|
||||
|
||||
// check file system exists
|
||||
if (!SPIFFS.begin()) {
|
||||
Serial.println("Formating file system");
|
||||
Serial.println("Formatting file system");
|
||||
SPIFFS.format();
|
||||
SPIFFS.begin();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Bodmers BMP image rendering function
|
||||
// Bodmer's BMP image rendering function
|
||||
|
||||
void drawBmp(const char *filename, int16_t x, int16_t y) {
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ void loop() {
|
||||
// The new larger fonts do not need to use the .setCursor call, coords are embedded
|
||||
tft.setTextColor(TFT_BLACK); // Do not plot the background colour
|
||||
|
||||
// Overlay the black text on top of the rainbow plot (the advantage of not drawing the backgorund colour!)
|
||||
// Overlay the black text on top of the rainbow plot (the advantage of not drawing the background colour!)
|
||||
tft.drawString("Font size 2", xpos, 14, 2); // Draw text centre at position xpos, 14 using font 2
|
||||
tft.drawString("Font size 4", xpos, 30, 4); // Draw text centre at position xpos, 30 using font 4
|
||||
tft.drawString("12.34", xpos, 54, 6); // Draw text centre at position xpos, 54 using font 6
|
||||
@@ -150,7 +150,7 @@ void loop() {
|
||||
// Fill screen with a rainbow pattern
|
||||
void rainbow_fill()
|
||||
{
|
||||
// The colours and state are not initialised so the start colour changes each time the funtion is called
|
||||
// The colours and state are not initialised so the start colour changes each time the function is called
|
||||
int rotation = tft.getRotation();
|
||||
tft.setRotation(random(4));
|
||||
for (int i = tft.height() - 1; i >= 0; i--) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
int32_t h = tft.getViewportHeight(); // Always returns height of viewport
|
||||
bool f = tft.getViewportDatum(); // Datum of the viewport (false = TFT corner, true = viewport corner)
|
||||
// To check if all or part of an area is in the viewport
|
||||
checkViewport(x, y, w, h); // Retruns "true" if all or part of area is in viewport
|
||||
checkViewport(x, y, w, h); // Returns "true" if all or part of area is in viewport
|
||||
|
||||
// To draw a rectangular frame outside viewport of width W (when W is negative)
|
||||
tft.frameViewport(TFT_RED, -W); // Note setting the width to a large negative value will clear the screen
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
This tests the alpha blending function that is used with the antialiased
|
||||
This tests the alpha blending function that is used with the anti-aliased
|
||||
fonts:
|
||||
|
||||
Alpha = 0 = 100% background, alpha = 255 = 100% foreground colour
|
||||
|
||||
Reference in new issue
Block a user