mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-07 20:19:25 +00:00
Compare commits
4 Commits
667b4ef0f2
...
3d5eb34c5c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3d5eb34c5c | ||
![]() |
3a9a4bbb92 | ||
![]() |
6eba2789d0 | ||
![]() |
9b4c260a92 |
@ -29,7 +29,7 @@ default_envs = tbeam
|
|||||||
;default_envs = rak4631
|
;default_envs = rak4631
|
||||||
;default_envs = rak4631_eth_gw
|
;default_envs = rak4631_eth_gw
|
||||||
;default_envs = rak2560
|
;default_envs = rak2560
|
||||||
;default_envs = rak10701
|
;default_envs = rak_wismeshtap
|
||||||
;default_envs = wio-e5
|
;default_envs = wio-e5
|
||||||
;default_envs = radiomaster_900_bandit_nano
|
;default_envs = radiomaster_900_bandit_nano
|
||||||
;default_envs = radiomaster_900_bandit_micro
|
;default_envs = radiomaster_900_bandit_micro
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#include "TouchScreenBase.h"
|
#include "TouchScreenBase.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
#if defined(RAK14014) && !defined(MESHTASTIC_EXCLUDE_CANNEDMESSAGES)
|
||||||
|
#include "modules/CannedMessageModule.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TIME_LONG_PRESS
|
#ifndef TIME_LONG_PRESS
|
||||||
#define TIME_LONG_PRESS 400
|
#define TIME_LONG_PRESS 400
|
||||||
#endif
|
#endif
|
||||||
@ -102,12 +106,30 @@ int32_t TouchScreenBase::runOnce()
|
|||||||
}
|
}
|
||||||
_touchedOld = touched;
|
_touchedOld = touched;
|
||||||
|
|
||||||
|
#if defined RAK14014
|
||||||
|
// Speed up the processing speed of the keyboard in virtual keyboard mode
|
||||||
|
auto state = cannedMessageModule->getRunState();
|
||||||
|
if (state == CANNED_MESSAGE_RUN_STATE_FREETEXT) {
|
||||||
|
if (_tapped) {
|
||||||
|
_tapped = false;
|
||||||
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
|
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||||
|
_tapped = false;
|
||||||
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
|
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
// fire TAP event when no 2nd tap occured within time
|
// fire TAP event when no 2nd tap occured within time
|
||||||
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||||
_tapped = false;
|
_tapped = false;
|
||||||
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||||
LOG_DEBUG("action TAP(%d/%d)", _last_x, _last_y);
|
LOG_DEBUG("action TAP(%d/%d)", _last_x, _last_y);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// fire LONG_PRESS event without the need for release
|
// fire LONG_PRESS event without the need for release
|
||||||
if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {
|
if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {
|
||||||
|
@ -231,6 +231,9 @@ NodeDB::NodeDB()
|
|||||||
moduleConfig.telemetry.health_update_interval = Default::getConfiguredOrMinimumValue(
|
moduleConfig.telemetry.health_update_interval = Default::getConfiguredOrMinimumValue(
|
||||||
moduleConfig.telemetry.health_update_interval, min_default_telemetry_interval_secs);
|
moduleConfig.telemetry.health_update_interval, min_default_telemetry_interval_secs);
|
||||||
}
|
}
|
||||||
|
// Ensure that the neighbor info update interval is coerced to the minimum
|
||||||
|
moduleConfig.neighbor_info.update_interval =
|
||||||
|
Default::getConfiguredOrMinimumValue(moduleConfig.neighbor_info.update_interval, min_neighbor_info_broadcast_secs);
|
||||||
|
|
||||||
if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate)))
|
if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate)))
|
||||||
saveWhat |= SEGMENT_DEVICESTATE;
|
saveWhat |= SEGMENT_DEVICESTATE;
|
||||||
@ -473,7 +476,7 @@ void NodeDB::initConfigIntervals()
|
|||||||
|
|
||||||
config.display.screen_on_secs = default_screen_on_secs;
|
config.display.screen_on_secs = default_screen_on_secs;
|
||||||
|
|
||||||
#if defined(T_WATCH_S3) || defined(T_DECK)
|
#if defined(T_WATCH_S3) || defined(T_DECK) || defined(RAK14014)
|
||||||
config.power.is_power_saving = true;
|
config.power.is_power_saving = true;
|
||||||
config.display.screen_on_secs = 30;
|
config.display.screen_on_secs = 30;
|
||||||
config.power.wait_bluetooth_secs = 30;
|
config.power.wait_bluetooth_secs = 30;
|
||||||
|
@ -218,62 +218,70 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case STATE_SEND_METADATA:
|
case STATE_SEND_METADATA:
|
||||||
LOG_DEBUG("Send Metadata");
|
LOG_DEBUG("Send device metadata");
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag;
|
||||||
fromRadioScratch.metadata = getDeviceMetadata();
|
fromRadioScratch.metadata = getDeviceMetadata();
|
||||||
state = STATE_SEND_CHANNELS;
|
state = STATE_SEND_CHANNELS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_CHANNELS:
|
case STATE_SEND_CHANNELS:
|
||||||
LOG_DEBUG("Send Channels");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag;
|
||||||
fromRadioScratch.channel = channels.getByIndex(config_state);
|
fromRadioScratch.channel = channels.getByIndex(config_state);
|
||||||
config_state++;
|
config_state++;
|
||||||
// Advance when we have sent all of our Channels
|
// Advance when we have sent all of our Channels
|
||||||
if (config_state >= MAX_NUM_CHANNELS) {
|
if (config_state >= MAX_NUM_CHANNELS) {
|
||||||
|
LOG_DEBUG("Send channels %d", config_state);
|
||||||
state = STATE_SEND_CONFIG;
|
state = STATE_SEND_CONFIG;
|
||||||
config_state = _meshtastic_AdminMessage_ConfigType_MIN + 1;
|
config_state = _meshtastic_AdminMessage_ConfigType_MIN + 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_CONFIG:
|
case STATE_SEND_CONFIG:
|
||||||
LOG_DEBUG("Send Radio config");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;
|
||||||
switch (config_state) {
|
switch (config_state) {
|
||||||
case meshtastic_Config_device_tag:
|
case meshtastic_Config_device_tag:
|
||||||
|
LOG_DEBUG("Send config: device");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_tag;
|
||||||
fromRadioScratch.config.payload_variant.device = config.device;
|
fromRadioScratch.config.payload_variant.device = config.device;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_position_tag:
|
case meshtastic_Config_position_tag:
|
||||||
|
LOG_DEBUG("Send config: position");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_position_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_position_tag;
|
||||||
fromRadioScratch.config.payload_variant.position = config.position;
|
fromRadioScratch.config.payload_variant.position = config.position;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_power_tag:
|
case meshtastic_Config_power_tag:
|
||||||
|
LOG_DEBUG("Send config: power");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_power_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_power_tag;
|
||||||
fromRadioScratch.config.payload_variant.power = config.power;
|
fromRadioScratch.config.payload_variant.power = config.power;
|
||||||
fromRadioScratch.config.payload_variant.power.ls_secs = default_ls_secs;
|
fromRadioScratch.config.payload_variant.power.ls_secs = default_ls_secs;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_network_tag:
|
case meshtastic_Config_network_tag:
|
||||||
|
LOG_DEBUG("Send config: network");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_network_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_network_tag;
|
||||||
fromRadioScratch.config.payload_variant.network = config.network;
|
fromRadioScratch.config.payload_variant.network = config.network;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_display_tag:
|
case meshtastic_Config_display_tag:
|
||||||
|
LOG_DEBUG("Send config: display");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_display_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_display_tag;
|
||||||
fromRadioScratch.config.payload_variant.display = config.display;
|
fromRadioScratch.config.payload_variant.display = config.display;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_lora_tag:
|
case meshtastic_Config_lora_tag:
|
||||||
|
LOG_DEBUG("Send config: lora");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_lora_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_lora_tag;
|
||||||
fromRadioScratch.config.payload_variant.lora = config.lora;
|
fromRadioScratch.config.payload_variant.lora = config.lora;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_bluetooth_tag:
|
case meshtastic_Config_bluetooth_tag:
|
||||||
|
LOG_DEBUG("Send config: bluetooth");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;
|
||||||
fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;
|
fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_security_tag:
|
case meshtastic_Config_security_tag:
|
||||||
|
LOG_DEBUG("Send config: security");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;
|
||||||
fromRadioScratch.config.payload_variant.security = config.security;
|
fromRadioScratch.config.payload_variant.security = config.security;
|
||||||
break;
|
break;
|
||||||
case meshtastic_Config_sessionkey_tag:
|
case meshtastic_Config_sessionkey_tag:
|
||||||
|
LOG_DEBUG("Send config: sessionkey");
|
||||||
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
|
fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -292,58 +300,70 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_SEND_MODULECONFIG:
|
case STATE_SEND_MODULECONFIG:
|
||||||
LOG_DEBUG("Send Module Config");
|
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_moduleConfig_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_moduleConfig_tag;
|
||||||
switch (config_state) {
|
switch (config_state) {
|
||||||
case meshtastic_ModuleConfig_mqtt_tag:
|
case meshtastic_ModuleConfig_mqtt_tag:
|
||||||
|
LOG_DEBUG("Send module config: mqtt");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.mqtt = moduleConfig.mqtt;
|
fromRadioScratch.moduleConfig.payload_variant.mqtt = moduleConfig.mqtt;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_serial_tag:
|
case meshtastic_ModuleConfig_serial_tag:
|
||||||
|
LOG_DEBUG("Send module config: serial");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_serial_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_serial_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.serial = moduleConfig.serial;
|
fromRadioScratch.moduleConfig.payload_variant.serial = moduleConfig.serial;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_external_notification_tag:
|
case meshtastic_ModuleConfig_external_notification_tag:
|
||||||
|
LOG_DEBUG("Send module config: ext notification");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.external_notification = moduleConfig.external_notification;
|
fromRadioScratch.moduleConfig.payload_variant.external_notification = moduleConfig.external_notification;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_store_forward_tag:
|
case meshtastic_ModuleConfig_store_forward_tag:
|
||||||
|
LOG_DEBUG("Send module config: store forward");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.store_forward = moduleConfig.store_forward;
|
fromRadioScratch.moduleConfig.payload_variant.store_forward = moduleConfig.store_forward;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_range_test_tag:
|
case meshtastic_ModuleConfig_range_test_tag:
|
||||||
|
LOG_DEBUG("Send module config: range test");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.range_test = moduleConfig.range_test;
|
fromRadioScratch.moduleConfig.payload_variant.range_test = moduleConfig.range_test;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_telemetry_tag:
|
case meshtastic_ModuleConfig_telemetry_tag:
|
||||||
|
LOG_DEBUG("Send module config: telemetry");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.telemetry = moduleConfig.telemetry;
|
fromRadioScratch.moduleConfig.payload_variant.telemetry = moduleConfig.telemetry;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_canned_message_tag:
|
case meshtastic_ModuleConfig_canned_message_tag:
|
||||||
|
LOG_DEBUG("Send module config: canned message");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.canned_message = moduleConfig.canned_message;
|
fromRadioScratch.moduleConfig.payload_variant.canned_message = moduleConfig.canned_message;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_audio_tag:
|
case meshtastic_ModuleConfig_audio_tag:
|
||||||
|
LOG_DEBUG("Send module config: audio");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_audio_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_audio_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.audio = moduleConfig.audio;
|
fromRadioScratch.moduleConfig.payload_variant.audio = moduleConfig.audio;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_remote_hardware_tag:
|
case meshtastic_ModuleConfig_remote_hardware_tag:
|
||||||
|
LOG_DEBUG("Send module config: remote hardware");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_neighbor_info_tag:
|
case meshtastic_ModuleConfig_neighbor_info_tag:
|
||||||
|
LOG_DEBUG("Send module config: neighbor info");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_detection_sensor_tag:
|
case meshtastic_ModuleConfig_detection_sensor_tag:
|
||||||
|
LOG_DEBUG("Send module config: detection sensor");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.detection_sensor = moduleConfig.detection_sensor;
|
fromRadioScratch.moduleConfig.payload_variant.detection_sensor = moduleConfig.detection_sensor;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_ambient_lighting_tag:
|
case meshtastic_ModuleConfig_ambient_lighting_tag:
|
||||||
|
LOG_DEBUG("Send module config: ambient lighting");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;
|
fromRadioScratch.moduleConfig.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;
|
||||||
break;
|
break;
|
||||||
case meshtastic_ModuleConfig_paxcounter_tag:
|
case meshtastic_ModuleConfig_paxcounter_tag:
|
||||||
|
LOG_DEBUG("Send module config: paxcounter");
|
||||||
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;
|
fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;
|
||||||
fromRadioScratch.moduleConfig.payload_variant.paxcounter = moduleConfig.paxcounter;
|
fromRadioScratch.moduleConfig.payload_variant.paxcounter = moduleConfig.paxcounter;
|
||||||
break;
|
break;
|
||||||
@ -443,7 +463,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
return numbytes;
|
return numbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DEBUG("no FromRadio packet available");
|
LOG_DEBUG("No FromRadio packet available");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
this->shift = !this->shift;
|
this->shift = !this->shift;
|
||||||
} else if (keyTapped == "⌫") {
|
} else if (keyTapped == "⌫") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = 0x08;
|
this->payload = 0x08;
|
||||||
|
|
||||||
@ -341,7 +343,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
validEvent = true;
|
validEvent = true;
|
||||||
} else if (keyTapped == " ") {
|
} else if (keyTapped == " ") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = keyTapped[0];
|
this->payload = keyTapped[0];
|
||||||
|
|
||||||
@ -361,7 +365,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
|
|
||||||
this->shift = false;
|
this->shift = false;
|
||||||
} else if (keyTapped != "") {
|
} else if (keyTapped != "") {
|
||||||
|
#ifndef RAK14014
|
||||||
this->highlight = keyTapped[0];
|
this->highlight = keyTapped[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
||||||
|
|
||||||
@ -830,6 +836,11 @@ void CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState
|
|||||||
|
|
||||||
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
||||||
|
|
||||||
|
#ifdef RAK14014 // Optimize the touch range of the virtual keyboard in the bottom row
|
||||||
|
if (outerIndex == outerSize - 1) {
|
||||||
|
updatedLetter.rectHeight = 240 - yOffset;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;
|
this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;
|
||||||
|
|
||||||
float characterOffset = ((cellWidth / 2) - (letter.width / 2));
|
float characterOffset = ((cellWidth / 2) - (letter.width / 2));
|
||||||
|
@ -68,6 +68,10 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
|
|
||||||
String drawWithCursor(String text, int cursor);
|
String drawWithCursor(String text, int cursor);
|
||||||
|
|
||||||
|
#ifdef RAK14014
|
||||||
|
cannedMessageModuleRunState getRunState() const { return runState; }
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-Override the wantPacket method. We need the Routing Messages to look for ACKs.
|
-Override the wantPacket method. We need the Routing Messages to look for ACKs.
|
||||||
*/
|
*/
|
||||||
|
@ -580,6 +580,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
|
|||||||
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
LOG_DEBUG("portnum %i message", env->packet->decoded.portnum);
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("nothing, pkt not decrypted");
|
LOG_DEBUG("nothing, pkt not decrypted");
|
||||||
|
mqttPool.release(env);
|
||||||
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
return; // Don't upload a still-encrypted PKI packet if not encryption_enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,4 +769,4 @@ bool MQTT::isPrivateIpAddress(const char address[])
|
|||||||
|
|
||||||
int octet2Num = atoi(octet2);
|
int octet2Num = atoi(octet2);
|
||||||
return octet2Num >= 16 && octet2Num <= 31;
|
return octet2Num >= 16 && octet2Num <= 31;
|
||||||
}
|
}
|
@ -1,15 +1,18 @@
|
|||||||
; The very slick RAK wireless RAK10701 Field Tester device. Note you will have to flash to Arduino bootloader to use this firmware. Be aware touch is not currently working.
|
; The very slick RAK wireless RAK10701 Field Tester device. Note you will have to flash to Arduino bootloader to use this firmware. Be aware touch is not currently working.
|
||||||
[env:rak10701]
|
[env:rak_wismeshtap]
|
||||||
extends = nrf52840_base
|
extends = nrf52840_base
|
||||||
board_level = extra
|
board_level = extra
|
||||||
board = wiscore_rak4631
|
board = wiscore_rak4631
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak10701 -D RAK_4631
|
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak_wismeshtap -D RAK_4631
|
||||||
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak10701> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
|
||||||
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak_wismeshtap> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
@ -243,7 +243,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
|||||||
// Therefore must be 1 to keep peripherals powered
|
// Therefore must be 1 to keep peripherals powered
|
||||||
// Power is on the controllable 3V3_S rail
|
// Power is on the controllable 3V3_S rail
|
||||||
// #define PIN_GPS_RESET (34)
|
// #define PIN_GPS_RESET (34)
|
||||||
#define PIN_GPS_EN PIN_3V3_EN
|
// #define PIN_GPS_EN PIN_3V3_EN
|
||||||
#define PIN_GPS_PPS (17) // Pulse per second input from the GPS
|
#define PIN_GPS_PPS (17) // Pulse per second input from the GPS
|
||||||
|
|
||||||
#define GPS_RX_PIN PIN_SERIAL1_RX
|
#define GPS_RX_PIN PIN_SERIAL1_RX
|
Loading…
Reference in New Issue
Block a user