Remove rss from weather

This commit is contained in:
Tyler Perkins 2021-12-22 12:46:56 -05:00
parent 23629bc4cf
commit 05173c872d
2 changed files with 2 additions and 12 deletions

View File

@ -21,7 +21,6 @@ weather::weather(){
_title = WEATHER_TITLE; _title = WEATHER_TITLE;
//let set to default, will make it so it updates the texture ASAP //let set to default, will make it so it updates the texture ASAP
//_last_update; //_last_update;
_rss = rss_utils::rss(WEATHER_URL_SOURCE);
} }
weather::~weather(){ weather::~weather(){
@ -66,17 +65,10 @@ void weather::update() {
_last_update = std::chrono::high_resolution_clock::now(); _last_update = std::chrono::high_resolution_clock::now();
//fetch updates //fetch updates
_rss.update();
//update internal state //update internal state
current_desc = "CURRENT DESC PLACEHOLDER";
current_desc = _rss.getItem(0).getDescription(); tommorow_desc = "TOMMOROW DESC PLACEHOLDER";
current_desc = current_desc.substr(0,current_desc.find('<'));
std::cerr << "Current Description : (\" " << current_desc << "\")\n";
tommorow_desc = _rss.getItem(1).getDescription();
tommorow_desc = tommorow_desc.substr(0,tommorow_desc.find('<'));
std::cerr << "Tommorow Description : (\" " << tommorow_desc << "\")\n";
} }
/////////////////////////////////////// ///////////////////////////////////////

View File

@ -9,7 +9,6 @@
#include "panel.hpp" #include "panel.hpp"
#include <chrono> #include <chrono>
#include "../util/rss.hpp"
#include <SDL.h> #include <SDL.h>
#include <SDL2/SDL_image.h> #include <SDL2/SDL_image.h>
@ -35,7 +34,6 @@ namespace dashboard::panel {
std::string tommorow_desc; std::string tommorow_desc;
rss_utils::rss _rss;
std::chrono::time_point<std::chrono::high_resolution_clock> _last_update; std::chrono::time_point<std::chrono::high_resolution_clock> _last_update;
std::chrono::milliseconds _update_interval; std::chrono::milliseconds _update_interval;
}; };