mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-10 07:02:11 +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)
|
int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||||
{
|
{
|
||||||
if ((strlen(moduleConfig.canned_message.allow_input_source) > 0) &&
|
if ((strlen(moduleConfig.canned_message.allow_input_source) > 0) &&
|
||||||
(strcmp(moduleConfig.canned_message.allow_input_source, event->source) != 0) &&
|
(strcasecmp(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, "_any") != 0)) {
|
||||||
// Event source is not accepted.
|
// Event source is not accepted.
|
||||||
// Event only accepted if source matches the configured one, or
|
// Event only accepted if source matches the configured one, or
|
||||||
// the configured one is "_any" (or if there is no configured
|
// the configured one is "_any" (or if there is no configured
|
||||||
|
@ -2,9 +2,18 @@
|
|||||||
|
|
||||||
#define ARCH_RP2040
|
#define ARCH_RP2040
|
||||||
|
|
||||||
|
#ifndef HAS_BUTTON
|
||||||
|
#define HAS_BUTTON 1
|
||||||
|
#endif
|
||||||
#ifndef HAS_TELEMETRY
|
#ifndef HAS_TELEMETRY
|
||||||
#define HAS_TELEMETRY 1
|
#define HAS_TELEMETRY 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HAS_SCREEN
|
||||||
|
#define HAS_SCREEN 1
|
||||||
|
#endif
|
||||||
|
#ifndef HAS_WIRE
|
||||||
|
#define HAS_WIRE 1
|
||||||
|
#endif
|
||||||
#ifndef HAS_SENSOR
|
#ifndef HAS_SENSOR
|
||||||
#define HAS_SENSOR 1
|
#define HAS_SENSOR 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,6 +12,8 @@ void powerCommandsCheck()
|
|||||||
ESP.restart();
|
ESP.restart();
|
||||||
#elif defined(ARCH_NRF52)
|
#elif defined(ARCH_NRF52)
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
|
#elif defined(ARCH_RP2040)
|
||||||
|
rp2040.reboot();
|
||||||
#else
|
#else
|
||||||
rebootAtMsec = -1;
|
rebootAtMsec = -1;
|
||||||
LOG_WARN("FIXME implement reboot for this platform. Skipping for now.\n");
|
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");
|
LOG_WARN("FIXME implement shutdown for this platform");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,11 +15,11 @@
|
|||||||
#define USE_SH1106 1
|
#define USE_SH1106 1
|
||||||
#undef GPS_SERIAL_NUM
|
#undef GPS_SERIAL_NUM
|
||||||
|
|
||||||
// #define I2C_SDA 6
|
// default I2C pins:
|
||||||
// #define I2C_SCL 7
|
// SDA = 4
|
||||||
|
// SCL = 5
|
||||||
|
|
||||||
#define BUTTON_PIN 17
|
#define BUTTON_PIN 17
|
||||||
#define EXT_NOTIFY_OUT 4
|
|
||||||
|
|
||||||
#define LED_PIN PIN_LED
|
#define LED_PIN PIN_LED
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
#define USE_SH1106 1
|
#define USE_SH1106 1
|
||||||
#undef GPS_SERIAL_NUM
|
#undef GPS_SERIAL_NUM
|
||||||
|
|
||||||
// #define I2C_SDA 6
|
// default I2C pins:
|
||||||
// #define I2C_SCL 7
|
// SDA = 4
|
||||||
|
// SCL = 5
|
||||||
|
|
||||||
#define BUTTON_PIN 17
|
#define BUTTON_PIN 17
|
||||||
#define EXT_NOTIFY_OUT 4
|
|
||||||
|
|
||||||
#define BATTERY_PIN 26
|
#define BATTERY_PIN 26
|
||||||
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
|
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
|
||||||
|
Loading…
Reference in New Issue
Block a user