adding Bluetooth Symbol

This commit is contained in:
richonguzman 2023-08-07 19:37:37 -04:00
parent 8544506a54
commit 4af3fd33c9
4 changed files with 60 additions and 10 deletions

View File

@ -1,7 +1,7 @@
{ {
"beacons": [ "beacons": [
{ {
"callsign": "CD2RXU-7", "callsign": "CD2RXU-8",
"symbol": "[", "symbol": "[",
"overlay": "/", "overlay": "/",
"comment": "", "comment": "",
@ -18,7 +18,7 @@
} }
}, },
{ {
"callsign": "CD2RXU-7", "callsign": "CD2RXU-8",
"symbol": ">", "symbol": ">",
"overlay": "/", "overlay": "/",
"comment": "", "comment": "",
@ -35,7 +35,7 @@
} }
}, },
{ {
"callsign": "CD2RXU-7", "callsign": "CD2RXU-8",
"symbol": "j", "symbol": "j",
"overlay": "/", "overlay": "/",
"comment": "", "comment": "",

View File

@ -28,7 +28,7 @@ TinyGPSPlus gps;
BluetoothSerial SerialBT; BluetoothSerial SerialBT;
OneButton userButton = OneButton(BUTTON_PIN, true, true); OneButton userButton = OneButton(BUTTON_PIN, true, true);
String versionDate = "2023.08.05"; String versionDate = "2023.08.07";
int myBeaconsIndex = 0; int myBeaconsIndex = 0;
int myBeaconsSize = Config.beacons.size(); int myBeaconsSize = Config.beacons.size();
@ -80,11 +80,11 @@ void setup() {
MSG_Utils::loadNumMessages(); MSG_Utils::loadNumMessages();
GPS_Utils::setup(); GPS_Utils::setup();
LoRa_Utils::setup(); //LoRa_Utils::setup();
WiFi.mode(WIFI_OFF); WiFi.mode(WIFI_OFF);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "WiFi controller stopped"); logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "WiFi controller stopped");
BLUETOOTH_Utils::setup(); //BLUETOOTH_Utils::setup();
userButton.attachClick(BUTTON_Utils::singlePress); userButton.attachClick(BUTTON_Utils::singlePress);
userButton.attachLongPressStart(BUTTON_Utils::longPress); userButton.attachLongPressStart(BUTTON_Utils::longPress);
@ -129,7 +129,7 @@ void loop() {
STATION_Utils::checkSmartBeaconState(); STATION_Utils::checkSmartBeaconState();
if (sendUpdate && gps_loc_update) { if (sendUpdate && gps_loc_update) {
STATION_Utils::sendBeacon(); //STATION_Utils::sendBeacon();
} }
STATION_Utils::checkSmartBeaconInterval(currentSpeed); STATION_Utils::checkSmartBeaconInterval(currentSpeed);

View File

@ -3,6 +3,23 @@
#include <Arduino.h> #include <Arduino.h>
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 = { static const unsigned char runnerSymbol[] PROGMEM = {
0b00000000, 0b11100000, 0b00000000, 0b11100000,
0b00000000, 0b11100000, 0b00000000, 0b11100000,
@ -156,6 +173,39 @@ static const unsigned char vanSymbol[] PROGMEM = {
0b00000000, 0b00000000 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 = { /*static const unsigned char noSymbol[] PROGMEM = {
0b00000000, 0b00000000, 0b00000000, 0b00000000,

View File

@ -6,7 +6,7 @@
#include "pins_config.h" #include "pins_config.h"
#include "display.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 #ifdef ssd1306
#include <Adafruit_SSD1306.h> #include <Adafruit_SSD1306.h>
@ -22,9 +22,9 @@ extern Beacon *currentBeacon;
extern int menuDisplay; extern int menuDisplay;
extern bool symbolAvailable; 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]); 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) // 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... // If your board didn't come with 4 pins OLED Screen and comes with 5 and one of them is RST...