]> git.earman.xyz Git - sensor-watch.git/commitdiff
consistently use _t convention
authorjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 11:45:24 +0000 (07:45 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 11:45:24 +0000 (07:45 -0400)
movement/watch_faces/clock/clock_face.c
watch-library/shared/watch/watch_common_display.c
watch-library/shared/watch/watch_slcd.h

index d51789794bc7e4ba053a13a556f9e63b8eb22bd8..4de602b04c83a8b2c92ce94263627d885e3b9e23 100644 (file)
@@ -64,7 +64,7 @@ static bool clock_should_set_leading_zero(movement_settings_t *settings) {
     return clock_is_in_24h_mode(settings) && settings->bit.clock_24h_leading_zero;
 }
 
-static void clock_indicate(WatchIndicatorSegment indicator, bool on) {
+static void clock_indicate(watch_indicator_t indicator, bool on) {
     if (on) {
         watch_set_indicator(indicator);
     } else {
index 66c5c75b2c07e1f7ff1d34cba81c368adc323dcb..042fabf4b4cf4856717ec615c261006b1774c725 100644 (file)
@@ -150,7 +150,7 @@ void watch_display_string(char *string, uint8_t position) {
     }
 }
 
-void watch_display_text(WatchDisplayLocation location, char *string) {
+void watch_display_text(watch_position_t location, char *string) {
     switch (location) {
         case WATCH_POSITION_TOP_LEFT:
             watch_display_character(string[0], 0);
@@ -204,7 +204,7 @@ void watch_display_text(WatchDisplayLocation location, char *string) {
     }
 }
 
-void watch_display_text_with_fallback(WatchDisplayLocation location, char *string, char *fallback) {
+void watch_display_text_with_fallback(watch_position_t location, char *string, char *fallback) {
 #ifdef USE_CUSTOM_LCD
     (void)fallback;
 
@@ -286,14 +286,14 @@ void watch_clear_decimal_if_available(void) {
 #endif
 }
 
-void watch_set_indicator(WatchIndicatorSegment indicator) {
+void watch_set_indicator(watch_indicator_t indicator) {
     uint32_t value = IndicatorSegments[indicator];
     uint8_t com = SLCD_COMNUM(value);
     uint8_t seg = SLCD_SEGNUM(value);
     watch_set_pixel(com, seg);
 }
 
-void watch_clear_indicator(WatchIndicatorSegment indicator) {
+void watch_clear_indicator(watch_indicator_t indicator) {
     uint32_t value = IndicatorSegments[indicator];
     uint8_t com = SLCD_COMNUM(value);
     uint8_t seg = SLCD_SEGNUM(value);
index cfd0cac5d290c573903b9915a07dca4c1e142ed9..07922be7644949eb1ba0dd979ceb73d6396c3195 100644 (file)
@@ -47,7 +47,7 @@
 #define SLCD_SEGNUM(segid) ((segid)&0xFF)
 
 /// An enum listing the icons and indicators available on the watch.
-typedef enum WatchIndicatorSegment {
+typedef enum {
     WATCH_INDICATOR_SIGNAL = 0, ///< The hourly signal indicator; also useful for indicating that sensors are on.
     WATCH_INDICATOR_BELL,       ///< The small bell indicating that an alarm is set.
     WATCH_INDICATOR_PM,         ///< The PM indicator, indicating that a time is in the afternoon.
@@ -57,10 +57,10 @@ typedef enum WatchIndicatorSegment {
     // These next indicators are only available on the new custom LCD:
     WATCH_INDICATOR_BATTERY,    ///< The battery indicator. Will fall back to the LAP icon on the original F-91W LCD.
     WATCH_INDICATOR_SLEEP,      ///< The sleep indicator. No fallback here; use the tick animation to indicate sleep.
-} WatchIndicatorSegment;
+} watch_indicator_t;
 
 /// An enum listing the locations on the display where text can be placed.
-typedef enum WatchDisplayLocation {
+typedef enum {
     WATCH_POSITION_FULL = 0,    ///< Display 10 characters to the full screen, in the standard F-91W layout.
     WATCH_POSITION_TOP_LEFT,    ///< Display 2 or 3 characters in the top left of the screen.
     WATCH_POSITION_TOP_RIGHT,   ///< Display 2 digits in the top right of the screen.
@@ -68,7 +68,7 @@ typedef enum WatchDisplayLocation {
     WATCH_POSITION_HOURS,       ///< Display 2 characters in the hours portion of the main line.
     WATCH_POSITION_MINUTES,     ///< Display 2 characters in the minutes portion of the main line.
     WATCH_POSITION_SECONDS,     ///< Display 2 characters in the seconds portion of the main line.
-} WatchDisplayLocation;
+} watch_position_t;
 
 /** @brief Enables the Segment LCD display.
   * Call this before attempting to set pixels or display strings.
@@ -108,10 +108,10 @@ void watch_display_string(char *string, uint8_t position) __attribute__ ((deprec
 
 /**
  * @brief Displays a string at the provided location.
- * @param location @see WatchDisplayLocation, the location where you wish to display the string.
+ * @param location @see watch_position_t, the location where you wish to display the string.
  * @param string A null-terminated string with two characters to display.
  */
-void watch_display_text(WatchDisplayLocation location, char *string);
+void watch_display_text(watch_position_t location, char *string);
 
 /**
  * @brief Displays a string at the provided location on the new LCD, with a fallback for the original.
@@ -154,7 +154,7 @@ void watch_display_text(WatchDisplayLocation location, char *string);
  *
  *       Needless to say, some fine-tuning may be necessary to get the best results on both displays.
  */
-void watch_display_text_with_fallback(WatchDisplayLocation location, char *string, char *fallback);
+void watch_display_text_with_fallback(watch_position_t location, char *string, char *fallback);
 
 /** @brief Turns the colon segment on.
   */
@@ -175,17 +175,17 @@ void watch_set_decimal_if_available(void);
 void watch_clear_decimal_if_available(void);
 
 /** @brief Sets an indicator on the LCD. Use this to turn on one of the indicator segments.
-  * @param indicator One of the indicator segments from the enum. @see WatchIndicatorSegment
+  * @param indicator One of the indicator segments from the enum. @see watch_indicator_t
   */
-void watch_set_indicator(WatchIndicatorSegment indicator);
+void watch_set_indicator(watch_indicator_t indicator);
 
 /** @brief Clears an indicator on the LCD. Use this to turn off one of the indicator segments.
-  * @param indicator One of the indicator segments from the enum. @see WatchIndicatorSegment
+  * @param indicator One of the indicator segments from the enum. @see watch_indicator_t
   */
-void watch_clear_indicator(WatchIndicatorSegment indicator);
+void watch_clear_indicator(watch_indicator_t indicator);
 
 /** @brief Clears all indicator segments.
-  * @see WatchIndicatorSegment
+  * @see watch_indicator_t
   */
 void watch_clear_all_indicators(void);