38 lines
No EOL
748 B
C++
38 lines
No EOL
748 B
C++
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "pico/cyw43_arch.h"
|
|
|
|
enum class Waste {
|
|
Restmuell,
|
|
GelberSack,
|
|
Papiertonne,
|
|
Biotonne,
|
|
Problemstoffmobil,
|
|
};
|
|
|
|
struct WasteDate {
|
|
std::chrono::year_month_day date;
|
|
std::vector<Waste> wasteTypes;
|
|
};
|
|
|
|
std::vector<WasteDate> parseCsv(const std::string &csv);
|
|
|
|
int wifi_setup(uint32_t country, const std::string &ssid, const std::string &pw,
|
|
bool firstTry = true);
|
|
void wifi_enable();
|
|
|
|
void wifi_disable();
|
|
|
|
bool isDST(const datetime_t &dt);
|
|
|
|
void recover_from_sleep(uint scb_orig, uint clock0_orig, uint clock1_orig);
|
|
|
|
void perform_sleep(datetime_t &untilDt);
|
|
|
|
//void add_one_day(datetime_t &dt);
|
|
|
|
void add_one_hour(datetime_t &dt); |