mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
added on air time measurement for easier time debugging
This commit is contained in:
parent
1924189bdc
commit
c9bcfcbc04
1 changed files with 5 additions and 0 deletions
|
@ -432,6 +432,7 @@ class RF:
|
||||||
"""
|
"""
|
||||||
self.log.debug("[MDM] transmit", mode=mode)
|
self.log.debug("[MDM] transmit", mode=mode)
|
||||||
static.TRANSMITTING = True
|
static.TRANSMITTING = True
|
||||||
|
start_of_transmission = time.time()
|
||||||
# Toggle ptt early to save some time and send ptt state via socket
|
# Toggle ptt early to save some time and send ptt state via socket
|
||||||
static.PTT_STATE = self.hamlib.set_ptt(True)
|
static.PTT_STATE = self.hamlib.set_ptt(True)
|
||||||
jsondata = {"ptt": "True"}
|
jsondata = {"ptt": "True"}
|
||||||
|
@ -573,6 +574,10 @@ class RF:
|
||||||
static.TRANSMITTING = False
|
static.TRANSMITTING = False
|
||||||
threading.Event().set()
|
threading.Event().set()
|
||||||
|
|
||||||
|
end_of_transmission = time.time()
|
||||||
|
transmission_time = end_of_transmission - start_of_transmission
|
||||||
|
self.log.debug("[MDM] ON AIR TIME", time=transmission_time)
|
||||||
|
|
||||||
def demodulate_audio(
|
def demodulate_audio(
|
||||||
self,
|
self,
|
||||||
audiobuffer: codec2.audio_buffer,
|
audiobuffer: codec2.audio_buffer,
|
||||||
|
|
Loading…
Reference in a new issue