Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/input/ExpressLRSFiveWay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void ExpressLRSFiveWay::determineAction(KeyType key, PressLength length)
// Feed input to the canned messages module
void ExpressLRSFiveWay::sendKey(input_broker_event key)
{
InputEvent e;
InputEvent e = {};
e.source = inputSourceName;
e.inputEvent = key;
notifyObservers(&e);
Expand Down
2 changes: 1 addition & 1 deletion src/input/LinuxInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int32_t LinuxInput::runOnce()
int rd = read(events[i].data.fd, ev, sizeof(ev));
assert(rd > ((signed int)sizeof(struct input_event)));
for (int j = 0; j < rd / ((signed int)sizeof(struct input_event)); j++) {
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
e.kbchar = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/input/RotaryEncoderInterruptBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void RotaryEncoderInterruptBase::init(

int32_t RotaryEncoderInterruptBase::runOnce()
{
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
unsigned long now = millis();
Expand Down
2 changes: 1 addition & 1 deletion src/input/SeesawRotary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool SeesawRotary::init()

int32_t SeesawRotary::runOnce()
{
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
bool currentlyPressed = !ss.digitalRead(SS_SWITCH);

Expand Down
4 changes: 2 additions & 2 deletions src/input/SerialKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SerialKeyboard::SerialKeyboard(const char *name) : concurrency::OSThread(name)

void SerialKeyboard::erase()
{
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_BACK;
e.kbchar = 0x08;
e.source = this->_originName;
Expand Down Expand Up @@ -80,7 +80,7 @@ int32_t SerialKeyboard::runOnce()

if (keys < prevKeys) { // a new key has been pressed (and not released), doesn't works for multiple presses at once but
// shouldn't be a limitation
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
// SELECT OR SEND OR CANCEL EVENT
Expand Down
2 changes: 1 addition & 1 deletion src/input/TouchScreenImpl1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool TouchScreenImpl1::getTouch(int16_t &x, int16_t &y)
*/
void TouchScreenImpl1::onEvent(const TouchEvent &event)
{
InputEvent e;
InputEvent e = {};
e.source = event.source;
e.kbchar = 0;
e.touchX = event.x;
Expand Down
2 changes: 1 addition & 1 deletion src/input/TrackballInterruptBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void TrackballInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLef

int32_t TrackballInterruptBase::runOnce()
{
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;

// Handle long press detection for press button
Expand Down
2 changes: 1 addition & 1 deletion src/input/UpDownInterruptBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void UpDownInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinPress,

int32_t UpDownInterruptBase::runOnce()
{
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
unsigned long now = millis();

Expand Down
10 changes: 5 additions & 5 deletions src/input/kbI2cBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int32_t KbI2cBase::runOnce()
while (keyCount--) {
const BBQ10Keyboard::KeyEvent key = Q10keyboard.keyEvent();
if ((key.key != 0x00) && (key.state == BBQ10Keyboard::StateRelease)) {
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
switch (key.key) {
Expand Down Expand Up @@ -187,7 +187,7 @@ int32_t KbI2cBase::runOnce()
}
case 0x37: { // MPR121
MPRkeyboard.trigger();
InputEvent e;
InputEvent e = {};

while (MPRkeyboard.hasEvent()) {
char nextEvent = MPRkeyboard.dequeueEvent();
Expand Down Expand Up @@ -250,7 +250,7 @@ int32_t KbI2cBase::runOnce()
}
case 0x84: { // Adafruit TCA8418
TCAKeyboard.trigger();
InputEvent e;
InputEvent e = {};
while (TCAKeyboard.hasEvent()) {
char nextEvent = TCAKeyboard.dequeueEvent();
e.inputEvent = INPUT_BROKER_ANYKEY;
Expand Down Expand Up @@ -350,7 +350,7 @@ int32_t KbI2cBase::runOnce()
}
if (PrintDataBuf != 0) {
LOG_DEBUG("RAK14004 key 0x%x pressed", PrintDataBuf);
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_MATRIXKEY;
e.source = this->_originName;
e.kbchar = PrintDataBuf;
Expand All @@ -365,7 +365,7 @@ int32_t KbI2cBase::runOnce()

if (i2cBus->available()) {
char c = i2cBus->read();
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
switch (c) {
Expand Down
2 changes: 1 addition & 1 deletion src/input/kbMatrixBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int32_t KbMatrixBase::runOnce()
if (key != 0) {
LOG_DEBUG("Key 0x%x pressed", key);
// reset shift now that we have a keypress
InputEvent e;
InputEvent e = {};
e.inputEvent = INPUT_BROKER_NONE;
e.source = this->_originName;
switch (key) {
Expand Down