use consistent naming style for typedefs
This commit is contained in:
@@ -63,7 +63,7 @@ static void finetune_update_display(void) {
|
||||
|
||||
if (finetune_page == 0) {
|
||||
watch_display_string("FT", 0);
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
watch_date_time_t date_time = watch_rtc_get_date_time();
|
||||
sprintf(buf, "%02d", date_time.unit.second);
|
||||
watch_display_string(buf, 8);
|
||||
|
||||
@@ -104,7 +104,7 @@ static void finetune_adjust_subseconds(int delta) {
|
||||
watch_rtc_enable(false);
|
||||
delay_ms(delta);
|
||||
if (delta > 500) {
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
watch_date_time_t date_time = watch_rtc_get_date_time();
|
||||
date_time.unit.second = (date_time.unit.second + 1) % 60;
|
||||
if (date_time.unit.second == 0) { // Overflow
|
||||
date_time.unit.minute = (date_time.unit.minute + 1) % 60;
|
||||
@@ -143,7 +143,7 @@ bool finetune_face_loop(movement_event_t event, void *context) {
|
||||
// If needed, update your display here, at canonical 0.5sec position.
|
||||
// We flash green LED once per minute to measure clock error, when we are not on first screen
|
||||
if (finetune_page!=0) {
|
||||
watch_date_time date_time;
|
||||
watch_date_time_t date_time;
|
||||
date_time = watch_rtc_get_date_time();
|
||||
if (date_time.unit.second == 0) {
|
||||
watch_set_led_green();
|
||||
|
||||
@@ -45,7 +45,7 @@ const float voltage_coefficient = 0.241666667 * dithering; // 10 * ppm/V. Nomina
|
||||
static void nanosec_init_profile(void) {
|
||||
nanosec_changed = true;
|
||||
nanosec_state.correction_cadence = 10;
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
watch_date_time_t date_time = watch_rtc_get_date_time();
|
||||
nanosec_state.last_correction_time = watch_utility_date_time_to_unix_time(date_time, 0);
|
||||
|
||||
// init data after changing profile - do that once per profile selection
|
||||
@@ -259,7 +259,7 @@ static void nanosec_next_edit_screen(void) {
|
||||
|
||||
float nanosec_get_aging() // Returns aging correction in ppm
|
||||
{
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
watch_date_time_t date_time = watch_rtc_get_date_time();
|
||||
float years = (watch_utility_date_time_to_unix_time(date_time, 0) - nanosec_state.last_correction_time) / 31536000.0f; // Years passed since finetune
|
||||
return years*nanosec_state.aging_ppm_pa/100.0f;
|
||||
}
|
||||
@@ -367,7 +367,7 @@ movement_watch_face_advisory_t nanosec_face_advise(void *context) {
|
||||
|
||||
// No need for background correction if we are on profile 0 - static hardware correction.
|
||||
if (nanosec_state.correction_profile != 0) {
|
||||
watch_date_time date_time = watch_rtc_get_date_time();
|
||||
watch_date_time_t date_time = watch_rtc_get_date_time();
|
||||
retval.wants_background_task = date_time.unit.minute % nanosec_state.correction_cadence == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct savefile {
|
||||
uint32_t b5;
|
||||
uint32_t b6;
|
||||
uint32_t b7;
|
||||
watch_date_time rtc;
|
||||
watch_date_time_t rtc;
|
||||
} savefile_t;
|
||||
|
||||
#define SAVE_LOAD_SLOTS 4
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
char set_time_hackwatch_face_titles[][3] = {"HR", "M1", "SE", "YR", "MO", "DA", "ZO"};
|
||||
#define set_time_hackwatch_face_NUM_SETTINGS (sizeof(set_time_hackwatch_face_titles) / sizeof(*set_time_hackwatch_face_titles))
|
||||
|
||||
watch_date_time date_time_settings;
|
||||
watch_date_time_t date_time_settings;
|
||||
|
||||
void set_time_hackwatch_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
||||
(void) watch_face_index;
|
||||
|
||||
Reference in New Issue
Block a user