mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 17:13:38 +00:00
RPi Pico screen, CannedMessageModule (CardKB) and reboot support (#2595)
* Make input_source case insensitive * Implement reboot for RP2040 * Remove EXT_NOTFIFY_OUT as it conflicts with I2C and module is not supported * RP2040 has screen, button and wire * Add default I2C pins also for Pico W
This commit is contained in:
parent
97606cd382
commit
d8ad2b3f48
@ -123,8 +123,8 @@ int CannedMessageModule::splitConfiguredMessages()
|
||||
int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
{
|
||||
if ((strlen(moduleConfig.canned_message.allow_input_source) > 0) &&
|
||||
(strcmp(moduleConfig.canned_message.allow_input_source, event->source) != 0) &&
|
||||
(strcmp(moduleConfig.canned_message.allow_input_source, "_any") != 0)) {
|
||||
(strcasecmp(moduleConfig.canned_message.allow_input_source, event->source) != 0) &&
|
||||
(strcasecmp(moduleConfig.canned_message.allow_input_source, "_any") != 0)) {
|
||||
// Event source is not accepted.
|
||||
// Event only accepted if source matches the configured one, or
|
||||
// the configured one is "_any" (or if there is no configured
|
||||
|
@ -2,9 +2,18 @@
|
||||
|
||||
#define ARCH_RP2040
|
||||
|
||||
#ifndef HAS_BUTTON
|
||||
#define HAS_BUTTON 1
|
||||
#endif
|
||||
#ifndef HAS_TELEMETRY
|
||||
#define HAS_TELEMETRY 1
|
||||
#endif
|
||||
#ifndef HAS_SCREEN
|
||||
#define HAS_SCREEN 1
|
||||
#endif
|
||||
#ifndef HAS_WIRE
|
||||
#define HAS_WIRE 1
|
||||
#endif
|
||||
#ifndef HAS_SENSOR
|
||||
#define HAS_SENSOR 1
|
||||
#endif
|
||||
|
@ -12,6 +12,8 @@ void powerCommandsCheck()
|
||||
ESP.restart();
|
||||
#elif defined(ARCH_NRF52)
|
||||
NVIC_SystemReset();
|
||||
#elif defined(ARCH_RP2040)
|
||||
rp2040.reboot();
|
||||
#else
|
||||
rebootAtMsec = -1;
|
||||
LOG_WARN("FIXME implement reboot for this platform. Skipping for now.\n");
|
||||
@ -33,4 +35,4 @@ void powerCommandsCheck()
|
||||
LOG_WARN("FIXME implement shutdown for this platform");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
@ -15,11 +15,11 @@
|
||||
#define USE_SH1106 1
|
||||
#undef GPS_SERIAL_NUM
|
||||
|
||||
// #define I2C_SDA 6
|
||||
// #define I2C_SCL 7
|
||||
// default I2C pins:
|
||||
// SDA = 4
|
||||
// SCL = 5
|
||||
|
||||
#define BUTTON_PIN 17
|
||||
#define EXT_NOTIFY_OUT 4
|
||||
|
||||
#define LED_PIN PIN_LED
|
||||
|
||||
|
@ -15,11 +15,11 @@
|
||||
#define USE_SH1106 1
|
||||
#undef GPS_SERIAL_NUM
|
||||
|
||||
// #define I2C_SDA 6
|
||||
// #define I2C_SCL 7
|
||||
// default I2C pins:
|
||||
// SDA = 4
|
||||
// SCL = 5
|
||||
|
||||
#define BUTTON_PIN 17
|
||||
#define EXT_NOTIFY_OUT 4
|
||||
|
||||
#define BATTERY_PIN 26
|
||||
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
|
||||
|
Loading…
Reference in New Issue
Block a user