From 4af3fd33c90fc60468f5452f4ffdd1bfcada9a2b Mon Sep 17 00:00:00 2001 From: richonguzman Date: Mon, 7 Aug 2023 19:37:37 -0400 Subject: [PATCH] adding Bluetooth Symbol --- data/tracker_config.json | 6 ++--- src/LoRa_APRS_Tracker.cpp | 8 +++---- src/custom_characters.h | 50 +++++++++++++++++++++++++++++++++++++++ src/display.cpp | 6 ++--- 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/data/tracker_config.json b/data/tracker_config.json index 5ec5f37..27ea838 100644 --- a/data/tracker_config.json +++ b/data/tracker_config.json @@ -1,7 +1,7 @@ { "beacons": [ { - "callsign": "CD2RXU-7", + "callsign": "CD2RXU-8", "symbol": "[", "overlay": "/", "comment": "", @@ -18,7 +18,7 @@ } }, { - "callsign": "CD2RXU-7", + "callsign": "CD2RXU-8", "symbol": ">", "overlay": "/", "comment": "", @@ -35,7 +35,7 @@ } }, { - "callsign": "CD2RXU-7", + "callsign": "CD2RXU-8", "symbol": "j", "overlay": "/", "comment": "", diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index bce5816..c894896 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -28,7 +28,7 @@ TinyGPSPlus gps; BluetoothSerial SerialBT; OneButton userButton = OneButton(BUTTON_PIN, true, true); -String versionDate = "2023.08.05"; +String versionDate = "2023.08.07"; int myBeaconsIndex = 0; int myBeaconsSize = Config.beacons.size(); @@ -80,11 +80,11 @@ void setup() { MSG_Utils::loadNumMessages(); GPS_Utils::setup(); - LoRa_Utils::setup(); + //LoRa_Utils::setup(); WiFi.mode(WIFI_OFF); logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "WiFi controller stopped"); - BLUETOOTH_Utils::setup(); + //BLUETOOTH_Utils::setup(); userButton.attachClick(BUTTON_Utils::singlePress); userButton.attachLongPressStart(BUTTON_Utils::longPress); @@ -129,7 +129,7 @@ void loop() { STATION_Utils::checkSmartBeaconState(); if (sendUpdate && gps_loc_update) { - STATION_Utils::sendBeacon(); + //STATION_Utils::sendBeacon(); } STATION_Utils::checkSmartBeaconInterval(currentSpeed); diff --git a/src/custom_characters.h b/src/custom_characters.h index 60919da..72a05df 100644 --- a/src/custom_characters.h +++ b/src/custom_characters.h @@ -3,6 +3,23 @@ #include +static const unsigned char bluetoothSymbol[] PROGMEM = { + 0b00001100, 0b00000000, + 0b00001111, 0b00000000, + 0b00001100, 0b11000000, + 0b11001100, 0b00110000, + 0b00111100, 0b11000000, + 0b00001111, 0b00000000, + 0b00001111, 0b00000000, + 0b00111100, 0b11000000, + 0b11001100, 0b00110000, + 0b00001100, 0b11000000, + 0b00001111, 0b00000000, + 0b00001100, 0b00000000, + 0b00000000, 0b00000000, + 0b00000000, 0b00000000 +}; + static const unsigned char runnerSymbol[] PROGMEM = { 0b00000000, 0b11100000, 0b00000000, 0b11100000, @@ -156,6 +173,39 @@ static const unsigned char vanSymbol[] PROGMEM = { 0b00000000, 0b00000000 }; +static const unsigned char carsateliteSymbol[] PROGMEM = { + 0b00000000, 0b00000100, + 0b01000000, 0b00000100, + 0b00111111, 0b11011111, + 0b00100100, 0b00100100, + 0b01000100, 0b00010100, + 0b01000100, 0b00010000, + 0b01000100, 0b00001000, + 0b11111111, 0b11111111, + 0b10111111, 0b11111101, + 0b11111111, 0b11111111, + 0b11001111, 0b11110011, + 0b01001000, 0b00010010, + 0b00110000, 0b00001100, + 0b00000000, 0b00000000 +}; + +static const unsigned char tentSymbol[] PROGMEM = { + 0b00000000, 0b00000000, + 0b00000000, 0b00000000, + 0b00001111, 0b11110000, + 0b00001000, 0b00110000, + 0b00010000, 0b01111000, + 0b00010000, 0b01011000, + 0b00100000, 0b10010100, + 0b00100000, 0b10010100, + 0b01000001, 0b00010010, + 0b01000001, 0b00010010, + 0b11100010, 0b00010001, + 0b00011111, 0b11111111, + 0b00000000, 0b00000000, + 0b00000000, 0b00000000 +}; /*static const unsigned char noSymbol[] PROGMEM = { 0b00000000, 0b00000000, diff --git a/src/display.cpp b/src/display.cpp index 768ddc5..b988196 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -6,7 +6,7 @@ #include "pins_config.h" #include "display.h" -#define ssd1306 //uncomment this line when using SH1106 screen instead of SSD1306 +//#define ssd1306 //uncomment this line when using SH1106 screen instead of SSD1306 #ifdef ssd1306 #include @@ -22,9 +22,9 @@ extern Beacon *currentBeacon; extern int menuDisplay; extern bool symbolAvailable; -String symbolArray[10] = {"[", ">", "j", "b", "<", "s", "u", "R", "v"}; +String symbolArray[13] = {"BT", "[", ">", "j", "b", "<", "s", "u", "R", "v", "(", ";"}; int symbolArraySize = sizeof(symbolArray)/sizeof(symbolArray[0]); -const uint8_t *symbolsAPRS[] = {runnerSymbol, carSymbol, jeepSymbol, bikeSymbol, motorcycleSymbol, shipSymbol, truckSymbol, recreationalVehicleSymbol, vanSymbol}; +const uint8_t *symbolsAPRS[] = {bluetoothSymbol, runnerSymbol, carSymbol, jeepSymbol, bikeSymbol, motorcycleSymbol, shipSymbol, truckSymbol, recreationalVehicleSymbol, vanSymbol, carsateliteSymbol, tentSymbol}; // T-Beams bought with soldered OLED Screen comes with only 4 pins (VCC, GND, SDA, SCL) // If your board didn't come with 4 pins OLED Screen and comes with 5 and one of them is RST...