Confused by RF24network Node assignments

Hi All, I have been using the tmrh20, RF24 Library and network for a long time and it has been working great. Many thanks to tmrh.

I have only ever been using two levels of nodes but now need to add a more distant node to be relayed by a closer Node. I need it to be the third level but I am having trouble understanding the octal assignments.

On this page ( https://tmrh20.github.io/RF24Network/index.html ) it shows some levels but the lower layers have no leading zero. Is that correct for an Octal representation?

The Node chain and using the “04” display on that page, I have is
00 < Base
…04
…014
…114 < should this be 0114?

I am using for my Node 2

  const uint16_t NODE_SHED   = 02;        // Displays as 2 dec
  const uint16_t NODE_LIGHTS = 012;      // Displays as 10 dec
  // those have been working fine but need to add

  const uint16_t NODE_FAN      = 0112;    // Displays as 112!!
OR
  const uint16_t NODE_FAN      = 112;      // Displays as 112!!

Why do the the first two convert correctly to decimal and the third displays as a decimal literal instead of 74-decimal (Octal 0112)?

Where am I going wrong?

Thanks.

Octal constants are preceded by the digit '0'. This works as expected for me:

void setup() {
  Serial.begin(9600);
  Serial.println(0114);  //prints 76
  const uint16_t NODE_FAN      = 0112;
  Serial.println(NODE_FAN); //prints 74
}

void loop() {}

jremington: Octal constants are preceded by the digit '0'. This works as expected for me:

OK, thanks, that snippet does for me too.

Then there is something I am missing in the real Sketch. It is weird that the first two levels convert OK. Back to digging I guess. For the moment I have hard programmed it as dec-74 and it is all working, but I need to fix the issue whatever it is.

I will try rolling back to 1.8.5 IDE version that seemed more stable than later versions, but I am grasping at straws here. :)

OK, it is all back to normal and working as "74" in 1.8.5. Beats me, but thanks anyway.

So that chart in the webpage needs preceding zeroes in all numbers in the lower lines. A little confusing the an Octal neophyte. ;)