Skip to content

Commit

Permalink
ksun_m6: Avoid float division in freq calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
wavexx committed Jun 7, 2024
1 parent bdea184 commit 940a6bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chirp/drivers/ksun_m6.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def get_memory(self, number):
tx_freq = (((_mem.freq[2] & 0xF) << 16)
+ (_mem.freq[3] << 8) + _mem.freq[4])

mem.freq = int(rx_freq / 2000 * 1000000)
mem.offset = int(tx_freq / 2000 * 1000000)
mem.freq = rx_freq * 1000000 // 2000
mem.offset = tx_freq * 1000000 // 2000

if _mem.no_tx:
mem.duplex = "off"
Expand Down

0 comments on commit 940a6bb

Please sign in to comment.