Skip to content

Commit

Permalink
Merge branch 'mega' into UweKaditz
Browse files Browse the repository at this point in the history
  • Loading branch information
uwekaditz committed Sep 17, 2024
2 parents cb9b6c1 + fbe91b2 commit 9952778
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ src/CustomIR.h
docs/source/Plugin/_plugin_sets_overview.repl
*.PVS-Studio.stacktrace.txt


.platformio/
16 changes: 8 additions & 8 deletions src/src/Helpers/_Plugin_Helper_GPIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ bool GPIO_plugin_helper_data_t::init(
newStatus.task++;
}


// @giig1967g-20181022: set initial UserVar of the switch
if ((newStatus.state != -1) && Settings.TaskDevicePin1Inversed[event->TaskIndex]) {
UserVar.setFloat(event->TaskIndex, 0, !newStatus.state);
} else {
UserVar.setFloat(event->TaskIndex, 0, newStatus.state);
}

// if boot pinState must be send, inverse default pinState
// this is done to force the trigger in PLUGIN_TEN_PER_SECOND
if (_sendBootState) {
Expand All @@ -90,6 +82,14 @@ bool GPIO_plugin_helper_data_t::init(

// setPinState(PLUGIN_ID_009, _mcpPin, PIN_MODE_INPUT, switchstate[event->TaskIndex]);
savePortStatus(_portStatus_key, newStatus);

// @giig1967g-20181022: set initial UserVar of the switch
if ((newStatus.state != -1) && Settings.TaskDevicePin1Inversed[event->TaskIndex]) {
UserVar.setFloat(event->TaskIndex, 0, !newStatus.state);
} else {
UserVar.setFloat(event->TaskIndex, 0, newStatus.state);
}

return true;
}

Expand Down

0 comments on commit 9952778

Please sign in to comment.