Add an option to start LCDd with screen rotation disabled.
This commit is contained in:
+5
-4
@@ -88,10 +88,7 @@
|
||||
#define DEFAULT_BACKLIGHT BACKLIGHT_OPEN
|
||||
#define DEFAULT_HEARTBEAT HEARTBEAT_OPEN
|
||||
#define DEFAULT_TITLESPEED TITLESPEED_MAX
|
||||
|
||||
/* All variables are set to 'unset' values*/
|
||||
#define UNSET_INT -1
|
||||
#define UNSET_STR "\01"
|
||||
#define DEFAULT_AUTOROTATE AUTOROTATE_ON
|
||||
|
||||
/* Socket to bind to...
|
||||
|
||||
@@ -444,6 +441,10 @@ process_configfile(char *configfile)
|
||||
heartbeat = config_get_tristate("Server", "Heartbeat", 0, "open", UNSET_INT);
|
||||
}
|
||||
|
||||
if (autorotate == UNSET_INT) {
|
||||
autorotate = config_get_bool("Server", "AutoRotate", 0, DEFAULT_AUTOROTATE);
|
||||
}
|
||||
|
||||
if (titlespeed == UNSET_INT) {
|
||||
int speed = config_get_int("Server", "TitleSpeed", 0, DEFAULT_TITLESPEED);
|
||||
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@
|
||||
/* Local functions */
|
||||
int compare_priority(void *one, void *two);
|
||||
|
||||
bool autorotate = 1; /* If on, INFO and FOREGROUND screens will rotate */
|
||||
bool autorotate = UNSET_INT; /* If on, INFO and FOREGROUND screens will rotate */
|
||||
LinkedList *screenlist = NULL;
|
||||
Screen *current_screen = NULL;
|
||||
long int current_screen_start_time = 0;
|
||||
@@ -103,8 +103,7 @@ screenlist_process(void)
|
||||
|
||||
if (!screenlist)
|
||||
return;
|
||||
|
||||
/* Sort the list acfording to priority class */
|
||||
/* Sort the list according to priority class */
|
||||
LL_Sort(screenlist, compare_priority);
|
||||
f = LL_GetFirst(screenlist);
|
||||
|
||||
@@ -147,6 +146,7 @@ screenlist_process(void)
|
||||
* current one ? */
|
||||
if (f->priority > s->priority) {
|
||||
/* Yes, switch to that screen, job done */
|
||||
report(RPT_DEBUG, "%s: High priority screen [%.40s] selected", __FUNCTION__, f->id);
|
||||
screenlist_switch(f);
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-8
@@ -15,15 +15,10 @@
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
#define SCR_HOLD 1
|
||||
#define SCR_SKIP 2
|
||||
#define SCR_BACK 3
|
||||
#define RENDER_HOLD 11
|
||||
#define RENDER_SKIP 12
|
||||
#define RENDER_BACK 13
|
||||
#define AUTOROTATE_OFF 0
|
||||
#define AUTOROTATE_ON 1
|
||||
|
||||
/*extern int screenlist_action;*/
|
||||
extern bool autorotate;
|
||||
extern bool autorotate; /**< If enabled, screens will rotate */
|
||||
|
||||
int screenlist_init(void);
|
||||
/* Initializes the screenlist. */
|
||||
|
||||
Reference in New Issue
Block a user