uint8_t update
This commit is contained in:
parent
49ab5424ac
commit
e35d498bc5
|
|
@ -49,12 +49,12 @@ BluetoothSerial SerialBT;
|
|||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.03.22";
|
||||
String versionDate = "2024.03.28";
|
||||
|
||||
int myBeaconsIndex = 0;
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
Beacon *currentBeacon = &Config.beacons[myBeaconsIndex];
|
||||
int loraIndex = 0;
|
||||
uint8_t loraIndex = 0;
|
||||
int loraIndexSize = Config.loraTypes.size();
|
||||
LoraType *currentLoRaType = &Config.loraTypes[loraIndex];
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ uint32_t displayTime = millis();
|
|||
uint32_t refreshDisplayTime = millis();
|
||||
|
||||
bool sendUpdate = true;
|
||||
int updateCounter = Config.sendCommentAfterXBeacons;
|
||||
uint8_t updateCounter = Config.sendCommentAfterXBeacons;
|
||||
bool sendStandingUpdate = false;
|
||||
bool statusState = true;
|
||||
uint32_t statusTime = millis();
|
||||
|
|
@ -82,7 +82,7 @@ String BLEToLoRaPacket = "";
|
|||
|
||||
bool messageLed = false;
|
||||
uint32_t messageLedTime = millis();
|
||||
int lowBatteryPercent = 21;
|
||||
uint8_t lowBatteryPercent = 21;
|
||||
|
||||
uint32_t lastTelemetryTx = millis();
|
||||
uint32_t telemetryTx = millis();
|
||||
|
|
@ -101,7 +101,7 @@ bool symbolAvailable = true;
|
|||
|
||||
uint32_t bmeLastReading = -60000;
|
||||
|
||||
int screenBrightness = 1;
|
||||
uint8_t screenBrightness = 1;
|
||||
bool keyboardConnected = false;
|
||||
bool keyDetected = false;
|
||||
uint32_t keyboardTime = millis();
|
||||
|
|
@ -120,7 +120,7 @@ bool smartBeaconValue = true;
|
|||
int ackNumberSend;
|
||||
uint32_t ackTime = millis();
|
||||
|
||||
int winlinkStatus = 0;
|
||||
uint8_t winlinkStatus = 0;
|
||||
String winlinkMailNumber = "_?";
|
||||
String winlinkAddressee = "";
|
||||
String winlinkSubject = "";
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace AX25_Utils {
|
|||
return result;
|
||||
}
|
||||
|
||||
String encodeAX25Address(String frame, int type, bool lastAddress) {
|
||||
String encodeAX25Address(String frame, uint8_t type, bool lastAddress) {
|
||||
String packet = "";
|
||||
String address;
|
||||
std::string concatenatedBinary;
|
||||
|
|
@ -104,7 +104,7 @@ namespace AX25_Utils {
|
|||
char c = address[j];
|
||||
packet += char(c<<1);
|
||||
}
|
||||
std::string firstSSIDBit = std::to_string(type); //type=0 (sender or path not repeated) type=1 (tocall or path bein repeated)
|
||||
std::string firstSSIDBit = std::to_string(type); //type=0 (sender or path not repeated) type=1 (tocall or path being repeated)
|
||||
std::string lastSSIDBit = "0";
|
||||
if (lastAddress) {
|
||||
lastSSIDBit = "1"; // address is the last from AX.25 Frame
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace AX25_Utils {
|
|||
String AX25FrameToLoRaPacket(String frame);
|
||||
String frameCleaning(String frame);
|
||||
std::string intToBinaryString(int value, int bitLength);
|
||||
String encodeAX25Address(String frame, int type, bool lastAddress);
|
||||
String encodeAX25Address(String frame, uint8_t type, bool lastAddress);
|
||||
String LoRaPacketToAX25Frame(String packet);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ namespace BME_Utils {
|
|||
String wx, tempStr, humStr, presStr;
|
||||
|
||||
uint32_t lastReading = millis() - bmeLastReading;
|
||||
if (lastReading > 60*1000) {
|
||||
if (lastReading > 60 * 1000) {
|
||||
#if defined(BME280Sensor) || defined(BMP280Sensor)
|
||||
bme.takeForcedMeasurement();
|
||||
newTemp = bme.readTemperature();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ extern Beacon *currentBeacon;
|
|||
extern int menuDisplay;
|
||||
extern bool symbolAvailable;
|
||||
extern bool bluetoothConnected;
|
||||
extern int screenBrightness; //from 1 to 255 to regulate brightness of oled scren
|
||||
extern uint8_t screenBrightness; //from 1 to 255 to regulate brightness of oled scren
|
||||
|
||||
const char* symbolArray[] = { "[", ">", "j", "b", "<", "s", "u", "R", "v", "(", ";", "-", "k",
|
||||
"C", "a", "Y", "O", "'", "=", "y"};
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ namespace GPS_Utils {
|
|||
}
|
||||
|
||||
void calculateHeadingDelta(int speed) {
|
||||
int TurnMinAngle;
|
||||
uint8_t TurnMinAngle;
|
||||
double headingDelta = abs(previousHeading - currentHeading);
|
||||
if (lastTx > currentBeacon->minDeltaBeacon * 1000) {
|
||||
if (speed == 0) {
|
||||
TurnMinAngle = currentBeacon->turnMinDeg + (currentBeacon->turnSlope/(speed+1));
|
||||
TurnMinAngle = currentBeacon->turnMinDeg + (currentBeacon->turnSlope/(speed + 1));
|
||||
} else {
|
||||
TurnMinAngle = currentBeacon->turnMinDeg + (currentBeacon->turnSlope/speed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,16 +21,16 @@ extern logging::Logger logger;
|
|||
extern bool sendUpdate;
|
||||
extern int menuDisplay;
|
||||
extern uint32_t menuTime;
|
||||
extern int myBeaconsIndex;
|
||||
extern uint8_t myBeaconsIndex;
|
||||
extern int myBeaconsSize;
|
||||
extern int loraIndex;
|
||||
extern uint8_t loraIndex;
|
||||
extern bool keyboardConnected;
|
||||
extern bool keyDetected;
|
||||
extern uint32_t keyboardTime;
|
||||
extern bool displayState;
|
||||
extern uint32_t displayTime;
|
||||
extern bool displayEcoMode;
|
||||
extern int screenBrightness;
|
||||
extern uint8_t screenBrightness;
|
||||
extern bool statusState;
|
||||
extern uint32_t statusTime;
|
||||
extern int messagesIterator;
|
||||
|
|
@ -41,7 +41,7 @@ extern bool sendStandingUpdate;
|
|||
extern bool flashlight;
|
||||
extern bool digirepeaterActive;
|
||||
extern bool sosActive;
|
||||
extern int winlinkStatus;
|
||||
extern uint8_t winlinkStatus;
|
||||
extern String winlinkMailNumber;
|
||||
extern String winlinkAddressee;
|
||||
extern String winlinkSubject;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
extern logging::Logger logger;
|
||||
extern Configuration Config;
|
||||
extern LoraType *currentLoRaType;
|
||||
extern int loraIndex;
|
||||
extern uint8_t loraIndex;
|
||||
extern int loraIndexSize;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ extern TinyGPSPlus gps;
|
|||
extern std::vector<String> loadedAPRSMessages;
|
||||
extern std::vector<String> loadedWLNKMails;
|
||||
extern int messagesIterator;
|
||||
extern int loraIndex;
|
||||
extern uint8_t loraIndex;
|
||||
extern uint32_t menuTime;
|
||||
extern bool symbolAvailable;
|
||||
extern int lowBatteryPercent;
|
||||
extern uint8_t lowBatteryPercent;
|
||||
extern bool keyDetected;
|
||||
extern String messageCallsign;
|
||||
extern String messageText;
|
||||
|
|
@ -35,7 +35,7 @@ extern bool screenBrightness;
|
|||
extern bool disableGPS;
|
||||
extern APRSPacket lastReceivedPacket;
|
||||
|
||||
extern int winlinkStatus;
|
||||
extern uint8_t winlinkStatus;
|
||||
extern String winlinkMailNumber;
|
||||
extern String winlinkAddressee;
|
||||
extern String winlinkSubject;
|
||||
|
|
@ -63,7 +63,7 @@ namespace MENU_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
String checkScreenBrightness(int bright) {
|
||||
String checkScreenBrightness(uint8_t bright) {
|
||||
if (bright == 255) {
|
||||
return "MAX";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace MENU_Utils {
|
|||
|
||||
String checkBTType();
|
||||
String checkProcessActive(bool process);
|
||||
String checkScreenBrightness(int bright);
|
||||
String checkScreenBrightness(uint8_t bright);
|
||||
void showOnScreen();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ extern uint32_t messageLedTime;
|
|||
extern bool digirepeaterActive;
|
||||
|
||||
extern int ackNumberSend;
|
||||
extern int winlinkStatus;
|
||||
extern uint8_t winlinkStatus;
|
||||
|
||||
extern APRSPacket lastReceivedPacket;
|
||||
extern uint32_t ackTime;
|
||||
|
|
@ -218,7 +218,7 @@ namespace MSG_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
void sendMessage(int typeOfMessage, String station, String textMessage) {
|
||||
void sendMessage(uint8_t typeOfMessage, String station, String textMessage) {
|
||||
String newPacket = APRSPacketLib::generateMessagePacket(currentBeacon->callsign, "APLRT1", Config.path, station, textMessage);
|
||||
if (textMessage.indexOf("ack") == 0) {
|
||||
if (station != "WLNK-1") { // don't show Winlink ACK
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace MSG_Utils {
|
|||
void ledNotification();
|
||||
void deleteFile(String typeOfFile);
|
||||
void saveNewMessage(String typeMessage, String station, String newMessage);
|
||||
void sendMessage(int typeOfMessage, String station, String textMessage);
|
||||
void sendMessage(uint8_t typeOfMessage, String station, String textMessage);
|
||||
void processOutputBuffer();
|
||||
void checkReceivedMessage(ReceivedLoRaPacket packetReceived);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ extern Configuration Config;
|
|||
extern Beacon *currentBeacon;
|
||||
extern logging::Logger logger;
|
||||
extern TinyGPSPlus gps;
|
||||
extern int myBeaconsIndex;
|
||||
extern int loraIndex;
|
||||
extern uint8_t myBeaconsIndex;
|
||||
extern uint8_t loraIndex;
|
||||
|
||||
extern uint32_t lastTx;
|
||||
extern uint32_t lastTxTime;
|
||||
|
|
@ -25,7 +25,7 @@ extern uint32_t telemetryTx;
|
|||
extern uint32_t lastTelemetryTx;
|
||||
|
||||
extern bool sendUpdate;
|
||||
extern int updateCounter;
|
||||
extern uint8_t updateCounter;
|
||||
extern bool sendStandingUpdate;
|
||||
|
||||
extern uint32_t txInterval;
|
||||
|
|
@ -40,7 +40,7 @@ extern double lastTxDistance;
|
|||
|
||||
extern bool miceActive;
|
||||
extern bool smartBeaconValue;
|
||||
extern int winlinkStatus;
|
||||
extern uint8_t winlinkStatus;
|
||||
|
||||
String firstNearTracker;
|
||||
String secondNearTracker;
|
||||
|
|
@ -445,7 +445,7 @@ namespace STATION_Utils {
|
|||
}
|
||||
}
|
||||
|
||||
void saveIndex(int type, int index) {
|
||||
void saveIndex(uint8_t type, uint8_t index) {
|
||||
String filePath;
|
||||
if (type == 0) {
|
||||
filePath = "/callsignIndex.txt";
|
||||
|
|
@ -467,7 +467,7 @@ namespace STATION_Utils {
|
|||
fileIndex.close();
|
||||
}
|
||||
|
||||
void loadIndex(int type) {
|
||||
void loadIndex(uint8_t type) {
|
||||
String filePath;
|
||||
if (type == 0) {
|
||||
filePath = "/callsignIndex.txt";
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ namespace STATION_Utils {
|
|||
void checkSmartBeaconState();
|
||||
void sendBeacon(String type);
|
||||
void checkTelemetryTx();
|
||||
void saveIndex(int type, int index);
|
||||
void loadIndex(int type);
|
||||
void saveIndex(uint8_t type, uint8_t index);
|
||||
void loadIndex(uint8_t type);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "logger.h"
|
||||
|
||||
extern Configuration Config;
|
||||
extern int winlinkStatus;
|
||||
extern uint8_t winlinkStatus;
|
||||
extern int menuDisplay;
|
||||
extern logging::Logger logger;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue