fix: TBeam 1W ramp fixes
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
# for the password. Tokens are never written to disk.
|
||||
#
|
||||
# Example:
|
||||
# REPEATER_PASSWORD=... eastmesh-tools/web-heap-check.sh 10.33.135.208 --stress
|
||||
# REPEATER_PASSWORD=... eastmesh-tools/web-heap-check.sh 192.168.1.50 --stress
|
||||
set -euo pipefail
|
||||
|
||||
host="${1:-}"
|
||||
|
||||
@@ -23,6 +23,15 @@ public:
|
||||
((CustomSX1262 *)_radio)->setMaxPayloadMillis(pm.payloadMillis);
|
||||
}
|
||||
|
||||
#ifdef SX126X_PA_RAMP_TIME
|
||||
void setTxPower(int8_t dbm) override {
|
||||
RadioLibWrapper::setTxPower(dbm);
|
||||
// SX126x::setOutputPower() hardcodes a 200us PA ramp; boards with an
|
||||
// external PA need a longer ramp, so re-apply it after every power change.
|
||||
((CustomSX1262 *)_radio)->setPaRampTime(SX126X_PA_RAMP_TIME);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool isReceivingPacket() override {
|
||||
return ((CustomSX1262 *)_radio)->isReceiving();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
virtual void setParams(float freq, float bw, uint8_t sf, uint8_t cr) = 0;
|
||||
uint32_t getRngSeed();
|
||||
void setTxPower(int8_t dbm);
|
||||
virtual void setTxPower(int8_t dbm);
|
||||
|
||||
virtual float getCurrentRSSI() =0;
|
||||
virtual uint8_t getSpreadingFactor() const { return LORA_SF; }
|
||||
|
||||
@@ -35,6 +35,10 @@ build_flags =
|
||||
; TX power: 22dBm to SX1262, PA module adds ~10dB for 32dBm total
|
||||
-D LORA_TX_POWER=22
|
||||
|
||||
; External PA needs a longer ramp; keep 800us across setTxPower() calls,
|
||||
; since SX126x::setOutputPower() would otherwise reset it to 200us
|
||||
-D SX126X_PA_RAMP_TIME=RADIOLIB_SX126X_PA_RAMP_800U
|
||||
|
||||
; Battery - 2S 7.4V LiPo (6.0V min, 8.4V max)
|
||||
-D BATT_MIN_MILLIVOLTS=6000
|
||||
-D BATT_MAX_MILLIVOLTS=8400
|
||||
|
||||
Reference in New Issue
Block a user