             // Distinguished 'invalid' valve position; never mistaken for a real valve.
             constexpr uint8_t valvePC = 0x7f;
             const uint8_t bodylen = OTRadioLink::SimpleSecureFrame32or0BodyTXV0p2::getInstance().generateSecureOFrameRawForTX(
-                  realTXFrameStart - offset, TX_MSG_BUF_SIZE - (realTXFrameStart-sW.buf) + offset,
+                  realTXFrameStart - offset, MSG_BUF_SIZE - (realTXFrameStart-sW.buf) + offset,
                   txIDLen, valvePC, ptextBuf, eW, subScratch, key);
             sendingJSONFailed = (0 == bodylen);
             wrote = bodylen - offset;

    OTV0P2BASE::IOSetup();

    OTV0P2BASE::serialPrintAndFlush(F("\r\nOpenTRV: ")); // Leading CRLF to clear leading junk, eg from bootloader.
      V0p2Base_serialPrintlnBuildVersion();

    // Count resets to detect unexpected crashes/restarts.
    const uint8_t oldResetCount = eeprom_read_byte((uint8_t *)V0P2BASE_EE_START_RESET_COUNT);

//========================================
// Controller's view of Least Significant Digits of the current (local) time, in this case whole seconds.
// Previous state of port B pins to help detect changes.
//
// NOTE: PrimaryRadio may switch PCINT0 on and off during operation! This pin bank should not be relied
//       upon for pin change interrupts!
static volatile uint8_t prevStatePB;
// Interrupt service routine for PB I/O port transition changes.
ISR(PCINT0_vect)
