Skip to content

Minor fixes for esp32 configurations #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
* Use default values for any parameters the user didn't provide.
*/

// If board is not defined in local configuration, assume Arduino Mega2560
// If board is not defined in local configuration, assume BOARD_UNKNOWN
// Configuration checks below will capture any missing pin assignments.
#ifndef BOARD
#define BOARD BOARD_AVR_MEGA2560
#define BOARD BOARD_UNKNOWN
#endif

// Set to 1 for the northern hemisphere, 0 otherwise
Expand Down Expand Up @@ -252,7 +253,9 @@
#include "Configuration_adv.hpp"

// Append board specific pins data.
#if (BOARD == BOARD_AVR_MEGA2560)
#if (BOARD == BOARD_UNKNOWN)
// Assume custom user board - no predefined pin mapping
#elif (BOARD == BOARD_AVR_MEGA2560)
#include "boards/AVR_MEGA2560/pins_MEGA2560.hpp"
#elif (BOARD == BOARD_ESP32_ESP32DEV)
#include "boards/ESP32_ESP32DEV/pins_ESP32DEV.hpp"
Expand Down
7 changes: 4 additions & 3 deletions Constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

/**
* Supported boards. The name consists of the platform and the board name (model).
* Applies predefined pin mappings for common boards.
* If BOARD_UNKNOWN is used then user is responsible for specifying complete mapping in Configuration_local.hpp
**/
#define BOARD_UNKNOWN 0000

// AVR based boards
#define BOARD_AVR_MEGA2560 0001
#define BOARD_AVR_MKS_GEN_L_V21 0002
Expand Down Expand Up @@ -55,9 +59,6 @@
#define SERIAL_BAUDRATE_STELLARIUM_DIRECT 9600
#define SERIAL_BAUDRATE_ASCOM 57600

#define DISABLED 0
#define ENABLED 1

// Wifi operating modes (ESP32 only)
#define WIFI_MODE_INFRASTRUCTURE 0 // Infrastructure Only - OAT connects to an existing Router
#define WIFI_MODE_AP_ONLY 1 // AP Mode Only - OAT acts as a local Router/Hotspot
Expand Down
2 changes: 0 additions & 2 deletions boards/AVR_MEGA2560/pins_MEGA2560.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include "Constants.hpp"

// DRIVER_TYPE_ULN2003 requires 4 digital outputs in Arduino pin numbering
#ifndef RA_IN1_PIN
#define RA_IN1_PIN 22
Expand Down
2 changes: 0 additions & 2 deletions boards/AVR_MKS_GEN_L_V21/pins_MKS_GEN_L_V21.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include "Constants.hpp"

// DRIVER_TYPE_ULN2003 requires 4 digital outputs in Arduino pin numbering
#ifndef RA_IN1_PIN
#define RA_IN1_PIN 63
Expand Down
2 changes: 0 additions & 2 deletions boards/ESP32_ESP32DEV/pins_ESP32DEV.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include "Constants.hpp"

// DRIVER_TYPE_ULN2003 requires 4 digital outputs in Arduino pin numbering
#ifndef RA_IN1_PIN
#define RA_IN1_PIN 13
Expand Down