Compare commits

..

7 commits

4 changed files with 10 additions and 5 deletions

View file

@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 23)
# Initialise pico_sdk from installed location # Initialise pico_sdk from installed location
# (note this can come from environment, CMake cache etc) # (note this can come from environment, CMake cache etc)
@ -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}") message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.4.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
endif() endif()
project(abfall VERSION "1.1.0" LANGUAGES C CXX ASM) project(abfall VERSION "1.2.2" LANGUAGES C CXX ASM)
# Initialise the Raspberry Pi Pico SDK # Initialise the Raspberry Pi Pico SDK
pico_sdk_init() pico_sdk_init()

View file

@ -49,7 +49,7 @@ std::string HttpClient::retrieveWasteDatesAsCsv() {
std::string result(""); 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); &m_settings, body_callback, nullptr, nullptr);
// If there was an error, return empty result. // If there was an error, return empty result.

View file

@ -261,11 +261,14 @@ void add_one_day(datetime_t &dt) {
dt.year += 1; dt.year += 1;
dt.month = 1; dt.month = 1;
dt.day = 1; dt.day = 1;
dt.dotw = (dt.dotw + 1) % 7;
} else if (dt.day == daysPerMonth[dt.month]) { } else if (dt.day == daysPerMonth[dt.month]) {
dt.month = (dt.month + 1) % 12; dt.month = (dt.month + 1) % 12;
dt.day = 1; dt.day = 1;
dt.dotw = (dt.dotw + 1) % 7;
} else { } else {
dt.day += 1; dt.day += 1;
dt.dotw = (dt.dotw + 1) % 7;
} }
} }

View file

@ -1,10 +1,12 @@
#include "ws2812.h" #include "ws2812.h"
#include <utility>
WS2812::WS2812(uint gpio, PIO pio, uint sm) : m_pio{pio}, m_gpio{gpio}, m_sm{sm} { init(); } WS2812::WS2812(uint gpio, PIO pio, uint sm) : m_pio{pio}, m_gpio{gpio}, m_sm{sm} { init(); }
WS2812::~WS2812() { deinit(); } WS2812::~WS2812() { deinit(); }
void WS2812::switchColor(Color color) { putPixel(static_cast<uint32_t>(color)); } void WS2812::switchColor(Color color) { putPixel(std::to_underlying(color)); }
void WS2812::blinkReady() { void WS2812::blinkReady() {
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {