mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Compare commits
5 Commits
3633e68aed
...
dc6eb092d9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dc6eb092d9 | ||
![]() |
cc5d00e211 | ||
![]() |
1a8ab2aadc | ||
![]() |
608fdc6f52 | ||
![]() |
ba7f23bb9b |
@ -431,6 +431,8 @@ class LGFX : public lgfx::LGFX_Device
|
||||
#if HAS_TOUCHSCREEN
|
||||
#if defined(T_WATCH_S3) || defined(ELECROW)
|
||||
lgfx::Touch_FT5x06 _touch_instance;
|
||||
#elif defined(TOUCH_CS)
|
||||
lgfx::Touch_XPT2046 _touch_instance;
|
||||
#else
|
||||
lgfx::Touch_GT911 _touch_instance;
|
||||
#endif
|
||||
@ -494,8 +496,17 @@ class LGFX : public lgfx::LGFX_Device
|
||||
#endif
|
||||
cfg.dummy_read_bits = 1; // Number of bits for dummy read before non-pixel data read
|
||||
cfg.readable = true; // Set to true if data can be read
|
||||
#ifndef TFT_INVERSION_OFF
|
||||
cfg.invert = true; // Set to true if the light/darkness of the panel is reversed
|
||||
#else
|
||||
cfg.invert = false;
|
||||
#endif
|
||||
|
||||
#if !defined(TFT_RGB_ORDER) || (TFT_RGB_ORDER == TFT_BGR)
|
||||
cfg.rgb_order = false; // Set to true if the panel's red and blue are swapped
|
||||
#else
|
||||
cfg.rgb_order = true;
|
||||
#endif
|
||||
cfg.dlen_16bit =
|
||||
false; // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI
|
||||
cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)
|
||||
@ -522,6 +533,7 @@ class LGFX : public lgfx::LGFX_Device
|
||||
#endif
|
||||
|
||||
#if HAS_TOUCHSCREEN
|
||||
#if !defined(TOUCH_CS)
|
||||
// Configure settings for touch screen control.
|
||||
{
|
||||
auto cfg = _touch_instance.config();
|
||||
@ -554,6 +566,30 @@ class LGFX : public lgfx::LGFX_Device
|
||||
_touch_instance.config(cfg);
|
||||
_panel_instance.setTouch(&_touch_instance);
|
||||
}
|
||||
#else // if defined(TOUCH_CS)
|
||||
{
|
||||
// Configure settings for touch control.
|
||||
auto touch_cfg = _touch_instance.config();
|
||||
|
||||
touch_cfg.x_min = TFT_TOUCH_X_MIN;
|
||||
touch_cfg.x_max = TFT_TOUCH_X_MAX;
|
||||
touch_cfg.y_min = TFT_TOUCH_Y_MIN;
|
||||
touch_cfg.y_max = TFT_TOUCH_Y_MAX;
|
||||
touch_cfg.pin_int = -1;
|
||||
touch_cfg.bus_shared = true;
|
||||
touch_cfg.offset_rotation = TFT_TOUCH_OFFSET_ROTATION;
|
||||
// SPI configuration
|
||||
touch_cfg.spi_host = ST7789_SPI_HOST;
|
||||
touch_cfg.freq = SPI_TOUCH_FREQUENCY;
|
||||
touch_cfg.pin_sclk = ST7789_SCK;
|
||||
touch_cfg.pin_mosi = ST7789_SDA;
|
||||
touch_cfg.pin_miso = ST7789_MISO;
|
||||
touch_cfg.pin_cs = TOUCH_CS;
|
||||
|
||||
_touch_instance.config(touch_cfg);
|
||||
_panel_instance.setTouch(&_touch_instance);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
setPanel(&_panel_instance); // Sets the panel to use.
|
||||
|
@ -205,6 +205,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
||||
// app not to send locations on our behalf.
|
||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag;
|
||||
strncpy(myNodeInfo.pio_env, optstr(APP_ENV), sizeof(myNodeInfo.pio_env));
|
||||
myNodeInfo.nodedb_count = static_cast<uint16_t>(nodeDB->getNumMeshNodes());
|
||||
fromRadioScratch.my_info = myNodeInfo;
|
||||
state = STATE_SEND_UIDATA;
|
||||
|
||||
|
@ -651,11 +651,12 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
|
||||
shouldIgnoreNonstandardPorts = true;
|
||||
#endif
|
||||
if (shouldIgnoreNonstandardPorts && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&
|
||||
IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_ATAK_FORWARDER, meshtastic_PortNum_ATAK_PLUGIN,
|
||||
meshtastic_PortNum_PAXCOUNTER_APP, meshtastic_PortNum_IP_TUNNEL_APP, meshtastic_PortNum_AUDIO_APP,
|
||||
meshtastic_PortNum_PRIVATE_APP, meshtastic_PortNum_DETECTION_SENSOR_APP, meshtastic_PortNum_RANGE_TEST_APP,
|
||||
meshtastic_PortNum_REMOTE_HARDWARE_APP)) {
|
||||
LOG_DEBUG("Ignore packet on blacklisted portnum for CORE_PORTNUMS_ONLY");
|
||||
!IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_TEXT_MESSAGE_APP, meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP,
|
||||
meshtastic_PortNum_POSITION_APP, meshtastic_PortNum_NODEINFO_APP, meshtastic_PortNum_ROUTING_APP,
|
||||
meshtastic_PortNum_TELEMETRY_APP, meshtastic_PortNum_ADMIN_APP, meshtastic_PortNum_ALERT_APP,
|
||||
meshtastic_PortNum_KEY_VERIFICATION_APP, meshtastic_PortNum_WAYPOINT_APP,
|
||||
meshtastic_PortNum_STORE_FORWARD_APP, meshtastic_PortNum_TRACEROUTE_APP)) {
|
||||
LOG_DEBUG("Ignore packet on non-standard portnum for CORE_PORTNUMS_ONLY");
|
||||
cancelSending(p->from, p->id);
|
||||
skipHandle = true;
|
||||
}
|
||||
|
@ -19,8 +19,6 @@
|
||||
#ifndef _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
||||
#define _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
||||
|
||||
#define GAT562_MESH_TRIAL_TRACKER
|
||||
|
||||
// led pin 2 (blue), see https://github.com/meshtastic/firmware/blob/master/src/mesh/NodeDB.cpp#L723
|
||||
#define RAK4630
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user