aboutsummaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2024-12-03 21:52:59 +0100
committerThomas Albers Raviola <thomas@thomaslabs.org>2024-12-03 21:52:59 +0100
commit7a8c601eec433f7c75d3291d64bb3d41fe50c8ae (patch)
tree1b1038a4dc80cc496a4c608ea760300f8b6d68f1 /src/menu.c
parent08b7ee440269c881546421da6efe1b6ae122b566 (diff)
Use custom types
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/menu.c b/src/menu.c
index 320732d..868318b 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -6,17 +6,17 @@
#include <string.h>
struct time {
- uint8_t second;
- uint8_t minute;
- uint8_t hour;
- uint8_t wkday;
- uint8_t date;
- uint8_t month;
- uint8_t year;
+ u8 second;
+ u8 minute;
+ u8 hour;
+ u8 wkday;
+ u8 date;
+ u8 month;
+ u8 year;
};
struct value {
- uint8_t roll;
+ u8 roll;
int val;
int min, max;
};
@@ -63,7 +63,7 @@ draw_time(void)
void
draw_battery(void)
{
- uint16_t soc = 100; // bat_state_of_charge();
+ u16 soc = 100; // bat_state_of_charge();
char buf[16];
sprintf(buf, "%u%%", soc);
mvaddstr(7, 1, buf);
@@ -73,7 +73,7 @@ void
set_time(void);
struct item {
- uint8_t type;
+ u8 type;
const char *text;
union {
void (*action)(void);
@@ -137,7 +137,7 @@ enum direction {
HORIZONTAL
};
-static uint8_t dir = HORIZONTAL;
+static u8 dir = HORIZONTAL;
static int menu_index = 0;
static int sub_menu_index = -1;
static int edit = 0;