mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-16 12:52:49 +00:00
- src/Mesh.cpp Reverted #ifdef ZEPHCORE_COMPANION block → back to vanilla self_id.copyHashTo - helpers/ContactInfo.h Removed OUT_PATH_SENT - helpers/ui-joystick/joystick_defs.h Added OUT_PATH_SENT here (with comment clarifying it's UI-only) - helpers/ui-joystick/joystick_ui_task.h Removed dead _next_batt_refresh field - helpers/ui-joystick/joystick_ui_task.cpp Removed _next_batt_refresh(0) from ctor init list - helpers/ui-joystick/joystick_screens.h MsgEntry::origin[80]→[32]; MAX_UNREAD_MSGS 32→16 - Kconfig DOOM help text now lists both UI activation paths - ARCHITECTURE.md Same correction in §8.5
37 lines
754 B
C++
37 lines
754 B
C++
/*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
* ContactInfo - contact/peer info for mesh
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <mesh/Mesh.h>
|
|
#include <mesh/MeshCore.h>
|
|
|
|
#define OUT_PATH_UNKNOWN 0xFF
|
|
|
|
struct ContactInfo {
|
|
mesh::Identity id;
|
|
char name[32];
|
|
uint8_t type;
|
|
uint8_t flags;
|
|
uint8_t out_path_len;
|
|
mutable bool shared_secret_valid;
|
|
uint8_t out_path[MAX_PATH_SIZE];
|
|
uint32_t last_advert_timestamp;
|
|
uint32_t lastmod;
|
|
int32_t gps_lat, gps_lon;
|
|
uint32_t sync_since;
|
|
|
|
const uint8_t *getSharedSecret(const mesh::LocalIdentity &self_id) const {
|
|
if (!shared_secret_valid) {
|
|
self_id.calcSharedSecret(shared_secret, id.pub_key);
|
|
shared_secret_valid = true;
|
|
}
|
|
return shared_secret;
|
|
}
|
|
|
|
private:
|
|
mutable uint8_t shared_secret[PUB_KEY_SIZE];
|
|
};
|