BLE_TX.h 466 B

12345678910111213141516171819202122
  1. /*
  2. BLE BT4/BT5 driver
  3. */
  4. #pragma once
  5. #include "transmitter.h"
  6. class BLE_TX : public Transmitter {
  7. public:
  8. bool init(void) override;
  9. bool transmit_longrange(ODID_UAS_Data &UAS_data);
  10. bool transmit_legacy(ODID_UAS_Data &UAS_data);
  11. private:
  12. bool initialised;
  13. uint8_t msg_counters[ODID_MSG_COUNTER_AMOUNT];
  14. uint8_t legacy_payload[36];
  15. uint8_t longrange_payload[250];
  16. bool started;
  17. uint8_t dBm_to_tx_power(float dBm) const;
  18. };