From ab0f3e8c6b369ad571614bcd6fe7b8d2e7c2995b Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 20 Jan 2024 10:03:49 +0100 Subject: [PATCH] =?UTF-8?q?Pin=20D1=20war=20defekt,=20daher=20haben=20wir?= =?UTF-8?q?=20dauf=20D4=20ge=C3=A4ndert.=20Dieser=20ist=20geleichzeitig=20?= =?UTF-8?q?die=202.=20Status=20LED=20auf=20dem=20Lua=20Bord=20und=20zeigt?= =?UTF-8?q?=20den=20Status=20geschlossen=20an.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/client/nodemcu/statusclient/certs.template | 11 +++++------ .../client/nodemcu/statusclient/credentials.template | 8 ++------ source/client/nodemcu/statusclient/statusclient.ino | 4 +++- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/source/client/nodemcu/statusclient/certs.template b/source/client/nodemcu/statusclient/certs.template index 07679bb..84d25ad 100644 --- a/source/client/nodemcu/statusclient/certs.template +++ b/source/client/nodemcu/statusclient/certs.template @@ -7,8 +7,7 @@ * Replace the comments in certificate sections with our own certificates. */ - -const char SERVER_CERT[] PROGMEM = R"EOF( +constexpr static inline char const CA_CERTS[] PROGMEM = R"EOF( -----BEGIN CERTIFICATE----- /* * lace for the public server certificate to authenticate the doorstatus @@ -17,7 +16,7 @@ const char SERVER_CERT[] PROGMEM = R"EOF( -----END CERTIFICATE----- )EOF"; -const char CLIENT_CERT[] PROGMEM = R"EOF( +constexpr static inline char const CLIENT_CERT[] PROGMEM = R"EOF( -----BEGIN CERTIFICATE----- /* * Place for the clients (this program) public certificate to authenticate @@ -26,11 +25,11 @@ const char CLIENT_CERT[] PROGMEM = R"EOF( -----END CERTIFICATE----- )EOF"; -const char CLIENT_KEY[] PROGMEM = R"EOF( ------BEGIN CERTIFICATE----- +constexpr static inline char const CLIENT_KEY[] PROGMEM = R"EOF( +-----BEGIN RSA PRIVATE KEY----- /* * Place for the clients private key file. */ ------END CERTIFICATE----- +-----END RSA PRIVATE KEY----- )EOF"; diff --git a/source/client/nodemcu/statusclient/credentials.template b/source/client/nodemcu/statusclient/credentials.template index 2ba711d..4235c06 100644 --- a/source/client/nodemcu/statusclient/credentials.template +++ b/source/client/nodemcu/statusclient/credentials.template @@ -9,9 +9,5 @@ */ /* wifi credentials */ -#define SSID_1 "your_first__wlan_ssid" -#define PSK_1 "your_first_wlan_passwort" -#define SSID_2 "your_second_wlan_ssid" -#define PSK_2 "your_seconde_wlan_password" -#define SSID_3 "your_third_wlan_ssid" -#define PSK_3 "your_third_wlan_password" +constexpr static inline char const SSID[] = "your_first__wlan_ssid" +constexpr static inline char const PSK[] = "your_first_wlan_passwort" diff --git a/source/client/nodemcu/statusclient/statusclient.ino b/source/client/nodemcu/statusclient/statusclient.ino index d70f4cb..cfe7164 100644 --- a/source/client/nodemcu/statusclient/statusclient.ino +++ b/source/client/nodemcu/statusclient/statusclient.ino @@ -23,7 +23,9 @@ namespace cpp23 { // defining some constants enum : uint8_t { LED_PIN = 16, // D0 - REED_PIN = 5 // D1 + //REED_PIN = 5 // D1 + REED_PIN = 2 // D4 + }; enum class door_state {