Wykres commitów

1472 Commity (1035c2b80178c2f00d930b4e07ab1c025a8edbba)

Autor SHA1 Wiadomość Data
Silvano Seva 1035c2b801 Updated version number in meson.build 2023-10-23 18:30:14 +02:00
Morgan Diepart 1124c76b73 Added M17 destination to settings
# callsign in backed-up settings
2023-10-23 00:40:55 +02:00
Silvano Seva 44bfdec947 Added 30ms sleep in OpMode_M17::offState to prevent the rtx thread from going into an endless loop. 2023-10-22 18:59:06 +02:00
Silvano Seva e362a80d45 Fixed truncation error in AT1846S setFrequency()
Fixed error in compuation of values for AT1846S frequency registers
causing the output frequency to have an effective resolution of 1kHz
instead of 62.5Hz.
2023-10-22 03:24:25 +02:00
Niccolò Izzo b4c8fca767
Implemented uf2 image wrapping for T-TWR Plus
T-TWR Plus target now produces images in UF2 format.
This format is compatible with bootloaders such as tinyuf2, and future
releases of the hardware will come pre-flashed with tinyuf2, thus
flashing them will not requires any other dependency than the uf2 file
itself.

TG-553
2023-10-18 11:27:43 +02:00
Niccolò Izzo 95e79e871d ttwrplus: Add emergency shutdown
Enabled 10 second long press emergency shutdown PMU function to be able
to reset the radio even when OpenRTX is freezed, without the need of
pulling out and back in the battery.

TG-553
2023-10-17 09:54:13 +02:00
Niccolò Izzo 4697be5ea6 Fix squelch behaviour on T-TWR Plus
On LILYGO T-TWR Plus the squelch was being controlled by AT1846s,
resulting in the squelch bar setting being completely ignored. Now we
are introducing the support for a new command of sa8x8-fw called
AT+AUDIO that controls the muting or unmuting of the speaker power
amplifier, enabling us to:
1. Disable AT1846s embedded squelch
2. Enable OpeRTX squelch
Also fixed a bug where the sa8x8-fw version was incorrectly checked.
AT+AUDIO requires sa8x8-fw version v1.3.0.r1, bumped version check in
OpenRTX.

TG-553
2023-10-17 09:54:09 +02:00
Niccolò Izzo 744ad85799 Adapt Radio settings to UI_NO_KEYBOARD interface
Enabled the T-TWR Plus to use split frequency settings by adapting the
Settings->Radio menu to the UI_NO_KEYBOARD user interface.

TG-553
2023-10-16 21:50:03 +02:00
Niccolò Izzo 17d5be118e Enable frequency offset input from radio menu
Adapted callsign input to create a frequency input menu, that was used
to enable the input of a frequency offset from the Settings->Radio menu.
2023-10-16 21:50:03 +02:00
Niccolò Izzo 5d3c6c825d Add radio settings for frequency offset, direction, and frequency step.
Add customizable frequency_step in radio state.
Offset is not yet selectable from Settings->Radio but only with keypad
from the VFO screen.
2023-10-16 21:49:56 +02:00
tarxvf 7612044d91 VFO screen cleanup: removed unused options, introduced compressed frequency print and lock icon.
Contribution by tarxvf.
2023-10-16 21:47:01 +02:00
tarxvf 7e291fe6fd Implement UI input lockout logic, toggled by macro menu key 9.
Contribution by tarxvf.
2023-10-16 21:46:37 +02:00
marco 20b0c375aa Change M17_orig to link and change callsign handling
This will swap the first extended callsign with the source callsign
if there is extended callsign data.
This allows to always store the true source in the M17_src variable

See #188
2023-10-13 09:58:34 +02:00
Niccolò Izzo 04d6d01a5c
Reduce encoder sensitivity on T-TWR Plus
Reduce encoder sensitivity on T-TWR Plus by dividing the pulse counter
input by two.

TG-553
2023-10-09 09:23:45 +02:00
Niccolò Izzo e939218001
Integrate west manifest to facilitate Zephyr build
Add west manifest contributed by edgetriggered to allow automated
cloning of the correst Zephyr revision.
Now codec2 dependency is enabled also for T-TWR build, enabling to build
it from scratch without first building a Miosix target.
Enabled non-cross build to use codec2 compiled sources.
2023-10-09 09:23:45 +02:00
marco 6baa368984 Enable edit mode for dst callsign on mod17
This allows editing the destination callsign on the module17
When on the main screen, the right arrow will enter edit mode.
2023-09-29 17:05:14 +02:00
Niccolò Izzo 7c09f7d2b0
Add meson wrapper to build Zephyr targets
Now zephyr build process can be invoked from meson by running:

- meson setup build
- meson compile -C build openrtx_ttwrplus

TG-553
2023-09-25 14:31:15 +02:00
marco 0126efe429 Fixed possible undeflow in battery charge level computation. Fix #192.
We check if the battery is below minimum and, if so, assume that the charge
is 0%. This to prevent an underflow which would result in the function
returing a 100% charge level.
2023-09-22 19:32:29 +02:00
Silvano Seva e2ab831c27 Added 1750Hz squelch tone on MD-3x0 radios 2023-09-22 13:58:59 +02:00
marco 06515e324a Enabled 1750Hz squelch tone on GDx 2023-09-22 13:58:59 +02:00
marco 77e0ad27a0 Added support for 1750Hz squelch tone, implemented squelch tone in UV-3x0 radio driver.
When pressing the Hash key and the PTT key in FM mode
a 1750 Hz tone is transmitted
2023-09-22 13:58:59 +02:00
Silvano Seva 73bfc2a15d Set proper thread stack size also when using the Zephyr RTOS 2023-09-22 13:57:33 +02:00
Niccolò Izzo e11c529807 Bump Zephyr to commit a4de2eb3d1756c
TODO: the include fixes can be probably refactored by including the
correct zephyr directories, as include/zephyr/posix/pthread.h should
already bringing in those header files.

TG-553
2023-09-20 21:16:43 +02:00
Silvano Seva 6f567cc38d ttwrplus: implemented the platform_pwrButtonStatus() function.
The platform_pwrButtonStatus() function returns false (shutdown) in
case of a long press of the power button.
2023-09-20 21:16:43 +02:00
Niccolò Izzo 21895ae304 ttwrplus: disable Tx in menus
As T-TWR Plus reuses the PTT as a back button, thus we need to disable
PTT in menus. Also enforce rx_only logic from CPS.

TG-553
2023-09-20 21:16:40 +02:00
Niccolò Izzo 7619b9473b ttwrplus: Slow down encoder input
Two ticks are needed to emit one KNOB_LEFT or KNOB_RIGHT event, thus
slowing down the rotary encoder input and making it more comfortable.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo fe027c440c ttwrplus: enable volume control
Replaced KEY_F7 and KEY_F8 with KEY_VOLUP and KEY_VOLDOWN.
Remapped the T-TWR Plus volume up and down keys to those, fixing a bug
in the pmu key detection where the wrong active edge was selected.
Adapt soft volume code for the UV3x0 to control code in the T-TWR Plus
by acting on the AT1846s Rx gain.
For target T-TWR Plus bound long press of KEY_VOLDOWN to macro menu open.
Unbound KNOB_LEFT and KNOB_RIGHT to squelch control and bound
instead KEY_VOLUP and KEY_VOLDOWN.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 8aa9b0a18f ttwrplus: enable macro menu usage
Enabled macro menu implementation without keyboard.

TG-553
2023-09-20 21:08:35 +02:00
Silvano Seva de3b319518 ttwrplus: added SA868 firmware version to info menu 2023-09-20 21:08:35 +02:00
Silvano Seva 6a17bb8483 ttwrplus: implemented radio band detection. 2023-09-20 21:08:35 +02:00
Niccolò Izzo a72f8387ad ttwrplus: disable low battery warning
T-TWR Plus appears to have sever voltage drops during normal operation,
therefore we cannot use OpenRTX's low voltage warning screen on this
radio.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo ad1beffcf3 ttwrplus: implemented PMU interrupts handling
TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 2dabacebd8 ttwrplus: Implement power control on SA8x8
Implemented power control in T-TWR Plus by using the embedded switch
(RADIO_PWR) that controls the H/L pin of the SA868.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 024c7ffe3a ttwrplus: fix sporadic missing TX
The bug was due to an uninitialized memory being used to configure the
RTX thread, that disabled Tx in a random way by randomly set the
txDisable field.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo c276fc5a51 ttwrplus: moved all the SA8x8 code in a dedicated translation unit. 2023-09-20 21:08:35 +02:00
Niccolò Izzo d935532fc4 ttwrplus: enable GPS
GPS was enabled using UART1 and Zephyr message queues.
UI is a bit crushed on the small 128x64 screen but hardware works as expected.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo eeb05bcc0f ttwrplus: fix unstable baseband startup
A proper baseband reset is now issued at each startup. Now OpenRTX check
for SA868 responsiveness before proceeding with radio initialization,
eliminating unstable behaviour at boot.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo dc84908fbc ttwrplus: enable TURBO mode on SA868S
Enabled AT+TURBO command on SA868 that switches the baud rate of the
serial communication from 9600 to 115200 to get a more responsive
baseband. Bumped up the required baseband firmware version to
v1.1.0.r20.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 15f5477ae0 ttwrplus: add battery voltage readout
Add battery voltage readout through the XPowersLib library.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 82218aabce ttwrplus: enable macro menu
Modified keyboard mapping to enable macro menu, interface is still
broken as the T-TWR Plus is missing a keyboard.
Now the volume down key, mapped as the MONI button can be also used to
set the squelch level.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 4c035bbf16 ttwrplus: enable Tx capability
Enabled Tx capability on T-TWR Plus.
Since Tx requires the SA8x8 to disable the Rx stage, we check that at
least firmware v.1.1.0.r14 is present on the baseband, otherwise we
don't initialize the radio.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 4df315473f ttwrplus: add RGB LED support
Implemented WS2812C support with Zephyr driver.
Hooked up the RGB control to the existing RED and GREEN LED support.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo c60f580396 ttwrplus: add support for SA868
Add support for initializing SA868 and querying its firmware version,
created a new instance of the AT1846S class that leverages the SA8x8
serial connection as an i2c implementation.
Rx works! In the sense that the RSSI bar behaves as expected, still no
audio.

This commit was contributed by edgetriggered.

TG-553
2023-09-20 21:08:35 +02:00
Federico Amedeo Izzo e05d09f0fe ttwrplus: Set battery charging current to 500mAh to limit PMU heating and max. capacity to 80% to extend lifetime by 2.5x-3x
Reference article: https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries
2023-09-20 21:08:35 +02:00
Niccolò Izzo 8e8daa78c8 ttwrplus: implement PMU support
Begin implementing PMU, now successfully read and write registers, need
to implement button functionality, battery voltage readout, charge
detection etc.

TG-553
2023-09-20 21:08:35 +02:00
Federico Amedeo Izzo c5a63d8767 Add XPowersLib meson subproject 2023-09-20 21:08:35 +02:00
Niccolò Izzo df853c8527 ttwrplus: add support for keys using Zephyr bindings
Zephyr already provides button support based on gpios. We are mapping
Zephyr keycodes to OpenRTX therefore future targets will only need to
configure their devicetrees to have button support.

Rotary encoder readout leverages the hardware pulse counter. PTT in
this device is also bound to KEY_ESC, that matched the behaviour
observed in many commercial radios.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 9a445f3b31 Enable malloc on ESP32 BSP, specify ttwrplus battery type.
Mallocs now are working.
This radio sports a single cell Li-Po battery.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 0c27c9ce28 Enable Zephyr dynamic stack threads
Enable Zephyr dynamic stack posix threading, with stack pool of 4 and
stack size of 4096.

TG-553
2023-09-20 21:08:35 +02:00
Niccolò Izzo 1f1d20e120 Update T-TWR devicetree
Updated T-TWR devicetree to reflect changes in upstream Zephyr.

TG-553
2023-09-20 21:08:35 +02:00