optimise mavlink SS packet size (#3029)
[ExpressLRS.git] / src / lib / TelemetryProtocol / telemetry_protocol.h
blob0c2422872e1b6cca55a137587e2424aff82590de
1 #pragma once
3 #define ELRS4_TELEMETRY_SHIFT 2
4 #define ELRS4_TELEMETRY_BYTES_PER_CALL 5
5 #define ELRS4_TELEMETRY_MAX_PACKAGES (255 >> ELRS4_TELEMETRY_SHIFT)
6 #define ELRS8_TELEMETRY_BYTES_PER_CALL 10 // some of this is consumed by LinkStats buuuut....
7 #define ELRS8_TELEMETRY_SHIFT 3
8 #define ELRS8_TELEMETRY_MAX_PACKAGES (255 >> ELRS8_TELEMETRY_SHIFT)
10 #define ELRS4_MSP_BYTES_PER_CALL 5
11 #define ELRS8_MSP_BYTES_PER_CALL 10
12 #define ELRS_MSP_BUFFER 65
13 #define ELRS_MSP_MAX_PACKAGES ((ELRS_MSP_BUFFER/ELRS4_MSP_BYTES_PER_CALL)+1)
15 #define AP_MAX_BUF_LEN 64