Moved magic numbers into header

This commit is contained in:
jakeg00dwin 2024-09-26 16:48:39 -07:00
parent 07c2ee4b6d
commit 3f45a4f789
2 changed files with 7 additions and 2 deletions

View File

@ -7,10 +7,15 @@
//Only applied if defined //Only applied if defined
#ifdef FEATHER_RFM9X #ifdef FEATHER_RFM9X
//Define Serial params for debuging
#define SERIAL_BUADRATE 115200
// DISPLAY CONFIGURATION (ST7789) // DISPLAY CONFIGURATION (ST7789)
#define TFT_CS 5 // Chip select pin for the display #define TFT_CS 5 // Chip select pin for the display
#define TFT_RST 9 // Reset pin for the display #define TFT_RST 9 // Reset pin for the display
#define TFT_DC 6 // Data/Command pin for the display #define TFT_DC 6 // Data/Command pin for the display
#define TFT_X 240 // Number of pixes in X axis.
#define TFT_Y 280 // Number of pixes in Y axis.
// LED RING CONFIGURATION (WS2812) // LED RING CONFIGURATION (WS2812)
#define NUM_LEDS 24 // Number of LEDs in the ring #define NUM_LEDS 24 // Number of LEDs in the ring

View File

@ -117,10 +117,10 @@ int Radio_ReceiveData() {
void setup(void) { void setup(void) {
// Initialize Serial Communication for debugging // Initialize Serial Communication for debugging
Serial.begin(115200); Serial.begin(SERIAL_BUADRATE);
// Display Setup // Display Setup
tft.init(240, 280); // Initialize the display with a resolution of 240x280 pixels tft.init(TFT_X, TFT_Y); // Initialize the display with a resolution of 240x280 pixels
tft.fillScreen(ST77XX_BLACK); // Set the screen background to black tft.fillScreen(ST77XX_BLACK); // Set the screen background to black
// Magnetometer Setup // Magnetometer Setup