Fix search and replace errors

This commit is contained in:
Bodmer committed 2023-12-19 02:18:01 +00:00
1 parent 9ab133f810
commit 2d88fe4c6e
28 files changed
+64 -64

No files matched your search

@@ -70,7 +70,7 @@ void setup() {
TJpgDec.setSwapBytes(true);
// The jpeg decoder must be given the exact name of the rendering function above
TJpgDec.setcallback(tft_output);
TJpgDec.setCallback(tft_output);
tft.begin();
tft.setRotation(0);
@@ -128,7 +128,7 @@ void loop() {
// =======================================================================================
void createNeedle(void)
{
needle.setcolorDepth(16);
needle.setColorDepth(16);
needle.createSprite(NEEDLE_WIDTH, NEEDLE_LENGTH); // create the needle Sprite
needle.fillSprite(TFT_BLACK); // Fill with black
@@ -76,7 +76,7 @@ void drawStar(int x, int y, int star_color)
// Create an 1 bit (2 colour) sprite 70x80 pixels (uses 70*80/8 = 700 bytes of RAM)
// Colour depths of 8 bits per pixel and 16 bits are also supported.
img.setcolorDepth(BITS_PER_PIXEL); // Set colour depth first
img.setColorDepth(BITS_PER_PIXEL); // Set colour depth first
img.createSprite(70, 80); // then create the sprite
// Fill Sprite with the colour that will be defined later as "transparent"
@@ -34,7 +34,7 @@ void setup(void)
tft.setRotation(0);
tft.fillScreen(TFT_BLUE);
img.setcolorDepth(COLOR_DEPTH);
img.setColorDepth(COLOR_DEPTH);
img.createSprite(RADIUS*2+1, RADIUS*2+1);
img.fillSprite(TFT_BLACK);
}
@@ -68,14 +68,14 @@ void loop() {
void yinyang(int x, int y, int start_angle, int r)
{
int x1 = 0; // getcoord() will update these
int x1 = 0; // getCoord() will update these
int y1 = 0;
getcoord(x, y, &x1, &y1, r/2, start_angle); // Get x1 ,y1
getCoord(x, y, &x1, &y1, r/2, start_angle); // Get x1 ,y1
img.fillCircle( x1, y1, r/2, TFT_WHITE);
img.fillCircle( x1, y1, r/8, TFT_BLACK);
getcoord(x, y, &x1, &y1, r/2, start_angle + 180);
getCoord(x, y, &x1, &y1, r/2, start_angle + 180);
img.fillCircle( x1, y1, r/2, TFT_BLACK);
img.fillCircle( x1, y1, r/8, TFT_WHITE);
@@ -87,7 +87,7 @@ void yinyang(int x, int y, int start_angle, int r)
// =========================================================================
// Coordinates are returned to caller via the xp and yp pointers
#define RAD2DEG 0.0174532925
void getcoord(int x, int y, int *xp, int *yp, int r, int a)
void getCoord(int x, int y, int *xp, int *yp, int r, int a)
{
float sx1 = cos( (a-90) * RAD2DEG );
float sy1 = sin( (a-90) * RAD2DEG );
+4 -4
View File
@@ -90,7 +90,7 @@ void loop() {
// =========================================================================
// Coordinates are returned to caller via the xp and yp pointers
#define DEG2RAD 0.0174532925
void getcoord(int x, int y, int *xp, int *yp, int r, float a)
void getCoord(int x, int y, int *xp, int *yp, int r, float a)
{
float sx1 = cos( -a * DEG2RAD );
float sy1 = sin( -a * DEG2RAD );
@@ -131,10 +131,10 @@ int plot_planets(void)
{
ang = Astronomy_EclipticLongitude(body[i], astro_time);
int x1 = 0; // getcoord() will update these
int x1 = 0; // getCoord() will update these
int y1 = 0;
getcoord(0, 0, &x1, &y1, i * 28, ang.angle); // Get x1 ,y1
getCoord(0, 0, &x1, &y1, i * 28, ang.angle); // Get x1 ,y1
img.fillSprite(TFT_TRANSPARENT);
img.fillCircle(9, 9, 9, TFT_BLACK);
@@ -149,7 +149,7 @@ int plot_planets(void)
int xm = 0;
int ym = 0;
getcoord(x1, y1, &xm, &ym, 15, 180 + ang.angle + mang.angle); // Get x1 ,y1
getCoord(x1, y1, &xm, &ym, 15, 180 + ang.angle + mang.angle); // Get x1 ,y1
img.fillSprite(TFT_TRANSPARENT);
img.fillCircle(9, 9, 7, TFT_BLACK);
@@ -59,7 +59,7 @@ void loop() {
drawX(xw, yh); // Show where screen pivot is
// Create the Sprite
spr.setcolorDepth(8); // Create an 8bpp Sprite of 60x30 pixels
spr.setColorDepth(8); // Create an 8bpp Sprite of 60x30 pixels
spr.createSprite(64, 30); // 8bpp requires 64 * 30 = 1920 bytes
spr.setPivot(32, 55); // Set pivot relative to top left corner of Sprite
spr.fillSprite(TFT_BLACK); // Fill the Sprite with black
@@ -120,7 +120,7 @@ void loop() {
spr.deleteSprite();
spr.setcolorDepth(8); // Create a 8bpp Sprite
spr.setColorDepth(8); // Create a 8bpp Sprite
spr.createSprite(40, 30); // Create a new Sprite 40x30
spr.setPivot(20, 70); // Set Sprite pivot at 20,80
@@ -99,7 +99,7 @@ void loop() {
void createDialScale(int16_t start_angle, int16_t end_angle, int16_t increment)
{
// Create the dial Sprite
dial.setcolorDepth(8); // Size is odd (i.e. 91) so there is a centre pixel at 45,45
dial.setColorDepth(8); // Size is odd (i.e. 91) so there is a centre pixel at 45,45
dial.createSprite(91, 91); // 8bpp requires 91 * 91 = 8281 bytes
dial.setPivot(45, 45); // set pivot in middle of dial Sprite
@@ -158,7 +158,7 @@ void plotDial(int16_t x, int16_t y, int16_t angle, String label, uint16_t val)
void createNeedle(void)
{
needle.setcolorDepth(8);
needle.setColorDepth(8);
needle.createSprite(11, 49); // create the needle Sprite 11 pixels wide by 49 high
needle.fillSprite(TFT_BLACK); // Fill with black
@@ -31,7 +31,7 @@ void setup(void) {
tft.fillScreen(TFT_BLUE);
//img.setcolorDepth(8); // Optionally set depth to 8 to halve RAM use
//img.setColorDepth(8); // Optionally set depth to 8 to halve RAM use
img.createSprite(IWIDTH, IHEIGHT);
img.fillSprite(TFT_BLACK);
}
+1 -1
View File
@@ -47,7 +47,7 @@ void setup()
tft.init();
// Optionally set colour depth to 8 or 16 bits, default is 16 if not specified
// spr.setcolorDepth(8);
// spr.setColorDepth(8);
// Create a sprite of defined size
spr.createSprite(WIDTH, HEIGHT);
@@ -50,7 +50,7 @@ void setup()
tft.init();
// Set the sprite colour depth to 4
spr.setcolorDepth(4);
spr.setColorDepth(4);
// Create a sprite of defined size
spr.createSprite(WIDTH, HEIGHT);
@@ -59,7 +59,7 @@ void setup()
// Initialise the TFT registers
tft.init();
spr.setcolorDepth(4);
spr.setColorDepth(4);
// Create a sprite of defined size
spr.createSprite(WIDTH, HEIGHT);
@@ -41,7 +41,7 @@ void setup() {
tft.fillScreen(TFT_BLACK);
// Create a sprite for the graph
graph1.setcolorDepth(8);
graph1.setColorDepth(8);
graph1.createSprite(128, 61);
graph1.fillSprite(TFT_BLUE); // Note: Sprite is filled with black when created
@@ -51,7 +51,7 @@ void setup() {
//graph1.setScrollRect(64, 0, 64, 61, TFT_DARKGREY); // Try this line to change the graph scroll area
// Create a sprite for the scrolling numbers
stext1.setcolorDepth(8);
stext1.setColorDepth(8);
stext1.createSprite(32, 64);
stext1.fillSprite(TFT_BLUE); // Fill sprite with blue
stext1.setScrollRect(0, 0, 32, 64, TFT_BLUE); // here we set scroll gap fill color to blue
@@ -59,7 +59,7 @@ void setup() {
stext1.setTextDatum(BR_DATUM); // Bottom right coordinate datum
// Create a sprite for Hello World
stext2.setcolorDepth(8);
stext2.setColorDepth(8);
stext2.createSprite(80, 16);
stext2.fillSprite(TFT_DARKGREY);
stext2.setScrollRect(0, 0, 40, 16, TFT_DARKGREY); // Scroll the "Hello" in the first 40 pixels