Skip to content

Commit

Permalink
Show frequency in FM player.
Browse files Browse the repository at this point in the history
  • Loading branch information
fdb committed Aug 27, 2019
1 parent ceabe84 commit 718ebf1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/fm-player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ function setup()
freq = (100.9e6 + freq_offset) / 1e6
device = nrf_device_new(freq, "../rfdata/rf-100.900-1.raw")
player = nrf_player_new(device, NRF_DEMODULATE_WBFM, freq_offset)
freq_font = ngl_font_new("../fonts/Roboto-Bold.ttf", 72)
end

function draw()
ngl_clear(0.2, 0.2, 0.2, 1.0)
ngl_font_draw(freq_font, freq, 1, 0.7, 1.0)
end

function on_key(key, mods)
Expand Down

0 comments on commit 718ebf1

Please sign in to comment.