From 2831548af4e405a28837f08ed4ede87ef6375bae Mon Sep 17 00:00:00 2001 From: Xavier Date: Sun, 4 Oct 2026 19:33:54 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"tools"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/cibi_channel_list_generator.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/cibi_channel_list_generator.py diff --git a/tools/cibi_channel_list_generator.py b/tools/cibi_channel_list_generator.py new file mode 100644 index 0000000..b9d2972 --- /dev/null +++ b/tools/cibi_channel_list_generator.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +''' + /* definning a structure to store names of Cibi channels */ + typedef struct { + uint16_t freq_khz; + uint8_t channel; + uint8_t band; + bool bis; + } cibi_channel_t; +''' + +def print_channel( channel, band, freq_khz, bis): + print('{.freq_khz = %d, .channel = %d, .band = %d, .bis = %s},' % (freq_khz, channel, band, bis)) + +bands = ['3Xinf', '2Xinf', '1Xinf', 'norm', '1Xsup', '2Xsup', '3Xsup'] +for band_index, band_name in enumerate(bands): + freq_khz = 25615 + band_index * 450 + for channel in xrange(40): + channel = channel + 1 + print_channel(channel, band_index, freq_khz, 'false') + freq_khz += 10 + if channel in [ 3, 7, 11, 15, 19 ]: + print_channel(channel, band_index, freq_khz, 'true') + freq_khz += 10 + + +