ESPNOW fixes, Icons, Lights and much more

This commit is contained in:
2018-06-17 22:09:05 +02:00
parent 6fa5a11350
commit 25baa3a5bb
7 changed files with 146 additions and 66 deletions

View File

@ -62,15 +62,14 @@ bool lightActive = false;
int fanMode = FANS_AUTO;
#include "lights.h"
void setBoardOptions(uint8_t options) {
Serial.print("opt: ");
Serial.println(options, BIN);
if(lightActive != options & 1) {
lightActive = options & 1;
if(lightActive != (options >> 4) & 1) {
lightActive = (options >> 4) & 1;
shouldUpdateLights = true;
}
lightMode = options & 3;
fanMode = (options >> 2) & 3;
}
@ -312,6 +311,7 @@ void setup() {
Serial.println("ESPNow Init Failed");
ESP.restart();
}
esp_now_set_self_role(ESP_NOW_ROLE_COMBO);
// Once ESPNow is successfully Init, we will register for recv CB to
// get recv packer info.