bugfix cfg.txpower

This commit is contained in:
Verkehrsrot 2019-09-20 21:42:59 +02:00
parent b587a5604e
commit 464809a54e
4 changed files with 7 additions and 19 deletions

View File

@ -327,19 +327,7 @@ Note: all settings are stored in NVRAM and will be reloaded when device starts.
0x06 set LoRa TXpower
0 ... 15 [default: 7]
TXPower Configuration
0 Max EIRP (usually +16dB)
1 -2dB
2 -4dB
3 -6dB
4 -8dB
5 -10dB
6 -12dB
7 -14dB
8 .. 14 reserved for future use (RFU)
15 ignored (device keeps current setting)
0 ... 255 desired TX power in dBm [default: 14]
0x07 set LoRa Adaptive Data Rate mode

View File

@ -7,7 +7,7 @@
; ---> SELECT THE TARGET PLATFORM HERE! <---
[board]
;halfile = generic.h
halfile = generic.h
;halfile = ebox.h
;halfile = eboxtube.h
;halfile = ecopower.h
@ -18,7 +18,7 @@
;halfile = ttgov21old.h
;halfile = ttgov21new.h
;halfile = ttgofox.h
halfile = ttgobeam.h
;halfile = ttgobeam.h
;halfile = ttgobeam10.h
;halfile = fipy.h
;halfile = lopy.h
@ -43,10 +43,10 @@ description = Paxcounter is a device for metering passenger flows in realtime. I
[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 1.8.3
release_version = 1.8.31
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 4
debug_level = 3
extra_scripts = pre:build.py
otakeyfile = ota.conf
lorakeyfile = loraconf.h

View File

@ -49,7 +49,7 @@
#define RETRANSMIT_RCMD 5 // [seconds] wait time before retransmitting rcommand results
#define PAYLOAD_BUFFER_SIZE 51 // maximum size of payload block per transmit
#define LORADRDEFAULT 5 // 0 .. 15, LoRaWAN datarate, according to regional LoRaWAN specs [default = 5]
#define LORATXPOWDEFAULT 7 // 0 .. 15, LoRaWAN TX power [default = 7]
#define LORATXPOWDEFAULT 7 // 0 .. 255, LoRaWAN TX power in dBm [default = 14]
#define MAXLORARETRY 500 // maximum count of TX retries if LoRa busy
#define SEND_QUEUE_SIZE 10 // maximum number of messages in payload send queue [1 = no queue]

View File

@ -254,7 +254,7 @@ void set_lorapower(uint8_t val[]) {
#if (HAS_LORA)
// set data rate and transmit power only if we have no ADR
if (!cfg.adrmode) {
cfg.txpower = val[0] & 0x0f;
cfg.txpower = val[0];
ESP_LOGI(TAG, "Remote command: set LoRa TXPOWER to %d", cfg.txpower);
LMIC_setDrTxpow(assertDR(cfg.loradr), cfg.txpower);
} else