Remove unused variable

This commit is contained in:
Melissa LeBlanc-Williams 2023-10-04 11:53:59 -07:00
parent 1c627ded6b
commit df7c0fae67

View file

@ -10,7 +10,7 @@ extern Adafruit_TestBed TB;
Arduino_XCA9554SWSPI *expander = new Arduino_XCA9554SWSPI(
PCA_TFT_RESET, PCA_TFT_CS, PCA_TFT_SCK, PCA_TFT_MOSI,
&Wire, 0x3F);
Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
TFT_DE, TFT_VSYNC, TFT_HSYNC, TFT_PCLK,
TFT_R1, TFT_R2, TFT_R3, TFT_R4, TFT_R5,
@ -26,12 +26,12 @@ Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
expander, GFX_NOT_DEFINED /* RST */, TL021WVC02_init_operations, sizeof(TL021WVC02_init_operations));
uint16_t *colorWheel;
void setup(void)
{
{
Serial.begin(115200);
//while (!Serial) delay(100);
#ifdef GFX_EXTRA_PRE_INIT
GFX_EXTRA_PRE_INIT();
#endif
@ -39,7 +39,7 @@ void setup(void)
Serial.println("Beginning");
// Init Display
Wire.setClock(1000000); // speed up I2C
Wire.setClock(1000000); // speed up I2C
if (!gfx->begin()) {
Serial.println("gfx->begin() failed!");
}
@ -61,7 +61,7 @@ uint8_t allpins[] = {SS, SCK, MOSI, MISO, A1, A0};
bool test = false;
void loop()
{
{
if (!test) {
gfx->draw16bitRGBBitmap(0, 0, colorWheel, 480, 480);
delay(100);
@ -83,7 +83,7 @@ void loop()
gfx->setCursor(100, gfx->height() / 2 - 75);
gfx->println("I2C OK!");
gfx->setCursor(100, gfx->height() / 2 - 25);
gfx->setTextColor(RED);
gfx->println("RED");
@ -104,11 +104,10 @@ void loop()
void generateColorWheel(uint16_t *colorWheel) {
float angle;
uint8_t r, g, b;
int index, scaled_index;
int scaled_index;
for(int y = 0; y < 240; y++) {
for(int x = 0; x < 240; x++) {
index = y * 240 + x;
angle = atan2(y - 120, x - 120);
r = uint8_t(127.5 * (cos(angle) + 1));
g = uint8_t(127.5 * (sin(angle) + 1));