налажена связь между 2 esp

This commit is contained in:
2026-08-07 01:34:18 +03:00
parent 1edc420b77
commit fb40f3ddef
9 changed files with 197 additions and 47 deletions

View File

@@ -24,6 +24,7 @@ class App {
void changeMenu(int direction);
void sanitizeRange();
void startTest();
bool armSlave();
bool prepareStage();
bool startLocalMeasurement(float hz, float duty);
void startMasterDiscovery();
@@ -39,6 +40,7 @@ class App {
uint64_t actualNominalTotalUs();
ProtocolPacket makePacket(MessageType type) const;
void sendCurrent(MessageType type);
void updateHeartbeat();
bool packetForCurrent(const ProtocolPacket &p) const;
Button startButton_, modeButton_;
@@ -61,10 +63,12 @@ class App {
uint8_t peer_[6] = {};
bool havePeer_ = false;
uint32_t deadlineMs_ = 0, lastSendMs_ = 0;
uint32_t lastHeartbeatMs_ = 0, lastPeerSeenMs_ = 0;
uint8_t retries_ = 0;
ProtocolPacket pendingPacket_ = {};
bool initialized_ = false, bootResetCandidate_ = false;
bool sweepHadDataLoss_ = false;
uint32_t firstDataLossHz_ = 0;
uint32_t bootCheckStartedMs_ = 0;
uint32_t slaveRearmAtMs_ = 0;
};