Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security fixes, build-break fix, and best-practices fixes #523

Merged
merged 16 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ESPixelStick/src/input/externalInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ fsm_ExternalInput_wait_for_off_state fsm_ExternalInput_wait_for_off_state_imp;
/* Code */
/*****************************************************************************/

c_ExternalInput::c_ExternalInput(void)
c_ExternalInput::c_ExternalInput(void) :
m_name(),
m_iPinId(0),
m_polarity(Polarity_t::ActiveLow),
m_ExpirationTime(0),
m_bIsEnabled(false),
m_iInputDebounceCount(0),
m_iInputHoldTimeMS(0),
m_bHadLongPush(false),
m_bHadShortPush(false),
m_pCurrentFsmState(&fsm_ExternalInput_boot_imp)
{
// DEBUG_START;
fsm_ExternalInput_boot_imp.Init(*this);
fsm_ExternalInput_boot_imp.Init(*this); // currently redundant, but might Init() might do more ... so important to leave this
// DEBUG_END;

} // c_ExternalInput
Expand Down
18 changes: 9 additions & 9 deletions ESPixelStick/src/input/externalInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ class c_ExternalInput final
# define M_ID CN_id

String m_name;
uint32_t m_iPinId = 0;
henrygab marked this conversation as resolved.
Show resolved Hide resolved
Polarity_t m_polarity = Polarity_t::ActiveLow;
time_t m_ExpirationTime = 0;
bool m_bIsEnabled = false;
uint32_t m_iInputDebounceCount = 0;
uint32_t m_iInputHoldTimeMS = 0;
bool m_bHadLongPush = false;
bool m_bHadShortPush = false;
fsm_ExternalInput_state * m_pCurrentFsmState = nullptr;
uint32_t m_iPinId;
Polarity_t m_polarity;
time_t m_ExpirationTime;
bool m_bIsEnabled;
uint32_t m_iInputDebounceCount;
uint32_t m_iInputHoldTimeMS;
bool m_bHadLongPush;
bool m_bHadShortPush;
fsm_ExternalInput_state * m_pCurrentFsmState;

friend class fsm_ExternalInput_boot;
friend class fsm_ExternalInput_off_state;
Expand Down