Daylight Savings Time support (#1793)

* Daylight Savings Time support

* Cleanup

* Clean-up

* Revert ADSB change

* Clean-up

* Corrected date in comment, ironically
This commit is contained in:
Mark Thompson 2024-01-21 12:47:28 -06:00 committed by GitHub
parent aa5d4ad078
commit 5f8e1ef307
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 403 additions and 35 deletions

View file

@ -116,6 +116,21 @@ enum encoder_dial_sensitivity {
NUM_DIAL_SENSITIVITY
};
typedef union {
uint32_t v;
struct {
uint8_t start_which : 4;
uint8_t start_weekday : 4;
uint8_t start_month : 4;
uint8_t end_which : 4;
uint8_t end_weekday : 4;
uint8_t end_month : 4;
uint8_t UNUSED : 7;
uint8_t dst_enabled : 1;
} b;
} dst_config_t;
static_assert(sizeof(dst_config_t) == sizeof(uint32_t));
namespace cache {
/* Set values in cache to sensible defaults. */
@ -241,9 +256,14 @@ void set_pocsag_ignore_address(uint32_t address);
bool clkout_enabled();
void set_clkout_enabled(bool v);
uint16_t clkout_freq();
void set_clkout_freq(uint16_t freq);
bool dst_enabled();
void set_dst_enabled(bool v);
uint16_t clkout_freq();
dst_config_t config_dst();
void set_config_dst(dst_config_t v);
/* Recon app */
bool recon_autosave_freqs();
bool recon_autostart_recon();