From e7480de82eb54ed436cc2a2f014670fc371437f3 Mon Sep 17 00:00:00 2001 From: vad7 Date: Sun, 26 Feb 2023 19:44:09 +0300 Subject: [PATCH] upd --- nrf24batch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nrf24batch.c b/nrf24batch.c index ce63b59e7ca..5c373babf53 100644 --- a/nrf24batch.c +++ b/nrf24batch.c @@ -67,7 +67,7 @@ uint8_t cmd_array_cnt = 0; uint8_t save_settings = 0; uint16_t view_cmd[3] = {0, 0, 0}; // ReadBatch, Read, WriteBatch uint8_t view_x = 0; -char Info[20] = ""; +char Info[32] = ""; char screen_buf[64]; char file_name[32]; char ERR_STR[32]; @@ -253,7 +253,7 @@ static void prepare_nrf24(void) nrf24_write_reg(nrf24_HANDLE, REG_RF_CH, NRF_channel); nrf24_write_reg(nrf24_HANDLE, REG_RF_SETUP, (NRF_rate == 0 ? 0b00100000 : NRF_rate == 1 ? 0 : 0b00001000) | 0b111); // +TX high power nrf24_write_reg(nrf24_HANDLE, REG_CONFIG, 0x70 | ((NRF_CRC == 1 ? 0b1000 : NRF_CRC == 2 ? 0b1100 : 0))); // Mask all interrupts - nrf24_write_reg(nrf24_HANDLE, REG_SETUP_RETR, ((NRF_rate == 0 ? 0b0010 : 0b0001)<<4) | 0b0111); // Automatic Retransmission, ARD, ARC + nrf24_write_reg(nrf24_HANDLE, REG_SETUP_RETR, ((NRF_rate == 0 ? 0b0100 : 0b0010)<<4) | 0b1111); // Automatic Retransmission, ARD, ARC nrf24_write_reg(nrf24_HANDLE, REG_EN_AA, 0x01); // Auto acknowledgement nrf24_write_reg(nrf24_HANDLE, REG_FEATURE, NRF24_EN_DYN_ACK | (NRF_DPL ? 4 : 0)); // Enables the W_TX_PAYLOAD_NOACK command, Disable Payload with ACK, set Dynamic Payload nrf24_write_reg(nrf24_HANDLE, REG_DYNPD, NRF_DPL ? 0x3F : 0); // Enable dynamic payload reg @@ -639,6 +639,7 @@ static uint8_t load_settings_file() { FURI_LOG_D(TAG, "Loading settings file"); FuriString* str = furi_string_alloc(); free_store(); + Info[0] = '\0'; NRF_INITED = false; while(stream_read_line(file_stream, str)) { char *p = (char*)furi_string_get_cstr(str); @@ -948,7 +949,7 @@ int32_t nrf24batch_app(void* p) { static FuriLogLevel FuriLogLevel = FuriLogLevelDefault; if(furi_log_get_level() != FuriLogLevel) { FuriLogLevel = furi_log_get_level(); - if(FuriLogLevel == FuriLogLevelDebug) furi_hal_uart_set_br(FuriHalUartIdUSART1, 460800); + if(FuriLogLevel == FuriLogLevelDebug) furi_hal_uart_set_br(FuriHalUartIdUSART1, 1843200); } if(event_status == FuriStatusOk) {