Commit 5560e971 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

Move setting_t declaration to settings.h

parent 81a5945e
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "application.h" #include "application.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "settings/settings.h"
/** /**
* @brief Type of menu entry. * @brief Type of menu entry.
...@@ -40,12 +41,6 @@ enum entry_type { ...@@ -40,12 +41,6 @@ enum entry_type {
END // sentinel, should be put as the last entry END // sentinel, should be put as the last entry
}; };
typedef struct setting {
char name[16];
uint32_t val;
uint32_t valmod;
} setting_t;
/** /**
* @brief Structure that represents a single * @brief Structure that represents a single
* entry - either application or submenu. * entry - either application or submenu.
......
...@@ -30,11 +30,11 @@ setting_t setting_coord_style = {"Coord style", 1, 3}; ...@@ -30,11 +30,11 @@ setting_t setting_coord_style = {"Coord style", 1, 3};
void setting_change(setting_t *setting) void setting_change(setting_t *setting)
{ {
uint32_t v = setting->val; int v = setting->val;
char s[16]; char s[16];
v++; v++;
v %= setting->valmod; v %= setting->nrvals;
sprintf(s, ": %d", v); sprintf(s, ": %d", v);
......
...@@ -29,7 +29,12 @@ ...@@ -29,7 +29,12 @@
#define SETTINGS_H #define SETTINGS_H
#include "application.h" #include "application.h"
#include "menu_struct.h"
typedef struct setting {
char name[16];
int val;
int nrvals;
} setting_t;
extern application set_time; extern application set_time;
extern application set_date; extern application set_date;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment