Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. int BoardAntennaSelect(RadioMode Mode, RadioBand Band) {
  2.    // static int txNum = 0;
  3. +  DEBUG_PRINT(("MODE=%d, BAND=%d\n",Mode, Band));
  4.    if (Band == RADIO_BAND_VHF) {
  5. -    if (Mode == RADIO_MODE_INIT) {
  6. +    if (Mode == RADIO_MODE_TX) {
  7. +      DEBUG_PRINT(("START TX\n"));
  8.        // Wake pic to enable low voltage detection
  9.        GPIOSetModeOutput(PWR_WAKE_PIN);
  10.        GPIOSetHigh(PWR_WAKE_PIN);
  11. +      Delay(1);
  12.        // LogAdd(txNum, "tx", strlen("tx"));
  13.        // txNum++;
  14.      } else if (Mode == RADIO_MODE_DEINIT) {
  15. +      DEBUG_PRINT(("END TX\n"));
  16.        // LogAdd(txNum, "rx", strlen("rx"));
  17.        GPIOSetLow(PWR_WAKE_PIN);
  18.        GPIOSetModeInput(PWR_WAKE_PIN, GPIO_NO_PULL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement