Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Firmware/LoRaSerial/Commands.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ const COMMAND_ENTRY commands[] =
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "Debug", &tempSettings.debug},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "DebugDatagrams", &tempSettings.debugDatagrams},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "DebugHeartbeat", &tempSettings.debugHeartbeat},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "debugHopTimer", &tempSettings.debugHopTimer},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "DebugNvm", &tempSettings.debugNvm},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "DebugRadio", &tempSettings.debugRadio},
{'D', 1, 0, 0, 1, 0, TYPE_BOOL, valInt, "DebugReceive", &tempSettings.debugReceive},
Expand Down
17 changes: 13 additions & 4 deletions Firmware/LoRaSerial/LoRaSerial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ const int FIRMWARE_VERSION_MINOR = 0;
#define SERIAL_RX_BUFFER_SIZE 1024
#define RTS_ON_BYTES (SERIAL_RX_BUFFER_SIZE / 4)

#define MILLISECONDS_IN_A_SECOND 1000
#define MILLISECONDS_IN_A_MINUTE (60 * MILLISECONDS_IN_A_SECOND)
#define MILLISECONDS_IN_AN_HOUR (60 * MILLISECONDS_IN_A_MINUTE)
#define MILLISECONDS_IN_A_DAY (24 * MILLISECONDS_IN_AN_HOUR)
#define MILLISECONDS_IN_A_WEEK (7 * MILLISECONDS_IN_A_DAY)

#include "settings.h"

//Hardware connections
Expand Down Expand Up @@ -389,7 +395,6 @@ bool cylonPatternGoingLeft;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
uint16_t radioBand = 0; //In MHz. Detected radio module type. Sets the upper/lower frequency bounds.
uint8_t outgoingPacket[MAX_PACKET_SIZE]; //Contains the current data in route to receiver
uint32_t frameAirTimeUsec; //Recalc'd with each new packet transmission
uint8_t frameSentCount = 0; //Increases each time a frame is sent

unsigned long lastPacketReceived = 0; //Controls link LED in broadcast mode
Expand Down Expand Up @@ -442,9 +447,6 @@ unsigned long radioCallHistory[RADIO_CALL_MAX];
unsigned long radioStateHistory[RADIO_MAX_STATE];

uint8_t packetLength = 0; //Total bytes received, used for calculating clock sync times in multi-point mode
int16_t msToNextHopRemote; //Can become negative
uint8_t clockSyncIndex;
CLOCK_SYNC_DATA clockSyncData[16];

bool requestYield = false; //Datagram sender can tell this radio to stop transmitting to enable two-way comm
unsigned long yieldTimerStart = 0;
Expand Down Expand Up @@ -477,6 +479,13 @@ unsigned long linkDownTimer;
unsigned long rcvTimeMillis;
unsigned long xmitTimeMillis;
long timestampOffset;
uint32_t frameAirTimeUsec; //Recalc'd with each new packet transmission
int16_t msToNextHopRemote; //Can become negative
uint8_t rmtChannelNumber;
CLOCK_SYNC_DATA clockSyncData;
unsigned long txCurrentMillis; //Local millis value when building TX header
uint16_t txMsecToNextHop; //Milliseconds remaining until channel hop timer fires
uint8_t txChannel; //Channel included in TX header

//Transmit control
uint8_t * endOfTxData;
Expand Down
Loading