Merge branch 'ripplebiz:dev' into dev

This commit is contained in:
Rastislav Vysoky
2025-03-09 07:16:50 +01:00
committed by GitHub
7 changed files with 46 additions and 11 deletions

View File

@@ -184,6 +184,7 @@ static uint32_t _atoi(const char* sp) {
#define PUSH_CODE_LOGIN_SUCCESS 0x85
#define PUSH_CODE_LOGIN_FAIL 0x86
#define PUSH_CODE_STATUS_RESPONSE 0x87
#define PUSH_CODE_LOG_RX_DATA 0x88
/* -------------------------------------------------------------------------------------- */
@@ -435,6 +436,18 @@ protected:
return (int) ((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
}
void logRxRaw(float snr, float rssi, const uint8_t raw[], int len) override {
if (_serial->isConnected()) {
int i = 0;
out_frame[i++] = PUSH_CODE_LOG_RX_DATA;
out_frame[i++] = (int8_t)(snr * 4);
out_frame[i++] = (int8_t)(rssi);
memcpy(&out_frame[i], raw, len); i += len;
_serial->writeFrame(out_frame, i);
}
}
void onDiscoveredContact(ContactInfo& contact, bool is_new) override {
if (_serial->isConnected()) {
out_frame[0] = PUSH_CODE_ADVERT;