Skip to content

Commit

Permalink
Merge pull request #239 from jgauchia/devel_serial
Browse files Browse the repository at this point in the history
Review Serial port for GPS
  • Loading branch information
jgauchia authored Nov 8, 2024
2 parents 0023162 + 013becf commit 0520c5b
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 545 deletions.
2 changes: 1 addition & 1 deletion lib/gps/GPSfix_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define GPS_FIX_DATE
#define GPS_FIX_TIME
#define GPS_FIX_LOCATION
#define GPS_FIX_LOCATION_DMS
//#define GPS_FIX_LOCATION_DMS
#define GPS_FIX_ALTITUDE
#define GPS_FIX_SPEED
#define GPS_FIX_VELNED
Expand Down
2 changes: 2 additions & 0 deletions lib/gps/NMEAGPS_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
// the last sentence the device sends if you have disabled
// it. Just select the last sentence that you have *enabled*.

#define NMEAGPS_COHERENT

//------------------------------------------------------
// Choose how multiple sentences are merged into a fix:
// 1) No merging
Expand Down
4 changes: 3 additions & 1 deletion lib/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ void initGPS()
gpsPort.begin(gpsBaudDetected, SERIAL_8N1, GPS_RX, GPS_TX);
}
}
gpsPort.setRxBufferSize(512);

#ifdef AT6558D_GPS
// FACTORY RESET
// gpsPort.println("$PCAS10,3*1F\r\n");
Expand Down Expand Up @@ -165,7 +167,7 @@ void getGPSData()

// Satellite info
gpsData.satInView = (uint8_t)GPS.sat_count;
for (uint8_t i = 0; i < GPS.sat_count; i++)
for (uint8_t i = 0; i < gpsData.satInView; i++)
{
satTracker[i].satNum = (uint8_t)GPS.satellites[i].id;
satTracker[i].elev = (uint8_t)GPS.satellites[i].elevation;
Expand Down
4 changes: 2 additions & 2 deletions lib/gps/gps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ extern bool isTimeFixed;
extern long gpsBaudDetected;
extern bool nmea_output_enable;

static unsigned long GPS_BAUD[] = {4800, 9600, 19200, 38400, 0};
static const char *GPS_BAUD_PCAS[] = {"$PCAS01,0*1C\r\n", "$PCAS01,1*1D\r\n", "$PCAS01,2*1E\r\n", "$PCAS01,3*1F\r\n"};
static unsigned long GPS_BAUD[] = {4800, 9600, 19200, 0};
static const char *GPS_BAUD_PCAS[] = {"$PCAS01,0*1C\r\n", "$PCAS01,1*1D\r\n", "$PCAS01,2*1E\r\n"};
static const char *GPS_RATE_PCAS[] = {"$PCAS02,1000*2E\r\n", "$PCAS02,500*1A\r\n", "$PCAS02,250*18\r\n", "$PCAS02,200*1D\r\n", "$PCAS02,100*1E\r\n"};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/gui/src/deviceSettingsScr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void createDeviceSettingsScr()
lv_obj_clear_flag(list, LV_OBJ_FLAG_CLICKABLE);
lv_obj_set_align(list, LV_ALIGN_OUT_LEFT_BOTTOM);
dropdown = lv_dropdown_create(list);
lv_dropdown_set_options(dropdown, "4800\n9600\n19200\n38400\nAUTO");
lv_dropdown_set_options(dropdown, "4800\n9600\n19200\nAUTO");
lv_dropdown_set_selected(dropdown, gpsBaud);
lv_obj_t* item = lv_dropdown_get_list(dropdown);
lv_obj_set_style_bg_color(item, lv_color_hex(objectColor), LV_PART_SELECTED | LV_STATE_CHECKED);
Expand Down
2 changes: 1 addition & 1 deletion lib/panel/ILI9488_FT5x06_SPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class LGFX : public lgfx::LGFX_Device
cfg.dma_channel = SPI_DMA_CH_AUTO;
cfg.pin_sclk = TFT_SPI_SCLK;
cfg.pin_mosi = TFT_SPI_MOSI;
cfg.pin_miso = TFT_SPI_MISO;
cfg.pin_miso = -1;
cfg.pin_dc = TFT_SPI_DC;
_bus_instance.config(cfg);
_panel_instance.setBus(&_bus_instance);
Expand Down
17 changes: 2 additions & 15 deletions lib/tasks/tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,9 @@ void gpsTask(void *pvParameters)
}

xSemaphoreGive(gpsMutex);
// if (GPS.time.isValid() && !isTimeFixed)
// {
// setTime(GPS.time.hour(),
// GPS.time.minute(),
// GPS.time.second(),
// GPS.date.day(),
// GPS.date.month(),
// GPS.date.year());
// // utc = now();
// // local = CE.toLocal(utc);
// // setTime(local);
// isTimeFixed = true;
// }
}
vTaskDelay(1); /// portTICK_PERIOD_MS);

vTaskDelay(1); /// portTICK_PERIOD_MS);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ default_envs = ICENAV_BOARD
platform = espressif32
framework = arduino
version = 0.1.8_Alpha
revision = 76
revision = 77
monitor_speed = 115200
;monitor_rts = 0
;monitor_dtr = 0
Expand Down
56 changes: 0 additions & 56 deletions tools/GPSfix_cfg.h

This file was deleted.

Loading

0 comments on commit 0520c5b

Please sign in to comment.