diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index fa9edc8c..6fe165c5 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -710,7 +710,7 @@ uint32_t MyMesh::calcDirectTimeoutMillisFor(uint32_t pkt_airtime_millis, uint8_t void MyMesh::onSendTimeout() {} MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store, AbstractUITask* ui) - : BaseChatMesh(radio, *(_ms_clock = new ArduinoMillis()), rng, rtc, *(_pkt_mgr = new StaticPoolPacketManager(16)), tables), + : BaseChatMesh(radio, *new ArduinoMillis(), rng, rtc, *new StaticPoolPacketManager(16), tables), _serial(NULL), telemetry(MAX_PACKET_PAYLOAD - 4), _store(&store), _ui(ui) { _iter_started = false; _cli_rescue = false; @@ -1612,8 +1612,7 @@ void MyMesh::enterCLIRescue() { void MyMesh::formatStatsReply(char *reply) { // Use StatsFormatHelper - // Note: err_flags is private in Dispatcher, so we use 0 - StatsFormatHelper::formatCoreStats(reply, board, *_ms_clock, 0, _pkt_mgr); + StatsFormatHelper::formatCoreStats(reply, board, *_ms, _err_flags, _mgr); } void MyMesh::formatRadioStatsReply(char *reply) { diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index ef451d5d..61a25e14 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -184,8 +184,6 @@ private: private: DataStore* _store; NodePrefs _prefs; - mesh::PacketManager* _pkt_mgr; // stored for stats access - mesh::MillisecondClock* _ms_clock; // stored for stats access uint32_t pending_login; uint32_t pending_status; uint32_t pending_telemetry, pending_discovery; // pending _TELEMETRY_REQ