another update
This commit is contained in:
No files matched your search
+190
-131
@@ -38,55 +38,10 @@
|
||||
#include "esp_adc/adc_cali_scheme.h"
|
||||
#include "nvs.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
/* ---------------------------- Pins/config ---------------------------- */
|
||||
|
||||
#define SPI_HOST_USED SPI2_HOST
|
||||
#define PIN_SPI_SCLK GPIO_NUM_4
|
||||
#define PIN_SPI_MOSI GPIO_NUM_5
|
||||
#define PIN_SPI_MISO GPIO_NUM_0
|
||||
|
||||
#define PIN_CC1101_CS GPIO_NUM_1
|
||||
#define PIN_CC1101_GDO0 GPIO_NUM_3
|
||||
|
||||
#define PIN_OLED_CS GPIO_NUM_10
|
||||
#define PIN_OLED_DC GPIO_NUM_11
|
||||
#define PIN_OLED_RESET GPIO_NUM_12
|
||||
#define PIN_BUTTON_BOOT GPIO_NUM_9
|
||||
#define PIN_BUTTON_UP GPIO_NUM_6
|
||||
#define PIN_BUTTON_DOWN GPIO_NUM_7
|
||||
#define PIN_BUTTON_SELECT GPIO_NUM_14
|
||||
#define PIN_BATTERY_ADC GPIO_NUM_2
|
||||
#define PIN_STATUS_LED GPIO_NUM_13
|
||||
#define PIN_NEOPIXEL GPIO_NUM_8
|
||||
|
||||
/* Change this one value to tune the receiver. Rebuild and flash afterwards. */
|
||||
#define RF_FREQ_HZ 435000000UL
|
||||
#define CC1101_XTAL_HZ 26000000UL
|
||||
#define TUNE_MIN_HZ 433000000UL
|
||||
#define TUNE_MAX_HZ 435500000UL
|
||||
#define TUNE_STEP_HZ 25000UL
|
||||
#define MY_RIC 1234567UL
|
||||
#define OLED_IDLE_OFF_MS 60000U
|
||||
#define OWN_PAGE_ALERT_MS 3000U
|
||||
#define RX_DISPLAY_FLASHES 4U
|
||||
#define RX_DISPLAY_FLASH_MS 120U
|
||||
|
||||
/* Enable after wiring BAT+ through a divider to GPIO2 and BAT- to GND. */
|
||||
#define BATTERY_MONITOR_ENABLE 0
|
||||
#define BATTERY_DIVIDER_TOP_OHMS 100000U
|
||||
#define BATTERY_DIVIDER_BOTTOM_OHMS 100000U
|
||||
|
||||
#define SAMPLE_TIMER_HZ 1000000UL
|
||||
#define SAMPLE_PERIOD_TICKS 26UL
|
||||
#define SAMPLE_RATE_HZ (SAMPLE_TIMER_HZ / SAMPLE_PERIOD_TICKS)
|
||||
|
||||
#define SAMPLE_BUF_SIZE 16384U
|
||||
#define SAMPLE_BUF_MASK (SAMPLE_BUF_SIZE - 1U)
|
||||
#define SPI_TRANSFER_CHUNK 64U
|
||||
|
||||
#define HISTORY_COUNT 8
|
||||
#define MESSAGE_SIZE 160
|
||||
#include "pager_config.h"
|
||||
#include "pager_presets.h"
|
||||
#include "pager_tx.h"
|
||||
#include "pocsag_bch.h"
|
||||
|
||||
static const char *TAG = "pager";
|
||||
|
||||
@@ -100,6 +55,13 @@ static unsigned display_baud;
|
||||
static uint32_t radio_frequency_hz = RF_FREQ_HZ;
|
||||
static bool oled_is_on = true;
|
||||
static TickType_t ui_last_activity;
|
||||
static uint32_t my_ric = MY_RIC;
|
||||
static unsigned my_ric_preset_index;
|
||||
static unsigned tx_ric_preset_index;
|
||||
static unsigned tx_message_index;
|
||||
static TickType_t tx_last_sent;
|
||||
static bool tx_has_sent;
|
||||
static const char *tx_status_text = "HOLD TO SEND";
|
||||
static bool oled_inverted;
|
||||
static unsigned rx_flash_toggles;
|
||||
static TickType_t rx_flash_next_toggle;
|
||||
@@ -504,6 +466,7 @@ static bool history_nvs_ready;
|
||||
#define HISTORY_STORAGE_VERSION 1U
|
||||
#define HISTORY_NVS_NAMESPACE "pager"
|
||||
#define HISTORY_NVS_KEY "history"
|
||||
#define OWN_RIC_NVS_KEY "own_ric"
|
||||
|
||||
typedef struct {
|
||||
uint32_t version;
|
||||
@@ -514,6 +477,18 @@ typedef struct {
|
||||
|
||||
static void ui_render(void);
|
||||
static void ui_note_activity(void);
|
||||
static void tx_send_selected(void);
|
||||
|
||||
static void ui_select_next_my_ric(void)
|
||||
{
|
||||
my_ric_preset_index = (my_ric_preset_index + 1U) % ric_preset_count;
|
||||
my_ric = ric_presets[my_ric_preset_index].ric;
|
||||
if (history_nvs_ready) {
|
||||
ESP_ERROR_CHECK(nvs_set_u8(history_nvs, OWN_RIC_NVS_KEY,
|
||||
(uint8_t)my_ric_preset_index));
|
||||
ESP_ERROR_CHECK(nvs_commit(history_nvs));
|
||||
}
|
||||
}
|
||||
|
||||
static void history_storage_save(void)
|
||||
{
|
||||
@@ -549,6 +524,13 @@ static void history_storage_init(void)
|
||||
&history_nvs));
|
||||
history_nvs_ready = true;
|
||||
|
||||
uint8_t saved_ric_index;
|
||||
if (nvs_get_u8(history_nvs, OWN_RIC_NVS_KEY, &saved_ric_index) == ESP_OK &&
|
||||
saved_ric_index < ric_preset_count) {
|
||||
my_ric_preset_index = saved_ric_index;
|
||||
my_ric = ric_presets[my_ric_preset_index].ric;
|
||||
}
|
||||
|
||||
history_storage_t storage;
|
||||
size_t size = sizeof(storage);
|
||||
err = nvs_get_blob(history_nvs, HISTORY_NVS_KEY, &storage, &size);
|
||||
@@ -574,7 +556,7 @@ static void history_add(uint32_t ric, unsigned baud, unsigned function,
|
||||
{
|
||||
if (!text || !text[0])
|
||||
return;
|
||||
if (!monitor_mode && ric != MY_RIC)
|
||||
if (!monitor_mode && ric != my_ric)
|
||||
return;
|
||||
|
||||
pager_message_t *m = &history[history_head];
|
||||
@@ -595,67 +577,8 @@ static void history_add(uint32_t ric, unsigned baud, unsigned function,
|
||||
ui_render();
|
||||
}
|
||||
|
||||
/* ------------------------------- BCH --------------------------------- */
|
||||
|
||||
#define POCSAG_SYNC 0x7CD215D8UL
|
||||
#define POCSAG_IDLE 0x7A89C197UL
|
||||
#define BCH_POLY 0x769U
|
||||
|
||||
static uint32_t syndrome_errors[1024];
|
||||
|
||||
static uint16_t bch_syndrome(uint32_t value)
|
||||
{
|
||||
for (int bit = 30; bit >= 10; bit--) {
|
||||
if (value & (1UL << bit))
|
||||
value ^= (uint32_t)BCH_POLY << (bit - 10);
|
||||
}
|
||||
return (uint16_t)(value & 0x3FF);
|
||||
}
|
||||
|
||||
static void bch_init(void)
|
||||
{
|
||||
memset(syndrome_errors, 0, sizeof(syndrome_errors));
|
||||
|
||||
for (int i = 0; i < 31; i++) {
|
||||
uint32_t e = 1UL << i;
|
||||
syndrome_errors[bch_syndrome(e)] = e;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 31; i++) {
|
||||
for (int j = i + 1; j < 31; j++) {
|
||||
uint32_t e = (1UL << i) | (1UL << j);
|
||||
syndrome_errors[bch_syndrome(e)] = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool bch_correct(uint32_t *word, unsigned *ncorrected)
|
||||
{
|
||||
uint32_t upper31 = *word >> 1;
|
||||
uint16_t syn = bch_syndrome(upper31);
|
||||
uint32_t error = syndrome_errors[syn];
|
||||
|
||||
if (syn && !error)
|
||||
return false;
|
||||
|
||||
upper31 ^= error;
|
||||
|
||||
unsigned parity = 0;
|
||||
for (int i = 1; i < 32; i++)
|
||||
parity ^= (upper31 >> (i - 1)) & 1U;
|
||||
|
||||
unsigned parity_error = ((*word & 1U) != parity);
|
||||
unsigned error_count = (unsigned)__builtin_popcount(error);
|
||||
if (error_count + parity_error > 2U)
|
||||
return false;
|
||||
|
||||
uint32_t rebuilt = (upper31 << 1) | parity;
|
||||
|
||||
*word = rebuilt;
|
||||
*ncorrected = error_count + parity_error;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* ---------------------------- POCSAG decode --------------------------- */
|
||||
|
||||
typedef enum {
|
||||
@@ -706,7 +629,8 @@ enum {
|
||||
UI_LIVE,
|
||||
UI_HISTORY,
|
||||
UI_MENU,
|
||||
UI_TUNE
|
||||
UI_TUNE,
|
||||
UI_TX
|
||||
};
|
||||
|
||||
static TickType_t page_alert_until;
|
||||
@@ -716,6 +640,7 @@ static bool alert_output_state;
|
||||
static bool alert_output_initialized;
|
||||
static unsigned menu_return_screen;
|
||||
static uint32_t tune_candidate_hz;
|
||||
static unsigned menu_scroll;
|
||||
|
||||
typedef enum {
|
||||
BUTTON_BOOT,
|
||||
@@ -784,16 +709,16 @@ static void ui_draw_live(void)
|
||||
oled_text(0, 0, monitor_mode ? "POCSAG MONITOR" : "MY PAGER");
|
||||
#if BATTERY_MONITOR_ENABLE
|
||||
if (battery_voltage_valid) {
|
||||
snprintf(line, sizeof(line), "RIC %lu BAT %u.%02uV",
|
||||
(unsigned long)MY_RIC,
|
||||
(unsigned)(battery_voltage_mv / 1000U),
|
||||
(unsigned)((battery_voltage_mv % 1000U) / 10U));
|
||||
unsigned battery_percent = battery_voltage_mv <= 3300U ? 0U :
|
||||
battery_voltage_mv >= 4200U ? 100U :
|
||||
(unsigned)(((battery_voltage_mv - 3300U) * 100U) / 900U);
|
||||
snprintf(line, sizeof(line), "RIC %lu BAT %u%%",
|
||||
(unsigned long)my_ric, battery_percent);
|
||||
} else {
|
||||
snprintf(line, sizeof(line), "RIC %lu BAT --",
|
||||
(unsigned long)MY_RIC);
|
||||
snprintf(line, sizeof(line), "RIC %lu BAT --", (unsigned long)my_ric);
|
||||
}
|
||||
#else
|
||||
snprintf(line, sizeof(line), "RIC %lu", (unsigned long)MY_RIC);
|
||||
snprintf(line, sizeof(line), "RIC %lu", (unsigned long)my_ric);
|
||||
#endif
|
||||
oled_text(0, 9, line);
|
||||
|
||||
@@ -858,17 +783,25 @@ static void ui_draw_menu(void)
|
||||
snprintf(frequency_item, sizeof(frequency_item), "FREQ %lu.%03lu MHZ",
|
||||
(unsigned long)(radio_frequency_hz / 1000000UL),
|
||||
(unsigned long)((radio_frequency_hz / 1000UL) % 1000UL));
|
||||
char own_ric_item[24];
|
||||
snprintf(own_ric_item, sizeof(own_ric_item), "MY RIC %lu",
|
||||
(unsigned long)my_ric);
|
||||
const char *items[] = {
|
||||
monitor_mode ? "FILTER: ALL RIC" : "FILTER: MY RIC",
|
||||
frequency_item,
|
||||
own_ric_item,
|
||||
"TX TEST PRESETS",
|
||||
"LIVE DISPLAY",
|
||||
"MESSAGE HISTORY",
|
||||
"RETURN"
|
||||
};
|
||||
oled_text(0, 0, "PAGER MENU");
|
||||
for (unsigned i = 0; i < 5; i++) {
|
||||
int y = 8 + (int)i * 8;
|
||||
if (i == menu_cursor) {
|
||||
for (unsigned row = 0; row < 5U; row++) {
|
||||
unsigned item = menu_scroll + row;
|
||||
if (item >= 7U)
|
||||
break;
|
||||
int y = 8 + (int)row * 8;
|
||||
if (item == menu_cursor) {
|
||||
for (int row = 0; row < 7; row++) {
|
||||
for (int col = 0; col < 5; col++) {
|
||||
if (cursor_rows[row] & (1U << col))
|
||||
@@ -876,7 +809,7 @@ static void ui_draw_menu(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
oled_text(8, y, items[i]);
|
||||
oled_text(8, y, items[item]);
|
||||
}
|
||||
oled_text(0, 49, "UP/DN MOVE; SEL OK");
|
||||
oled_text(0, 57, "BOOT TAP NEXT / HOLD");
|
||||
@@ -894,6 +827,23 @@ static void ui_draw_tune(void)
|
||||
oled_text(0, 49, "TAP NEXT / HOLD SET");
|
||||
}
|
||||
|
||||
static void ui_draw_tx(void)
|
||||
{
|
||||
char line[24];
|
||||
const ric_preset_t *target = &ric_presets[tx_ric_preset_index];
|
||||
const tx_message_preset_t *preset = &tx_message_presets[tx_message_index];
|
||||
oled_text(0, 0, POCSAG_TX_ENABLE ? "TX TEST PRESETS" : "TX DISABLED BUILD");
|
||||
snprintf(line, sizeof(line), "TO %s", target->label);
|
||||
oled_text(0, 12, line);
|
||||
snprintf(line, sizeof(line), "RIC %lu", (unsigned long)target->ric);
|
||||
oled_text(0, 21, line);
|
||||
snprintf(line, sizeof(line), "MSG %s", preset->label);
|
||||
oled_text(0, 27, line);
|
||||
oled_text(0, 36, preset->system_status ? "LIVE SYSTEM SNAPSHOT" : preset->text);
|
||||
oled_text(0, 45, "UP/DN RIC; SEL MSG");
|
||||
oled_text(0, 55, POCSAG_TX_ENABLE ? tx_status_text : "TX OFF IN BUILD CONFIG");
|
||||
}
|
||||
|
||||
static void ui_render(void)
|
||||
{
|
||||
if (!oled_is_on)
|
||||
@@ -905,6 +855,8 @@ static void ui_render(void)
|
||||
ui_draw_history();
|
||||
else if (ui_screen == UI_TUNE)
|
||||
ui_draw_tune();
|
||||
else if (ui_screen == UI_TX)
|
||||
ui_draw_tx();
|
||||
else
|
||||
ui_draw_live();
|
||||
if (hold_cue_visible) {
|
||||
@@ -921,15 +873,33 @@ static void oled_draw_history(void)
|
||||
ui_render();
|
||||
}
|
||||
|
||||
static void ui_move_menu(int direction)
|
||||
{
|
||||
menu_cursor = direction < 0
|
||||
? (menu_cursor + 6U) % 7U
|
||||
: (menu_cursor + 1U) % 7U;
|
||||
if (menu_cursor < menu_scroll)
|
||||
menu_scroll = menu_cursor;
|
||||
else if (menu_cursor >= menu_scroll + 5U)
|
||||
menu_scroll = menu_cursor - 4U;
|
||||
}
|
||||
|
||||
static void ui_next_tx_message(void)
|
||||
{
|
||||
tx_message_index = (tx_message_index + 1U) % tx_message_preset_count;
|
||||
}
|
||||
|
||||
static void ui_short_press(void)
|
||||
{
|
||||
ui_note_activity();
|
||||
if (ui_screen == UI_MENU) {
|
||||
menu_cursor = (menu_cursor + 1U) % 5U;
|
||||
ui_move_menu(1);
|
||||
} else if (ui_screen == UI_TUNE) {
|
||||
tune_candidate_hz += TUNE_STEP_HZ;
|
||||
if (tune_candidate_hz > TUNE_MAX_HZ)
|
||||
tune_candidate_hz = TUNE_MIN_HZ;
|
||||
} else if (ui_screen == UI_TX) {
|
||||
ui_next_tx_message();
|
||||
} else if (ui_screen == UI_LIVE) {
|
||||
if (live_page && message_active &&
|
||||
text_page + 1U < text_page_count(message_len)) {
|
||||
@@ -956,6 +926,11 @@ static void ui_short_press(void)
|
||||
static void ui_long_press(void)
|
||||
{
|
||||
ui_note_activity();
|
||||
if (ui_screen == UI_TX) {
|
||||
tx_send_selected();
|
||||
ui_render();
|
||||
return;
|
||||
}
|
||||
if (ui_screen == UI_TUNE) {
|
||||
cc1101_retune(tune_candidate_hz);
|
||||
ui_screen = UI_MENU;
|
||||
@@ -984,9 +959,17 @@ static void ui_long_press(void)
|
||||
ui_screen = UI_TUNE;
|
||||
break;
|
||||
case 2:
|
||||
ui_screen = UI_LIVE;
|
||||
ui_select_next_my_ric();
|
||||
break;
|
||||
case 3:
|
||||
tx_ric_preset_index = my_ric_preset_index;
|
||||
tx_message_index = 0;
|
||||
ui_screen = UI_TX;
|
||||
break;
|
||||
case 4:
|
||||
ui_screen = UI_LIVE;
|
||||
break;
|
||||
case 5:
|
||||
ui_screen = UI_HISTORY;
|
||||
history_cursor = 0;
|
||||
text_page = 0;
|
||||
@@ -1009,7 +992,14 @@ static void ui_handle_button(ui_button_id_t button, bool long_press)
|
||||
}
|
||||
|
||||
if (button == BUTTON_SELECT) {
|
||||
if (ui_screen == UI_MENU || ui_screen == UI_TUNE) {
|
||||
if (ui_screen == UI_TX) {
|
||||
if (long_press)
|
||||
tx_send_selected();
|
||||
else
|
||||
ui_next_tx_message();
|
||||
ui_note_activity();
|
||||
ui_render();
|
||||
} else if (ui_screen == UI_MENU || ui_screen == UI_TUNE) {
|
||||
ui_long_press();
|
||||
} else if (ui_screen == UI_HISTORY) {
|
||||
ui_screen = UI_LIVE;
|
||||
@@ -1028,9 +1018,9 @@ static void ui_handle_button(ui_button_id_t button, bool long_press)
|
||||
ui_note_activity();
|
||||
if (ui_screen == UI_MENU) {
|
||||
if (button == BUTTON_UP)
|
||||
menu_cursor = (menu_cursor + 4U) % 5U;
|
||||
ui_move_menu(-1);
|
||||
else
|
||||
menu_cursor = (menu_cursor + 1U) % 5U;
|
||||
ui_move_menu(1);
|
||||
} else if (ui_screen == UI_TUNE) {
|
||||
if (button == BUTTON_UP) {
|
||||
tune_candidate_hz = tune_candidate_hz <= TUNE_MIN_HZ + TUNE_STEP_HZ
|
||||
@@ -1039,6 +1029,12 @@ static void ui_handle_button(ui_button_id_t button, bool long_press)
|
||||
tune_candidate_hz = tune_candidate_hz >= TUNE_MAX_HZ
|
||||
? TUNE_MIN_HZ : tune_candidate_hz + TUNE_STEP_HZ;
|
||||
}
|
||||
} else if (ui_screen == UI_TX) {
|
||||
if (button == BUTTON_UP)
|
||||
tx_ric_preset_index = (tx_ric_preset_index + ric_preset_count - 1U)
|
||||
% ric_preset_count;
|
||||
else
|
||||
tx_ric_preset_index = (tx_ric_preset_index + 1U) % ric_preset_count;
|
||||
} else if (history_count) {
|
||||
if (ui_screen == UI_LIVE) {
|
||||
ui_screen = UI_HISTORY;
|
||||
@@ -1346,7 +1342,7 @@ static void decode_codeword(uint32_t raw, unsigned slot)
|
||||
}
|
||||
|
||||
unsigned fixed = 0;
|
||||
if (!bch_correct(&raw, &fixed)) {
|
||||
if (!pocsag_bch_correct(&raw, &fixed)) {
|
||||
ESP_LOGW(TAG, "BCH failure, raw=%08lX",
|
||||
(unsigned long)raw);
|
||||
message_abort();
|
||||
@@ -1390,9 +1386,9 @@ static void decode_codeword(uint32_t raw, unsigned slot)
|
||||
alpha_acc = 0;
|
||||
alpha_nbits = 0;
|
||||
numeric_nibble_count = 0;
|
||||
live_page = monitor_mode || current_ric == MY_RIC;
|
||||
live_page = monitor_mode || current_ric == my_ric;
|
||||
text_page = 0;
|
||||
if (current_ric == MY_RIC)
|
||||
if (current_ric == my_ric)
|
||||
ui_start_own_page_alert();
|
||||
if (live_page) {
|
||||
ui_screen = UI_LIVE;
|
||||
@@ -1400,7 +1396,7 @@ static void decode_codeword(uint32_t raw, unsigned slot)
|
||||
ui_start_display_flash();
|
||||
}
|
||||
|
||||
if (monitor_mode || current_ric == MY_RIC) {
|
||||
if (monitor_mode || current_ric == my_ric) {
|
||||
ESP_LOGI(TAG, "Address RIC=%lu function=%u",
|
||||
(unsigned long)current_ric, current_function);
|
||||
}
|
||||
@@ -1579,6 +1575,69 @@ static void start_sampler(void)
|
||||
(unsigned long)SAMPLE_RATE_HZ);
|
||||
}
|
||||
|
||||
/* Send is explicit from the TX screen; pause sampling so our own RF cannot enter RX decode. */
|
||||
static void tx_send_selected(void)
|
||||
{
|
||||
#if !POCSAG_TX_ENABLE
|
||||
tx_status_text = "ENABLE TX IN CONFIG";
|
||||
ESP_LOGW(TAG, "TX is disabled; set POCSAG_TX_ENABLE in pager_config.h");
|
||||
#else
|
||||
TickType_t now = xTaskGetTickCount();
|
||||
if (tx_has_sent && now - tx_last_sent < pdMS_TO_TICKS(TX_MIN_INTERVAL_MS)) {
|
||||
tx_status_text = "WAIT 10 SECONDS";
|
||||
return;
|
||||
}
|
||||
|
||||
char system_message[TX_MAX_MESSAGE_CHARS + 1U];
|
||||
const tx_message_preset_t *preset = &tx_message_presets[tx_message_index];
|
||||
const char *selected_text = preset->text;
|
||||
if (preset->system_status) {
|
||||
#if BATTERY_MONITOR_ENABLE
|
||||
if (battery_voltage_valid) {
|
||||
unsigned battery_percent = battery_voltage_mv <= 3300U ? 0U :
|
||||
battery_voltage_mv >= 4200U ? 100U :
|
||||
(unsigned)(((battery_voltage_mv - 3300U) * 100U) / 900U);
|
||||
snprintf(system_message, sizeof(system_message),
|
||||
"SYS %luM %uB H%u BAT%u",
|
||||
(unsigned long)(radio_frequency_hz / 1000000UL),
|
||||
(unsigned)current_baud, history_count, battery_percent);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
snprintf(system_message, sizeof(system_message), "SYS %luM %uB H%u",
|
||||
(unsigned long)(radio_frequency_hz / 1000000UL),
|
||||
(unsigned)current_baud, history_count);
|
||||
}
|
||||
selected_text = system_message;
|
||||
}
|
||||
|
||||
const ric_preset_t *target = &ric_presets[tx_ric_preset_index];
|
||||
tx_status_text = "TRANSMITTING";
|
||||
ui_render();
|
||||
ESP_ERROR_CHECK(gptimer_stop(sample_timer));
|
||||
esp_err_t err = pager_tx_send(cc_dev, PIN_CC1101_GDO0,
|
||||
target->ric, selected_text);
|
||||
sample_wr = 0;
|
||||
sample_rd = 0;
|
||||
sync_shift = 0;
|
||||
sync_bits = 0;
|
||||
batch_locked = false;
|
||||
codeword_bits = 0;
|
||||
codeword_shift = 0;
|
||||
ESP_ERROR_CHECK(gptimer_start(sample_timer));
|
||||
|
||||
if (err == ESP_OK) {
|
||||
tx_has_sent = true;
|
||||
tx_last_sent = xTaskGetTickCount();
|
||||
tx_status_text = "PAGE SENT";
|
||||
ESP_LOGI(TAG, "Sent test preset to RIC %lu", (unsigned long)target->ric);
|
||||
} else {
|
||||
tx_status_text = "TX ERROR";
|
||||
ESP_LOGE(TAG, "TX failed: %s", esp_err_to_name(err));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* -------------------------------- main -------------------------------- */
|
||||
|
||||
void app_main(void)
|
||||
@@ -1609,7 +1668,7 @@ void app_main(void)
|
||||
ui_screen = UI_LIVE;
|
||||
ui_render();
|
||||
|
||||
bch_init();
|
||||
pocsag_bch_init();
|
||||
cc1101_init();
|
||||
ui_render();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user