mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-09 12:49:40 +00:00
Compare commits
No commits in common. "a48df917374019f408608e814451e9029a75d002" and "4cd2ba54795f47b732608eab8e834c50ea8cc9c1" have entirely different histories.
a48df91737
...
4cd2ba5479
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -2,6 +2,5 @@ meshtasticd (2.5.20.0) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* Initial packaging
|
* Initial packaging
|
||||||
* GitHub Actions Automatic version bump
|
* GitHub Actions Automatic version bump
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
-- Austin Lane <github-actions[bot]@users.noreply.github.com> Wed, 15 Jan 2025 14:08:54 +0000
|
-- Austin Lane <github-actions[bot]@users.noreply.github.com> Mon, 13 Jan 2025 19:24:14 +0000
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
#include "ScanAndSelect.h"
|
#include "ScanAndSelect.h"
|
||||||
#include "modules/CannedMessageModule.h"
|
#include "modules/CannedMessageModule.h"
|
||||||
#include <Throttle.h>
|
#include <Throttle.h>
|
||||||
#ifdef ARCH_PORTDUINO // Only to check for pin conflict with user button
|
|
||||||
#include "platform/portduino/PortduinoGlue.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
static const char name[] = "scanAndSelect"; // should match "allow input source" string
|
static const char name[] = "scanAndSelect"; // should match "allow input source" string
|
||||||
@ -33,9 +30,7 @@ bool ScanAndSelectInput::init()
|
|||||||
if (strcasecmp(moduleConfig.canned_message.allow_input_source, name) != 0)
|
if (strcasecmp(moduleConfig.canned_message.allow_input_source, name) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Determine which pin to use for the single scan-and-select button
|
// Use any available inputbroker pin as the button
|
||||||
// User can specify this by setting any of the inputbroker pins
|
|
||||||
// If all values are zero, we'll assume the user *does* want GPIO0
|
|
||||||
if (moduleConfig.canned_message.inputbroker_pin_press)
|
if (moduleConfig.canned_message.inputbroker_pin_press)
|
||||||
pin = moduleConfig.canned_message.inputbroker_pin_press;
|
pin = moduleConfig.canned_message.inputbroker_pin_press;
|
||||||
else if (moduleConfig.canned_message.inputbroker_pin_a)
|
else if (moduleConfig.canned_message.inputbroker_pin_a)
|
||||||
@ -43,25 +38,7 @@ bool ScanAndSelectInput::init()
|
|||||||
else if (moduleConfig.canned_message.inputbroker_pin_b)
|
else if (moduleConfig.canned_message.inputbroker_pin_b)
|
||||||
pin = moduleConfig.canned_message.inputbroker_pin_b;
|
pin = moduleConfig.canned_message.inputbroker_pin_b;
|
||||||
else
|
else
|
||||||
pin = 0; // GPIO 0 then
|
return false; // Short circuit: no button found
|
||||||
|
|
||||||
// Short circuit: if selected pin conficts with the user button
|
|
||||||
#if defined(ARCH_PORTDUINO)
|
|
||||||
int pinUserButton = 0;
|
|
||||||
if (settingsMap.count(user) != 0) {
|
|
||||||
pinUserButton = settingsMap[user];
|
|
||||||
}
|
|
||||||
#elif defined(USERPREFS_BUTTON_PIN)
|
|
||||||
int pinUserButton = config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN;
|
|
||||||
#elif defined(BUTTON_PIN)
|
|
||||||
int pinUserButton = config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN;
|
|
||||||
#else
|
|
||||||
int pinUserButton = config.device.button_gpio;
|
|
||||||
#endif
|
|
||||||
if (pin == pinUserButton) {
|
|
||||||
LOG_ERROR("ScanAndSelect conflict with user button");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set-up the button
|
// Set-up the button
|
||||||
pinMode(pin, INPUT_PULLUP);
|
pinMode(pin, INPUT_PULLUP);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 2
|
major = 2
|
||||||
minor = 5
|
minor = 5
|
||||||
build = 20
|
build = 19
|
||||||
|
Loading…
Reference in New Issue
Block a user