mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-05 20:40:25 -08:00
Fix attempt NMEA Stream Screen printing
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __AXP192_H__
|
||||
#define __AXP192_H__
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef Assets_h
|
||||
#define Assets_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef BatteryInterface_h
|
||||
#define BatteryInterface_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef Buffer_h
|
||||
#define Buffer_h
|
||||
|
||||
|
||||
@@ -281,9 +281,9 @@ void CommandLine::runCommand(String input) {
|
||||
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
|
||||
#ifdef HAS_GPS
|
||||
gps_obj.disable_queue();
|
||||
#endif
|
||||
//#ifdef HAS_GPS
|
||||
// gps_obj.disable_queue();
|
||||
//#endif
|
||||
|
||||
if(old_scan_mode == WIFI_SCAN_GPS_NMEA)
|
||||
Serial.println("END OF NMEA STREAM");
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef CommandLine_h
|
||||
#define CommandLine_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef Display_h
|
||||
#define Display_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef EvilPortal_h
|
||||
#define EvilPortal_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef GpsInterface_h
|
||||
#define GpsInterface_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef LedInterface_h
|
||||
#define LedInterface_h
|
||||
|
||||
|
||||
@@ -1672,6 +1672,7 @@ void MenuFunctions::RunSetup()
|
||||
});
|
||||
|
||||
this->addNodes(&deviceMenu, "NMEA Stream", TFT_ORANGE, NULL, GPS_MENU, [this]() {
|
||||
gps_obj.enable_queue();
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_GPS_NMEA;
|
||||
this->changeMenu(&gpsInfoMenu);
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_GPS_NMEA, TFT_ORANGE);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef MenuFunctions_h
|
||||
#define MenuFunctions_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SDInterface_h
|
||||
#define SDInterface_h
|
||||
|
||||
|
||||
@@ -750,6 +750,11 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
|
||||
display_obj.tteBar = false;
|
||||
#endif
|
||||
|
||||
#ifdef HAS_GPS
|
||||
if (gps_obj.queue_enabled())
|
||||
gps_obj.disable_queue();
|
||||
#endif
|
||||
}
|
||||
|
||||
String WiFiScan::getStaMAC()
|
||||
@@ -1170,6 +1175,20 @@ void WiFiScan::RunGPSNmea() {
|
||||
LinkedList<String> *buffer=gps_obj.get_queue();
|
||||
|
||||
static String old_nmea_sentence="";
|
||||
#ifdef HAS_SCREEN
|
||||
// Get screen position ready
|
||||
display_obj.tft.setTextWrap(true);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
|
||||
// Clean up screen first
|
||||
display_obj.tft.fillRect(0, (SCREEN_HEIGHT / 3) - 6, SCREEN_WIDTH, SCREEN_HEIGHT - ((SCREEN_HEIGHT / 3) - 6), TFT_BLACK);
|
||||
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
#endif
|
||||
|
||||
if(buffer && gps_obj.queue_enabled()){
|
||||
gps_obj.new_queue();
|
||||
int size=buffer->size();
|
||||
@@ -1189,26 +1208,22 @@ void WiFiScan::RunGPSNmea() {
|
||||
old_nmea_sentence=nmea_sentence;
|
||||
Serial.println(nmea_sentence);
|
||||
#ifdef HAS_SCREEN
|
||||
// Get screen position ready
|
||||
display_obj.tft.setTextWrap(true);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
|
||||
// Clean up screen first
|
||||
display_obj.tft.fillRect(0, (SCREEN_HEIGHT / 3) - 6, SCREEN_WIDTH, SCREEN_HEIGHT - ((SCREEN_HEIGHT / 3) - 6), TFT_BLACK);
|
||||
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
|
||||
display_obj.tft.print(nmea_sentence);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
gps_obj.sendSentence(Serial, gps_obj.generateGXgga().c_str());
|
||||
gps_obj.sendSentence(Serial, gps_obj.generateGXrmc().c_str());
|
||||
String gxgga = gps_obj.generateGXgga();
|
||||
String gxrmc = gps_obj.generateGXrmc();
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.print(gxgga);
|
||||
display_obj.tft.print(gxrmc);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
#endif
|
||||
|
||||
gps_obj.sendSentence(Serial, gxgga.c_str());
|
||||
gps_obj.sendSentence(Serial, gxrmc.c_str());
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef WiFiScan_h
|
||||
#define WiFiScan_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef configs_h
|
||||
|
||||
#define configs_h
|
||||
@@ -22,7 +24,7 @@
|
||||
//#define XIAO_ESP32_S3
|
||||
//// END BOARD TARGETS
|
||||
|
||||
#define MARAUDER_VERSION "v0.13.5"
|
||||
#define MARAUDER_VERSION "v0.13.6"
|
||||
|
||||
//// HARDWARE NAMES
|
||||
#ifdef MARAUDER_M5STICKC
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef flipperLED_h
|
||||
#define flipperLED_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef lang_var_h
|
||||
#define lang_var_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef Settings_h
|
||||
#define Settings_h
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef stickcLED_H
|
||||
#define stickcLED_H
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef xiaoLED_H
|
||||
#define xiaoLED_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user