Some Clarification of Automatic Power Control (RFM69_ATC)

Started by jrdoner, November 30, 2015, 09:24:15 PM

Kilo95

Would you mind telling me how to print the debug statements on the gateway? Much appreciated

Kilo95

I assumed gateway.sys.log. It shows ack-sent on all nodes. It does appear that one node I reset last night did possibly tune itself down. (At least the rssi dropped from -50 to about -60 on a stationary node)

Felix

All the serial data coming from the gateway Moteino or MightyHat is logged in the gateway.sys.log by this function:

global.processSerialData = function (data) {
  . . .
  console.log('>: ' + data)


Look for lines in the log file that start with ">: some data".

However this only shows data that is written from the gateway with Serial.write commands. You won't see any serial data from your nodes.
In addition, there's nothing wrong with debugging with Serial.write, even inside interrupts. Although interrupts should be as fast as possible without any bloated unnecessary code. Don't let them uncommented for long term use though, indeed that is not a good idea, but it's OK for short term debugging.

Kilo95

I'll give that a shot Felix and see what the node to power is

TomWS

Quote from: Felix on March 23, 2016, 10:27:03 AM
In addition, there's nothing wrong with debugging with Serial.write, even inside interrupts. Although interrupts should be as fast as possible without any bloated unnecessary code. Don't let them uncommented for long term use though, indeed that is not a good idea, but it's OK for short term debugging.
Agreed, which it why the print was there in the first place, I just didn't like leaving the impression of this being a proper general practice.  Thanks for the clarification.

Tom

Kilo95

Tried to uncomment the two serial.print lines in RFM69_ATC.cpp interruptHook(). When I did and I recompiled my WS node sketch, I got errors. I'll have to try it again in the next couple of days (got a sick child right now so my time is limited). thanks for your help