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