explictely set radio default power to 6 (#1286)
This commit is contained in:
1 parent
465d83637f
commit
eed66868a9
3 files changed
+3
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# set Transmit Power
|
||||
|
||||
Make the ``radio`` signal of the @boardname@ stronger or weaker. It can be as weak as `0` and as strong as `7`.
|
||||
Make the ``radio`` signal of the @boardname@ stronger or weaker. It can be as weak as `0` and as strong as `7`. Default is ``6``.
|
||||
|
||||
The scientific name for the strength of the ``radio`` signal is
|
||||
**dBm**, or **decibel-milliwatts**. A signal strength of `0`
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace radio {
|
||||
}
|
||||
if (!radioEnabled) {
|
||||
uBit.radio.setGroup(pxt::programHash());
|
||||
uBit.radio.setTransmitPower(6); // start with high power by default
|
||||
radioEnabled = true;
|
||||
}
|
||||
return r;
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace pxsim {
|
||||
|
||||
constructor(private runtime: Runtime) {
|
||||
this.datagram = new RadioDatagram(runtime);
|
||||
this.power = 6; // default value
|
||||
}
|
||||
|
||||
setTransmitPower(power: number) {
|
||||
|
||||
Reference in new issue
Block a user