Last row no work
This commit is contained in:
parent
2689166f45
commit
59b6a10de8
3 changed files with 15 additions and 27 deletions
|
|
@ -275,33 +275,21 @@ void ISEDisplay::handlePWMChange(uint8_t pin, bool state, uint16_t value)
|
|||
uint8_t current_page = this->currentPage;
|
||||
if (current_page == PAGE_STANDBY)
|
||||
{
|
||||
if (pin >= 1 && pin <= 4)
|
||||
if ((pin >= 0 && pin <= 3) ||(pin >= 8 && pin <= 11))
|
||||
{
|
||||
// Light
|
||||
updateLightGroupStatePageStandby();
|
||||
// time_since_last_screen_update = millis(); // update time since last activity
|
||||
}
|
||||
else if (pin == 5 || pin == 6)
|
||||
{
|
||||
// Air Purifier
|
||||
updateAirPurifierStateStandby();
|
||||
// time_since_last_screen_update = millis(); // update time since last activity
|
||||
}
|
||||
}
|
||||
else if (current_page == PAGE_DASHBOARD)
|
||||
{
|
||||
if (pin >= 1 && pin <= 4)
|
||||
if ((pin >= 0 && pin <= 3) ||(pin >= 8 && pin <= 11))
|
||||
{
|
||||
// Light
|
||||
updateLightGroupStatePageDashboard();
|
||||
// time_since_last_screen_update = millis(); // update time since last activity
|
||||
}
|
||||
else if (pin == 5 || pin == 6)
|
||||
{
|
||||
// Air Purifier
|
||||
updateAirPurifierState();
|
||||
// time_since_last_screen_update = millis(); // update time since last activity
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -589,8 +577,8 @@ void ISEDisplay::setLightLevel(uint8_t row, uint8_t level)
|
|||
break;
|
||||
}
|
||||
|
||||
this->outputCard->setValue(primary_pin, primary);
|
||||
this->outputCard->setValue(secondary_pin, secondary);
|
||||
this->outputCard->setState(primary_pin, primary);
|
||||
this->outputCard->setState(secondary_pin, secondary);
|
||||
}
|
||||
|
||||
u_int8_t ISEDisplay::getLightLevel(uint8_t row)
|
||||
|
|
@ -600,8 +588,8 @@ u_int8_t ISEDisplay::getLightLevel(uint8_t row)
|
|||
//lightLevel = this->outputCard->getValue(row);
|
||||
uint8_t primary_pin = *(light_array + 2*(row - 1));
|
||||
uint8_t secondary_pin = *(light_array + 2*(row - 1) + 1);
|
||||
bool primary = this->outputCard->getValue(primary_pin);
|
||||
bool secondary = this->outputCard->getValue(secondary_pin);
|
||||
bool primary = this->outputCard->getState(primary_pin);
|
||||
bool secondary = this->outputCard->getState(secondary_pin);
|
||||
if (primary && secondary)
|
||||
{
|
||||
lightLevel = 3;
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ change light assignment
|
|||
8: row 4 column 2
|
||||
*/
|
||||
|
||||
#define LIGHT_ROW1_COLUMN1 1
|
||||
#define LIGHT_ROW1_COLUMN2 2
|
||||
#define LIGHT_ROW2_COLUMN1 3
|
||||
#define LIGHT_ROW2_COLUMN2 4
|
||||
#define LIGHT_ROW3_COLUMN1 5
|
||||
#define LIGHT_ROW3_COLUMN2 6
|
||||
#define LIGHT_ROW4_COLUMN1 7
|
||||
#define LIGHT_ROW4_COLUMN2 8
|
||||
#define LIGHT_ROW1_COLUMN1 0
|
||||
#define LIGHT_ROW1_COLUMN2 1
|
||||
#define LIGHT_ROW2_COLUMN1 2
|
||||
#define LIGHT_ROW2_COLUMN2 3
|
||||
#define LIGHT_ROW3_COLUMN1 8
|
||||
#define LIGHT_ROW3_COLUMN2 9
|
||||
#define LIGHT_ROW4_COLUMN1 10
|
||||
#define LIGHT_ROW4_COLUMN2 11
|
||||
|
||||
/*
|
||||
5: Air Purifier status (on/off)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue