Commit Graph

585 Commits

Author SHA1 Message Date
Alessio Caiazza d742d027b7 Display timer UI 2022-01-03 14:51:22 +01:00
Alessio Caiazza 269420c2be Load standby timer from settings 2022-01-03 14:51:22 +01:00
Silvano Seva 3c6ad9802c Added API function allowing to query the current status of the RX audio squelch 2021-12-23 14:52:25 +01:00
Alessio Caiazza e2baf5a833 Document functions with Doxygen format 2021-12-23 14:52:25 +01:00
Alessio Caiazza 82699f3d07 Implement an SDL main loop inside the Main Thread 2021-12-23 14:52:25 +01:00
Silvano Seva 756812ca31 Created function for writing settings and VFO status to NVM, starting of temporary implementation writing data to the MCU's internal flash 2021-11-08 22:22:26 +01:00
Silvano Seva c91e306026 Reorganised settings data structure 2021-11-08 21:44:33 +01:00
Federico Amedeo Izzo 1e19574fd6 Add destination callsign input for M17, Add -/ to keypad input 2021-10-09 18:53:28 +02:00
Silvano Seva 42e7521205 Fixed compilation error with GDx targets
Added codec2 as a dependency also for GD77, DM1801 and MD9600 targets to allow compilation of OpMode_17.cpp file
Stub input audio stream driver for GDx targets
2021-10-06 21:43:07 +02:00
Silvano Seva a9e1e68709 Implemented function for inverse code puncturing in M17 protocol 2021-10-03 12:09:00 +02:00
Silvano Seva d018dbb4a0 Implementation of M17 polynomial deinterleaver 2021-09-20 21:34:59 +02:00
Silvano Seva 0b276b2b64 Experimental implementation of voice transmission in M17 protocol handler 2021-09-07 12:22:35 +02:00
Silvano Seva e954f3fda2 Moved sleep regulating update rate of rtx task from rtx thread to OpMode implementations, as each operating mode may require a custom update rate 2021-09-03 16:44:57 +02:00
Silvano Seva bad5a50d7d Updated code puncturing pattern for M17 link setup frame to follow new specifications 2021-09-03 16:44:57 +02:00
Silvano Seva 2f3db118fc Changed streamType_t from bitfield struct to union of anonymous bitfield struct and uint16_t to facilitate endianness conversion. Change also fixed a bug in endianness conversion inside M17LinkSetupFrame class due to unaligned memory access. 2021-09-03 16:44:57 +02:00
Federico Amedeo Izzo c23eaf8e98 Add M17 src/dst addresses to rtxStatus_t 2021-09-03 16:44:57 +02:00
Niccolò Izzo eea9be3349 Add M17 codeplug data structures 2021-09-03 16:44:57 +02:00
Niccolò Izzo f43f54117c Fix M17 callsign setting
Fix M17 callsign disappearing in M17 settings.

The generic callsign (currently not used) was being shown instead of M17 callsign.
2021-09-03 16:44:57 +02:00
Federico Amedeo Izzo 229a81b2ad Add text input draft
Fix text input position not being reset when entering edit mode
2021-09-03 16:44:57 +02:00
Federico Amedeo Izzo 87703a76e6 Add M17 Settings 2021-09-03 16:44:57 +02:00
Federico Amedeo Izzo 882a657359 * Combine S-meter and Level meter
* Make squelch bar always yellow
* Include font height in s-meter total height

Correct bottom bar printing position

Increase bottom bar size on GD-77
2021-09-03 16:44:57 +02:00
Federico Amedeo Izzo 118c514081 UI: Add digital mode screen
Use main screen bottom bar in mode screen

mode screen: Move frequency and channel name to center

Show S-meter without squelch bar for digital modes

Change S-meter for digital modes, add audio level meter

Print FM information in mode screen

Add mode screen fonts
2021-09-03 16:44:57 +02:00
Silvano Seva 92ea1535ff Moved definition of 'PLATFORM_LINUX' macro from hwconfig to meson.build, added '-std=c++14' compilation flag to compile arguments for linux platform, added missing includes to M17Utils.h 2021-09-03 16:44:57 +02:00
Silvano Seva c8d62ff47f Initial implementation of M17 operating mode handler 2021-09-03 16:44:57 +02:00
Silvano Seva 98e4164f54 M17 transmitter class 2021-09-03 16:44:57 +02:00
Silvano Seva 39e41ee470 M17 4FSK modulator class 2021-09-03 16:44:57 +02:00
Silvano Seva f7bec2358b Class for implementation of FIR filters 2021-09-03 16:44:56 +02:00
Niccolò Izzo 3439f3a497 Add invert phase DSP filter 2021-09-03 16:40:41 +02:00
Silvano Seva 7b5e98bbca Implemented generation of Golay(24,12) LICH blocks inside M17LinkSetupFrame class 2021-09-03 16:39:06 +02:00
Silvano Seva 93af26ef13 Implementation of M17 decorrelator, polynomial interleaver and Golay(24,12) encoder 2021-09-03 16:39:06 +02:00
Silvano Seva ee1b111fb7 Implementation of M17 code puncturing scheme 2021-09-03 16:39:06 +02:00
Silvano Seva d545071df6 Implementation of M17 convolutional encoder 2021-09-03 16:39:06 +02:00
Silvano Seva 9e5c689bf3 M17 protocol data structures 2021-09-03 16:39:06 +02:00
Silvano Seva 222ba690a5 Improved implementation of DSP function for DC removal 2021-09-03 15:46:13 +02:00
Silvano Seva c2b6bd545f API interfaces for audio path and audio stream management 2021-08-25 18:30:28 +02:00
Silvano Seva 4d3eacc144 Switched 'v_bat' and 'charge' fields of state struct from float to, respectively, uint16_t and uint8_t and updated UI functions accordingly. Rationale for this change is providing better support for future platforms without hardware floating point unit. 2021-08-14 12:56:45 +02:00
Silvano Seva 46819ba993 Modified 'battery_getCharge': now it takes as input the battery voltage in mV and returns charge percentage as an integer ranging from 0 to 100. Function body is implemented using fixed point math instead of floats for improved platform compatibility when hardware floating point support is not present. 2021-08-14 12:52:55 +02:00
Silvano Seva a7acc3301b Modified 'platform_getVbat' API: now it returns an uint16_t value containing the battery voltage in millivolt 2021-08-14 12:47:21 +02:00
Silvano Seva 8e0a5d1c0f Made 'platform_getVolumeLevel' and 'platform_getMicLevel' API functions return a normalised 8 bit value ranging from 0 to 255 (TG-293 #closed) 2021-08-14 10:18:55 +02:00
Silvano Seva 6995230d8f Extended 'mode' field in CPS data structure to 8 bits, to align its size to the one contained in rtxStatus_t. Modified code for channel data loading in NVM drivers to align it to the new opMode enum values. 2021-06-05 21:21:12 +02:00
Federico Amedeo Izzo 57b66652b7 Use channel knob to change frequency and navigate menus (TG-238) 2021-06-05 18:11:30 +02:00
Silvano Seva 66552be403 Added function to radio API allowing to fine tune the radio's VCXO polarisation voltage. Currently, this functionality is effective only on MD-3x0 devices. (TG-195 #ready-for-test) 2021-06-03 14:50:47 +02:00
Silvano Seva b29b24fdc0 Implemented RX tone squelch on MD-UV3x0 and GDx (TG-43) 2021-06-02 12:44:46 +02:00
Silvano Seva 4d68f02ab4 Updated documetation for radio.h API, removed old baseband C source files. 2021-05-29 08:20:12 +02:00
Silvano Seva 2d517d5bf8 New radio driver for GDx. Renamed some entries in GDx calibration data structure 2021-05-29 08:20:12 +02:00
Silvano Seva 850e3580ed New radio driver for MD-3x0 platform, still requiring a bit of debugging 2021-05-29 08:20:12 +02:00
Silvano Seva 5b0bec8c5f Created OpMode class for modular OOP-based management of operating modes. Created OpMode_FM class for analog FM management. Refactored and moved to C++ the content of openrtx/src/rtx.c. (TG-38, TG-41) 2021-05-29 08:20:12 +02:00
Silvano Seva d95e36f43b Moved to C++ and refactored AT1846S driver, grouping common code. A C-callable wrapper is also provided. TG-37 2021-05-29 08:19:47 +02:00
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
Niccolò Izzo 0ce92f991c Add GPS NMEA parsing task
Add dedicated task to parse NMEA sentences received by the GPS module.
The parsed data is moved to the radio state, to be read by the user
interface.
2021-02-08 17:25:11 +01:00
Niccolò Izzo 67195d178f Add GPS data structures in radio state 2021-02-06 15:37:14 +01:00
Silvano Seva d9a55c137a Implementation of all common rtx functionalities and radio driver for MD3x0 2021-02-03 14:30:06 +01:00
Silvano Seva edb2697124 New 'radio' interface API, providing a standard interface for low-level platform-specific baseband control 2021-02-03 14:30:06 +01:00
Silvano Seva 1840c1aeb5 Moved 'rtx.h' out of 'interfaces' folder, since it now becomes a cross-platform component 2021-02-03 14:30:06 +01:00
Federico Amedeo Izzo 2728dbcce1 UI: Use separate font setting for VFO input and Time to
avoid inheriting asymmetric fonts from the main screen
2021-02-02 12:54:09 +01:00
Niccolò Izzo 7e0500d3a5 Improved Smeter rendering in MACRO menu 2021-02-01 23:33:49 +01:00
Silvano Seva 80c7668faa Added a data structure providing some hardware information parameters and the relative platform API function to retrieve them 2021-02-01 21:27:31 +01:00
Federico Amedeo Izzo 438540290b UI: Add MEM channel filtering per zone 2021-01-31 14:14:54 +01:00
Niccolò Izzo d60c75d9e3 Move MACRO menu into super-state 2021-01-31 13:29:23 +01:00
Federico Amedeo Izzo c8b4328450 UI: Change layout to show big digits frequency 2021-01-31 11:37:42 +01:00
Federico Amedeo Izzo 046d1a160c UI: Change right and left positions in layout_t to a unique position
This can be done since you can now print with right aligning on a left position
2021-01-30 20:04:04 +01:00
Federico Amedeo Izzo a612e885ab UI: Add about screen 2021-01-30 11:57:00 +01:00
Federico Amedeo Izzo 8b72587b7b UI: Make last_state an extern variable. Add Info screen values 2021-01-30 08:33:39 +01:00
Federico Amedeo Izzo 92af6c4804 UI: Add Info menu 2021-01-30 08:02:54 +01:00
Federico Amedeo Izzo f083a77001 UI: Fixed (null) menu entry on targets without RTC 2021-01-29 23:07:39 +01:00
Federico Amedeo Izzo 450c965ee0 Disable contrast menu on targets without adjustable contrast 2021-01-29 22:57:24 +01:00
Federico Amedeo Izzo 1f240ba132 Move brightness from state_t to settings_t, add Contrast 2021-01-29 22:13:47 +01:00
Federico Amedeo Izzo 0c11198e8a UI: Use one function to draw all menus 2021-01-29 19:31:17 +01:00
Federico Amedeo Izzo 2533f35309 UI: Add display settings 2021-01-29 19:30:22 +01:00
Niccolò Izzo 421ff0e448 Add RSSI and squelch graphic representation
Replaced bottom bar with graphic squelch and rssi representation.
2021-01-29 11:20:35 +01:00
Niccolò Izzo 364f8d4e46 Add squelch visualization and control from macro menu 2021-01-28 12:51:22 +01:00
Niccolò Izzo 90445e29a7 Implement voltage to dBm conversion in MDx
MDx radios get an RSSI voltage in mV, to be converted into dBm, we used
and empirically derived linear relation to compute the dBm value.
2021-01-28 10:31:37 +01:00
Silvano Seva 92870f477f Added display API function to set LCD contrast 2021-01-26 08:53:42 +01:00
Federico Amedeo Izzo bec69dc440 Graphics.h: Fix compiler warning 2021-01-24 15:57:02 +01:00
Federico Amedeo Izzo 0608176342 CPS: Read contact data from codeplug 2021-01-23 11:28:12 +01:00
Federico Amedeo Izzo 6706a796ad CPS: Add code to read zone data from Codeplug 2021-01-22 21:16:13 +01:00
Federico Amedeo Izzo 463e5bf6fb Graphics: Add error box printing 2021-01-21 22:01:25 +01:00
Silvano Seva 4bbad17012 Refactoring of data structure for GDx calibration data: 'vhfCal' and 'uhfCal' fields merged into a single two-element array field 2021-01-21 12:34:11 +01:00
Federico Amedeo Izzo 1a894c67df UI: Save and restore VFO channel when switching to MEM mode 2021-01-12 19:25:47 +01:00
Niccolò Izzo daeeee64dd Fix battery glitch
Battery charge was mistakenly being computed because values used in
computation were defined in a function which was not included as a
header file.
2021-01-12 08:01:34 +01:00
Federico Amedeo Izzo 73c9ab56a6 UI: Channel mode: load channel from cps and do basic validation 2021-01-10 10:18:29 +01:00
Federico Amedeo Izzo feb7e7ef7e UI: Initial MEM implementation 2021-01-09 19:37:51 +01:00
Federico Amedeo Izzo aef0eb30b1 UI: Move ui_menu.c function prototypes from ui_menu.h to ui.c as extern 2021-01-09 18:33:40 +01:00
Federico Amedeo Izzo e34674151b UI: Move menu related functions to ui_menu.c 2021-01-09 10:47:18 +01:00
Niccolò Izzo adc48efb19 Implement CTCSS available tones array
Now the CTCSS tones are taken from an array and indexed from that array.
A macro that sets the tone has been implemented.
2021-01-05 11:26:22 +01:00
Niccolò Izzo bbcd6483a2 Add tone enable flags into channel data structure 2021-01-05 10:08:18 +01:00
Niccolò Izzo 2dcefb7c0e Add backlight into state, macro functionality
Now the current backlight level is part of the radio state, and the
first few macros have been implemented although the rate limiting of
presses has still to be fixed.
2021-01-05 10:08:18 +01:00
Niccolò Izzo 09c94a943a Fix Macro Menu printing 2021-01-05 10:08:18 +01:00
Niccolò Izzo 2fe6cd1cb6 Implement draft of the macro menu feature 2021-01-05 10:08:18 +01:00
Silvano Seva 41e6c1d1e6 Added flags to enable TX and RX tones in rtxStatus_t 2021-01-04 08:58:17 +01:00
Silvano Seva 206daec861 Driver for nonvolatile external memory on GDx devices, by now only supporting retrieval of calibration parameters 2021-01-02 15:07:14 +01:00
Federico Amedeo Izzo 89567cce85 UI: remove screen refresh flag
screen refresh is not needed anymore since GUI refresh is already done on demand
2021-01-01 21:11:22 +01:00
Federico Amedeo Izzo f4c4a72584 RTC: Bugfix, add missing bit in the date field 2020-12-31 19:11:35 +01:00
Silvano Seva 8b6f4e3056 Renamed rtc_shutdown() and toneGen_shutdown() to rtc_terminate() and toneGen_terminate() 2020-12-31 18:31:00 +01:00
Federico Amedeo Izzo 641dcc13e9 UI: Add Time&Date settings, not functional yet 2020-12-31 16:36:32 +01:00
Federico Amedeo Izzo c2f331467c UI: Fix bug where key 9 did not work in frequency input 2020-12-31 13:58:49 +01:00
Niccolò Izzo 73c7b74a3a Add input parsing functions
Input parsing functions are moved into input.c/input.h, and currently
contain functions to determine if a number is pressed and to extract the
pressed number.
2020-12-30 15:46:43 +01:00
Niccolò Izzo aeea305228 Switch to angular brackets include notation 2020-12-24 16:30:45 +01:00
Niccolò Izzo c77cc46fb6 Fix include syntax
Interface header includes have acquired the interface prefix, to
distinguish them from regular header includes.
2020-12-24 16:30:13 +01:00
Federico Amedeo Izzo 1f4fba958b KBD: Add function to tell if number keys are pressed 2020-12-23 11:05:59 +01:00
Federico Amedeo Izzo 7888a7e398 UI: Add time and date settings, cannot be set right now 2020-12-22 17:49:00 +01:00
Federico Amedeo Izzo 423c3f04d3 UI: Add menu list drawing function, small refactoring. 2020-12-20 09:07:48 +01:00
Niccolò Izzo 8d55a3e702 Implement alpha channel in graphics library
Alpha channel can be used to draw transparent objects.
2020-12-19 15:03:00 +01:00
Silvano Seva fc67d89abd Increased rtx task stack size to 512 bytes 2020-12-18 21:52:45 +01:00
Niccolò Izzo 5949a481fa Add synchronization between radio state and RTX
Now the FSM update function takes an additional parameter, which
determines if the radio state has to be synchronized with the RTX state.
If so, the ui_task does the job.
2020-12-18 21:44:59 +01:00
Niccolò Izzo c7e928666c Move low battery screen into main FSM 2020-12-18 19:03:57 +01:00
Federico Amedeo Izzo 2c792c13a2 kbd_task: Increase long-press threshold to 0.7 2020-12-18 18:42:17 +01:00
Niccolò Izzo 9df60008a2 Change long press interval to half a second 2020-12-18 10:27:29 +01:00
Federico Amedeo Izzo 400a766f54 kbd_task: improve long-press behaviour 2020-12-17 23:15:56 +01:00
Federico Amedeo Izzo e59085a85e Increase keyboard stack size on ARM targets 2020-12-17 22:36:36 +01:00
Silvano Seva 81a2e1fc22 Fixed missing padding in kbd_msg_t bitfield struct 2020-12-17 22:18:44 +01:00
Federico Amedeo Izzo 970f3553c4 kbd_task refactoring, add long-press detection logic 2020-12-17 22:18:44 +01:00
Silvano Seva 0d5a703521 Began integrating RTX driver with all the other code 2020-12-13 11:44:07 +01:00
Silvano Seva 4f0ffe8565 Improved message passing mechanism for rtx driver configuration 2020-12-13 09:17:08 +01:00
Silvano Seva d98611fbed Updated 'display_render' documentation 2020-12-12 10:23:14 +01:00
Silvano Seva 344041b371 Adjusted task stack sizes when compiling for ARM 2020-12-11 14:41:44 +01:00
Niccolò Izzo 41ec005680 Implement battery voltage to charge conversion
Voltage to charge nonlinear function is being linearly approximated in
the operating range.
2020-12-11 14:09:36 +01:00
Federico Amedeo Izzo 0e1d9b090f UI: Add current mode print on status bar 2020-12-07 18:43:54 +01:00
Silvano Seva 7273c084ca Moved menuItems from ui.h to ui.c 2020-12-06 22:28:11 +01:00
Federico Amedeo Izzo 2251354288 UI: Add top menu items 2020-12-06 22:28:11 +01:00
Federico Amedeo Izzo 8b1d688935 UI: Add initial menu support 2020-12-06 22:28:11 +01:00
Silvano Seva 0fee5acbf0 Complete refactoring of both rtx API and its implementation for MD3x0 platforms 2020-12-06 19:33:27 +01:00
Silvano Seva 6e144a7160 Fixed bug in MD3x0 calibration loader, made the input parameters of 'interpCalParameter' const 2020-12-06 19:33:27 +01:00
Silvano Seva 0931f1b588 Utility for interpolation of calibration parameters 2020-12-06 19:33:27 +01:00
Silvano Seva 55b182406d Initial implementation of rtx driver for TYT MD-380 radio, by now supporting only analog FM reception 2020-12-06 19:33:27 +01:00
Niccolò Izzo 1ee4744cb7 Improve battery icon drawing implementation
Fix a bug where the signature of the battery draw function was not
present, causing a build error. Now the battery size and position is
screen size independent and should work for all layouts.
2020-12-06 16:22:38 +01:00
Federico Amedeo Izzo 08776e70eb Threads: rename status_task to device_task 2020-12-06 14:37:21 +01:00
Federico Amedeo Izzo 0fb3493bef Events: Complete UI events implementation 2020-12-06 14:37:21 +01:00
Silvano Seva 014262f4df Modified event_t structure to make it castable to void * 2020-12-06 14:37:21 +01:00
Federico Amedeo Izzo 94b37d9137 Events: More events changes 2020-12-06 14:37:21 +01:00
Federico Amedeo Izzo 3e461e6b80 Add initial events implementation 2020-12-06 14:37:21 +01:00
Silvano Seva 774468ae46 Added to platform API a function allowing to retrieve device calibration data 2020-12-04 10:45:03 +01:00
Silvano Seva d4cdba2243 Moved calibration data structures from 'platform/drivers/NVM' to 'openrtx/include/calibration', since various modules need them 2020-12-04 10:27:04 +01:00
Federico Amedeo Izzo e62458119a Keyboard: Increase thread stack and send multiple events if a key is kept pressed 2020-11-29 09:09:59 +01:00
Federico Amedeo Izzo 869cb673b6 Keyboard: Manage keyboard status with a queue 2020-11-29 08:45:17 +01:00
Federico Amedeo Izzo 42ccc3ac28 GFX: Add gfx_clearRows() implementation 2020-11-29 08:43:58 +01:00
Silvano Seva 5f669d1c18 Made task stack size platform dependent, since values for ARM target were too small for a correct execution on x64 2020-11-28 21:19:37 +01:00
Federico Amedeo Izzo b0b772cd50 Keyboard: Add missing keyboard.h include 2020-11-28 09:53:44 +01:00
Federico Amedeo Izzo efc4820328 Keyboard: Replace uint32_t with keyboard_t 2020-11-28 09:51:18 +01:00
Silvano Seva bf24c31be7 Increased UI task stack size to 1kB, fixed some compiler warnings, code cleanup pass 2020-11-27 10:12:54 +01:00
Federico Amedeo Izzo 82be1afe17 UI: Add VFO frequency change 2020-11-26 22:44:39 +01:00
Silvano Seva 5d964f3358 Reorganised radio state data structure, bringing in new channel_t variable. 2020-11-26 15:25:26 +01:00
Silvano Seva 4dbdb5ddbb Implemented reading of channel data from external flash memory for MDx targets 2020-11-25 16:40:17 +01:00
Silvano Seva 9ba2c79425 Code changes to remove a bunch of compiler warnings 2020-11-24 17:27:30 +01:00
Silvano Seva 380f489eb0 Changed underlying type of 'freq_t' from 'float' to 'uint32_t' 2020-11-24 15:39:10 +01:00
Silvano Seva 65e4643f1e Code cleanup and suppression of some compilation warnings 2020-11-24 14:23:05 +01:00
Federico Amedeo Izzo 3370e5a3a7 Add shared state logic 2020-11-21 10:46:48 +01:00
Silvano Seva 310f19c6b7 API to access external nonvolatile memory, implementation for MD3x0 devices and testsuite for printing calibration values of MD3x0 devices 2020-11-21 09:37:12 +01:00
Federico Amedeo Izzo bd176d7142 Fonts: Manually fixed font to make it more symmetric 2020-11-19 22:59:15 +01:00
Federico Amedeo Izzo f2d9db024c Graphics: Add drawHLine and drawVLine functions 2020-11-18 16:56:32 +01:00
Federico Amedeo Izzo 39d5912adc UI: Add 3 font sizes, fix UI padding for new fonts. 2020-11-17 22:50:27 +01:00
Niccolò Izzo 1639ddf174 Remove OpenGD77 font 2020-11-17 14:42:23 +01:00
Niccolò Izzo 91d0e05af7 Replace OpenGD77 fonts with Adafruit GFX fonts
OpenGD77 custom binary font format was replaced with Adafruit GFX
library standard font format, to be able to reuse all the available
fonts, together with the relative tools.
2020-11-17 14:42:23 +01:00
Niccolò Izzo c0ed3a7466 Add Adafruit GFX library fonts 2020-11-17 14:32:54 +01:00
Silvano Seva b06b120148 Reorganising thread structure, moving thread bodies and thread creation function into a dedicated source file to make overall source code more easily readable 2020-11-15 22:23:32 +01:00
Federico Amedeo Izzo 1000133c01 Create thread structure
Now main.c creates four threads to manage
- UI
- Platform state
- Analog radio
- Digital radio

Every thread has an entry point named `*_main()` like `ui_main()`
that gets executed periodically depending on the given interval
2020-11-14 19:33:56 +01:00
Federico Amedeo Izzo 1bed1b5cfe Remove dubious font 2020-11-03 15:15:36 +01:00
Federico Amedeo Izzo a19ba1785e UI: Add VFO frequency to main screen 2020-11-03 15:15:36 +01:00
Fred 09be53b24a Fix keyboard variable size 2020-11-03 15:15:36 +01:00
Federico Amedeo Izzo a2b2b602dd Add initial UI main 2020-11-03 15:15:36 +01:00
Silvano Seva b0f5341304 Added flag for 'monitor' button to keyboard driver, implemented 'monitor' and 'function' buttons in MDxx380 keyboard driver 2020-11-03 15:15:36 +01:00
Silvano Seva 2350103831 Made platform_getVbat returning the battery voltage in V instead of mV. 2020-11-03 15:15:36 +01:00
Silvano Seva 8a3872e5f9 Added to platform API a function which allows to query the PTT status 2020-11-03 15:15:36 +01:00
Silvano Seva af2e4eb372 Adding keyboard interface API 2020-11-03 15:15:36 +01:00
Federico Amedeo Izzo 6b0f0242d1 Remove screenWidth and screenHeight getters. 2020-11-03 15:15:36 +01:00
Silvano Seva 99b2280f76 Adding interface for RTC drivers 2020-11-03 15:15:36 +01:00
Silvano Seva 9b20e5010c Made gpio API completely platform independent 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo c3ef0ca036 Remove backlight control from anywhere except platform.c and platform.h 2020-11-03 15:15:35 +01:00
Silvano Seva 06346ac827 Moving function for setting display backlight level from display driver to 'platform.c' file 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 310ff3839c Add platform.h interface definition 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 9a5e12d4f0 graphics.h renamed graphics_* to gfx_*
Removed unused print methods
2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 9b26c2d71b Add printing functions from legacy-code branch 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 72d739b987 Import OpenGD77 font 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 09602387b2 graphics_rgb565.c: Implement drawing empty rectangles 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 52b4718deb graphics_rgb565.c: small refactoring. Linux-demo: moved from display interface to graphics interface 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 94bece00c0 add graphics_rgb565.c to linux target, fixed compilation errors 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo c24e56185c graphics.h: removed getFramebuffer method 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo f17a9241cc graphics.h Add color and coordinates struct, add fillScreen, drawLine and drawRect prototypes 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 810586aa5b display.h: Move get_FrameBuffer() up in the interface file 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo 60dd623ddd graphics.h: Add initial version 2020-11-03 15:15:35 +01:00
Federico Amedeo Izzo b324665b0f Fixed typo in display.h 2020-11-03 15:15:35 +01:00
Silvano Seva 638707a6aa Renamed 'lcd.h' to 'display.h' and updated the function names for low-level display driver. 2020-11-03 15:15:35 +01:00
Silvano Seva f043581928 Making the interface for low-level display drivers more general: now the pointer to framebuffer is returned as void *. Updated existing drivers and test code accordingly. 2020-11-03 15:15:35 +01:00
Silvano Seva ad8d89cd3e Testing uC/OS-III on STM32F4 MCU 2020-11-03 15:15:35 +01:00
Silvano Seva 2cfca62b00 Driver for SDL-based display emulator, updated lcd.h documentation 2020-11-03 15:15:35 +01:00
Silvano Seva 327d8c193c Start migrating code from previous work 2020-11-03 15:15:35 +01:00