defaults, not personal settings (#12)

This commit is contained in:
Owen Carter
2020-08-21 19:49:14 +02:00
committed by GitHub
parent 15b3db536c
commit ede61d4c74
2 changed files with 22 additions and 14 deletions

View File

@ -36,10 +36,14 @@
// I keep my settings in a seperate header file // I keep my settings in a seperate header file
#include "myconfig.h" #include "myconfig.h"
#else #else
const char* ssid = "my-access-point-ssid"; // Default Setup; an accesspoint
const char* password = "my-access-point-password"; // SSID and Password for the accesspoint we want to join, or create
// used for wifi AP char* ssid = "ESP32-CAM-CONNECT";
const int wifichan = 5; const char* password = "InsecurePassword";
// Accesspoint mode: comment out to join an existing network
#define WIFI_AP
// Optional fixed channel for accesspoint
// #define AP_CHAN 5
#endif #endif
// A Name for the Camera. (can be set in myconfig.h) // A Name for the Camera. (can be set in myconfig.h)
@ -51,8 +55,9 @@
// This will be displayed to identify the firmware // This will be displayed to identify the firmware
char myVer[] PROGMEM = __DATE__ " @ " __TIME__; char myVer[] PROGMEM = __DATE__ " @ " __TIME__;
char myRotation[5];
// current rotation direction
char myRotation[5];
#include "camera_pins.h" #include "camera_pins.h"
@ -89,7 +94,6 @@ void setup() {
// set the initialisation for image rotation // set the initialisation for image rotation
int n = snprintf(myRotation,sizeof(myRotation),"%d",CAM_ROTATION); int n = snprintf(myRotation,sizeof(myRotation),"%d",CAM_ROTATION);
// Serial.printf("Config Rotation: \"%s\" size %d\n",myRotation,sizeof(myRotation));
#ifdef LED_PIN // If we have a notification LED set it to output #ifdef LED_PIN // If we have a notification LED set it to output
@ -174,7 +178,11 @@ void setup() {
#ifdef WIFI_AP #ifdef WIFI_AP
Serial.println("Setting up AP"); Serial.println("Setting up AP");
WiFi.softAP(ssid, password, wifichan); #ifdef AP_CHAN
WiFi.softAP(ssid, password, AP_CHAN);
# else
WiFi.softAP(ssid, password);
#endif
#else #else
WiFi.begin(ssid, password); WiFi.begin(ssid, password);

View File

@ -3,15 +3,15 @@
const char* ssid = "my-access-point-ssid"; const char* ssid = "my-access-point-ssid";
const char* password = "my-access-point-password"; const char* password = "my-access-point-password";
const int wifichan = 5;
// Optionally give the camera a name for the web interface // Optionally give the camera a name for the web interface
// (nb: this is not the network hostname) // (nb: this is not the network hostname)
#define CAM_NAME "UltiCam" #define CAM_NAME "my-awesome-webcam"
// Optional initial rotation // Optional initial rotation
#define CAM_ROTATION 90 // #define CAM_ROTATION 90
// Optional AP setup
#define WIFI_AP
// Optional AccessPoint setup, uncomment to enable
// #define WIFI_AP
// Optionall accesspoint channel number
// #define AP_CHAN 5