From 2e62919999f5083827beaced62af01d0904c3826 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 11 Jan 2023 12:48:10 +0100 Subject: [PATCH 1/6] push version number --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21c085f..efa2610 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "1.4.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.4.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -project(abfall VERSION "1.1.0" LANGUAGES C CXX ASM) +project(abfall VERSION "1.2.0" LANGUAGES C CXX ASM) # Initialise the Raspberry Pi Pico SDK pico_sdk_init() From e9fef4f4d3a2ca4cfc0477d1421c42a2db66338b Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Thu, 12 Jan 2023 08:49:02 +0100 Subject: [PATCH 2/6] using new language feature --- CMakeLists.txt | 2 +- src/ws2812.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efa2610..07932d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_C_STANDARD 11) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) # Initialise pico_sdk from installed location # (note this can come from environment, CMake cache etc) diff --git a/src/ws2812.cpp b/src/ws2812.cpp index edf35b7..d21074b 100644 --- a/src/ws2812.cpp +++ b/src/ws2812.cpp @@ -1,10 +1,12 @@ #include "ws2812.h" +#include + WS2812::WS2812(uint gpio, PIO pio, uint sm) : m_pio{pio}, m_gpio{gpio}, m_sm{sm} { init(); } WS2812::~WS2812() { deinit(); } -void WS2812::switchColor(Color color) { putPixel(static_cast(color)); } +void WS2812::switchColor(Color color) { putPixel(std::to_underlying(color)); } void WS2812::blinkReady() { for (int i = 0; i < 2; i++) { From 5b12a9cd1631eb2874d7a235128c130b1f5f83e2 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 13 Jan 2023 17:53:25 +0100 Subject: [PATCH 3/6] fix setting dotw --- src/utils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.cpp b/src/utils.cpp index 9c8caf2..d07a4f4 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -261,11 +261,14 @@ void add_one_day(datetime_t &dt) { dt.year += 1; dt.month = 1; dt.day = 1; + dt.dotw = (dt.dotw + 1) % 7; } else if (dt.day == daysPerMonth[dt.month]) { dt.month = (dt.month + 1) % 12; dt.day = 1; + dt.dotw = (dt.dotw + 1) % 7; } else { dt.day += 1; + dt.dotw = (dt.dotw + 1) % 7; } } From 89f646fc6cdba25df36ad008ea7e1a4cb6388546 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 13 Jan 2023 17:53:55 +0100 Subject: [PATCH 4/6] push version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07932d2..c5d5d1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "1.4.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.4.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -project(abfall VERSION "1.2.0" LANGUAGES C CXX ASM) +project(abfall VERSION "1.2.1" LANGUAGES C CXX ASM) # Initialise the Raspberry Pi Pico SDK pico_sdk_init() From 58f364d930da43eb2a28e0bef586822073174e34 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 14 Jun 2023 15:01:33 +0200 Subject: [PATCH 5/6] hostname changed --- src/http_client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http_client.cpp b/src/http_client.cpp index c899c6c..4809783 100644 --- a/src/http_client.cpp +++ b/src/http_client.cpp @@ -49,7 +49,7 @@ std::string HttpClient::retrieveWasteDatesAsCsv() { std::string result(""); - err_t err = httpc_get_file_dns("beenas.brodbeck-online.de", port, "/abfall/abfall.csv", + err_t err = httpc_get_file_dns("hornet.brodbeck-online.de", port, "/abfall/abfall.csv", &m_settings, body_callback, nullptr, nullptr); // If there was an error, return empty result. @@ -75,4 +75,4 @@ std::string HttpClient::retrieveWasteDatesAsCsv() { #endif return result; -} \ No newline at end of file +} From 82178c139866539f10752bbbb39f596dad8f4f58 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 14 Jun 2023 15:02:43 +0200 Subject: [PATCH 6/6] new version 1.2.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5d5d1b..ce3a8f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "1.4.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.4.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -project(abfall VERSION "1.2.1" LANGUAGES C CXX ASM) +project(abfall VERSION "1.2.2" LANGUAGES C CXX ASM) # Initialise the Raspberry Pi Pico SDK pico_sdk_init()