<commit_before><commit_msg>v1.0 Initial release<commit_after>/* GPS LCD

    By <NAME>
    8/30/16
*/

#ifndef GPSLCD_h
#define GPSLCD_h

#define VERSION  "1.0"          // Version number
//#define _16x2                 // LCD type (20x4 or 16x2). Comment out for 20x4
//#define DEBUG                 // Comment out to turn on debug
//#define DATA_VALID_OVERRIDE   // Override the data valid flag (comment out to turn off)
                                // It also feed fake GPS data to the system for debugging

#define Rs_pin  0             // Pin hook up for the LCD via the I2C interface
#define Rw_pin  1 //                   "
#define En_pin  2 //                   "
#define BACKLIGHT_PIN 3 //             "
#define D4_pin  4 //                   "
#define D5_pin  5 //                   "
#define D6_pin  6 //                   "
#define D7_pin  7 //                   "
#define BACKLIGHT_SW 6               // LCD backlight select switch
#define INITIALIZATION_INTERVAL 1000 // Initialization display interval
#define SPEED_CUTOUT 10.0            // Value where the speed & heading are set to 0
#define TOGGLETIME_INTERVAL 5000     // Toggle display interval
#define CREDIT "GKG"                 // Yours truly :-)
//#define BACKLIGHT_OVERRIDE           // Override the LCD backlight switch (comment out to disable)
#ifdef BACKLIGHT_OVERRIDE
#define BACKLIGHT_ONOFF LOW          // Works with BACKLIGHT_OVERRIDE to force on/off the LCD backlight
#endif

#ifdef _16x2 //------------------------------------------------------
#define COLUMN 16             // Number of Columns
#define ROW 2                 // Number of rows
#define SPEED_ALTITUDE_SW 5   // Speed/Altitude select switch
#define I2C_ADDR    0x27      // Address of my 16x2 LCD

// Function Prototypes
//     Nada
#else // _20x4 ------------------------------------------------------
#define COLUMN 20             // Number of Columns
#define ROW 4                 // Number of rows
#define ALTITUDE_DATE_TIME_SW 5 // Altitude/Date time select switch
#define I2C_ADDR    0x3F      // Address of my 20x4 LCD
#define DISPLAY_12_HOUR       // Display either 12 or 24 hour time (comment out for 24)
#define CONVERT_TO_LOCAL      // Convert the UTC time/date to local time/date (comment out for UTC)
//#define _16CARDINAL         // Displays 16 cardinal heading points (comment out for 8)

// Function Prototypes
uint16_t leap (uint16_t year);
uint16_t zeller (uint16_t year, uint8_t month, uint8_t day);
uint8_t dayOfWeek (uint16_t year, uint8_t month, uint8_t day);
void printDay(uint8_t day);
const char* cardinal(double course);
bool IsDST(uint8_t day, uint8_t month, uint8_t DOW);
#ifdef CONVERT_TO_LOCAL
bool convertToLocal (uint8_t* hour, uint16_t* year, uint8_t* month,
                     uint8_t* day, const double lon, bool convertDate);
#endif // #ifdef CONVERT_TO_LOCAL
#endif //------------------------------------------------------------

struct GPSStruct {
  double   lat;           // Degrees
  double   lon;           // Degrees
  double   speed;         // MPH
  double   altitude;      // Feet
  uint32_t satellites;
#ifndef _16x2
  double   heading;       // Degrees
  uint16_t year;
  uint8_t  month;
  uint8_t  day;
  uint8_t  hour;
  uint8_t  minute;
  uint8_t  second;
#endif // #ifndef _16x2
};

#ifdef DEBUG
#define DEBUG_INTERVAL 10000 // Debug display interval
// Function Prototype
void displayDebugData();
#endif // #ifdef DEBUG

#endif // #define GPSLCD_h
{'fraction_non_alphanumeric': 0.12384259259259259, 'fraction_numerical': 0.037905092592592594, 'mean_word_length': 1.8688796680497926, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1472579', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1030, 'n_words': 363}