hjd1964/OnStepX

FYSETC S6 GPS

kbahey opened this issue · 1 comments

I could not get the FYSETC S6 to compile until I removed the software serial section from the HAL_STM32F446.h file:

Once we get this working with Serial3, we will need to revisit this later for those who have it wired to the soft serial port.

diff --git a/src/HAL/HAL_STM32F446.h b/src/HAL/HAL_STM32F446.h
index b05ddad..5844eb0 100644
--- a/src/HAL/HAL_STM32F446.h
+++ b/src/HAL/HAL_STM32F446.h
@@ -29,24 +29,6 @@
   #define SERIAL_C Serial3
 #endif
 
-// Handle special case of using software serial for a GPS
-#if SerialGPS == SoftwareSerial2
-  #define SWSERIAL_1
-  #define SWSERIAL_1_RX PA3
-  #define SWSERIAL_1_TX PA2
-  #define SERIAL_GPS SWSerial1
-#endif
-
-/*
-// Handle special case of using software serial for a GPS
-#if SerialGPS == SoftwareSerial2
-  #include <SoftwareSerial.h>
-  SoftwareSerial SWSerialGPS(PA3, PA2); // RX2, TX2
-  #undef SerialGPS
-  #define SerialGPS SWSerialGPS
-#endif
-*/
-
 // New symbol for the default I2C port ---------------------------------------------------------------
 #include <Wire.h>
 #define HAL_Wire Wire

My Config.h has:

  #define TIME_LOCATION_SOURCE    GPS
  #define SERIAL_GPS              Serial3
  #define SERIAL_GPS_BAUD         9600

I added the code to handle SoftwareSerial for GPS to X.
It's general purpose now so instead of "SoftwareSerial2" it's called "SoftSerial". For an S6 the HAL automatically adds the #defines for RX/TX at the Serial2 location. For others boards, if needed, they can assign elsewhere. The TLS/GPS class then creates the SoftwareSerial object.