TX power moved to configuration
This commit is contained in:
6
.vscode/tags
vendored
Normal file
6
.vscode/tags
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
||||||
|
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
||||||
|
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
||||||
|
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
||||||
|
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
||||||
|
!_TAG_PROGRAM_VERSION 5.8 //
|
||||||
@@ -156,10 +156,14 @@ void setup(void)
|
|||||||
while (true);
|
while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Configure LoRa module
|
||||||
LoRa.setSignalBandwidth(radioState.loraBandwidth);
|
LoRa.setSignalBandwidth(radioState.loraBandwidth);
|
||||||
LoRa.setSpreadingFactor(radioState.loraSpreadingFactor);
|
LoRa.setSpreadingFactor(radioState.loraSpreadingFactor);
|
||||||
LoRa.setCodingRate4(radioState.loraCodingRate);
|
LoRa.setCodingRate4(radioState.loraCodingRate);
|
||||||
|
LoRa.setTxPower(radioState.loraTxPower);
|
||||||
LoRa.enableCrc();
|
LoRa.enableCrc();
|
||||||
|
|
||||||
|
//Setup ISR callback and start receiving
|
||||||
LoRa.onReceive(onReceive);
|
LoRa.onReceive(onReceive);
|
||||||
LoRa.receive();
|
LoRa.receive();
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ struct RadioState_t {
|
|||||||
uint32_t loraBandwidth = 250000;
|
uint32_t loraBandwidth = 250000;
|
||||||
uint8_t loraSpreadingFactor = 7;
|
uint8_t loraSpreadingFactor = 7;
|
||||||
uint8_t loraCodingRate = 6;
|
uint8_t loraCodingRate = 6;
|
||||||
|
uint8_t loraTxPower = 17; // Defines output power of TX, defined in dBm range from 2-17
|
||||||
int8_t bytesToRead = -1;
|
int8_t bytesToRead = -1;
|
||||||
uint8_t rssi = 0;
|
uint8_t rssi = 0;
|
||||||
uint8_t snr = 0;
|
uint8_t snr = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user