From 23263b276a95abb7e64cbe14f9157d9fb7bcf5f0 Mon Sep 17 00:00:00 2001 From: Edward Emelianov Date: Mon, 23 Nov 2026 23:24:49 +0300 Subject: [PATCH] fix readme --- F1:F103/AS3935-lightning/Readme.md | 15 ++++++++------- F1:F103/AS3935-lightning/as3935.bin | Bin 19304 -> 19304 bytes F1:F103/AS3935-lightning/as3935.creator.user | 2 +- F1:F103/AS3935-lightning/strfunc.c | 2 +- F1:F103/AS3935-lightning/version.inc | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/F1:F103/AS3935-lightning/Readme.md b/F1:F103/AS3935-lightning/Readme.md index 2c68e0b..a8f5a96 100644 --- a/F1:F103/AS3935-lightning/Readme.md +++ b/F1:F103/AS3935-lightning/Readme.md @@ -3,9 +3,8 @@ ## Overview This project implements a lightning detection system using two AS3935 Franklin Lightning Sensors interfaced -with an STM32F103 microcontroller. The device communicates over USB CDC (virtual serial port) and exposes a -text-based command protocol for configuration, monitoring, and data extraction. -In the next version it is possible to add RS-232 or RS-485 as an alternative to USB. +with an STM32F103 microcontroller. The device communicates over USB CDC (virtual serial port) and RS-485; +exposes a text-based command protocol for configuration, monitoring, and data extraction. Key features: - Dual AS3935 sensors on single SPI channel. @@ -64,9 +63,10 @@ When the host opens the virtual COM port (DTR asserted), the device becomes read - **command** — case-sensitive name (exactly as listed, all lowercase). - **channel** — numeric index of the sensor (0 or 1). Required for sensor-specific commands; omitted for -global commands. -- **value** — decimal integer, hexadecimal (`0x` prefix), binary (`0b` prefix), or a string (for commands -like `setiface`). For the `SPI` command, the value is a sequence of hex bytes and/or quoted text. + global commands. +- **value** — decimal integer, hexadecimal (`0x` prefix), octal (`0` prefix), binary (`b` prefix), or + a string (for commands like `setiface`). For the `SPI` command, the value is a sequence of hex bytes + and/or quoted text. - **whitespaces** around `=` and between tokens is ignored. There are two modes: @@ -245,7 +245,7 @@ corresponding `DISPLCO` setting is `0` (not used as clock output), the code read ``` If the pin is configured as a clock output (`displco` != 0), no interrupt processing occurs. You can mask -disturber interrupts by command `maskdist n = 0`, in this case only `NOICE` and `LIGHTNING` will be +disturber interrupts by command `maskdist n = 1`, in this case only `NOICE` and `LIGHTNING` will be monitored. --- @@ -257,6 +257,7 @@ starts at a fixed address (defined in the linker script) and has a limited capac `user_conf` contains: - `userconf_sz` — magic cookie (size of the structure). +- `usartspeed` — RS-485 baudrate. - `iInterface` + `iIlength` — USB interface name (stored as two bytes per character for Unicode). - `spars[]` — per-sensor parameters (gain, WDTH, NF_LEV, SREJ, MIN_NUM_LIG, MASK_DIST, LCO_FDIV, TUN_CAP). - `flags.restore` — if 1, all parameters are automatically applied after reset. diff --git a/F1:F103/AS3935-lightning/as3935.bin b/F1:F103/AS3935-lightning/as3935.bin index 65dcf581f76b3b4e27112d8e972f3a3a01ab658d..8f57119de599056b7f2895500906f8fa7a2274df 100755 GIT binary patch delta 16 YcmaDcjq$}a#tjoZ8I3nj^t{dp073x=ApigX delta 16 YcmaDcjq$}a#tjoZ8I3ki^t{dp073f)AOHXW diff --git a/F1:F103/AS3935-lightning/as3935.creator.user b/F1:F103/AS3935-lightning/as3935.creator.user index 1869c8b..3ad085e 100644 --- a/F1:F103/AS3935-lightning/as3935.creator.user +++ b/F1:F103/AS3935-lightning/as3935.creator.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/F1:F103/AS3935-lightning/strfunc.c b/F1:F103/AS3935-lightning/strfunc.c index 946aba9..f277ce2 100644 --- a/F1:F103/AS3935-lightning/strfunc.c +++ b/F1:F103/AS3935-lightning/strfunc.c @@ -219,7 +219,7 @@ static char *getbin(char *buf, uint32_t *N){ } /** - * @brief getnum - read uint32_t from string (dec, hex or bin: 127, 0x7f, 0b1111111) + * @brief getnum - read uint32_t from string (dec, hex, oct or bin: 127, 0x7f, 0124, b1111111) * @param buf - buffer with number and so on * @param N - the number read * @return pointer to first non-number symbol in buf diff --git a/F1:F103/AS3935-lightning/version.inc b/F1:F103/AS3935-lightning/version.inc index 3a40f70..c26bb6e 100644 --- a/F1:F103/AS3935-lightning/version.inc +++ b/F1:F103/AS3935-lightning/version.inc @@ -1,2 +1,2 @@ -#define BUILD_NUMBER "62" +#define BUILD_NUMBER "63" #define BUILD_DATE "2026-11-23"