Add an option to start LCDd with screen rotation disabled.
This commit is contained in:
@@ -11,6 +11,7 @@ v.0.5dev (ongoing development)
|
|||||||
* Reset ccmode on screen clear for NoritakeVFD, tyan driver
|
* Reset ccmode on screen clear for NoritakeVFD, tyan driver
|
||||||
* All drivers: Refactor CGmode enum into lcd.h
|
* All drivers: Refactor CGmode enum into lcd.h
|
||||||
* hd44780: New (possible faster) screen update algorithm
|
* hd44780: New (possible faster) screen update algorithm
|
||||||
|
+ Add an option to start LCDd with screen rotation disabled (M. Zanetti)
|
||||||
|
|
||||||
v0.5.4
|
v0.5.4
|
||||||
* Update driver includes and LDFLAGS (fixed glk and bayrad binding error)
|
* Update driver includes and LDFLAGS (fixed glk and bayrad binding error)
|
||||||
|
|||||||
@@ -82,6 +82,12 @@ User=nobody
|
|||||||
# Sets the default time in seconds to displays a screen.
|
# Sets the default time in seconds to displays a screen.
|
||||||
WaitTime=5
|
WaitTime=5
|
||||||
|
|
||||||
|
# If set to no, LCDd will start with screen rotation disabled. This has the
|
||||||
|
# same effect as if the ToggleRotateKey had been pressed. Rotation will start
|
||||||
|
# if the ToggleRotateKey is pressed. Note that this setting does not turn off
|
||||||
|
# priority sorting of screens. [default: on; legal: on, off]
|
||||||
|
#AutoRotate=no
|
||||||
|
|
||||||
# If yes, the the serverscreen will be rotated as a usual info screen. If no,
|
# If yes, the the serverscreen will be rotated as a usual info screen. If no,
|
||||||
# it will be a background screen, only visible when no other screens are
|
# it will be a background screen, only visible when no other screens are
|
||||||
# active. The special value 'blank' is similar to no, but only a blank screen
|
# active. The special value 'blank' is similar to no, but only a blank screen
|
||||||
|
|||||||
@@ -369,6 +369,29 @@ settings for the LCDproc server <application>LCDd</application>.
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<property>AutoRotate</property> = ¶meters.yesdefno;
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If set to <literal>no</literal>, LCDd will start with screen rotation disabled.
|
||||||
|
This has the same effect as if the ToggleRotateKey had been pressed.
|
||||||
|
Rotation will start if the ToggleRotateKey is pressed.
|
||||||
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
This setting does not turn off priority sorting of screens. Therefore
|
||||||
|
the client or LCDd may still show a different screen if it assigns it
|
||||||
|
a higher priority than any other screen. Due to the way priority
|
||||||
|
sorting works the screen shown when the first client connects may not
|
||||||
|
be that clients first screen. If the client sets up more than two
|
||||||
|
screens it will be the next to last one (this is not considered a bug).
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<property>ServerScreen</property> =
|
<property>ServerScreen</property> =
|
||||||
|
|||||||
+5
-4
@@ -88,10 +88,7 @@
|
|||||||
#define DEFAULT_BACKLIGHT BACKLIGHT_OPEN
|
#define DEFAULT_BACKLIGHT BACKLIGHT_OPEN
|
||||||
#define DEFAULT_HEARTBEAT HEARTBEAT_OPEN
|
#define DEFAULT_HEARTBEAT HEARTBEAT_OPEN
|
||||||
#define DEFAULT_TITLESPEED TITLESPEED_MAX
|
#define DEFAULT_TITLESPEED TITLESPEED_MAX
|
||||||
|
#define DEFAULT_AUTOROTATE AUTOROTATE_ON
|
||||||
/* All variables are set to 'unset' values*/
|
|
||||||
#define UNSET_INT -1
|
|
||||||
#define UNSET_STR "\01"
|
|
||||||
|
|
||||||
/* Socket to bind to...
|
/* Socket to bind to...
|
||||||
|
|
||||||
@@ -444,6 +441,10 @@ process_configfile(char *configfile)
|
|||||||
heartbeat = config_get_tristate("Server", "Heartbeat", 0, "open", UNSET_INT);
|
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) {
|
if (titlespeed == UNSET_INT) {
|
||||||
int speed = config_get_int("Server", "TitleSpeed", 0, DEFAULT_TITLESPEED);
|
int speed = config_get_int("Server", "TitleSpeed", 0, DEFAULT_TITLESPEED);
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -26,7 +26,7 @@
|
|||||||
/* Local functions */
|
/* Local functions */
|
||||||
int compare_priority(void *one, void *two);
|
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;
|
LinkedList *screenlist = NULL;
|
||||||
Screen *current_screen = NULL;
|
Screen *current_screen = NULL;
|
||||||
long int current_screen_start_time = 0;
|
long int current_screen_start_time = 0;
|
||||||
@@ -103,8 +103,7 @@ screenlist_process(void)
|
|||||||
|
|
||||||
if (!screenlist)
|
if (!screenlist)
|
||||||
return;
|
return;
|
||||||
|
/* Sort the list according to priority class */
|
||||||
/* Sort the list acfording to priority class */
|
|
||||||
LL_Sort(screenlist, compare_priority);
|
LL_Sort(screenlist, compare_priority);
|
||||||
f = LL_GetFirst(screenlist);
|
f = LL_GetFirst(screenlist);
|
||||||
|
|
||||||
@@ -147,6 +146,7 @@ screenlist_process(void)
|
|||||||
* current one ? */
|
* current one ? */
|
||||||
if (f->priority > s->priority) {
|
if (f->priority > s->priority) {
|
||||||
/* Yes, switch to that screen, job done */
|
/* Yes, switch to that screen, job done */
|
||||||
|
report(RPT_DEBUG, "%s: High priority screen [%.40s] selected", __FUNCTION__, f->id);
|
||||||
screenlist_switch(f);
|
screenlist_switch(f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-8
@@ -15,15 +15,10 @@
|
|||||||
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
|
||||||
#define SCR_HOLD 1
|
#define AUTOROTATE_OFF 0
|
||||||
#define SCR_SKIP 2
|
#define AUTOROTATE_ON 1
|
||||||
#define SCR_BACK 3
|
|
||||||
#define RENDER_HOLD 11
|
|
||||||
#define RENDER_SKIP 12
|
|
||||||
#define RENDER_BACK 13
|
|
||||||
|
|
||||||
/*extern int screenlist_action;*/
|
extern bool autorotate; /**< If enabled, screens will rotate */
|
||||||
extern bool autorotate;
|
|
||||||
|
|
||||||
int screenlist_init(void);
|
int screenlist_init(void);
|
||||||
/* Initializes the screenlist. */
|
/* Initializes the screenlist. */
|
||||||
|
|||||||
Reference in New Issue
Block a user