Commit Graph

29 Commits

Author SHA1 Message Date
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
Niccolò Izzo 4d66d8b1af Fix various warnings 2021-02-17 11:21:46 +01:00
Federico Amedeo Izzo 31552ff2b2 Consider RTC time UTC instead of local time, applying timezone 2021-02-13 22:11:25 +01:00
Federico Amedeo Izzo 66af402e83 Move settings from UI to State 2021-02-13 20:32:53 +01:00
Federico Amedeo Izzo b3e0f964a1 State: remove unused variable channelInfoUpdated 2021-02-13 11:24:05 +01:00
Federico Amedeo Izzo 19838dbb38 Read VFO channel from flash when initializing state 2021-02-13 11:24:05 +01:00
Federico Amedeo Izzo 61ad0879c5 CPS-UI: Make channels, zones and contacts 1-based to fix zone bound 2021-02-02 20:52:37 +01:00
Federico Amedeo Izzo 438540290b UI: Add MEM channel filtering per zone 2021-01-31 14:14:54 +01:00
Federico Amedeo Izzo 1f240ba132 Move brightness from state_t to settings_t, add Contrast 2021-01-29 22:13:47 +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 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
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
Federico Amedeo Izzo 94b7be826a Disable RTC related code on platforms without a functional RTC 2021-01-01 18:58:35 +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
Niccolò Izzo d74bece14e Sane default values for the channel struct 2020-12-18 22:42:39 +01:00
Niccolò Izzo c7e928666c Move low battery screen into main FSM 2020-12-18 19:03:57 +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 65e4643f1e Code cleanup and suppression of some compilation warnings 2020-11-24 14:23:05 +01:00
Federico Amedeo Izzo 32ccd29c5c State: Add sane initialization 2020-11-21 11:02:49 +01:00
Federico Amedeo Izzo 3370e5a3a7 Add shared state logic 2020-11-21 10:46:48 +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 a19ba1785e UI: Add VFO frequency to main screen 2020-11-03 15:15:36 +01:00
Federico Amedeo Izzo a2b2b602dd Add initial UI main 2020-11-03 15:15:36 +01:00