Commit Graph

585 Commits

Author SHA1 Message Date
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