Commit Graph

187 Commits

Author SHA1 Message Date
Niccolò Izzo e3a128f035 Add DSP code with DC removal and FIR PWM filter compensation
Add generic FIR implementation, specialized to compensate the PWM filter
applied by STM32 targets when modulating M17 signal.
Add DC bias compensation to normalize audio signal received from STM32
ADC.

TG-85 #ready-for-test
TG-199 #ready-for-test
2021-04-16 09:46:32 +02:00
Silvano Seva a850f9f1ab Removed packed attribute from rtx and radio state data structures as they can cause crashes due to unaligned memory accesses. 2021-04-15 21:24:26 +02:00
Silvano Seva c0ecf2e13f Basic audio management module, controlling only speaker PA and microphone preamplifier. TG-61 2021-04-12 19:10:13 +02:00
Silvano Seva 60defbedc0 Implemented stack and heap memory profiling functions. TG-47 2021-04-12 12:03:15 +02:00
Silvano Seva 4b30a66735 Added 'platform_pwrButtonStatus' API function, which returns the current status of the power button/knob. Implemented power on/off mechanism on MD-9600 2021-04-11 12:38:20 +02:00
Federico Amedeo Izzo a42354a204 Remove Messages menu as it's not implemented yet 2021-04-11 10:06:12 +02:00
Federico Amedeo Izzo 58f4f5dcaf Print git commit or tag inside Info menu 2021-04-11 09:56:46 +02:00
Federico Amedeo Izzo 93d2ede113 Add default contrast setting define 2021-04-11 09:10:08 +02:00
Federico Amedeo Izzo 341c46a263 Now state.time is UTC, add functions to convert from UTC to local and reverse 2021-04-10 15:39:59 +02:00
Silvano Seva d70e0bc60a Made 'battery_getCharge' return full charge when 'BAT_NONE' is defined 2021-04-10 12:45:07 +02:00
Federico Amedeo Izzo 8045a9bcea Improve gfx_printLine calculation 2021-04-10 11:10:52 +02:00
Federico Amedeo Izzo 3e326a43f0 Add gfx_getFontHeigth() function 2021-04-10 11:10:52 +02:00
Federico Amedeo Izzo c3a8251ca9 Integrated getLineY() functionality in gfx_printLine() 2021-04-10 11:10:52 +02:00
Federico Amedeo Izzo 765fb3f4c9 Add getLineY Layout helper function 2021-04-10 11:10:52 +02:00
Federico Amedeo Izzo 341ab84ce9 Converted `gfx_print()` from char * pointer to format string 2021-04-10 11:10:52 +02:00
Niccolò Izzo d4ad8b12b1 Fix bug on MD380
Fixed a bug where pressing the side button would lead to a crash,
probably caused by a misaligned memory access, due to the addition of a
packed attribute.
2021-04-09 13:26:01 +02:00
Caleb Jamison e5c5ee90f2 Add support for encoder knob on MD-UV380
Added: qdec, a header only quadrature encoder library

Added: EXTI15_10_IRQHandler to handle the encoder knob

Changed: platform_init() for the MD-UV380 now configures the EXTI15_10
interrupt.

Changed: platform_getChSelector now returns signed int8

Changed: size of settings_t.valid went from 6 to 7
Without this change, pressing the macro button crashes the radio, I
haven't investigated and I don't remember how I found that solution.

Changed: meson.build includes the qdec library
2021-04-03 09:21:47 +02:00
Niccolò Izzo b6eab0fde7 Fix failing boot on MD380 2021-04-02 08:43:31 +02:00
Silvano Seva 86f6d114e2 Applied __attribute__((packed)) to all data structures to reduce memory footprint 2021-03-26 18:11:22 +01:00
Federico Amedeo Izzo 0d9d77d3ca Manually trim FreeSans6pt7b font to make it more symmetric 2021-03-14 18:43:33 +01:00
Silvano Seva 01ea1a9b3f Made the main() thread run the UI task, thus removing the need for a dedicated one 2021-03-14 17:17:24 +01:00
Federico Amedeo Izzo 92e0abafa2 Display: Set default contrast at boot. Improve default contrast for GD-77 2021-03-14 11:35:45 +01:00
Silvano Seva e5316aa8be Minimal refactoring of queue sources 2021-03-13 09:16:06 +01:00
Silvano Seva fb3447b0c6 Moving to miosix kernel: swapped old uC/OS-III task management functions with pthread ones 2021-03-13 09:16:06 +01:00
Silvano Seva 2b28ea0525 Moving to miosix kernel: added two functions to 'interfaces/delays.h' to provide substitutes for their uC/OS-III counterparts and removed the old rtos sources 2021-03-13 09:16:06 +01:00
Silvano Seva 093640478c Moving to miosix kernel: adapted GDx drivers and part of the common code to new configuration 2021-03-13 09:16:06 +01:00
Silvano Seva 7992b4abca Moving to miosix kernel: adapted MDx drivers to new configuration 2021-03-13 09:16:06 +01:00
Silvano Seva 416ae13eb1 Fixed linking error when building for linux 2021-02-23 14:01:09 +01:00
Silvano Seva d0e8d15389 Added 'packed' attribute to settings data structure. Some refactoring of settings and state code. 2021-02-21 19:25:09 +01:00
Federico Amedeo Izzo 35bde9bccb Add state_terminate() that saves settings to flash 2021-02-21 16:44:31 +01:00
Federico Amedeo Izzo d4981ee288 Add Settings persistence to SPI Flash 2021-02-21 15:58:41 +01:00
Federico Amedeo Izzo 820ac73d08 UI: Add menu_h and menu_font layout parameters 2021-02-20 16:03:37 +01:00
Federico Amedeo Izzo 711d8426c9 Add 10pt font. Reduce frequency line on GD-77 to avoid overlap 2021-02-20 15:14:35 +01:00
Niccolò Izzo 4d66d8b1af Fix various warnings 2021-02-17 11:21:46 +01:00
Federico Amedeo Izzo cecd01e03d GPS: workaround: Move settings above gps_data to avoid settings
corruption caused by gps_data overflow
2021-02-16 22:44:21 +01:00
Federico Amedeo Izzo 75c1f13882 UI: Replaced strcmp with switch case to fix GPS/menu bug 2021-02-15 22:02:09 +01:00
Federico Amedeo Izzo ebe87b22e2 UI: Add menu edit mode. Small refactoring 2021-02-13 21:29:25 +01:00
Federico Amedeo Izzo 66af402e83 Move settings from UI to State 2021-02-13 20:32:53 +01:00
Federico Amedeo Izzo d66b59694a UI: Add GPS settings menu 2021-02-13 17:23:16 +01:00
Federico Amedeo Izzo a803958c61 UI: Menu scrolling logic refactoring, add GPS Settings entry 2021-02-13 16:35:03 +01:00
Niccolò Izzo a163bc6998 Fix a bug where only satellites with a low id were marked active 2021-02-13 13:49:03 +01:00
Niccolò Izzo 7577b4d6ae Improved algorithm for keeping track of active satellites 2021-02-13 13:27:06 +01:00
Niccolò Izzo 1f9793d268 Complete GPS compass implementation
Now the GPS screen compass has a needle, which point to the current
movement direction.
2021-02-13 12:43:48 +01:00
Federico Amedeo Izzo b3e0f964a1 State: remove unused variable channelInfoUpdated 2021-02-13 11:24:05 +01:00
Federico Amedeo Izzo a9ad22a4c9 NVM: Add function to read VFO channel for MD-UV3x0 2021-02-13 11:24:05 +01:00
Niccolò Izzo 586b524625 Add GPS compass stub 2021-02-13 11:23:13 +01:00
Niccolò Izzo c7e8a258f3 Add active satellite field in GPS data
Now for each satellite in view we are keeping track if it's part of a
fix or not. This information is represented by a yellow color in the bar
graph screen.
2021-02-13 11:20:06 +01:00
Niccolò Izzo ec06b14618 Add GPS satellites snr bar graph 2021-02-11 21:27:03 +01:00
Niccolò Izzo b570f3b690 Add GPS altitude parsing 2021-02-11 09:43:51 +01:00
Niccolò Izzo 3ea428e8f8 Add GPS task stack size in linux 2021-02-11 09:43:24 +01:00