#!/bin/bash

raspi-gpio set $GPIO_PTT op

ptt_on () {
if [[ $PTTLOGIC == 0 ]];
then
    if [[ $BLOCK_WIFI_DURING_TX = 1 ]]; then rfkill block wifi; fi
    raspi-gpio set $GPIO_PTT dl
else
    raspi-gpio set $GPIO_PTT dh
     if [[ $BLOCK_WIFI_DURING_TX = 1 ]]; then rfkill unblock wifi; fi
fi
}


ptt_off () {
if [[ $PTTLOGIC == 0 ]];
then
    if [[ $BLOCK_WIFI_DURING_TX = 1 ]]; then rfkill block wifi; fi
    raspi-gpio set $GPIO_PTT dh

else    
    raspi-gpio set $GPIO_PTT dl
     if [[ $BLOCK_WIFI_DURING_TX = 1 ]]; then rfkill unblock wifi; fi
fi      
}
