From 20ebf25af7ff8d38533386dcd5df58ea87a8eddc Mon Sep 17 00:00:00 2001
From: Zoe Pfister <zoe.pfister@student.uibk.ac.at>
Date: Mon, 10 Oct 2022 10:59:55 +0200
Subject: [PATCH] fix compilation issues

---
 client/client/lib/espnow/src/ESPNow.cpp | 7 ++++---
 client/client/lib/espnow/src/ESPNow.hpp | 2 +-
 client/client/platformio.ini            | 3 ---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/client/client/lib/espnow/src/ESPNow.cpp b/client/client/lib/espnow/src/ESPNow.cpp
index 890392a..11dafda 100644
--- a/client/client/lib/espnow/src/ESPNow.cpp
+++ b/client/client/lib/espnow/src/ESPNow.cpp
@@ -36,7 +36,7 @@ void on_data_recv(const uint8_t *mac, const uint8_t *incomingData, int len)
 	} // host change shouldn't be an issue
 	preferences.end();
 	// sync time
-	esptime::rtc.setTime(
+	Time::getInstance().setTime(
 	    new_config.time_millis); // see https://www.esp32.com/viewtopic.php?t=9965, maybe this needs an offset
 }
 
@@ -54,8 +54,9 @@ esp_err_t espnow_setup()
 
 	hostInfo.channel = 0;
 
-	// TODO: PMK is used to encrypt LMK with the AES-128 algorithm. Call esp_now_set_pmk() to set PMK. If PMK is not set, a
-	// default PMK will be used. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_now.html
+	// TODO: PMK is used to encrypt LMK with the AES-128 algorithm. Call esp_now_set_pmk() to set PMK. If PMK is not
+	// set, a default PMK will be used.
+	// https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_now.html
 	hostInfo.encrypt = false;
 	esp_now_add_peer(&hostInfo);
 
diff --git a/client/client/lib/espnow/src/ESPNow.hpp b/client/client/lib/espnow/src/ESPNow.hpp
index 797d1f3..c28cfe2 100644
--- a/client/client/lib/espnow/src/ESPNow.hpp
+++ b/client/client/lib/espnow/src/ESPNow.hpp
@@ -17,7 +17,7 @@ typedef struct config {
 } config;
 
 esp_err_t espnow_setup();
-esp_err_t espnow_send_message(const Message& message);
+//esp_err_t espnow_send_message(const Message& message);
 bool is_host_defined();
 void get_host_mac(uint8_t *destination);
 void on_data_sent(const uint8_t *mac_addr, esp_now_send_status_t status);
diff --git a/client/client/platformio.ini b/client/client/platformio.ini
index 435ae69..28cc58c 100644
--- a/client/client/platformio.ini
+++ b/client/client/platformio.ini
@@ -20,9 +20,6 @@ build_flags =
 	-DCORE_DEBUG_LEVEL=5
 	-std=gnu++17
 build_unflags = -std=gnu++11
-; serial port
-monitor_port = /dev/ttyUSB1
-upload_port = /dev/ttyUSB1
 lib_deps =
 	sparkfun/SparkFun SCD30 Arduino Library@^1.0.18
 	Wire
-- 
GitLab