kopia lustrzana https://github.com/PiInTheSky/lora-gateway
V1.8.43 - Fixed bug in implicit/explicit setting when used with HAB Base
rodzic
5789e12b76
commit
0a7ada4260
|
@ -250,6 +250,11 @@ Many thanks to David Brooke for coding this feature and the AFC.
|
||||||
Change History
|
Change History
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
07/03/2021 - V1.8.43
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Fixed erors in setting implicit/explicit bit on config register when sent from JSON client. Thanks to Alan Hall for spotting this one.
|
||||||
|
|
||||||
23/02/2021 - V1.8.42
|
23/02/2021 - V1.8.42
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
2
config.c
2
config.c
|
@ -356,7 +356,7 @@ void SetConfigValue(char *Setting, char *Value)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case stBoolean:
|
case stBoolean:
|
||||||
*Settings[SettingIndex].IntValuePtr = Value[strcspn(Value, "1YyTt")];
|
*Settings[SettingIndex].IntValuePtr = (*Value == '1') || (*Value == 'Y') || (*Value == 'y') || (*Value == 't') || (*Value == 'T');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case stNone:
|
case stNone:
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#include "udpclient.h"
|
#include "udpclient.h"
|
||||||
#include "lifo_buffer.h"
|
#include "lifo_buffer.h"
|
||||||
|
|
||||||
#define VERSION "V1.8.42"
|
#define VERSION "V1.8.43"
|
||||||
bool run = TRUE;
|
bool run = TRUE;
|
||||||
|
|
||||||
// RFM98
|
// RFM98
|
||||||
|
@ -573,7 +573,7 @@ int LowOptToInt(int LowOpt)
|
||||||
|
|
||||||
void SetLoRaParameters( int Channel, int ImplicitOrExplicit, int ErrorCoding, double Bandwidth, int SpreadingFactor, int LowDataRateOptimize )
|
void SetLoRaParameters( int Channel, int ImplicitOrExplicit, int ErrorCoding, double Bandwidth, int SpreadingFactor, int LowDataRateOptimize )
|
||||||
{
|
{
|
||||||
writeRegister( Channel, REG_MODEM_CONFIG, ImplicitOrExplicit | IntToEC(ErrorCoding) | DoubleToBandwidth(Bandwidth));
|
writeRegister( Channel, REG_MODEM_CONFIG, (ImplicitOrExplicit ? IMPLICIT_MODE : EXPLICIT_MODE) | IntToEC(ErrorCoding) | DoubleToBandwidth(Bandwidth));
|
||||||
writeRegister( Channel, REG_MODEM_CONFIG2, IntToSF(SpreadingFactor) | CRC_ON );
|
writeRegister( Channel, REG_MODEM_CONFIG2, IntToSF(SpreadingFactor) | CRC_ON );
|
||||||
writeRegister( Channel, REG_MODEM_CONFIG3, 0x04 | IntToLowOpt(LowDataRateOptimize)); // 0x04: AGC sets LNA gain
|
writeRegister( Channel, REG_MODEM_CONFIG3, 0x04 | IntToLowOpt(LowDataRateOptimize)); // 0x04: AGC sets LNA gain
|
||||||
writeRegister( Channel, REG_DETECT_OPT, ( readRegister( Channel, REG_DETECT_OPT ) & 0xF8 ) | ( ( SpreadingFactor == 6 ) ? 0x05 : 0x03 ) ); // 0x05 For SF6; 0x03 otherwise
|
writeRegister( Channel, REG_DETECT_OPT, ( readRegister( Channel, REG_DETECT_OPT ) & 0xF8 ) | ( ( SpreadingFactor == 6 ) ? 0x05 : 0x03 ) ); // 0x05 For SF6; 0x03 otherwise
|
||||||
|
|
Ładowanie…
Reference in New Issue