mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 03:01:40 +02:00
small improvements - code review
This commit is contained in:
parent
eee64e7746
commit
1253960177
2 changed files with 5 additions and 5 deletions
|
@ -205,7 +205,6 @@ class HmRadio {
|
||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPacket(invId, cnt, isRetransmit, isNoMI);
|
sendPacket(invId, cnt, isRetransmit, isNoMI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,8 +242,7 @@ class HmRadio {
|
||||||
/* Test whether a signal (carrier or otherwise) greater than or equal to -64dBm is present on the channel.
|
/* Test whether a signal (carrier or otherwise) greater than or equal to -64dBm is present on the channel.
|
||||||
Valid only on nRF24L01P (+) hardware. On nRF24L01, use testCarrier().
|
Valid only on nRF24L01P (+) hardware. On nRF24L01, use testCarrier().
|
||||||
Useful to check for interference on the current channel and channel hopping strategies.
|
Useful to check for interference on the current channel and channel hopping strategies.
|
||||||
bool goodSignal = radio.testRPD();
|
bool goodSignal = radio.testRPD();*/
|
||||||
if(radio.available()){ Serial.println(goodSignal ? "Strong signal > 64dBm" : "Weak signal < 64dBm" ); radio.read(0,0); } */
|
|
||||||
bool goodSignal(void) {
|
bool goodSignal(void) {
|
||||||
bool goodSignal = mNrf24.testRPD();
|
bool goodSignal = mNrf24.testRPD();
|
||||||
mNrf24.read(0,0);
|
mNrf24.read(0,0);
|
||||||
|
|
|
@ -60,8 +60,10 @@
|
||||||
h.appendChild(r);
|
h.appendChild(r);
|
||||||
main.appendChild(h);
|
main.appendChild(h);
|
||||||
|
|
||||||
main.appendChild(genTabRow("nrf24l01" + (obj["isPVariant"] ? "+ " : ""), (obj["isconnected"] ? "is connected " : "is not connected ")));
|
main.append(
|
||||||
main.appendChild(genTabRow("NRF Signal: ", (obj["goodSignal"] ? "Strong signal > 64dBm" : "Weak signal < 64dBm")));
|
genTabRow("nrf24l01" + (obj["isPVariant"] ? "+ " : ""), (obj["isconnected"] ? "is connected " : "is not connected ")),
|
||||||
|
genTabRow("NRF Signal: ", (obj["goodSignal"] ? "Strong signal > 64dBm" : "Weak signal < 64dBm"))
|
||||||
|
);
|
||||||
|
|
||||||
if(obj["isconnected"]) {
|
if(obj["isconnected"]) {
|
||||||
main.appendChild(genTabRow("Datarate", datarate[obj["DataRate"]]));
|
main.appendChild(genTabRow("Datarate", datarate[obj["DataRate"]]));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue