AP_RCProtocol: moved fport variables into class

reduced pollution of global namespace
This commit is contained in:
Andrew Tridgell 2020-03-20 09:48:40 +11:00
parent a1069d85cb
commit 6b35497129
2 changed files with 13 additions and 12 deletions

View File

@ -86,18 +86,6 @@ struct PACKED FPort_Frame {
};
};
struct {
bool available = false;
uint32_t data;
uint16_t appid;
uint8_t frame;
} telem_data;
// receiver sends 0x10 when ready to receive telemetry frames (R-XSR)
bool rx_driven_frame_rate = false;
// if the receiver is not controlling frame rate apply a constraint on consecutive frames
uint8_t consecutive_telemetry_frame_count;
static_assert(sizeof(FPort_Frame) == FPORT_CONTROL_FRAME_SIZE, "FPort_Frame incorrect size");
// constructor

View File

@ -47,4 +47,17 @@ private:
} byte_input;
const bool inverted;
struct {
bool available = false;
uint32_t data;
uint16_t appid;
uint8_t frame;
} telem_data;
// receiver sends 0x10 when ready to receive telemetry frames (R-XSR)
bool rx_driven_frame_rate = false;
// if the receiver is not controlling frame rate apply a constraint on consecutive frames
uint8_t consecutive_telemetry_frame_count;
};