mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-21 20:44:47 +00:00
All Canned All the time
This commit is contained in:
parent
4317d477b9
commit
c67a0103ab
@ -243,14 +243,8 @@ void ExpressLRSFiveWay::shutdown()
|
||||
shutdownAtMsec = millis() + 3000;
|
||||
}
|
||||
|
||||
// Emulate user button, or canned message SELECT
|
||||
// This is necessary as canned message module doesn't translate SELECT to user button presses if the module is disabled
|
||||
// Contained as one method for easier remapping of buttons by user
|
||||
void ExpressLRSFiveWay::click()
|
||||
{
|
||||
if (!moduleConfig.canned_message.enabled)
|
||||
powerFSM.trigger(EVENT_PRESS);
|
||||
else
|
||||
sendKey(INPUT_BROKER_SELECT);
|
||||
}
|
||||
|
||||
|
@ -793,7 +793,6 @@ void NodeDB::installDefaultModuleConfig()
|
||||
moduleConfig.external_notification.nag_timeout = 60;
|
||||
#endif
|
||||
moduleConfig.has_canned_message = true;
|
||||
moduleConfig.canned_message.enabled = true;
|
||||
#if USERPREFS_MQTT_ENABLED && !MESHTASTIC_EXCLUDE_MQTT
|
||||
moduleConfig.mqtt.enabled = true;
|
||||
#endif
|
||||
|
@ -48,7 +48,6 @@ CannedMessageModule *cannedMessageModule;
|
||||
CannedMessageModule::CannedMessageModule()
|
||||
: SinglePortModule("canned", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread("CannedMessage")
|
||||
{
|
||||
if (moduleConfig.canned_message.enabled || CANNED_MESSAGE_MODULE_ENABLE) {
|
||||
this->loadProtoForModule();
|
||||
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE &&
|
||||
!CANNED_MESSAGE_MODULE_ENABLE) {
|
||||
@ -59,10 +58,6 @@ CannedMessageModule::CannedMessageModule()
|
||||
LOG_INFO("CannedMessageModule is enabled");
|
||||
this->inputObserver.observe(inputBroker);
|
||||
}
|
||||
} else {
|
||||
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
|
||||
disable();
|
||||
}
|
||||
}
|
||||
static bool returnToCannedList = false;
|
||||
bool hasKeyForNode(const meshtastic_NodeInfoLite *node)
|
||||
@ -832,8 +827,7 @@ int32_t CannedMessageModule::runOnce()
|
||||
}
|
||||
|
||||
// Normal module disable/idle handling
|
||||
if (((!moduleConfig.canned_message.enabled) && !CANNED_MESSAGE_MODULE_ENABLE) ||
|
||||
(this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) || (this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE)) {
|
||||
if ((this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) || (this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE)) {
|
||||
temporaryMessage = "";
|
||||
return INT32_MAX;
|
||||
}
|
||||
@ -1020,9 +1014,6 @@ const char *CannedMessageModule::getNodeName(NodeNum node)
|
||||
|
||||
bool CannedMessageModule::shouldDraw()
|
||||
{
|
||||
if (!moduleConfig.canned_message.enabled && !CANNED_MESSAGE_MODULE_ENABLE) {
|
||||
return false;
|
||||
}
|
||||
return (currentMessageIndex != -1) || (this->runState != CANNED_MESSAGE_RUN_STATE_INACTIVE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user