Commit Graph

57 Commits

Author SHA1 Message Date
Federico Amedeo Izzo f357f476dc GPS: Enable GPS on gps_task start only if enabled in settings 2021-02-16 22:47:38 +01:00
Niccolò Izzo fed9912c7d Improved RTC GPS time synchronization 2021-02-16 08:33:34 +01:00
Niccolò Izzo f850dbdc45 Add GPS RTC time synchronization, remove debug prints 2021-02-15 09:26:13 +01:00
Federico Amedeo Izzo 9255dfb969 Disable GPS functions for radios that don't support a GPS chip 2021-02-14 17:49:23 +01:00
Federico Amedeo Izzo 31552ff2b2 Consider RTC time UTC instead of local time, applying timezone 2021-02-13 22:11:25 +01:00
Niccolò Izzo 0cf86ce6ea Add GPS UI draft 2021-02-11 09:44:41 +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
Silvano Seva 6dfbd2419d Improved RX activation mechanism in rtx driver 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 8b72587b7b UI: Make last_state an extern variable. Add Info screen values 2021-01-30 08:33:39 +01:00
Niccolò Izzo 226d2ccaf7 Implement RSSI based squelch control 2021-01-28 15:13:06 +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
Niccolò Izzo 827bc45794 Fix deadlock issue on linux target
The keyboard thread was causing a deadlock with the ui thread,
now the keyboard thread is non-blocking.
2021-01-15 22:09:11 +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
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
Federico Amedeo Izzo 04a8e2025e Keyboard: Do not send event bursts after long press 2021-01-05 10:08:18 +01:00
Federico Amedeo Izzo 07707ccae5 Keyboard: Send release key events 2021-01-05 10:08:18 +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 94b7be826a Disable RTC related code on platforms without a functional RTC 2021-01-01 18:58:35 +01:00
Federico Amedeo Izzo aca804c738 KBD: Fix double events generated from long + short press.
The problem was caused by kbd_task() sending an old copy
of the keyboard map.
This was necessary when the events were triggered on key lift
but since now events are sent on key press, this is no more necessary.
2020-12-24 17:29:24 +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 ce09f2c208 kbd_task: Get timestamp after mutex to avoid getting incorrect timestamp
on mutex blocking
2020-12-19 15:45:42 +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
Federico Amedeo Izzo 95a8e99605 kbd_task: Send keyboard event when the key is pressed, not when it's lifted 2020-12-18 18:42:17 +01:00
Federico Amedeo Izzo 400a766f54 kbd_task: improve long-press behaviour 2020-12-17 23:15:56 +01:00
Federico Amedeo Izzo 67aac8a68e kbd_task: Replace renderingInProgress() check with display mutex 2020-12-17 22:30:08 +01:00
Federico Amedeo Izzo 3c00802330 threads.c: Avoid reading keyboard status while display is rendering 2020-12-17 22:18:44 +01:00
Federico Amedeo Izzo b5c06d5459 Fix new keyboard task 2020-12-17 22:18:44 +01:00
Federico Amedeo Izzo 749f5a1444 KBD: Correct key pressed/lifted check 2020-12-17 22:18:44 +01:00
Federico Amedeo Izzo ee6f87c735 KBD: Add missing keyboard state save 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 6ca3faceaf Made calls to 'display_renderRows' and 'display_render' blocking, thus not requiring anymore to busy wiat on 'display_renderingInProgress'. Modifications involved only MDx display driver, the others were already blocking. 2020-12-12 10:16:26 +01:00
Niccolò Izzo 20667c87c4 Add low battery warning screen
Basic UI composition functions have been moved to the main to accomodate
for pre-boot warning screens.
2020-12-11 14:17:06 +01:00
Federico Amedeo Izzo 8b1d688935 UI: Add initial menu support 2020-12-06 22:28:11 +01:00
Federico Amedeo Izzo 7fffc339f8 Threads: align keyboard task stack size to other tasks 2020-12-06 14:37:21 +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
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
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 efc4820328 Keyboard: Replace uint32_t with keyboard_t 2020-11-28 09:51:18 +01:00
Silvano Seva 8b877ed6d0 Narrowed down RAM usage 2020-11-27 15:07:39 +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
Federico Amedeo Izzo 00fd786b8e UI: Switch to alternative splash screen 2020-11-26 21:12:05 +01:00