mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-24 14:26:11 +02:00
parent
0be3a23603
commit
be9c505407
11 changed files with 83 additions and 44 deletions
|
@ -51,6 +51,7 @@ void app::setup() {
|
|||
everySec(std::bind(&ahoywifi::tickWifiLoop, &mWifi), "wifiL");
|
||||
#endif
|
||||
|
||||
mSys.setup(&mTimestamp);
|
||||
mSys.addInverters(&mConfig->inst);
|
||||
if(mConfig->nrf.enabled) {
|
||||
mPayload.setup(this, &mSys, &mNrfRadio, &mStat, mConfig->nrf.maxRetransPerPyld, &mTimestamp);
|
||||
|
@ -413,7 +414,7 @@ void app:: zeroIvValues(bool checkAvail, bool skipYieldDay) {
|
|||
continue; // skip to next inverter
|
||||
|
||||
if (checkAvail) {
|
||||
if (!iv->isAvailable(mTimestamp))
|
||||
if (!iv->isAvailable())
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -496,7 +497,7 @@ void app::updateLed(void) {
|
|||
if (mConfig->led.led0 != 0xff) {
|
||||
Inverter<> *iv = mSys.getInverterByPos(0);
|
||||
if (NULL != iv) {
|
||||
if (iv->isProducing(mTimestamp))
|
||||
if (iv->isProducing())
|
||||
digitalWrite(mConfig->led.led0, led_on);
|
||||
else
|
||||
digitalWrite(mConfig->led.led0, led_off);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue