Add welcome screen feature toggle

This commit is contained in:
Jm Casler 2022-04-13 21:59:25 -07:00
parent ecc114f1cd
commit 7e977aea00
4 changed files with 11 additions and 6 deletions

View File

@ -115,8 +115,9 @@ platform_packages =
;upload_port = /dev/ttyUSB0 ;upload_port = /dev/ttyUSB0
;monitor_port = /dev/ttyUSB0 ;monitor_port = /dev/ttyUSB0
upload_port = /dev/cu.SLAB_USBtoUART ; Please don't delete these lines. JM uses them.
monitor_port = /dev/cu.SLAB_USBtoUART ;upload_port = /dev/cu.SLAB_USBtoUART
;monitor_port = /dev/cu.SLAB_USBtoUART
; customize the partition table ; customize the partition table
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables

View File

@ -131,6 +131,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define DISABLE_NTP //#define DISABLE_NTP
#define DISABLE_WELCOME_UNSET
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// OLED & Input // OLED & Input
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -894,9 +894,11 @@ int32_t Screen::runOnce()
showingBootScreen = false; showingBootScreen = false;
} }
#ifndef DISABLE_WELCOME_UNSET
if (radioConfig.preferences.region == RegionCode_Unset) { if (radioConfig.preferences.region == RegionCode_Unset) {
setWelcomeFrames(); setWelcomeFrames();
} }
#endif
// Process incoming commands. // Process incoming commands.
for (;;) { for (;;) {

View File

@ -360,13 +360,13 @@ Routing_Error perhapsEncode(MeshPacket *p)
} else { } else {
DEBUG_MSG("Compressing message.\n"); DEBUG_MSG("Compressing message.\n");
// Copy the compressed data into the meshpacket // Copy the compressed data into the meshpacket
p->decoded.payload_compressed.size = compressed_len; //p->decoded.payload_compressed.size = compressed_len;
memcpy(p->decoded.payload_compressed.bytes, compressed_out, compressed_len); //memcpy(p->decoded.payload_compressed.bytes, compressed_out, compressed_len);
p->decoded.which_payloadVariant = Data_payload_compressed_tag; //p->decoded.which_payloadVariant = Data_payload_compressed_tag;
} }
if (0) { if (1) {
char decompressed_out[Constants_DATA_PAYLOAD_LEN] = {}; char decompressed_out[Constants_DATA_PAYLOAD_LEN] = {};
int decompressed_len; int decompressed_len;