improve configuration of name and version

This commit is contained in:
Ronald Schaten 2016-05-18 09:04:10 +02:00
parent 9cffc34073
commit 933c94e7e5
3 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,8 @@
#include "DeviceLed.h"
#include "DeviceRgb.h"
const char* FWNAME = "things@h801wifi";
const byte PIN_LED = 14;
DeviceLed deviceLed(PIN_LED);

View File

@ -10,6 +10,8 @@
#include "DeviceLdr.h"
#include "DeviceButton.h"
const char* FWNAME = "things@witty";
const byte PIN_RGB_RED = D8;
const byte PIN_RGB_GREEN = D6;
const byte PIN_RGB_BLUE = D7;

View File

@ -3,6 +3,8 @@
#include "HardwareWitty.h"
//#include "HardwareH801wifi.h"
const char* FWVERSION = "1.0.0";
void setupHandler() {
for (int i = 0; i < sizeof(devices) / sizeof(*devices); i++) {
devices[i]->deviceSetup();
@ -16,7 +18,7 @@ void loopHandler() {
}
void setup() {
Homie.setFirmware("things", "1.0.1");
Homie.setFirmware(FWNAME, FWVERSION);
for (int i = 0; i < sizeof(devices) / sizeof(*devices); i++) {
devices[i]->deviceRegister();
}