Skip to content

Commit

Permalink
e-ink support for weather
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurik72 committed Feb 19, 2020
1 parent 975c768 commit 66d7aaf
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 64 deletions.
1 change: 1 addition & 0 deletions HomeController/BME280Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ void BME280Controller::getdefaultconfig(JsonObject& json) {
#define BME_SDO_MOSI 5
#define BME_CS 14
void BME280Controller::setup() {
DBG_OUTPUT_PORT.println("BME280Controller setup");
if (this->uselegacy) {
DBG_OUTPUT_PORT.println("Init Adafruit_BME280");
this->pbme = new Adafruit_BME280();
Expand Down
6 changes: 6 additions & 0 deletions HomeController/BaseController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ void CBaseController::savestate() {
savefile(this->get_filename_state().c_str(), this->serializestate());


}
void CBaseController::raise_event(ControllerEvent evt, uint16_t evData) {
Controllers::getInstance()->raise_event(this, evt, evData);
}
void CBaseController::on_event(CBaseController* pSender,ControllerEvent evt, uint16_t evData) {

}
void CBaseController::set_monitor_state(uint channel, bool isOn, long mask , uint masklen, uint duration) {

Expand Down
6 changes: 6 additions & 0 deletions HomeController/BaseController.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ void runcoreloop(void*param);
#endif
#define CONTROLLER_MAX_COMMANDS 99
class CBaseController;
enum ControllerEvent {
SleepStart = 0,
SleepUp = 1

};
class ControllerFactory
{
public:
Expand Down Expand Up @@ -246,6 +250,8 @@ class CBaseController
short get_priority() { return priority; };
virtual bool ispersiststate() { return false; }
virtual void savestate() ;
virtual void raise_event(ControllerEvent evt,uint16_t evData);
virtual void on_event(CBaseController* pSender,ControllerEvent evt, uint16_t evData);
virtual bool loadstate()=0;
String get_filename_state();
virtual void set_power_on() {};
Expand Down
Loading

0 comments on commit 66d7aaf

Please sign in to comment.