Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2020, 01:49 PM   #1
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
How to determine Kindle orienation?

Hi, wondering if there is a simple way to determine the actual current orientation (landscape/portrait) of a Kindle PW? Maybe lab126? Or at least how do put it into landscape/portrait mode...

Last edited by handyguy; 02-11-2020 at 01:53 PM.
handyguy is offline   Reply With Quote
Old 02-11-2020, 02:17 PM   #2
Tarana
Wizard
Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.Tarana ought to be getting tired of karma fortunes by now.
 
Tarana's Avatar
 
Posts: 3,977
Karma: 38840460
Join Date: Sep 2012
Location: Minneapolis
Device: PWSE, Voyage, K3, HDX, KBasic 7 & 8, Nook Glo3, Echos, Nanos
There is a mode selection in your settings.
Tarana is offline   Reply With Quote
Advert
Old 02-11-2020, 04:24 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
There's a lipc prop that I don't recall right now, check KOReader's orientation code.

That was back in the Oasis day, I assume it hasn't changed too much.
NiLuJe is offline   Reply With Quote
Old 06-08-2020, 07:26 PM   #4
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
Doesn't seem to do anything on a PW4. All orientations return a 'U' from:
lipc-get-prop com.lab126.winmgr accelerometer. Also, could not find any orientation mode in settings, although it is alluded to when within a book, which is not the case here.

Last edited by handyguy; 06-08-2020 at 07:29 PM.
handyguy is offline   Reply With Quote
Old 06-08-2020, 07:55 PM   #5
Deskisamess
Wizard
Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.Deskisamess ought to be getting tired of karma fortunes by now.
 
Deskisamess's Avatar
 
Posts: 2,607
Karma: 42697471
Join Date: Sep 2012
Location: Ohio
Device: iPhone 7+, iPad mini, 2021 iPad Pro 12.9",Paperwhite 6.8"
On a Paperwhite, the landscape orientation is in the Aa menu, only when a book is open. The Home Screen doesn't rotate.
Deskisamess is offline   Reply With Quote
Advert
Old 06-08-2020, 08:03 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Some of those props are RO, IIRC.

Some might be RW but contextual (i.e., won't work outside of a reader Booklet).

But, if you don't actually rely on the UI at all, it's a standard Linux fb ioctl away . (Actual mapping will be device-specific, to a potentially large extent, though [i.e., don't expect 0 to mean UR, on your device or any other]).

(Otherwise, doing that behind the UI/Xorg's back is a great way to shoot oneself in the foot (as in, soft-locking pillow and/or awesome). There's another recent-ish thread about that somewhere around here).

Last edited by NiLuJe; 06-08-2020 at 08:07 PM.
NiLuJe is offline   Reply With Quote
Old 06-09-2020, 06:04 PM   #7
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
I looked at the github code, but was not smart enough to translate to a standard fbink command. Would like to use fbink to write in landscape mode.
handyguy is offline   Reply With Quote
Old 06-09-2020, 06:54 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Code:
┌─(ROOT@kindle:pts/0)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(0.46:57%:00:51:98%:#)── fbink -Mmp "Portrait"                                                                                                                                                                                                                                                                                                       ──(Wed, Jun 10)─┘
[FBInk] Detected a Kindle PaperWhite 2 (0x17 => Pinot on Wario)
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 212 dpi
[FBInk] Variable fb info: 758x1024, 8bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 47 cols, Page size: 64 rows
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 768 bytes
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
Printing string 'Portrait' @ column 0 + 0px, row 0 + 0px (overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, halfway: Y, left padded: Y, right padded: N, clear screen: N, waveform: AUTO, dithering: PASSTHROUGH, nightmode: N, skip refresh: N, font: 0, font scaling: x0)
Next line should start @ row 1

┌─(ROOT@kindle:pts/0)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(0.50:57%:00:51:98%:#)── fbdepth -r $(( ($(fbdepth -o) + 1) & 3 ))                                                                                                                                                                                                                                                                                   ──(Wed, Jun 10)─┘
[FBInk] Detected a Kindle PaperWhite 2 (0x17 => Pinot on Wario)
Variable fb info: 758x1024 (768x4096), 8bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 768 bytes

Current grayscale flag is already 1!

Current bitdepth is already 8bpp!

Switching fb to 8bpp (current bitdepth) @ rotation 0 . . .
Setting bitdepth to 8bpp
Setting grayscale to 1
Setting rotate to 0 (Upright, 0°)
Bitdepth is now 8bpp (grayscale: 1) @ rotate: 0 (Upright, 0°)

Variable fb info: 1024x758 (1024x3072), 8bpp @ rotation: 0 (Upright, 0°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 1024 bytes

┌─(ROOT@kindle:pts/0)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(0.58:57%:00:51:98%:#)── fbink -Mmp "Landscape"                                                                                                                                                                                                                                                                                                      ──(Wed, Jun 10)─┘
[FBInk] Detected a Kindle PaperWhite 2 (0x17 => Pinot on Wario)
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 212 dpi
[FBInk] Variable fb info: 1024x758, 8bpp @ rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8)
[FBInk] Line length: 64 cols, Page size: 47 rows
[FBInk] Horizontal fit is perfect!
[FBInk] Vertical fit isn't perfect, shifting rows down by 3 pixels
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 1024 bytes
[FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background
Printing string 'Landscape' @ column 0 + 0px, row 0 + 0px (overlay: N, no BG: N, no FG: N, inverted: N, flashing: N, centered: Y, halfway: Y, left padded: Y, right padded: N, clear screen: N, waveform: AUTO, dithering: PASSTHROUGH, nightmode: N, skip refresh: N, font: 0, font scaling: x0)
Next line should start @ row 1
(Or -1 for Inverted Landscape. (Or the reverse, here, actually, because) The PW2 EPDC appears to be mirroring, which is a known quirk of some versions of the EPDC).

Last edited by NiLuJe; 06-09-2020 at 07:08 PM.
NiLuJe is offline   Reply With Quote
Old 06-09-2020, 06:59 PM   #9
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Linux FB rotation is expressed in terms of 90° clockwise turns. So +1 or -1 from Portrait is always going to be Landscape.

Don't trust the actual absolute values, as eInk panels are only extremely rarely mounted Upright/Portrait, and some of them respond in weird ways to rotation events (see mirroring, which may not apply to every rotation state).

fbdepth -o returns the current rotation (as would reading /sys/class/graphics/fb0/rotate), and the actual range of valid constants is 0 to 3, so the & 3 gets us a wraparound at 3 (as would % 4, if you're more comfortable with divisions).

Last edited by NiLuJe; 06-09-2020 at 07:02 PM.
NiLuJe is offline   Reply With Quote
Old 06-10-2020, 12:28 AM   #10
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
I'm running FBInk v1.20.3 - is that gonna make a difference?
handyguy is offline   Reply With Quote
Old 06-10-2020, 11:58 AM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I don't recall when I started shipping fbdepth on Kindle, but it was recent-ish.

EDIT: Ah, more recent than -ish, actually ;D. 1.22.1 .
NiLuJe is offline   Reply With Quote
Old 06-10-2020, 01:48 PM   #12
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
i guess i should install the new version!
handyguy is offline   Reply With Quote
Old 06-10-2020, 03:11 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Ah. Just realized that I actually only ship it with USBNet, not the standalone package ^^.
NiLuJe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine if On Device HogDrvr Amazon Kindle 1 12-01-2019 10:57 AM
How to determine if I have a first editiono book? crankypants General Discussions 7 01-15-2016 06:37 AM
How to determine firmware on new Kindle Paperwhite? DuncanWatson Kindle Developer's Corner 4 05-09-2015 12:32 AM
How to Determine if Kindle Fire is Refurbished Staciemcg Kindle Fire 4 07-03-2014 09:36 PM
Gender does determine what device you use. OldGunbunny News 55 08-30-2011 12:48 PM


All times are GMT -4. The time now is 12:51 PM.


MobileRead.com is a privately owned, operated and funded community.